diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57ee8f7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +node_modules/ +env/* +!env/.env.example +*.log +.DS_Store \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..d3893a7 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "printWidth": 80, + "bracketSpacing": true, + "trailingComma": "all", + "semi": true, + "singleQuote": true +} \ No newline at end of file diff --git a/env/.env.example b/env/.env.example new file mode 100644 index 0000000..4c275c9 --- /dev/null +++ b/env/.env.example @@ -0,0 +1,3 @@ +NODE_ENV= +PORT= +DATABASE_URL= \ No newline at end of file diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..0ad2ab1 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,23 @@ +import js from '@eslint/js'; + +export default [ + js.configs.recommended, + { + languageOptions: { + ecmaVersion: 2024, + sourceType: 'module', + globals: { + console: 'readonly', + process: 'readonly', + }, + }, + rules: { + 'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], + 'no-console': 'off', + 'prefer-const': 'error', + 'no-var': 'error', + semi: ['error', 'always'], + quotes: ['error', 'single'], + }, + }, +]; diff --git a/generated/prisma/browser.ts b/generated/prisma/browser.ts new file mode 100644 index 0000000..6dd65b3 --- /dev/null +++ b/generated/prisma/browser.ts @@ -0,0 +1,34 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file should be your main import to use Prisma-related types and utilities in a browser. + * Use it to get access to models, enums, and input types. + * + * This file does not contain a `PrismaClient` class, nor several other helpers that are intended as server-side only. + * See `client.ts` for the standard, server-side entry point. + * + * 🟒 You can import this file directly. + */ + +import * as Prisma from './internal/prismaNamespaceBrowser.ts' +export { Prisma } +export * as $Enums from './enums.ts' +export * from './enums.ts'; +/** + * Model Product + * + */ +export type Product = Prisma.ProductModel +/** + * Model Article + * + */ +export type Article = Prisma.ArticleModel +/** + * Model Comment + * + */ +export type Comment = Prisma.CommentModel diff --git a/generated/prisma/client.ts b/generated/prisma/client.ts new file mode 100644 index 0000000..4e6cea2 --- /dev/null +++ b/generated/prisma/client.ts @@ -0,0 +1,56 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types. + * If you're looking for something you can import in the client-side of your application, please refer to the `browser.ts` file instead. + * + * 🟒 You can import this file directly. + */ + +import * as process from 'node:process' +import * as path from 'node:path' +import { fileURLToPath } from 'node:url' +globalThis['__dirname'] = path.dirname(fileURLToPath(import.meta.url)) + +import * as runtime from "@prisma/client/runtime/client" +import * as $Enums from "./enums.ts" +import * as $Class from "./internal/class.ts" +import * as Prisma from "./internal/prismaNamespace.ts" + +export * as $Enums from './enums.ts' +export * from "./enums.ts" +/** + * ## Prisma Client + * + * Type-safe database client for TypeScript + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Products + * const products = await prisma.product.findMany() + * ``` + * + * Read more in our [docs](https://pris.ly/d/client). + */ +export const PrismaClient = $Class.getPrismaClientClass() +export type PrismaClient = $Class.PrismaClient +export { Prisma } + +/** + * Model Product + * + */ +export type Product = Prisma.ProductModel +/** + * Model Article + * + */ +export type Article = Prisma.ArticleModel +/** + * Model Comment + * + */ +export type Comment = Prisma.CommentModel diff --git a/generated/prisma/commonInputTypes.ts b/generated/prisma/commonInputTypes.ts new file mode 100644 index 0000000..0a88fc0 --- /dev/null +++ b/generated/prisma/commonInputTypes.ts @@ -0,0 +1,276 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports various common sort, input & filter types that are not directly linked to a particular model. + * + * 🟒 You can import this file directly. + */ + +import type * as runtime from "@prisma/client/runtime/client" +import * as $Enums from "./enums.ts" +import type * as Prisma from "./internal/prismaNamespace.ts" + + +export type StringFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + mode?: Prisma.QueryMode + not?: Prisma.NestedStringFilter<$PrismaModel> | string +} + +export type IntFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntFilter<$PrismaModel> | number +} + +export type StringNullableFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + mode?: Prisma.QueryMode + not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null +} + +export type DateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string +} + +export type SortOrderInput = { + sort: Prisma.SortOrder + nulls?: Prisma.NullsOrder +} + +export type StringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + mode?: Prisma.QueryMode + not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedStringFilter<$PrismaModel> + _max?: Prisma.NestedStringFilter<$PrismaModel> +} + +export type IntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: Prisma.NestedIntFilter<$PrismaModel> + _avg?: Prisma.NestedFloatFilter<$PrismaModel> + _sum?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedIntFilter<$PrismaModel> + _max?: Prisma.NestedIntFilter<$PrismaModel> +} + +export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + mode?: Prisma.QueryMode + not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedStringNullableFilter<$PrismaModel> + _max?: Prisma.NestedStringNullableFilter<$PrismaModel> +} + +export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedDateTimeFilter<$PrismaModel> + _max?: Prisma.NestedDateTimeFilter<$PrismaModel> +} + +export type NestedStringFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringFilter<$PrismaModel> | string +} + +export type NestedIntFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntFilter<$PrismaModel> | number +} + +export type NestedStringNullableFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null +} + +export type NestedDateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string +} + +export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedStringFilter<$PrismaModel> + _max?: Prisma.NestedStringFilter<$PrismaModel> +} + +export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: Prisma.NestedIntFilter<$PrismaModel> + _avg?: Prisma.NestedFloatFilter<$PrismaModel> + _sum?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedIntFilter<$PrismaModel> + _max?: Prisma.NestedIntFilter<$PrismaModel> +} + +export type NestedFloatFilter<$PrismaModel = never> = { + equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListFloatFieldRefInput<$PrismaModel> + lt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + lte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + not?: Prisma.NestedFloatFilter<$PrismaModel> | number +} + +export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedStringNullableFilter<$PrismaModel> + _max?: Prisma.NestedStringNullableFilter<$PrismaModel> +} + +export type NestedIntNullableFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> | null + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null +} + +export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedDateTimeFilter<$PrismaModel> + _max?: Prisma.NestedDateTimeFilter<$PrismaModel> +} + + diff --git a/generated/prisma/enums.ts b/generated/prisma/enums.ts new file mode 100644 index 0000000..043572d --- /dev/null +++ b/generated/prisma/enums.ts @@ -0,0 +1,15 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* +* This file exports all enum related types from the schema. +* +* 🟒 You can import this file directly. +*/ + + + +// This file is empty because there are no enums in the schema. +export {} diff --git a/generated/prisma/internal/class.ts b/generated/prisma/internal/class.ts new file mode 100644 index 0000000..3bea913 --- /dev/null +++ b/generated/prisma/internal/class.ts @@ -0,0 +1,212 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * WARNING: This is an internal file that is subject to change! + * + * πŸ›‘ Under no circumstances should you import this file directly! πŸ›‘ + * + * Please import the `PrismaClient` class from the `client.ts` file instead. + */ + +import * as runtime from "@prisma/client/runtime/client" +import type * as Prisma from "./prismaNamespace.ts" + + +const config: runtime.GetPrismaClientConfig = { + "previewFeatures": [], + "clientVersion": "7.3.0", + "engineVersion": "9d6ad21cbbceab97458517b147a6a09ff43aa735", + "activeProvider": "postgresql", + "inlineSchema": "// Prisma Client 생성 μ„€μ •\ngenerator client {\n provider = \"prisma-client\"\n output = \"../generated/prisma\"\n}\n\n// λ°μ΄ν„°λ² μ΄μŠ€ μ—°κ²° μ„€μ •\ndatasource db {\n provider = \"postgresql\"\n}\n\nmodel Product {\n id String @id @default(cuid())\n name String\n description String\n price Int\n tags String[]\n images String[]\n ownerId String?\n favoriteCount Int @default(0)\n comments Comment[]\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Article {\n id String @id @default(cuid())\n title String\n content String\n comments Comment[]\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Comment {\n id String @id @default(cuid())\n content String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n article Article? @relation(fields: [articleId], references: [id], onDelete: Cascade)\n articleId String?\n product Product? @relation(fields: [productId], references: [id], onDelete: Cascade)\n productId String?\n}\n", + "runtimeDataModel": { + "models": {}, + "enums": {}, + "types": {} + } +} + +config.runtimeDataModel = JSON.parse("{\"models\":{\"Product\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"price\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"tags\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"images\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ownerId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"favoriteCount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comments\",\"kind\":\"object\",\"type\":\"Comment\",\"relationName\":\"CommentToProduct\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Article\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"content\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"comments\",\"kind\":\"object\",\"type\":\"Comment\",\"relationName\":\"ArticleToComment\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Comment\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"content\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"article\",\"kind\":\"object\",\"type\":\"Article\",\"relationName\":\"ArticleToComment\"},{\"name\":\"articleId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"CommentToProduct\"},{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}") + +async function decodeBase64AsWasm(wasmBase64: string): Promise { + const { Buffer } = await import('node:buffer') + const wasmArray = Buffer.from(wasmBase64, 'base64') + return new WebAssembly.Module(wasmArray) +} + +config.compilerWasm = { + getRuntime: async () => await import("@prisma/client/runtime/query_compiler_fast_bg.postgresql.mjs"), + + getQueryCompilerWasmModule: async () => { + const { wasm } = await import("@prisma/client/runtime/query_compiler_fast_bg.postgresql.wasm-base64.mjs") + return await decodeBase64AsWasm(wasm) + }, + + importName: "./query_compiler_fast_bg.js" +} + + + +export type LogOptions = + 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array ? Prisma.GetEvents : never : never + +export interface PrismaClientConstructor { + /** + * ## Prisma Client + * + * Type-safe database client for TypeScript + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Products + * const products = await prisma.product.findMany() + * ``` + * + * Read more in our [docs](https://pris.ly/d/client). + */ + + new < + Options extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, + LogOpts extends LogOptions = LogOptions, + OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends { omit: infer U } ? U : Prisma.PrismaClientOptions['omit'], + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs + >(options: Prisma.Subset ): PrismaClient +} + +/** + * ## Prisma Client + * + * Type-safe database client for TypeScript + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Products + * const products = await prisma.product.findMany() + * ``` + * + * Read more in our [docs](https://pris.ly/d/client). + */ + +export interface PrismaClient< + in LogOpts extends Prisma.LogLevel = never, + in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = undefined, + in out ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs +> { + [K: symbol]: { types: Prisma.TypeMap['other'] } + + $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient; + + /** + * Connect with the database + */ + $connect(): runtime.Types.Utils.JsPromise; + + /** + * Disconnect from the database + */ + $disconnect(): runtime.Types.Utils.JsPromise; + +/** + * Executes a prepared raw query and returns the number of affected rows. + * @example + * ``` + * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};` + * ``` + * + * Read more in our [docs](https://pris.ly/d/raw-queries). + */ + $executeRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Executes a raw query and returns the number of affected rows. + * Susceptible to SQL injections, see documentation. + * @example + * ``` + * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') + * ``` + * + * Read more in our [docs](https://pris.ly/d/raw-queries). + */ + $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a prepared raw query and returns the `SELECT` data. + * @example + * ``` + * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};` + * ``` + * + * Read more in our [docs](https://pris.ly/d/raw-queries). + */ + $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a raw query and returns the `SELECT` data. + * Susceptible to SQL injections, see documentation. + * @example + * ``` + * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') + * ``` + * + * Read more in our [docs](https://pris.ly/d/raw-queries). + */ + $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + + + /** + * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. + * @example + * ``` + * const [george, bob, alice] = await prisma.$transaction([ + * prisma.user.create({ data: { name: 'George' } }), + * prisma.user.create({ data: { name: 'Bob' } }), + * prisma.user.create({ data: { name: 'Alice' } }), + * ]) + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). + */ + $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise> + + $transaction(fn: (prisma: Omit) => runtime.Types.Utils.JsPromise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise + + $extends: runtime.Types.Extensions.ExtendsHook<"extends", Prisma.TypeMapCb, ExtArgs, runtime.Types.Utils.Call, { + extArgs: ExtArgs + }>> + + /** + * `prisma.product`: Exposes CRUD operations for the **Product** model. + * Example usage: + * ```ts + * // Fetch zero or more Products + * const products = await prisma.product.findMany() + * ``` + */ + get product(): Prisma.ProductDelegate; + + /** + * `prisma.article`: Exposes CRUD operations for the **Article** model. + * Example usage: + * ```ts + * // Fetch zero or more Articles + * const articles = await prisma.article.findMany() + * ``` + */ + get article(): Prisma.ArticleDelegate; + + /** + * `prisma.comment`: Exposes CRUD operations for the **Comment** model. + * Example usage: + * ```ts + * // Fetch zero or more Comments + * const comments = await prisma.comment.findMany() + * ``` + */ + get comment(): Prisma.CommentDelegate; +} + +export function getPrismaClientClass(): PrismaClientConstructor { + return runtime.getPrismaClient(config) as unknown as PrismaClientConstructor +} diff --git a/generated/prisma/internal/prismaNamespace.ts b/generated/prisma/internal/prismaNamespace.ts new file mode 100644 index 0000000..f3aed99 --- /dev/null +++ b/generated/prisma/internal/prismaNamespace.ts @@ -0,0 +1,954 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * WARNING: This is an internal file that is subject to change! + * + * πŸ›‘ Under no circumstances should you import this file directly! πŸ›‘ + * + * All exports from this file are wrapped under a `Prisma` namespace object in the client.ts file. + * While this enables partial backward compatibility, it is not part of the stable public API. + * + * If you are looking for your Models, Enums, and Input Types, please import them from the respective + * model files in the `model` directory! + */ + +import * as runtime from "@prisma/client/runtime/client" +import type * as Prisma from "../models.ts" +import { type PrismaClient } from "./class.ts" + +export type * from '../models.ts' + +export type DMMF = typeof runtime.DMMF + +export type PrismaPromise = runtime.Types.Public.PrismaPromise + +/** + * Prisma Errors + */ + +export const PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError +export type PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError + +export const PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError +export type PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError + +export const PrismaClientRustPanicError = runtime.PrismaClientRustPanicError +export type PrismaClientRustPanicError = runtime.PrismaClientRustPanicError + +export const PrismaClientInitializationError = runtime.PrismaClientInitializationError +export type PrismaClientInitializationError = runtime.PrismaClientInitializationError + +export const PrismaClientValidationError = runtime.PrismaClientValidationError +export type PrismaClientValidationError = runtime.PrismaClientValidationError + +/** + * Re-export of sql-template-tag + */ +export const sql = runtime.sqltag +export const empty = runtime.empty +export const join = runtime.join +export const raw = runtime.raw +export const Sql = runtime.Sql +export type Sql = runtime.Sql + + + +/** + * Decimal.js + */ +export const Decimal = runtime.Decimal +export type Decimal = runtime.Decimal + +export type DecimalJsLike = runtime.DecimalJsLike + +/** +* Extensions +*/ +export type Extension = runtime.Types.Extensions.UserArgs +export const getExtensionContext = runtime.Extensions.getExtensionContext +export type Args = runtime.Types.Public.Args +export type Payload = runtime.Types.Public.Payload +export type Result = runtime.Types.Public.Result +export type Exact = runtime.Types.Public.Exact + +export type PrismaVersion = { + client: string + engine: string +} + +/** + * Prisma Client JS version: 7.3.0 + * Query Engine version: 9d6ad21cbbceab97458517b147a6a09ff43aa735 + */ +export const prismaVersion: PrismaVersion = { + client: "7.3.0", + engine: "9d6ad21cbbceab97458517b147a6a09ff43aa735" +} + +/** + * Utility Types + */ + +export type Bytes = runtime.Bytes +export type JsonObject = runtime.JsonObject +export type JsonArray = runtime.JsonArray +export type JsonValue = runtime.JsonValue +export type InputJsonObject = runtime.InputJsonObject +export type InputJsonArray = runtime.InputJsonArray +export type InputJsonValue = runtime.InputJsonValue + + +export const NullTypes = { + DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull), + JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull), + AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull), +} +/** + * Helper for filtering JSON entries that have `null` on the database (empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const DbNull = runtime.DbNull + +/** + * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const JsonNull = runtime.JsonNull + +/** + * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const AnyNull = runtime.AnyNull + + +type SelectAndInclude = { + select: any + include: any +} + +type SelectAndOmit = { + select: any + omit: any +} + +/** + * From T, pick a set of properties whose keys are in the union K + */ +type Prisma__Pick = { + [P in K]: T[P]; +}; + +export type Enumerable = T | Array; + +/** + * Subset + * @desc From `T` pick properties that exist in `U`. Simple version of Intersection + */ +export type Subset = { + [key in keyof T]: key extends keyof U ? T[key] : never; +}; + +/** + * SelectSubset + * @desc From `T` pick properties that exist in `U`. Simple version of Intersection. + * Additionally, it validates, if both select and include are present. If the case, it errors. + */ +export type SelectSubset = { + [key in keyof T]: key extends keyof U ? T[key] : never +} & + (T extends SelectAndInclude + ? 'Please either choose `select` or `include`.' + : T extends SelectAndOmit + ? 'Please either choose `select` or `omit`.' + : {}) + +/** + * Subset + Intersection + * @desc From `T` pick properties that exist in `U` and intersect `K` + */ +export type SubsetIntersection = { + [key in keyof T]: key extends keyof U ? T[key] : never +} & + K + +type Without = { [P in Exclude]?: never }; + +/** + * XOR is needed to have a real mutually exclusive union type + * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types + */ +export type XOR = + T extends object ? + U extends object ? + (Without & U) | (Without & T) + : U : T + + +/** + * Is T a Record? + */ +type IsObject = T extends Array +? False +: T extends Date +? False +: T extends Uint8Array +? False +: T extends BigInt +? False +: T extends object +? True +: False + + +/** + * If it's T[], return T + */ +export type UnEnumerate = T extends Array ? U : T + +/** + * From ts-toolbelt + */ + +type __Either = Omit & + { + // Merge all but K + [P in K]: Prisma__Pick // With K possibilities + }[K] + +type EitherStrict = Strict<__Either> + +type EitherLoose = ComputeRaw<__Either> + +type _Either< + O extends object, + K extends Key, + strict extends Boolean +> = { + 1: EitherStrict + 0: EitherLoose +}[strict] + +export type Either< + O extends object, + K extends Key, + strict extends Boolean = 1 +> = O extends unknown ? _Either : never + +export type Union = any + +export type PatchUndefined = { + [K in keyof O]: O[K] extends undefined ? At : O[K] +} & {} + +/** Helper Types for "Merge" **/ +export type IntersectOf = ( + U extends unknown ? (k: U) => void : never +) extends (k: infer I) => void + ? I + : never + +export type Overwrite = { + [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; +} & {}; + +type _Merge = IntersectOf; +}>>; + +type Key = string | number | symbol; +type AtStrict = O[K & keyof O]; +type AtLoose = O extends unknown ? AtStrict : never; +export type At = { + 1: AtStrict; + 0: AtLoose; +}[strict]; + +export type ComputeRaw = A extends Function ? A : { + [K in keyof A]: A[K]; +} & {}; + +export type OptionalFlat = { + [K in keyof O]?: O[K]; +} & {}; + +type _Record = { + [P in K]: T; +}; + +// cause typescript not to expand types and preserve names +type NoExpand = T extends unknown ? T : never; + +// this type assumes the passed object is entirely optional +export type AtLeast = NoExpand< + O extends unknown + ? | (K extends keyof O ? { [P in K]: O[P] } & O : O) + | {[P in keyof O as P extends K ? P : never]-?: O[P]} & O + : never>; + +type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never; + +export type Strict = ComputeRaw<_Strict>; +/** End Helper Types for "Merge" **/ + +export type Merge = ComputeRaw<_Merge>>; + +export type Boolean = True | False + +export type True = 1 + +export type False = 0 + +export type Not = { + 0: 1 + 1: 0 +}[B] + +export type Extends = [A1] extends [never] + ? 0 // anything `never` is false + : A1 extends A2 + ? 1 + : 0 + +export type Has = Not< + Extends, U1> +> + +export type Or = { + 0: { + 0: 0 + 1: 1 + } + 1: { + 0: 1 + 1: 1 + } +}[B1][B2] + +export type Keys = U extends unknown ? keyof U : never + +export type GetScalarType = O extends object ? { + [P in keyof T]: P extends keyof O + ? O[P] + : never +} : never + +type FieldPaths< + T, + U = Omit +> = IsObject extends True ? U : T + +export type GetHavingFields = { + [K in keyof T]: Or< + Or, Extends<'AND', K>>, + Extends<'NOT', K> + > extends True + ? // infer is only needed to not hit TS limit + // based on the brilliant idea of Pierre-Antoine Mills + // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437 + T[K] extends infer TK + ? GetHavingFields extends object ? Merge> : never> + : never + : {} extends FieldPaths + ? never + : K +}[keyof T] + +/** + * Convert tuple to union + */ +type _TupleToUnion = T extends (infer E)[] ? E : never +type TupleToUnion = _TupleToUnion +export type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T + +/** + * Like `Pick`, but additionally can also accept an array of keys + */ +export type PickEnumerable | keyof T> = Prisma__Pick> + +/** + * Exclude all keys with underscores + */ +export type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T + + +export type FieldRef = runtime.FieldRef + +type FieldRefInputType = Model extends never ? never : FieldRef + + +export const ModelName = { + Product: 'Product', + Article: 'Article', + Comment: 'Comment' +} as const + +export type ModelName = (typeof ModelName)[keyof typeof ModelName] + + + +export interface TypeMapCb extends runtime.Types.Utils.Fn<{extArgs: runtime.Types.Extensions.InternalArgs }, runtime.Types.Utils.Record> { + returns: TypeMap +} + +export type TypeMap = { + globalOmitOptions: { + omit: GlobalOmitOptions + } + meta: { + modelProps: "product" | "article" | "comment" + txIsolationLevel: TransactionIsolationLevel + } + model: { + Product: { + payload: Prisma.$ProductPayload + fields: Prisma.ProductFieldRefs + operations: { + findUnique: { + args: Prisma.ProductFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ProductFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.ProductFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ProductFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.ProductFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.ProductCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.ProductCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ProductCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.ProductDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.ProductUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ProductDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ProductUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ProductUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ProductUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.ProductAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.ProductGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.ProductCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + Article: { + payload: Prisma.$ArticlePayload + fields: Prisma.ArticleFieldRefs + operations: { + findUnique: { + args: Prisma.ArticleFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ArticleFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.ArticleFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ArticleFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.ArticleFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.ArticleCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.ArticleCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ArticleCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.ArticleDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.ArticleUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ArticleDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ArticleUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ArticleUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ArticleUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.ArticleAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.ArticleGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.ArticleCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + Comment: { + payload: Prisma.$CommentPayload + fields: Prisma.CommentFieldRefs + operations: { + findUnique: { + args: Prisma.CommentFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.CommentFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.CommentFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.CommentFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.CommentFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.CommentCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.CommentCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.CommentCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.CommentDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.CommentUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.CommentDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.CommentUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.CommentUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.CommentUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.CommentAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.CommentGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.CommentCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + } +} & { + other: { + payload: any + operations: { + $executeRaw: { + args: [query: TemplateStringsArray | Sql, ...values: any[]], + result: any + } + $executeRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + $queryRaw: { + args: [query: TemplateStringsArray | Sql, ...values: any[]], + result: any + } + $queryRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + } + } +} + +/** + * Enums + */ + +export const TransactionIsolationLevel = runtime.makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +} as const) + +export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + + +export const ProductScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + price: 'price', + tags: 'tags', + images: 'images', + ownerId: 'ownerId', + favoriteCount: 'favoriteCount', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum] + + +export const ArticleScalarFieldEnum = { + id: 'id', + title: 'title', + content: 'content', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type ArticleScalarFieldEnum = (typeof ArticleScalarFieldEnum)[keyof typeof ArticleScalarFieldEnum] + + +export const CommentScalarFieldEnum = { + id: 'id', + content: 'content', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + articleId: 'articleId', + productId: 'productId' +} as const + +export type CommentScalarFieldEnum = (typeof CommentScalarFieldEnum)[keyof typeof CommentScalarFieldEnum] + + +export const SortOrder = { + asc: 'asc', + desc: 'desc' +} as const + +export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] + + +export const QueryMode = { + default: 'default', + insensitive: 'insensitive' +} as const + +export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] + + +export const NullsOrder = { + first: 'first', + last: 'last' +} as const + +export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + + + +/** + * Field references + */ + + +/** + * Reference to a field of type 'String' + */ +export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> + + + +/** + * Reference to a field of type 'String[]' + */ +export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'> + + + +/** + * Reference to a field of type 'Int' + */ +export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> + + + +/** + * Reference to a field of type 'Int[]' + */ +export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'> + + + +/** + * Reference to a field of type 'DateTime' + */ +export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'> + + + +/** + * Reference to a field of type 'DateTime[]' + */ +export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'> + + + +/** + * Reference to a field of type 'Float' + */ +export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'> + + + +/** + * Reference to a field of type 'Float[]' + */ +export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'> + + +/** + * Batch Payload for updateMany & deleteMany & createMany + */ +export type BatchPayload = { + count: number +} + +export const defineExtension = runtime.Extensions.defineExtension as unknown as runtime.Types.Extensions.ExtendsHook<"define", TypeMapCb, runtime.Types.Extensions.DefaultArgs> +export type DefaultPrismaClient = PrismaClient +export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' +export type PrismaClientOptions = ({ + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-pg`. + */ + adapter: runtime.SqlDriverAdapterFactory + accelerateUrl?: never +} | { + /** + * Prisma Accelerate URL allowing the client to connect through Accelerate instead of a direct database. + */ + accelerateUrl: string + adapter?: never +}) & { + /** + * @default "colorless" + */ + errorFormat?: ErrorFormat + /** + * @example + * ``` + * // Shorthand for `emit: 'stdout'` + * log: ['query', 'info', 'warn', 'error'] + * + * // Emit as events only + * log: [ + * { emit: 'event', level: 'query' }, + * { emit: 'event', level: 'info' }, + * { emit: 'event', level: 'warn' } + * { emit: 'event', level: 'error' } + * ] + * + * / Emit as events and log to stdout + * og: [ + * { emit: 'stdout', level: 'query' }, + * { emit: 'stdout', level: 'info' }, + * { emit: 'stdout', level: 'warn' } + * { emit: 'stdout', level: 'error' } + * + * ``` + * Read more in our [docs](https://pris.ly/d/logging). + */ + log?: (LogLevel | LogDefinition)[] + /** + * The default values for transactionOptions + * maxWait ?= 2000 + * timeout ?= 5000 + */ + transactionOptions?: { + maxWait?: number + timeout?: number + isolationLevel?: TransactionIsolationLevel + } + /** + * Global configuration for omitting model fields by default. + * + * @example + * ``` + * const prisma = new PrismaClient({ + * omit: { + * user: { + * password: true + * } + * } + * }) + * ``` + */ + omit?: GlobalOmitConfig + /** + * SQL commenter plugins that add metadata to SQL queries as comments. + * Comments follow the sqlcommenter format: https://google.github.io/sqlcommenter/ + * + * @example + * ``` + * const prisma = new PrismaClient({ + * adapter, + * comments: [ + * traceContext(), + * queryInsights(), + * ], + * }) + * ``` + */ + comments?: runtime.SqlCommenterPlugin[] +} +export type GlobalOmitConfig = { + product?: Prisma.ProductOmit + article?: Prisma.ArticleOmit + comment?: Prisma.CommentOmit +} + +/* Types for Logging */ +export type LogLevel = 'info' | 'query' | 'warn' | 'error' +export type LogDefinition = { + level: LogLevel + emit: 'stdout' | 'event' +} + +export type CheckIsLogLevel = T extends LogLevel ? T : never; + +export type GetLogType = CheckIsLogLevel< + T extends LogDefinition ? T['level'] : T +>; + +export type GetEvents = T extends Array + ? GetLogType + : never; + +export type QueryEvent = { + timestamp: Date + query: string + params: string + duration: number + target: string +} + +export type LogEvent = { + timestamp: Date + message: string + target: string +} +/* End Types for Logging */ + + +export type PrismaAction = + | 'findUnique' + | 'findUniqueOrThrow' + | 'findMany' + | 'findFirst' + | 'findFirstOrThrow' + | 'create' + | 'createMany' + | 'createManyAndReturn' + | 'update' + | 'updateMany' + | 'updateManyAndReturn' + | 'upsert' + | 'delete' + | 'deleteMany' + | 'executeRaw' + | 'queryRaw' + | 'aggregate' + | 'count' + | 'runCommandRaw' + | 'findRaw' + | 'groupBy' + +/** + * `PrismaClient` proxy available in interactive transactions. + */ +export type TransactionClient = Omit + diff --git a/generated/prisma/internal/prismaNamespaceBrowser.ts b/generated/prisma/internal/prismaNamespaceBrowser.ts new file mode 100644 index 0000000..0912c44 --- /dev/null +++ b/generated/prisma/internal/prismaNamespaceBrowser.ts @@ -0,0 +1,136 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * WARNING: This is an internal file that is subject to change! + * + * πŸ›‘ Under no circumstances should you import this file directly! πŸ›‘ + * + * All exports from this file are wrapped under a `Prisma` namespace object in the browser.ts file. + * While this enables partial backward compatibility, it is not part of the stable public API. + * + * If you are looking for your Models, Enums, and Input Types, please import them from the respective + * model files in the `model` directory! + */ + +import * as runtime from "@prisma/client/runtime/index-browser" + +export type * from '../models.ts' +export type * from './prismaNamespace.ts' + +export const Decimal = runtime.Decimal + + +export const NullTypes = { + DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull), + JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull), + AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull), +} +/** + * Helper for filtering JSON entries that have `null` on the database (empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const DbNull = runtime.DbNull + +/** + * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const JsonNull = runtime.JsonNull + +/** + * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const AnyNull = runtime.AnyNull + + +export const ModelName = { + Product: 'Product', + Article: 'Article', + Comment: 'Comment' +} as const + +export type ModelName = (typeof ModelName)[keyof typeof ModelName] + +/* + * Enums + */ + +export const TransactionIsolationLevel = runtime.makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +} as const) + +export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + + +export const ProductScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + price: 'price', + tags: 'tags', + images: 'images', + ownerId: 'ownerId', + favoriteCount: 'favoriteCount', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum] + + +export const ArticleScalarFieldEnum = { + id: 'id', + title: 'title', + content: 'content', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type ArticleScalarFieldEnum = (typeof ArticleScalarFieldEnum)[keyof typeof ArticleScalarFieldEnum] + + +export const CommentScalarFieldEnum = { + id: 'id', + content: 'content', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + articleId: 'articleId', + productId: 'productId' +} as const + +export type CommentScalarFieldEnum = (typeof CommentScalarFieldEnum)[keyof typeof CommentScalarFieldEnum] + + +export const SortOrder = { + asc: 'asc', + desc: 'desc' +} as const + +export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] + + +export const QueryMode = { + default: 'default', + insensitive: 'insensitive' +} as const + +export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] + + +export const NullsOrder = { + first: 'first', + last: 'last' +} as const + +export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + diff --git a/generated/prisma/models.ts b/generated/prisma/models.ts new file mode 100644 index 0000000..3b41a1b --- /dev/null +++ b/generated/prisma/models.ts @@ -0,0 +1,14 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This is a barrel export file for all models and their related types. + * + * 🟒 You can import this file directly. + */ +export type * from './models/Product.ts' +export type * from './models/Article.ts' +export type * from './models/Comment.ts' +export type * from './commonInputTypes.ts' \ No newline at end of file diff --git a/generated/prisma/models/Article.ts b/generated/prisma/models/Article.ts new file mode 100644 index 0000000..accc7ac --- /dev/null +++ b/generated/prisma/models/Article.ts @@ -0,0 +1,1324 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Article` model and its related types. + * + * 🟒 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums.ts" +import type * as Prisma from "../internal/prismaNamespace.ts" + +/** + * Model Article + * + */ +export type ArticleModel = runtime.Types.Result.DefaultSelection + +export type AggregateArticle = { + _count: ArticleCountAggregateOutputType | null + _min: ArticleMinAggregateOutputType | null + _max: ArticleMaxAggregateOutputType | null +} + +export type ArticleMinAggregateOutputType = { + id: string | null + title: string | null + content: string | null + createdAt: Date | null + updatedAt: Date | null +} + +export type ArticleMaxAggregateOutputType = { + id: string | null + title: string | null + content: string | null + createdAt: Date | null + updatedAt: Date | null +} + +export type ArticleCountAggregateOutputType = { + id: number + title: number + content: number + createdAt: number + updatedAt: number + _all: number +} + + +export type ArticleMinAggregateInputType = { + id?: true + title?: true + content?: true + createdAt?: true + updatedAt?: true +} + +export type ArticleMaxAggregateInputType = { + id?: true + title?: true + content?: true + createdAt?: true + updatedAt?: true +} + +export type ArticleCountAggregateInputType = { + id?: true + title?: true + content?: true + createdAt?: true + updatedAt?: true + _all?: true +} + +export type ArticleAggregateArgs = { + /** + * Filter which Article to aggregate. + */ + where?: Prisma.ArticleWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Articles to fetch. + */ + orderBy?: Prisma.ArticleOrderByWithRelationInput | Prisma.ArticleOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.ArticleWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `Β±n` Articles from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Articles. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Articles + **/ + _count?: true | ArticleCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ArticleMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ArticleMaxAggregateInputType +} + +export type GetArticleAggregateType = { + [P in keyof T & keyof AggregateArticle]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type ArticleGroupByArgs = { + where?: Prisma.ArticleWhereInput + orderBy?: Prisma.ArticleOrderByWithAggregationInput | Prisma.ArticleOrderByWithAggregationInput[] + by: Prisma.ArticleScalarFieldEnum[] | Prisma.ArticleScalarFieldEnum + having?: Prisma.ArticleScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ArticleCountAggregateInputType | true + _min?: ArticleMinAggregateInputType + _max?: ArticleMaxAggregateInputType +} + +export type ArticleGroupByOutputType = { + id: string + title: string + content: string + createdAt: Date + updatedAt: Date + _count: ArticleCountAggregateOutputType | null + _min: ArticleMinAggregateOutputType | null + _max: ArticleMaxAggregateOutputType | null +} + +type GetArticleGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof ArticleGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type ArticleWhereInput = { + AND?: Prisma.ArticleWhereInput | Prisma.ArticleWhereInput[] + OR?: Prisma.ArticleWhereInput[] + NOT?: Prisma.ArticleWhereInput | Prisma.ArticleWhereInput[] + id?: Prisma.StringFilter<"Article"> | string + title?: Prisma.StringFilter<"Article"> | string + content?: Prisma.StringFilter<"Article"> | string + createdAt?: Prisma.DateTimeFilter<"Article"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Article"> | Date | string + comments?: Prisma.CommentListRelationFilter +} + +export type ArticleOrderByWithRelationInput = { + id?: Prisma.SortOrder + title?: Prisma.SortOrder + content?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + comments?: Prisma.CommentOrderByRelationAggregateInput +} + +export type ArticleWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: Prisma.ArticleWhereInput | Prisma.ArticleWhereInput[] + OR?: Prisma.ArticleWhereInput[] + NOT?: Prisma.ArticleWhereInput | Prisma.ArticleWhereInput[] + title?: Prisma.StringFilter<"Article"> | string + content?: Prisma.StringFilter<"Article"> | string + createdAt?: Prisma.DateTimeFilter<"Article"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Article"> | Date | string + comments?: Prisma.CommentListRelationFilter +}, "id"> + +export type ArticleOrderByWithAggregationInput = { + id?: Prisma.SortOrder + title?: Prisma.SortOrder + content?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + _count?: Prisma.ArticleCountOrderByAggregateInput + _max?: Prisma.ArticleMaxOrderByAggregateInput + _min?: Prisma.ArticleMinOrderByAggregateInput +} + +export type ArticleScalarWhereWithAggregatesInput = { + AND?: Prisma.ArticleScalarWhereWithAggregatesInput | Prisma.ArticleScalarWhereWithAggregatesInput[] + OR?: Prisma.ArticleScalarWhereWithAggregatesInput[] + NOT?: Prisma.ArticleScalarWhereWithAggregatesInput | Prisma.ArticleScalarWhereWithAggregatesInput[] + id?: Prisma.StringWithAggregatesFilter<"Article"> | string + title?: Prisma.StringWithAggregatesFilter<"Article"> | string + content?: Prisma.StringWithAggregatesFilter<"Article"> | string + createdAt?: Prisma.DateTimeWithAggregatesFilter<"Article"> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Article"> | Date | string +} + +export type ArticleCreateInput = { + id?: string + title: string + content: string + createdAt?: Date | string + updatedAt?: Date | string + comments?: Prisma.CommentCreateNestedManyWithoutArticleInput +} + +export type ArticleUncheckedCreateInput = { + id?: string + title: string + content: string + createdAt?: Date | string + updatedAt?: Date | string + comments?: Prisma.CommentUncheckedCreateNestedManyWithoutArticleInput +} + +export type ArticleUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + title?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + comments?: Prisma.CommentUpdateManyWithoutArticleNestedInput +} + +export type ArticleUncheckedUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + title?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + comments?: Prisma.CommentUncheckedUpdateManyWithoutArticleNestedInput +} + +export type ArticleCreateManyInput = { + id?: string + title: string + content: string + createdAt?: Date | string + updatedAt?: Date | string +} + +export type ArticleUpdateManyMutationInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + title?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type ArticleUncheckedUpdateManyInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + title?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type ArticleCountOrderByAggregateInput = { + id?: Prisma.SortOrder + title?: Prisma.SortOrder + content?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type ArticleMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + title?: Prisma.SortOrder + content?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type ArticleMinOrderByAggregateInput = { + id?: Prisma.SortOrder + title?: Prisma.SortOrder + content?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type ArticleNullableScalarRelationFilter = { + is?: Prisma.ArticleWhereInput | null + isNot?: Prisma.ArticleWhereInput | null +} + +export type ArticleCreateNestedOneWithoutCommentsInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.ArticleCreateOrConnectWithoutCommentsInput + connect?: Prisma.ArticleWhereUniqueInput +} + +export type ArticleUpdateOneWithoutCommentsNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.ArticleCreateOrConnectWithoutCommentsInput + upsert?: Prisma.ArticleUpsertWithoutCommentsInput + disconnect?: Prisma.ArticleWhereInput | boolean + delete?: Prisma.ArticleWhereInput | boolean + connect?: Prisma.ArticleWhereUniqueInput + update?: Prisma.XOR, Prisma.ArticleUncheckedUpdateWithoutCommentsInput> +} + +export type ArticleCreateWithoutCommentsInput = { + id?: string + title: string + content: string + createdAt?: Date | string + updatedAt?: Date | string +} + +export type ArticleUncheckedCreateWithoutCommentsInput = { + id?: string + title: string + content: string + createdAt?: Date | string + updatedAt?: Date | string +} + +export type ArticleCreateOrConnectWithoutCommentsInput = { + where: Prisma.ArticleWhereUniqueInput + create: Prisma.XOR +} + +export type ArticleUpsertWithoutCommentsInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.ArticleWhereInput +} + +export type ArticleUpdateToOneWithWhereWithoutCommentsInput = { + where?: Prisma.ArticleWhereInput + data: Prisma.XOR +} + +export type ArticleUpdateWithoutCommentsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + title?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type ArticleUncheckedUpdateWithoutCommentsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + title?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + + +/** + * Count Type ArticleCountOutputType + */ + +export type ArticleCountOutputType = { + comments: number +} + +export type ArticleCountOutputTypeSelect = { + comments?: boolean | ArticleCountOutputTypeCountCommentsArgs +} + +/** + * ArticleCountOutputType without action + */ +export type ArticleCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the ArticleCountOutputType + */ + select?: Prisma.ArticleCountOutputTypeSelect | null +} + +/** + * ArticleCountOutputType without action + */ +export type ArticleCountOutputTypeCountCommentsArgs = { + where?: Prisma.CommentWhereInput +} + + +export type ArticleSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + title?: boolean + content?: boolean + createdAt?: boolean + updatedAt?: boolean + comments?: boolean | Prisma.Article$commentsArgs + _count?: boolean | Prisma.ArticleCountOutputTypeDefaultArgs +}, ExtArgs["result"]["article"]> + +export type ArticleSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + title?: boolean + content?: boolean + createdAt?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["article"]> + +export type ArticleSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + title?: boolean + content?: boolean + createdAt?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["article"]> + +export type ArticleSelectScalar = { + id?: boolean + title?: boolean + content?: boolean + createdAt?: boolean + updatedAt?: boolean +} + +export type ArticleOmit = runtime.Types.Extensions.GetOmit<"id" | "title" | "content" | "createdAt" | "updatedAt", ExtArgs["result"]["article"]> +export type ArticleInclude = { + comments?: boolean | Prisma.Article$commentsArgs + _count?: boolean | Prisma.ArticleCountOutputTypeDefaultArgs +} +export type ArticleIncludeCreateManyAndReturn = {} +export type ArticleIncludeUpdateManyAndReturn = {} + +export type $ArticlePayload = { + name: "Article" + objects: { + comments: Prisma.$CommentPayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: string + title: string + content: string + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["article"]> + composites: {} +} + +export type ArticleGetPayload = runtime.Types.Result.GetResult + +export type ArticleCountArgs = + Omit & { + select?: ArticleCountAggregateInputType | true + } + +export interface ArticleDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Article'], meta: { name: 'Article' } } + /** + * Find zero or one Article that matches the filter. + * @param {ArticleFindUniqueArgs} args - Arguments to find a Article + * @example + * // Get one Article + * const article = await prisma.article.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__ArticleClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Article that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ArticleFindUniqueOrThrowArgs} args - Arguments to find a Article + * @example + * // Get one Article + * const article = await prisma.article.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__ArticleClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Article that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ArticleFindFirstArgs} args - Arguments to find a Article + * @example + * // Get one Article + * const article = await prisma.article.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__ArticleClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Article that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ArticleFindFirstOrThrowArgs} args - Arguments to find a Article + * @example + * // Get one Article + * const article = await prisma.article.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__ArticleClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Articles that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ArticleFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Articles + * const articles = await prisma.article.findMany() + * + * // Get first 10 Articles + * const articles = await prisma.article.findMany({ take: 10 }) + * + * // Only select the `id` + * const articleWithIdOnly = await prisma.article.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Article. + * @param {ArticleCreateArgs} args - Arguments to create a Article. + * @example + * // Create one Article + * const Article = await prisma.article.create({ + * data: { + * // ... data to create a Article + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__ArticleClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Articles. + * @param {ArticleCreateManyArgs} args - Arguments to create many Articles. + * @example + * // Create many Articles + * const article = await prisma.article.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Articles and returns the data saved in the database. + * @param {ArticleCreateManyAndReturnArgs} args - Arguments to create many Articles. + * @example + * // Create many Articles + * const article = await prisma.article.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Articles and only return the `id` + * const articleWithIdOnly = await prisma.article.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Article. + * @param {ArticleDeleteArgs} args - Arguments to delete one Article. + * @example + * // Delete one Article + * const Article = await prisma.article.delete({ + * where: { + * // ... filter to delete one Article + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__ArticleClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Article. + * @param {ArticleUpdateArgs} args - Arguments to update one Article. + * @example + * // Update one Article + * const article = await prisma.article.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__ArticleClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Articles. + * @param {ArticleDeleteManyArgs} args - Arguments to filter Articles to delete. + * @example + * // Delete a few Articles + * const { count } = await prisma.article.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Articles. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ArticleUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Articles + * const article = await prisma.article.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Articles and returns the data updated in the database. + * @param {ArticleUpdateManyAndReturnArgs} args - Arguments to update many Articles. + * @example + * // Update many Articles + * const article = await prisma.article.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Articles and only return the `id` + * const articleWithIdOnly = await prisma.article.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Article. + * @param {ArticleUpsertArgs} args - Arguments to update or create a Article. + * @example + * // Update or create a Article + * const article = await prisma.article.upsert({ + * create: { + * // ... data to create a Article + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Article we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__ArticleClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Articles. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ArticleCountArgs} args - Arguments to filter Articles to count. + * @example + * // Count the number of Articles + * const count = await prisma.article.count({ + * where: { + * // ... the filter for the Articles we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Article. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ArticleAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by Article. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ArticleGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ArticleGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: ArticleGroupByArgs['orderBy'] } + : { orderBy?: ArticleGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetArticleGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Article model + */ +readonly fields: ArticleFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Article. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ +export interface Prisma__ArticleClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + comments = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the Article model + */ +export interface ArticleFieldRefs { + readonly id: Prisma.FieldRef<"Article", 'String'> + readonly title: Prisma.FieldRef<"Article", 'String'> + readonly content: Prisma.FieldRef<"Article", 'String'> + readonly createdAt: Prisma.FieldRef<"Article", 'DateTime'> + readonly updatedAt: Prisma.FieldRef<"Article", 'DateTime'> +} + + +// Custom InputTypes +/** + * Article findUnique + */ +export type ArticleFindUniqueArgs = { + /** + * Select specific fields to fetch from the Article + */ + select?: Prisma.ArticleSelect | null + /** + * Omit specific fields from the Article + */ + omit?: Prisma.ArticleOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ArticleInclude | null + /** + * Filter, which Article to fetch. + */ + where: Prisma.ArticleWhereUniqueInput +} + +/** + * Article findUniqueOrThrow + */ +export type ArticleFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Article + */ + select?: Prisma.ArticleSelect | null + /** + * Omit specific fields from the Article + */ + omit?: Prisma.ArticleOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ArticleInclude | null + /** + * Filter, which Article to fetch. + */ + where: Prisma.ArticleWhereUniqueInput +} + +/** + * Article findFirst + */ +export type ArticleFindFirstArgs = { + /** + * Select specific fields to fetch from the Article + */ + select?: Prisma.ArticleSelect | null + /** + * Omit specific fields from the Article + */ + omit?: Prisma.ArticleOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ArticleInclude | null + /** + * Filter, which Article to fetch. + */ + where?: Prisma.ArticleWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Articles to fetch. + */ + orderBy?: Prisma.ArticleOrderByWithRelationInput | Prisma.ArticleOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Articles. + */ + cursor?: Prisma.ArticleWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `Β±n` Articles from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Articles. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Articles. + */ + distinct?: Prisma.ArticleScalarFieldEnum | Prisma.ArticleScalarFieldEnum[] +} + +/** + * Article findFirstOrThrow + */ +export type ArticleFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Article + */ + select?: Prisma.ArticleSelect | null + /** + * Omit specific fields from the Article + */ + omit?: Prisma.ArticleOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ArticleInclude | null + /** + * Filter, which Article to fetch. + */ + where?: Prisma.ArticleWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Articles to fetch. + */ + orderBy?: Prisma.ArticleOrderByWithRelationInput | Prisma.ArticleOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Articles. + */ + cursor?: Prisma.ArticleWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `Β±n` Articles from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Articles. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Articles. + */ + distinct?: Prisma.ArticleScalarFieldEnum | Prisma.ArticleScalarFieldEnum[] +} + +/** + * Article findMany + */ +export type ArticleFindManyArgs = { + /** + * Select specific fields to fetch from the Article + */ + select?: Prisma.ArticleSelect | null + /** + * Omit specific fields from the Article + */ + omit?: Prisma.ArticleOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ArticleInclude | null + /** + * Filter, which Articles to fetch. + */ + where?: Prisma.ArticleWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Articles to fetch. + */ + orderBy?: Prisma.ArticleOrderByWithRelationInput | Prisma.ArticleOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Articles. + */ + cursor?: Prisma.ArticleWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `Β±n` Articles from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Articles. + */ + skip?: number + distinct?: Prisma.ArticleScalarFieldEnum | Prisma.ArticleScalarFieldEnum[] +} + +/** + * Article create + */ +export type ArticleCreateArgs = { + /** + * Select specific fields to fetch from the Article + */ + select?: Prisma.ArticleSelect | null + /** + * Omit specific fields from the Article + */ + omit?: Prisma.ArticleOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ArticleInclude | null + /** + * The data needed to create a Article. + */ + data: Prisma.XOR +} + +/** + * Article createMany + */ +export type ArticleCreateManyArgs = { + /** + * The data used to create many Articles. + */ + data: Prisma.ArticleCreateManyInput | Prisma.ArticleCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Article createManyAndReturn + */ +export type ArticleCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Article + */ + select?: Prisma.ArticleSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Article + */ + omit?: Prisma.ArticleOmit | null + /** + * The data used to create many Articles. + */ + data: Prisma.ArticleCreateManyInput | Prisma.ArticleCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Article update + */ +export type ArticleUpdateArgs = { + /** + * Select specific fields to fetch from the Article + */ + select?: Prisma.ArticleSelect | null + /** + * Omit specific fields from the Article + */ + omit?: Prisma.ArticleOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ArticleInclude | null + /** + * The data needed to update a Article. + */ + data: Prisma.XOR + /** + * Choose, which Article to update. + */ + where: Prisma.ArticleWhereUniqueInput +} + +/** + * Article updateMany + */ +export type ArticleUpdateManyArgs = { + /** + * The data used to update Articles. + */ + data: Prisma.XOR + /** + * Filter which Articles to update + */ + where?: Prisma.ArticleWhereInput + /** + * Limit how many Articles to update. + */ + limit?: number +} + +/** + * Article updateManyAndReturn + */ +export type ArticleUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Article + */ + select?: Prisma.ArticleSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Article + */ + omit?: Prisma.ArticleOmit | null + /** + * The data used to update Articles. + */ + data: Prisma.XOR + /** + * Filter which Articles to update + */ + where?: Prisma.ArticleWhereInput + /** + * Limit how many Articles to update. + */ + limit?: number +} + +/** + * Article upsert + */ +export type ArticleUpsertArgs = { + /** + * Select specific fields to fetch from the Article + */ + select?: Prisma.ArticleSelect | null + /** + * Omit specific fields from the Article + */ + omit?: Prisma.ArticleOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ArticleInclude | null + /** + * The filter to search for the Article to update in case it exists. + */ + where: Prisma.ArticleWhereUniqueInput + /** + * In case the Article found by the `where` argument doesn't exist, create a new Article with this data. + */ + create: Prisma.XOR + /** + * In case the Article was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Article delete + */ +export type ArticleDeleteArgs = { + /** + * Select specific fields to fetch from the Article + */ + select?: Prisma.ArticleSelect | null + /** + * Omit specific fields from the Article + */ + omit?: Prisma.ArticleOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ArticleInclude | null + /** + * Filter which Article to delete. + */ + where: Prisma.ArticleWhereUniqueInput +} + +/** + * Article deleteMany + */ +export type ArticleDeleteManyArgs = { + /** + * Filter which Articles to delete + */ + where?: Prisma.ArticleWhereInput + /** + * Limit how many Articles to delete. + */ + limit?: number +} + +/** + * Article.comments + */ +export type Article$commentsArgs = { + /** + * Select specific fields to fetch from the Comment + */ + select?: Prisma.CommentSelect | null + /** + * Omit specific fields from the Comment + */ + omit?: Prisma.CommentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CommentInclude | null + where?: Prisma.CommentWhereInput + orderBy?: Prisma.CommentOrderByWithRelationInput | Prisma.CommentOrderByWithRelationInput[] + cursor?: Prisma.CommentWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.CommentScalarFieldEnum | Prisma.CommentScalarFieldEnum[] +} + +/** + * Article without action + */ +export type ArticleDefaultArgs = { + /** + * Select specific fields to fetch from the Article + */ + select?: Prisma.ArticleSelect | null + /** + * Omit specific fields from the Article + */ + omit?: Prisma.ArticleOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ArticleInclude | null +} diff --git a/generated/prisma/models/Comment.ts b/generated/prisma/models/Comment.ts new file mode 100644 index 0000000..d1a3ef9 --- /dev/null +++ b/generated/prisma/models/Comment.ts @@ -0,0 +1,1539 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Comment` model and its related types. + * + * 🟒 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums.ts" +import type * as Prisma from "../internal/prismaNamespace.ts" + +/** + * Model Comment + * + */ +export type CommentModel = runtime.Types.Result.DefaultSelection + +export type AggregateComment = { + _count: CommentCountAggregateOutputType | null + _min: CommentMinAggregateOutputType | null + _max: CommentMaxAggregateOutputType | null +} + +export type CommentMinAggregateOutputType = { + id: string | null + content: string | null + createdAt: Date | null + updatedAt: Date | null + articleId: string | null + productId: string | null +} + +export type CommentMaxAggregateOutputType = { + id: string | null + content: string | null + createdAt: Date | null + updatedAt: Date | null + articleId: string | null + productId: string | null +} + +export type CommentCountAggregateOutputType = { + id: number + content: number + createdAt: number + updatedAt: number + articleId: number + productId: number + _all: number +} + + +export type CommentMinAggregateInputType = { + id?: true + content?: true + createdAt?: true + updatedAt?: true + articleId?: true + productId?: true +} + +export type CommentMaxAggregateInputType = { + id?: true + content?: true + createdAt?: true + updatedAt?: true + articleId?: true + productId?: true +} + +export type CommentCountAggregateInputType = { + id?: true + content?: true + createdAt?: true + updatedAt?: true + articleId?: true + productId?: true + _all?: true +} + +export type CommentAggregateArgs = { + /** + * Filter which Comment to aggregate. + */ + where?: Prisma.CommentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Comments to fetch. + */ + orderBy?: Prisma.CommentOrderByWithRelationInput | Prisma.CommentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.CommentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `Β±n` Comments from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Comments. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Comments + **/ + _count?: true | CommentCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: CommentMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: CommentMaxAggregateInputType +} + +export type GetCommentAggregateType = { + [P in keyof T & keyof AggregateComment]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type CommentGroupByArgs = { + where?: Prisma.CommentWhereInput + orderBy?: Prisma.CommentOrderByWithAggregationInput | Prisma.CommentOrderByWithAggregationInput[] + by: Prisma.CommentScalarFieldEnum[] | Prisma.CommentScalarFieldEnum + having?: Prisma.CommentScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: CommentCountAggregateInputType | true + _min?: CommentMinAggregateInputType + _max?: CommentMaxAggregateInputType +} + +export type CommentGroupByOutputType = { + id: string + content: string + createdAt: Date + updatedAt: Date + articleId: string | null + productId: string | null + _count: CommentCountAggregateOutputType | null + _min: CommentMinAggregateOutputType | null + _max: CommentMaxAggregateOutputType | null +} + +type GetCommentGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof CommentGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type CommentWhereInput = { + AND?: Prisma.CommentWhereInput | Prisma.CommentWhereInput[] + OR?: Prisma.CommentWhereInput[] + NOT?: Prisma.CommentWhereInput | Prisma.CommentWhereInput[] + id?: Prisma.StringFilter<"Comment"> | string + content?: Prisma.StringFilter<"Comment"> | string + createdAt?: Prisma.DateTimeFilter<"Comment"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Comment"> | Date | string + articleId?: Prisma.StringNullableFilter<"Comment"> | string | null + productId?: Prisma.StringNullableFilter<"Comment"> | string | null + article?: Prisma.XOR | null + product?: Prisma.XOR | null +} + +export type CommentOrderByWithRelationInput = { + id?: Prisma.SortOrder + content?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + articleId?: Prisma.SortOrderInput | Prisma.SortOrder + productId?: Prisma.SortOrderInput | Prisma.SortOrder + article?: Prisma.ArticleOrderByWithRelationInput + product?: Prisma.ProductOrderByWithRelationInput +} + +export type CommentWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: Prisma.CommentWhereInput | Prisma.CommentWhereInput[] + OR?: Prisma.CommentWhereInput[] + NOT?: Prisma.CommentWhereInput | Prisma.CommentWhereInput[] + content?: Prisma.StringFilter<"Comment"> | string + createdAt?: Prisma.DateTimeFilter<"Comment"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Comment"> | Date | string + articleId?: Prisma.StringNullableFilter<"Comment"> | string | null + productId?: Prisma.StringNullableFilter<"Comment"> | string | null + article?: Prisma.XOR | null + product?: Prisma.XOR | null +}, "id"> + +export type CommentOrderByWithAggregationInput = { + id?: Prisma.SortOrder + content?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + articleId?: Prisma.SortOrderInput | Prisma.SortOrder + productId?: Prisma.SortOrderInput | Prisma.SortOrder + _count?: Prisma.CommentCountOrderByAggregateInput + _max?: Prisma.CommentMaxOrderByAggregateInput + _min?: Prisma.CommentMinOrderByAggregateInput +} + +export type CommentScalarWhereWithAggregatesInput = { + AND?: Prisma.CommentScalarWhereWithAggregatesInput | Prisma.CommentScalarWhereWithAggregatesInput[] + OR?: Prisma.CommentScalarWhereWithAggregatesInput[] + NOT?: Prisma.CommentScalarWhereWithAggregatesInput | Prisma.CommentScalarWhereWithAggregatesInput[] + id?: Prisma.StringWithAggregatesFilter<"Comment"> | string + content?: Prisma.StringWithAggregatesFilter<"Comment"> | string + createdAt?: Prisma.DateTimeWithAggregatesFilter<"Comment"> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Comment"> | Date | string + articleId?: Prisma.StringNullableWithAggregatesFilter<"Comment"> | string | null + productId?: Prisma.StringNullableWithAggregatesFilter<"Comment"> | string | null +} + +export type CommentCreateInput = { + id?: string + content: string + createdAt?: Date | string + updatedAt?: Date | string + article?: Prisma.ArticleCreateNestedOneWithoutCommentsInput + product?: Prisma.ProductCreateNestedOneWithoutCommentsInput +} + +export type CommentUncheckedCreateInput = { + id?: string + content: string + createdAt?: Date | string + updatedAt?: Date | string + articleId?: string | null + productId?: string | null +} + +export type CommentUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + article?: Prisma.ArticleUpdateOneWithoutCommentsNestedInput + product?: Prisma.ProductUpdateOneWithoutCommentsNestedInput +} + +export type CommentUncheckedUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + articleId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + productId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null +} + +export type CommentCreateManyInput = { + id?: string + content: string + createdAt?: Date | string + updatedAt?: Date | string + articleId?: string | null + productId?: string | null +} + +export type CommentUpdateManyMutationInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type CommentUncheckedUpdateManyInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + articleId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + productId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null +} + +export type CommentListRelationFilter = { + every?: Prisma.CommentWhereInput + some?: Prisma.CommentWhereInput + none?: Prisma.CommentWhereInput +} + +export type CommentOrderByRelationAggregateInput = { + _count?: Prisma.SortOrder +} + +export type CommentCountOrderByAggregateInput = { + id?: Prisma.SortOrder + content?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + articleId?: Prisma.SortOrder + productId?: Prisma.SortOrder +} + +export type CommentMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + content?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + articleId?: Prisma.SortOrder + productId?: Prisma.SortOrder +} + +export type CommentMinOrderByAggregateInput = { + id?: Prisma.SortOrder + content?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + articleId?: Prisma.SortOrder + productId?: Prisma.SortOrder +} + +export type CommentCreateNestedManyWithoutProductInput = { + create?: Prisma.XOR | Prisma.CommentCreateWithoutProductInput[] | Prisma.CommentUncheckedCreateWithoutProductInput[] + connectOrCreate?: Prisma.CommentCreateOrConnectWithoutProductInput | Prisma.CommentCreateOrConnectWithoutProductInput[] + createMany?: Prisma.CommentCreateManyProductInputEnvelope + connect?: Prisma.CommentWhereUniqueInput | Prisma.CommentWhereUniqueInput[] +} + +export type CommentUncheckedCreateNestedManyWithoutProductInput = { + create?: Prisma.XOR | Prisma.CommentCreateWithoutProductInput[] | Prisma.CommentUncheckedCreateWithoutProductInput[] + connectOrCreate?: Prisma.CommentCreateOrConnectWithoutProductInput | Prisma.CommentCreateOrConnectWithoutProductInput[] + createMany?: Prisma.CommentCreateManyProductInputEnvelope + connect?: Prisma.CommentWhereUniqueInput | Prisma.CommentWhereUniqueInput[] +} + +export type CommentUpdateManyWithoutProductNestedInput = { + create?: Prisma.XOR | Prisma.CommentCreateWithoutProductInput[] | Prisma.CommentUncheckedCreateWithoutProductInput[] + connectOrCreate?: Prisma.CommentCreateOrConnectWithoutProductInput | Prisma.CommentCreateOrConnectWithoutProductInput[] + upsert?: Prisma.CommentUpsertWithWhereUniqueWithoutProductInput | Prisma.CommentUpsertWithWhereUniqueWithoutProductInput[] + createMany?: Prisma.CommentCreateManyProductInputEnvelope + set?: Prisma.CommentWhereUniqueInput | Prisma.CommentWhereUniqueInput[] + disconnect?: Prisma.CommentWhereUniqueInput | Prisma.CommentWhereUniqueInput[] + delete?: Prisma.CommentWhereUniqueInput | Prisma.CommentWhereUniqueInput[] + connect?: Prisma.CommentWhereUniqueInput | Prisma.CommentWhereUniqueInput[] + update?: Prisma.CommentUpdateWithWhereUniqueWithoutProductInput | Prisma.CommentUpdateWithWhereUniqueWithoutProductInput[] + updateMany?: Prisma.CommentUpdateManyWithWhereWithoutProductInput | Prisma.CommentUpdateManyWithWhereWithoutProductInput[] + deleteMany?: Prisma.CommentScalarWhereInput | Prisma.CommentScalarWhereInput[] +} + +export type CommentUncheckedUpdateManyWithoutProductNestedInput = { + create?: Prisma.XOR | Prisma.CommentCreateWithoutProductInput[] | Prisma.CommentUncheckedCreateWithoutProductInput[] + connectOrCreate?: Prisma.CommentCreateOrConnectWithoutProductInput | Prisma.CommentCreateOrConnectWithoutProductInput[] + upsert?: Prisma.CommentUpsertWithWhereUniqueWithoutProductInput | Prisma.CommentUpsertWithWhereUniqueWithoutProductInput[] + createMany?: Prisma.CommentCreateManyProductInputEnvelope + set?: Prisma.CommentWhereUniqueInput | Prisma.CommentWhereUniqueInput[] + disconnect?: Prisma.CommentWhereUniqueInput | Prisma.CommentWhereUniqueInput[] + delete?: Prisma.CommentWhereUniqueInput | Prisma.CommentWhereUniqueInput[] + connect?: Prisma.CommentWhereUniqueInput | Prisma.CommentWhereUniqueInput[] + update?: Prisma.CommentUpdateWithWhereUniqueWithoutProductInput | Prisma.CommentUpdateWithWhereUniqueWithoutProductInput[] + updateMany?: Prisma.CommentUpdateManyWithWhereWithoutProductInput | Prisma.CommentUpdateManyWithWhereWithoutProductInput[] + deleteMany?: Prisma.CommentScalarWhereInput | Prisma.CommentScalarWhereInput[] +} + +export type CommentCreateNestedManyWithoutArticleInput = { + create?: Prisma.XOR | Prisma.CommentCreateWithoutArticleInput[] | Prisma.CommentUncheckedCreateWithoutArticleInput[] + connectOrCreate?: Prisma.CommentCreateOrConnectWithoutArticleInput | Prisma.CommentCreateOrConnectWithoutArticleInput[] + createMany?: Prisma.CommentCreateManyArticleInputEnvelope + connect?: Prisma.CommentWhereUniqueInput | Prisma.CommentWhereUniqueInput[] +} + +export type CommentUncheckedCreateNestedManyWithoutArticleInput = { + create?: Prisma.XOR | Prisma.CommentCreateWithoutArticleInput[] | Prisma.CommentUncheckedCreateWithoutArticleInput[] + connectOrCreate?: Prisma.CommentCreateOrConnectWithoutArticleInput | Prisma.CommentCreateOrConnectWithoutArticleInput[] + createMany?: Prisma.CommentCreateManyArticleInputEnvelope + connect?: Prisma.CommentWhereUniqueInput | Prisma.CommentWhereUniqueInput[] +} + +export type CommentUpdateManyWithoutArticleNestedInput = { + create?: Prisma.XOR | Prisma.CommentCreateWithoutArticleInput[] | Prisma.CommentUncheckedCreateWithoutArticleInput[] + connectOrCreate?: Prisma.CommentCreateOrConnectWithoutArticleInput | Prisma.CommentCreateOrConnectWithoutArticleInput[] + upsert?: Prisma.CommentUpsertWithWhereUniqueWithoutArticleInput | Prisma.CommentUpsertWithWhereUniqueWithoutArticleInput[] + createMany?: Prisma.CommentCreateManyArticleInputEnvelope + set?: Prisma.CommentWhereUniqueInput | Prisma.CommentWhereUniqueInput[] + disconnect?: Prisma.CommentWhereUniqueInput | Prisma.CommentWhereUniqueInput[] + delete?: Prisma.CommentWhereUniqueInput | Prisma.CommentWhereUniqueInput[] + connect?: Prisma.CommentWhereUniqueInput | Prisma.CommentWhereUniqueInput[] + update?: Prisma.CommentUpdateWithWhereUniqueWithoutArticleInput | Prisma.CommentUpdateWithWhereUniqueWithoutArticleInput[] + updateMany?: Prisma.CommentUpdateManyWithWhereWithoutArticleInput | Prisma.CommentUpdateManyWithWhereWithoutArticleInput[] + deleteMany?: Prisma.CommentScalarWhereInput | Prisma.CommentScalarWhereInput[] +} + +export type CommentUncheckedUpdateManyWithoutArticleNestedInput = { + create?: Prisma.XOR | Prisma.CommentCreateWithoutArticleInput[] | Prisma.CommentUncheckedCreateWithoutArticleInput[] + connectOrCreate?: Prisma.CommentCreateOrConnectWithoutArticleInput | Prisma.CommentCreateOrConnectWithoutArticleInput[] + upsert?: Prisma.CommentUpsertWithWhereUniqueWithoutArticleInput | Prisma.CommentUpsertWithWhereUniqueWithoutArticleInput[] + createMany?: Prisma.CommentCreateManyArticleInputEnvelope + set?: Prisma.CommentWhereUniqueInput | Prisma.CommentWhereUniqueInput[] + disconnect?: Prisma.CommentWhereUniqueInput | Prisma.CommentWhereUniqueInput[] + delete?: Prisma.CommentWhereUniqueInput | Prisma.CommentWhereUniqueInput[] + connect?: Prisma.CommentWhereUniqueInput | Prisma.CommentWhereUniqueInput[] + update?: Prisma.CommentUpdateWithWhereUniqueWithoutArticleInput | Prisma.CommentUpdateWithWhereUniqueWithoutArticleInput[] + updateMany?: Prisma.CommentUpdateManyWithWhereWithoutArticleInput | Prisma.CommentUpdateManyWithWhereWithoutArticleInput[] + deleteMany?: Prisma.CommentScalarWhereInput | Prisma.CommentScalarWhereInput[] +} + +export type CommentCreateWithoutProductInput = { + id?: string + content: string + createdAt?: Date | string + updatedAt?: Date | string + article?: Prisma.ArticleCreateNestedOneWithoutCommentsInput +} + +export type CommentUncheckedCreateWithoutProductInput = { + id?: string + content: string + createdAt?: Date | string + updatedAt?: Date | string + articleId?: string | null +} + +export type CommentCreateOrConnectWithoutProductInput = { + where: Prisma.CommentWhereUniqueInput + create: Prisma.XOR +} + +export type CommentCreateManyProductInputEnvelope = { + data: Prisma.CommentCreateManyProductInput | Prisma.CommentCreateManyProductInput[] + skipDuplicates?: boolean +} + +export type CommentUpsertWithWhereUniqueWithoutProductInput = { + where: Prisma.CommentWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type CommentUpdateWithWhereUniqueWithoutProductInput = { + where: Prisma.CommentWhereUniqueInput + data: Prisma.XOR +} + +export type CommentUpdateManyWithWhereWithoutProductInput = { + where: Prisma.CommentScalarWhereInput + data: Prisma.XOR +} + +export type CommentScalarWhereInput = { + AND?: Prisma.CommentScalarWhereInput | Prisma.CommentScalarWhereInput[] + OR?: Prisma.CommentScalarWhereInput[] + NOT?: Prisma.CommentScalarWhereInput | Prisma.CommentScalarWhereInput[] + id?: Prisma.StringFilter<"Comment"> | string + content?: Prisma.StringFilter<"Comment"> | string + createdAt?: Prisma.DateTimeFilter<"Comment"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Comment"> | Date | string + articleId?: Prisma.StringNullableFilter<"Comment"> | string | null + productId?: Prisma.StringNullableFilter<"Comment"> | string | null +} + +export type CommentCreateWithoutArticleInput = { + id?: string + content: string + createdAt?: Date | string + updatedAt?: Date | string + product?: Prisma.ProductCreateNestedOneWithoutCommentsInput +} + +export type CommentUncheckedCreateWithoutArticleInput = { + id?: string + content: string + createdAt?: Date | string + updatedAt?: Date | string + productId?: string | null +} + +export type CommentCreateOrConnectWithoutArticleInput = { + where: Prisma.CommentWhereUniqueInput + create: Prisma.XOR +} + +export type CommentCreateManyArticleInputEnvelope = { + data: Prisma.CommentCreateManyArticleInput | Prisma.CommentCreateManyArticleInput[] + skipDuplicates?: boolean +} + +export type CommentUpsertWithWhereUniqueWithoutArticleInput = { + where: Prisma.CommentWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type CommentUpdateWithWhereUniqueWithoutArticleInput = { + where: Prisma.CommentWhereUniqueInput + data: Prisma.XOR +} + +export type CommentUpdateManyWithWhereWithoutArticleInput = { + where: Prisma.CommentScalarWhereInput + data: Prisma.XOR +} + +export type CommentCreateManyProductInput = { + id?: string + content: string + createdAt?: Date | string + updatedAt?: Date | string + articleId?: string | null +} + +export type CommentUpdateWithoutProductInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + article?: Prisma.ArticleUpdateOneWithoutCommentsNestedInput +} + +export type CommentUncheckedUpdateWithoutProductInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + articleId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null +} + +export type CommentUncheckedUpdateManyWithoutProductInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + articleId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null +} + +export type CommentCreateManyArticleInput = { + id?: string + content: string + createdAt?: Date | string + updatedAt?: Date | string + productId?: string | null +} + +export type CommentUpdateWithoutArticleInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + product?: Prisma.ProductUpdateOneWithoutCommentsNestedInput +} + +export type CommentUncheckedUpdateWithoutArticleInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + productId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null +} + +export type CommentUncheckedUpdateManyWithoutArticleInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + productId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null +} + + + +export type CommentSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + content?: boolean + createdAt?: boolean + updatedAt?: boolean + articleId?: boolean + productId?: boolean + article?: boolean | Prisma.Comment$articleArgs + product?: boolean | Prisma.Comment$productArgs +}, ExtArgs["result"]["comment"]> + +export type CommentSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + content?: boolean + createdAt?: boolean + updatedAt?: boolean + articleId?: boolean + productId?: boolean + article?: boolean | Prisma.Comment$articleArgs + product?: boolean | Prisma.Comment$productArgs +}, ExtArgs["result"]["comment"]> + +export type CommentSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + content?: boolean + createdAt?: boolean + updatedAt?: boolean + articleId?: boolean + productId?: boolean + article?: boolean | Prisma.Comment$articleArgs + product?: boolean | Prisma.Comment$productArgs +}, ExtArgs["result"]["comment"]> + +export type CommentSelectScalar = { + id?: boolean + content?: boolean + createdAt?: boolean + updatedAt?: boolean + articleId?: boolean + productId?: boolean +} + +export type CommentOmit = runtime.Types.Extensions.GetOmit<"id" | "content" | "createdAt" | "updatedAt" | "articleId" | "productId", ExtArgs["result"]["comment"]> +export type CommentInclude = { + article?: boolean | Prisma.Comment$articleArgs + product?: boolean | Prisma.Comment$productArgs +} +export type CommentIncludeCreateManyAndReturn = { + article?: boolean | Prisma.Comment$articleArgs + product?: boolean | Prisma.Comment$productArgs +} +export type CommentIncludeUpdateManyAndReturn = { + article?: boolean | Prisma.Comment$articleArgs + product?: boolean | Prisma.Comment$productArgs +} + +export type $CommentPayload = { + name: "Comment" + objects: { + article: Prisma.$ArticlePayload | null + product: Prisma.$ProductPayload | null + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: string + content: string + createdAt: Date + updatedAt: Date + articleId: string | null + productId: string | null + }, ExtArgs["result"]["comment"]> + composites: {} +} + +export type CommentGetPayload = runtime.Types.Result.GetResult + +export type CommentCountArgs = + Omit & { + select?: CommentCountAggregateInputType | true + } + +export interface CommentDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Comment'], meta: { name: 'Comment' } } + /** + * Find zero or one Comment that matches the filter. + * @param {CommentFindUniqueArgs} args - Arguments to find a Comment + * @example + * // Get one Comment + * const comment = await prisma.comment.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__CommentClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Comment that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {CommentFindUniqueOrThrowArgs} args - Arguments to find a Comment + * @example + * // Get one Comment + * const comment = await prisma.comment.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__CommentClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Comment that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CommentFindFirstArgs} args - Arguments to find a Comment + * @example + * // Get one Comment + * const comment = await prisma.comment.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__CommentClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Comment that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CommentFindFirstOrThrowArgs} args - Arguments to find a Comment + * @example + * // Get one Comment + * const comment = await prisma.comment.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__CommentClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Comments that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CommentFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Comments + * const comments = await prisma.comment.findMany() + * + * // Get first 10 Comments + * const comments = await prisma.comment.findMany({ take: 10 }) + * + * // Only select the `id` + * const commentWithIdOnly = await prisma.comment.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Comment. + * @param {CommentCreateArgs} args - Arguments to create a Comment. + * @example + * // Create one Comment + * const Comment = await prisma.comment.create({ + * data: { + * // ... data to create a Comment + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__CommentClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Comments. + * @param {CommentCreateManyArgs} args - Arguments to create many Comments. + * @example + * // Create many Comments + * const comment = await prisma.comment.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Comments and returns the data saved in the database. + * @param {CommentCreateManyAndReturnArgs} args - Arguments to create many Comments. + * @example + * // Create many Comments + * const comment = await prisma.comment.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Comments and only return the `id` + * const commentWithIdOnly = await prisma.comment.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Comment. + * @param {CommentDeleteArgs} args - Arguments to delete one Comment. + * @example + * // Delete one Comment + * const Comment = await prisma.comment.delete({ + * where: { + * // ... filter to delete one Comment + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__CommentClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Comment. + * @param {CommentUpdateArgs} args - Arguments to update one Comment. + * @example + * // Update one Comment + * const comment = await prisma.comment.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__CommentClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Comments. + * @param {CommentDeleteManyArgs} args - Arguments to filter Comments to delete. + * @example + * // Delete a few Comments + * const { count } = await prisma.comment.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Comments. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CommentUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Comments + * const comment = await prisma.comment.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Comments and returns the data updated in the database. + * @param {CommentUpdateManyAndReturnArgs} args - Arguments to update many Comments. + * @example + * // Update many Comments + * const comment = await prisma.comment.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Comments and only return the `id` + * const commentWithIdOnly = await prisma.comment.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Comment. + * @param {CommentUpsertArgs} args - Arguments to update or create a Comment. + * @example + * // Update or create a Comment + * const comment = await prisma.comment.upsert({ + * create: { + * // ... data to create a Comment + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Comment we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__CommentClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Comments. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CommentCountArgs} args - Arguments to filter Comments to count. + * @example + * // Count the number of Comments + * const count = await prisma.comment.count({ + * where: { + * // ... the filter for the Comments we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Comment. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CommentAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by Comment. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CommentGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends CommentGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: CommentGroupByArgs['orderBy'] } + : { orderBy?: CommentGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetCommentGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Comment model + */ +readonly fields: CommentFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Comment. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ +export interface Prisma__CommentClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + article = {}>(args?: Prisma.Subset>): Prisma.Prisma__ArticleClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + product = {}>(args?: Prisma.Subset>): Prisma.Prisma__ProductClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the Comment model + */ +export interface CommentFieldRefs { + readonly id: Prisma.FieldRef<"Comment", 'String'> + readonly content: Prisma.FieldRef<"Comment", 'String'> + readonly createdAt: Prisma.FieldRef<"Comment", 'DateTime'> + readonly updatedAt: Prisma.FieldRef<"Comment", 'DateTime'> + readonly articleId: Prisma.FieldRef<"Comment", 'String'> + readonly productId: Prisma.FieldRef<"Comment", 'String'> +} + + +// Custom InputTypes +/** + * Comment findUnique + */ +export type CommentFindUniqueArgs = { + /** + * Select specific fields to fetch from the Comment + */ + select?: Prisma.CommentSelect | null + /** + * Omit specific fields from the Comment + */ + omit?: Prisma.CommentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CommentInclude | null + /** + * Filter, which Comment to fetch. + */ + where: Prisma.CommentWhereUniqueInput +} + +/** + * Comment findUniqueOrThrow + */ +export type CommentFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Comment + */ + select?: Prisma.CommentSelect | null + /** + * Omit specific fields from the Comment + */ + omit?: Prisma.CommentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CommentInclude | null + /** + * Filter, which Comment to fetch. + */ + where: Prisma.CommentWhereUniqueInput +} + +/** + * Comment findFirst + */ +export type CommentFindFirstArgs = { + /** + * Select specific fields to fetch from the Comment + */ + select?: Prisma.CommentSelect | null + /** + * Omit specific fields from the Comment + */ + omit?: Prisma.CommentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CommentInclude | null + /** + * Filter, which Comment to fetch. + */ + where?: Prisma.CommentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Comments to fetch. + */ + orderBy?: Prisma.CommentOrderByWithRelationInput | Prisma.CommentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Comments. + */ + cursor?: Prisma.CommentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `Β±n` Comments from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Comments. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Comments. + */ + distinct?: Prisma.CommentScalarFieldEnum | Prisma.CommentScalarFieldEnum[] +} + +/** + * Comment findFirstOrThrow + */ +export type CommentFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Comment + */ + select?: Prisma.CommentSelect | null + /** + * Omit specific fields from the Comment + */ + omit?: Prisma.CommentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CommentInclude | null + /** + * Filter, which Comment to fetch. + */ + where?: Prisma.CommentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Comments to fetch. + */ + orderBy?: Prisma.CommentOrderByWithRelationInput | Prisma.CommentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Comments. + */ + cursor?: Prisma.CommentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `Β±n` Comments from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Comments. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Comments. + */ + distinct?: Prisma.CommentScalarFieldEnum | Prisma.CommentScalarFieldEnum[] +} + +/** + * Comment findMany + */ +export type CommentFindManyArgs = { + /** + * Select specific fields to fetch from the Comment + */ + select?: Prisma.CommentSelect | null + /** + * Omit specific fields from the Comment + */ + omit?: Prisma.CommentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CommentInclude | null + /** + * Filter, which Comments to fetch. + */ + where?: Prisma.CommentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Comments to fetch. + */ + orderBy?: Prisma.CommentOrderByWithRelationInput | Prisma.CommentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Comments. + */ + cursor?: Prisma.CommentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `Β±n` Comments from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Comments. + */ + skip?: number + distinct?: Prisma.CommentScalarFieldEnum | Prisma.CommentScalarFieldEnum[] +} + +/** + * Comment create + */ +export type CommentCreateArgs = { + /** + * Select specific fields to fetch from the Comment + */ + select?: Prisma.CommentSelect | null + /** + * Omit specific fields from the Comment + */ + omit?: Prisma.CommentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CommentInclude | null + /** + * The data needed to create a Comment. + */ + data: Prisma.XOR +} + +/** + * Comment createMany + */ +export type CommentCreateManyArgs = { + /** + * The data used to create many Comments. + */ + data: Prisma.CommentCreateManyInput | Prisma.CommentCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Comment createManyAndReturn + */ +export type CommentCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Comment + */ + select?: Prisma.CommentSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Comment + */ + omit?: Prisma.CommentOmit | null + /** + * The data used to create many Comments. + */ + data: Prisma.CommentCreateManyInput | Prisma.CommentCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CommentIncludeCreateManyAndReturn | null +} + +/** + * Comment update + */ +export type CommentUpdateArgs = { + /** + * Select specific fields to fetch from the Comment + */ + select?: Prisma.CommentSelect | null + /** + * Omit specific fields from the Comment + */ + omit?: Prisma.CommentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CommentInclude | null + /** + * The data needed to update a Comment. + */ + data: Prisma.XOR + /** + * Choose, which Comment to update. + */ + where: Prisma.CommentWhereUniqueInput +} + +/** + * Comment updateMany + */ +export type CommentUpdateManyArgs = { + /** + * The data used to update Comments. + */ + data: Prisma.XOR + /** + * Filter which Comments to update + */ + where?: Prisma.CommentWhereInput + /** + * Limit how many Comments to update. + */ + limit?: number +} + +/** + * Comment updateManyAndReturn + */ +export type CommentUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Comment + */ + select?: Prisma.CommentSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Comment + */ + omit?: Prisma.CommentOmit | null + /** + * The data used to update Comments. + */ + data: Prisma.XOR + /** + * Filter which Comments to update + */ + where?: Prisma.CommentWhereInput + /** + * Limit how many Comments to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CommentIncludeUpdateManyAndReturn | null +} + +/** + * Comment upsert + */ +export type CommentUpsertArgs = { + /** + * Select specific fields to fetch from the Comment + */ + select?: Prisma.CommentSelect | null + /** + * Omit specific fields from the Comment + */ + omit?: Prisma.CommentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CommentInclude | null + /** + * The filter to search for the Comment to update in case it exists. + */ + where: Prisma.CommentWhereUniqueInput + /** + * In case the Comment found by the `where` argument doesn't exist, create a new Comment with this data. + */ + create: Prisma.XOR + /** + * In case the Comment was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Comment delete + */ +export type CommentDeleteArgs = { + /** + * Select specific fields to fetch from the Comment + */ + select?: Prisma.CommentSelect | null + /** + * Omit specific fields from the Comment + */ + omit?: Prisma.CommentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CommentInclude | null + /** + * Filter which Comment to delete. + */ + where: Prisma.CommentWhereUniqueInput +} + +/** + * Comment deleteMany + */ +export type CommentDeleteManyArgs = { + /** + * Filter which Comments to delete + */ + where?: Prisma.CommentWhereInput + /** + * Limit how many Comments to delete. + */ + limit?: number +} + +/** + * Comment.article + */ +export type Comment$articleArgs = { + /** + * Select specific fields to fetch from the Article + */ + select?: Prisma.ArticleSelect | null + /** + * Omit specific fields from the Article + */ + omit?: Prisma.ArticleOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ArticleInclude | null + where?: Prisma.ArticleWhereInput +} + +/** + * Comment.product + */ +export type Comment$productArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null + where?: Prisma.ProductWhereInput +} + +/** + * Comment without action + */ +export type CommentDefaultArgs = { + /** + * Select specific fields to fetch from the Comment + */ + select?: Prisma.CommentSelect | null + /** + * Omit specific fields from the Comment + */ + omit?: Prisma.CommentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CommentInclude | null +} diff --git a/generated/prisma/models/Product.ts b/generated/prisma/models/Product.ts new file mode 100644 index 0000000..bc8dcb1 --- /dev/null +++ b/generated/prisma/models/Product.ts @@ -0,0 +1,1568 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Product` model and its related types. + * + * 🟒 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums.ts" +import type * as Prisma from "../internal/prismaNamespace.ts" + +/** + * Model Product + * + */ +export type ProductModel = runtime.Types.Result.DefaultSelection + +export type AggregateProduct = { + _count: ProductCountAggregateOutputType | null + _avg: ProductAvgAggregateOutputType | null + _sum: ProductSumAggregateOutputType | null + _min: ProductMinAggregateOutputType | null + _max: ProductMaxAggregateOutputType | null +} + +export type ProductAvgAggregateOutputType = { + price: number | null + favoriteCount: number | null +} + +export type ProductSumAggregateOutputType = { + price: number | null + favoriteCount: number | null +} + +export type ProductMinAggregateOutputType = { + id: string | null + name: string | null + description: string | null + price: number | null + ownerId: string | null + favoriteCount: number | null + createdAt: Date | null + updatedAt: Date | null +} + +export type ProductMaxAggregateOutputType = { + id: string | null + name: string | null + description: string | null + price: number | null + ownerId: string | null + favoriteCount: number | null + createdAt: Date | null + updatedAt: Date | null +} + +export type ProductCountAggregateOutputType = { + id: number + name: number + description: number + price: number + tags: number + images: number + ownerId: number + favoriteCount: number + createdAt: number + updatedAt: number + _all: number +} + + +export type ProductAvgAggregateInputType = { + price?: true + favoriteCount?: true +} + +export type ProductSumAggregateInputType = { + price?: true + favoriteCount?: true +} + +export type ProductMinAggregateInputType = { + id?: true + name?: true + description?: true + price?: true + ownerId?: true + favoriteCount?: true + createdAt?: true + updatedAt?: true +} + +export type ProductMaxAggregateInputType = { + id?: true + name?: true + description?: true + price?: true + ownerId?: true + favoriteCount?: true + createdAt?: true + updatedAt?: true +} + +export type ProductCountAggregateInputType = { + id?: true + name?: true + description?: true + price?: true + tags?: true + images?: true + ownerId?: true + favoriteCount?: true + createdAt?: true + updatedAt?: true + _all?: true +} + +export type ProductAggregateArgs = { + /** + * Filter which Product to aggregate. + */ + where?: Prisma.ProductWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Products to fetch. + */ + orderBy?: Prisma.ProductOrderByWithRelationInput | Prisma.ProductOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.ProductWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `Β±n` Products from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Products. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Products + **/ + _count?: true | ProductCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: ProductAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: ProductSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ProductMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ProductMaxAggregateInputType +} + +export type GetProductAggregateType = { + [P in keyof T & keyof AggregateProduct]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type ProductGroupByArgs = { + where?: Prisma.ProductWhereInput + orderBy?: Prisma.ProductOrderByWithAggregationInput | Prisma.ProductOrderByWithAggregationInput[] + by: Prisma.ProductScalarFieldEnum[] | Prisma.ProductScalarFieldEnum + having?: Prisma.ProductScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ProductCountAggregateInputType | true + _avg?: ProductAvgAggregateInputType + _sum?: ProductSumAggregateInputType + _min?: ProductMinAggregateInputType + _max?: ProductMaxAggregateInputType +} + +export type ProductGroupByOutputType = { + id: string + name: string + description: string + price: number + tags: string[] + images: string[] + ownerId: string | null + favoriteCount: number + createdAt: Date + updatedAt: Date + _count: ProductCountAggregateOutputType | null + _avg: ProductAvgAggregateOutputType | null + _sum: ProductSumAggregateOutputType | null + _min: ProductMinAggregateOutputType | null + _max: ProductMaxAggregateOutputType | null +} + +type GetProductGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof ProductGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type ProductWhereInput = { + AND?: Prisma.ProductWhereInput | Prisma.ProductWhereInput[] + OR?: Prisma.ProductWhereInput[] + NOT?: Prisma.ProductWhereInput | Prisma.ProductWhereInput[] + id?: Prisma.StringFilter<"Product"> | string + name?: Prisma.StringFilter<"Product"> | string + description?: Prisma.StringFilter<"Product"> | string + price?: Prisma.IntFilter<"Product"> | number + tags?: Prisma.StringNullableListFilter<"Product"> + images?: Prisma.StringNullableListFilter<"Product"> + ownerId?: Prisma.StringNullableFilter<"Product"> | string | null + favoriteCount?: Prisma.IntFilter<"Product"> | number + createdAt?: Prisma.DateTimeFilter<"Product"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Product"> | Date | string + comments?: Prisma.CommentListRelationFilter +} + +export type ProductOrderByWithRelationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + price?: Prisma.SortOrder + tags?: Prisma.SortOrder + images?: Prisma.SortOrder + ownerId?: Prisma.SortOrderInput | Prisma.SortOrder + favoriteCount?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + comments?: Prisma.CommentOrderByRelationAggregateInput +} + +export type ProductWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: Prisma.ProductWhereInput | Prisma.ProductWhereInput[] + OR?: Prisma.ProductWhereInput[] + NOT?: Prisma.ProductWhereInput | Prisma.ProductWhereInput[] + name?: Prisma.StringFilter<"Product"> | string + description?: Prisma.StringFilter<"Product"> | string + price?: Prisma.IntFilter<"Product"> | number + tags?: Prisma.StringNullableListFilter<"Product"> + images?: Prisma.StringNullableListFilter<"Product"> + ownerId?: Prisma.StringNullableFilter<"Product"> | string | null + favoriteCount?: Prisma.IntFilter<"Product"> | number + createdAt?: Prisma.DateTimeFilter<"Product"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Product"> | Date | string + comments?: Prisma.CommentListRelationFilter +}, "id"> + +export type ProductOrderByWithAggregationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + price?: Prisma.SortOrder + tags?: Prisma.SortOrder + images?: Prisma.SortOrder + ownerId?: Prisma.SortOrderInput | Prisma.SortOrder + favoriteCount?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + _count?: Prisma.ProductCountOrderByAggregateInput + _avg?: Prisma.ProductAvgOrderByAggregateInput + _max?: Prisma.ProductMaxOrderByAggregateInput + _min?: Prisma.ProductMinOrderByAggregateInput + _sum?: Prisma.ProductSumOrderByAggregateInput +} + +export type ProductScalarWhereWithAggregatesInput = { + AND?: Prisma.ProductScalarWhereWithAggregatesInput | Prisma.ProductScalarWhereWithAggregatesInput[] + OR?: Prisma.ProductScalarWhereWithAggregatesInput[] + NOT?: Prisma.ProductScalarWhereWithAggregatesInput | Prisma.ProductScalarWhereWithAggregatesInput[] + id?: Prisma.StringWithAggregatesFilter<"Product"> | string + name?: Prisma.StringWithAggregatesFilter<"Product"> | string + description?: Prisma.StringWithAggregatesFilter<"Product"> | string + price?: Prisma.IntWithAggregatesFilter<"Product"> | number + tags?: Prisma.StringNullableListFilter<"Product"> + images?: Prisma.StringNullableListFilter<"Product"> + ownerId?: Prisma.StringNullableWithAggregatesFilter<"Product"> | string | null + favoriteCount?: Prisma.IntWithAggregatesFilter<"Product"> | number + createdAt?: Prisma.DateTimeWithAggregatesFilter<"Product"> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Product"> | Date | string +} + +export type ProductCreateInput = { + id?: string + name: string + description: string + price: number + tags?: Prisma.ProductCreatetagsInput | string[] + images?: Prisma.ProductCreateimagesInput | string[] + ownerId?: string | null + favoriteCount?: number + createdAt?: Date | string + updatedAt?: Date | string + comments?: Prisma.CommentCreateNestedManyWithoutProductInput +} + +export type ProductUncheckedCreateInput = { + id?: string + name: string + description: string + price: number + tags?: Prisma.ProductCreatetagsInput | string[] + images?: Prisma.ProductCreateimagesInput | string[] + ownerId?: string | null + favoriteCount?: number + createdAt?: Date | string + updatedAt?: Date | string + comments?: Prisma.CommentUncheckedCreateNestedManyWithoutProductInput +} + +export type ProductUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + price?: Prisma.IntFieldUpdateOperationsInput | number + tags?: Prisma.ProductUpdatetagsInput | string[] + images?: Prisma.ProductUpdateimagesInput | string[] + ownerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + favoriteCount?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + comments?: Prisma.CommentUpdateManyWithoutProductNestedInput +} + +export type ProductUncheckedUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + price?: Prisma.IntFieldUpdateOperationsInput | number + tags?: Prisma.ProductUpdatetagsInput | string[] + images?: Prisma.ProductUpdateimagesInput | string[] + ownerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + favoriteCount?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + comments?: Prisma.CommentUncheckedUpdateManyWithoutProductNestedInput +} + +export type ProductCreateManyInput = { + id?: string + name: string + description: string + price: number + tags?: Prisma.ProductCreatetagsInput | string[] + images?: Prisma.ProductCreateimagesInput | string[] + ownerId?: string | null + favoriteCount?: number + createdAt?: Date | string + updatedAt?: Date | string +} + +export type ProductUpdateManyMutationInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + price?: Prisma.IntFieldUpdateOperationsInput | number + tags?: Prisma.ProductUpdatetagsInput | string[] + images?: Prisma.ProductUpdateimagesInput | string[] + ownerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + favoriteCount?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type ProductUncheckedUpdateManyInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + price?: Prisma.IntFieldUpdateOperationsInput | number + tags?: Prisma.ProductUpdatetagsInput | string[] + images?: Prisma.ProductUpdateimagesInput | string[] + ownerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + favoriteCount?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type StringNullableListFilter<$PrismaModel = never> = { + equals?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + has?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + hasEvery?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + hasSome?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + isEmpty?: boolean +} + +export type ProductCountOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + price?: Prisma.SortOrder + tags?: Prisma.SortOrder + images?: Prisma.SortOrder + ownerId?: Prisma.SortOrder + favoriteCount?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type ProductAvgOrderByAggregateInput = { + price?: Prisma.SortOrder + favoriteCount?: Prisma.SortOrder +} + +export type ProductMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + price?: Prisma.SortOrder + ownerId?: Prisma.SortOrder + favoriteCount?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type ProductMinOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + price?: Prisma.SortOrder + ownerId?: Prisma.SortOrder + favoriteCount?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type ProductSumOrderByAggregateInput = { + price?: Prisma.SortOrder + favoriteCount?: Prisma.SortOrder +} + +export type ProductNullableScalarRelationFilter = { + is?: Prisma.ProductWhereInput | null + isNot?: Prisma.ProductWhereInput | null +} + +export type ProductCreatetagsInput = { + set: string[] +} + +export type ProductCreateimagesInput = { + set: string[] +} + +export type StringFieldUpdateOperationsInput = { + set?: string +} + +export type IntFieldUpdateOperationsInput = { + set?: number + increment?: number + decrement?: number + multiply?: number + divide?: number +} + +export type ProductUpdatetagsInput = { + set?: string[] + push?: string | string[] +} + +export type ProductUpdateimagesInput = { + set?: string[] + push?: string | string[] +} + +export type NullableStringFieldUpdateOperationsInput = { + set?: string | null +} + +export type DateTimeFieldUpdateOperationsInput = { + set?: Date | string +} + +export type ProductCreateNestedOneWithoutCommentsInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.ProductCreateOrConnectWithoutCommentsInput + connect?: Prisma.ProductWhereUniqueInput +} + +export type ProductUpdateOneWithoutCommentsNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.ProductCreateOrConnectWithoutCommentsInput + upsert?: Prisma.ProductUpsertWithoutCommentsInput + disconnect?: Prisma.ProductWhereInput | boolean + delete?: Prisma.ProductWhereInput | boolean + connect?: Prisma.ProductWhereUniqueInput + update?: Prisma.XOR, Prisma.ProductUncheckedUpdateWithoutCommentsInput> +} + +export type ProductCreateWithoutCommentsInput = { + id?: string + name: string + description: string + price: number + tags?: Prisma.ProductCreatetagsInput | string[] + images?: Prisma.ProductCreateimagesInput | string[] + ownerId?: string | null + favoriteCount?: number + createdAt?: Date | string + updatedAt?: Date | string +} + +export type ProductUncheckedCreateWithoutCommentsInput = { + id?: string + name: string + description: string + price: number + tags?: Prisma.ProductCreatetagsInput | string[] + images?: Prisma.ProductCreateimagesInput | string[] + ownerId?: string | null + favoriteCount?: number + createdAt?: Date | string + updatedAt?: Date | string +} + +export type ProductCreateOrConnectWithoutCommentsInput = { + where: Prisma.ProductWhereUniqueInput + create: Prisma.XOR +} + +export type ProductUpsertWithoutCommentsInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.ProductWhereInput +} + +export type ProductUpdateToOneWithWhereWithoutCommentsInput = { + where?: Prisma.ProductWhereInput + data: Prisma.XOR +} + +export type ProductUpdateWithoutCommentsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + price?: Prisma.IntFieldUpdateOperationsInput | number + tags?: Prisma.ProductUpdatetagsInput | string[] + images?: Prisma.ProductUpdateimagesInput | string[] + ownerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + favoriteCount?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type ProductUncheckedUpdateWithoutCommentsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + price?: Prisma.IntFieldUpdateOperationsInput | number + tags?: Prisma.ProductUpdatetagsInput | string[] + images?: Prisma.ProductUpdateimagesInput | string[] + ownerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + favoriteCount?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + + +/** + * Count Type ProductCountOutputType + */ + +export type ProductCountOutputType = { + comments: number +} + +export type ProductCountOutputTypeSelect = { + comments?: boolean | ProductCountOutputTypeCountCommentsArgs +} + +/** + * ProductCountOutputType without action + */ +export type ProductCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the ProductCountOutputType + */ + select?: Prisma.ProductCountOutputTypeSelect | null +} + +/** + * ProductCountOutputType without action + */ +export type ProductCountOutputTypeCountCommentsArgs = { + where?: Prisma.CommentWhereInput +} + + +export type ProductSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + price?: boolean + tags?: boolean + images?: boolean + ownerId?: boolean + favoriteCount?: boolean + createdAt?: boolean + updatedAt?: boolean + comments?: boolean | Prisma.Product$commentsArgs + _count?: boolean | Prisma.ProductCountOutputTypeDefaultArgs +}, ExtArgs["result"]["product"]> + +export type ProductSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + price?: boolean + tags?: boolean + images?: boolean + ownerId?: boolean + favoriteCount?: boolean + createdAt?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["product"]> + +export type ProductSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + price?: boolean + tags?: boolean + images?: boolean + ownerId?: boolean + favoriteCount?: boolean + createdAt?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["product"]> + +export type ProductSelectScalar = { + id?: boolean + name?: boolean + description?: boolean + price?: boolean + tags?: boolean + images?: boolean + ownerId?: boolean + favoriteCount?: boolean + createdAt?: boolean + updatedAt?: boolean +} + +export type ProductOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "price" | "tags" | "images" | "ownerId" | "favoriteCount" | "createdAt" | "updatedAt", ExtArgs["result"]["product"]> +export type ProductInclude = { + comments?: boolean | Prisma.Product$commentsArgs + _count?: boolean | Prisma.ProductCountOutputTypeDefaultArgs +} +export type ProductIncludeCreateManyAndReturn = {} +export type ProductIncludeUpdateManyAndReturn = {} + +export type $ProductPayload = { + name: "Product" + objects: { + comments: Prisma.$CommentPayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: string + name: string + description: string + price: number + tags: string[] + images: string[] + ownerId: string | null + favoriteCount: number + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["product"]> + composites: {} +} + +export type ProductGetPayload = runtime.Types.Result.GetResult + +export type ProductCountArgs = + Omit & { + select?: ProductCountAggregateInputType | true + } + +export interface ProductDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Product'], meta: { name: 'Product' } } + /** + * Find zero or one Product that matches the filter. + * @param {ProductFindUniqueArgs} args - Arguments to find a Product + * @example + * // Get one Product + * const product = await prisma.product.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Product that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ProductFindUniqueOrThrowArgs} args - Arguments to find a Product + * @example + * // Get one Product + * const product = await prisma.product.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Product that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductFindFirstArgs} args - Arguments to find a Product + * @example + * // Get one Product + * const product = await prisma.product.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Product that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductFindFirstOrThrowArgs} args - Arguments to find a Product + * @example + * // Get one Product + * const product = await prisma.product.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Products that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Products + * const products = await prisma.product.findMany() + * + * // Get first 10 Products + * const products = await prisma.product.findMany({ take: 10 }) + * + * // Only select the `id` + * const productWithIdOnly = await prisma.product.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Product. + * @param {ProductCreateArgs} args - Arguments to create a Product. + * @example + * // Create one Product + * const Product = await prisma.product.create({ + * data: { + * // ... data to create a Product + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Products. + * @param {ProductCreateManyArgs} args - Arguments to create many Products. + * @example + * // Create many Products + * const product = await prisma.product.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Products and returns the data saved in the database. + * @param {ProductCreateManyAndReturnArgs} args - Arguments to create many Products. + * @example + * // Create many Products + * const product = await prisma.product.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Products and only return the `id` + * const productWithIdOnly = await prisma.product.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Product. + * @param {ProductDeleteArgs} args - Arguments to delete one Product. + * @example + * // Delete one Product + * const Product = await prisma.product.delete({ + * where: { + * // ... filter to delete one Product + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Product. + * @param {ProductUpdateArgs} args - Arguments to update one Product. + * @example + * // Update one Product + * const product = await prisma.product.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Products. + * @param {ProductDeleteManyArgs} args - Arguments to filter Products to delete. + * @example + * // Delete a few Products + * const { count } = await prisma.product.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Products. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Products + * const product = await prisma.product.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Products and returns the data updated in the database. + * @param {ProductUpdateManyAndReturnArgs} args - Arguments to update many Products. + * @example + * // Update many Products + * const product = await prisma.product.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Products and only return the `id` + * const productWithIdOnly = await prisma.product.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Product. + * @param {ProductUpsertArgs} args - Arguments to update or create a Product. + * @example + * // Update or create a Product + * const product = await prisma.product.upsert({ + * create: { + * // ... data to create a Product + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Product we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Products. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductCountArgs} args - Arguments to filter Products to count. + * @example + * // Count the number of Products + * const count = await prisma.product.count({ + * where: { + * // ... the filter for the Products we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Product. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by Product. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ProductGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: ProductGroupByArgs['orderBy'] } + : { orderBy?: ProductGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetProductGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Product model + */ +readonly fields: ProductFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Product. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ +export interface Prisma__ProductClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + comments = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the Product model + */ +export interface ProductFieldRefs { + readonly id: Prisma.FieldRef<"Product", 'String'> + readonly name: Prisma.FieldRef<"Product", 'String'> + readonly description: Prisma.FieldRef<"Product", 'String'> + readonly price: Prisma.FieldRef<"Product", 'Int'> + readonly tags: Prisma.FieldRef<"Product", 'String[]'> + readonly images: Prisma.FieldRef<"Product", 'String[]'> + readonly ownerId: Prisma.FieldRef<"Product", 'String'> + readonly favoriteCount: Prisma.FieldRef<"Product", 'Int'> + readonly createdAt: Prisma.FieldRef<"Product", 'DateTime'> + readonly updatedAt: Prisma.FieldRef<"Product", 'DateTime'> +} + + +// Custom InputTypes +/** + * Product findUnique + */ +export type ProductFindUniqueArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null + /** + * Filter, which Product to fetch. + */ + where: Prisma.ProductWhereUniqueInput +} + +/** + * Product findUniqueOrThrow + */ +export type ProductFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null + /** + * Filter, which Product to fetch. + */ + where: Prisma.ProductWhereUniqueInput +} + +/** + * Product findFirst + */ +export type ProductFindFirstArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null + /** + * Filter, which Product to fetch. + */ + where?: Prisma.ProductWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Products to fetch. + */ + orderBy?: Prisma.ProductOrderByWithRelationInput | Prisma.ProductOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Products. + */ + cursor?: Prisma.ProductWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `Β±n` Products from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Products. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Products. + */ + distinct?: Prisma.ProductScalarFieldEnum | Prisma.ProductScalarFieldEnum[] +} + +/** + * Product findFirstOrThrow + */ +export type ProductFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null + /** + * Filter, which Product to fetch. + */ + where?: Prisma.ProductWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Products to fetch. + */ + orderBy?: Prisma.ProductOrderByWithRelationInput | Prisma.ProductOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Products. + */ + cursor?: Prisma.ProductWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `Β±n` Products from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Products. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Products. + */ + distinct?: Prisma.ProductScalarFieldEnum | Prisma.ProductScalarFieldEnum[] +} + +/** + * Product findMany + */ +export type ProductFindManyArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null + /** + * Filter, which Products to fetch. + */ + where?: Prisma.ProductWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Products to fetch. + */ + orderBy?: Prisma.ProductOrderByWithRelationInput | Prisma.ProductOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Products. + */ + cursor?: Prisma.ProductWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `Β±n` Products from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Products. + */ + skip?: number + distinct?: Prisma.ProductScalarFieldEnum | Prisma.ProductScalarFieldEnum[] +} + +/** + * Product create + */ +export type ProductCreateArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null + /** + * The data needed to create a Product. + */ + data: Prisma.XOR +} + +/** + * Product createMany + */ +export type ProductCreateManyArgs = { + /** + * The data used to create many Products. + */ + data: Prisma.ProductCreateManyInput | Prisma.ProductCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Product createManyAndReturn + */ +export type ProductCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * The data used to create many Products. + */ + data: Prisma.ProductCreateManyInput | Prisma.ProductCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Product update + */ +export type ProductUpdateArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null + /** + * The data needed to update a Product. + */ + data: Prisma.XOR + /** + * Choose, which Product to update. + */ + where: Prisma.ProductWhereUniqueInput +} + +/** + * Product updateMany + */ +export type ProductUpdateManyArgs = { + /** + * The data used to update Products. + */ + data: Prisma.XOR + /** + * Filter which Products to update + */ + where?: Prisma.ProductWhereInput + /** + * Limit how many Products to update. + */ + limit?: number +} + +/** + * Product updateManyAndReturn + */ +export type ProductUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * The data used to update Products. + */ + data: Prisma.XOR + /** + * Filter which Products to update + */ + where?: Prisma.ProductWhereInput + /** + * Limit how many Products to update. + */ + limit?: number +} + +/** + * Product upsert + */ +export type ProductUpsertArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null + /** + * The filter to search for the Product to update in case it exists. + */ + where: Prisma.ProductWhereUniqueInput + /** + * In case the Product found by the `where` argument doesn't exist, create a new Product with this data. + */ + create: Prisma.XOR + /** + * In case the Product was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Product delete + */ +export type ProductDeleteArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null + /** + * Filter which Product to delete. + */ + where: Prisma.ProductWhereUniqueInput +} + +/** + * Product deleteMany + */ +export type ProductDeleteManyArgs = { + /** + * Filter which Products to delete + */ + where?: Prisma.ProductWhereInput + /** + * Limit how many Products to delete. + */ + limit?: number +} + +/** + * Product.comments + */ +export type Product$commentsArgs = { + /** + * Select specific fields to fetch from the Comment + */ + select?: Prisma.CommentSelect | null + /** + * Omit specific fields from the Comment + */ + omit?: Prisma.CommentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CommentInclude | null + where?: Prisma.CommentWhereInput + orderBy?: Prisma.CommentOrderByWithRelationInput | Prisma.CommentOrderByWithRelationInput[] + cursor?: Prisma.CommentWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.CommentScalarFieldEnum | Prisma.CommentScalarFieldEnum[] +} + +/** + * Product without action + */ +export type ProductDefaultArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: Prisma.ProductSelect | null + /** + * Omit specific fields from the Product + */ + omit?: Prisma.ProductOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ProductInclude | null +} diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..06372a8 --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "target": "esnext", + "module": "nodenext", + "moduleResolution": "nodenext" + }, + "include": ["./generated/", "./src/"] +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..a226917 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,3626 @@ +{ + "name": "11-sprint-mission-be", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "11-sprint-mission-be", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@prisma/adapter-pg": "^7.3.0", + "@prisma/client": "^7.3.0", + "cors": "^2.8.6", + "dotenv": "^17.2.3", + "dotenv-cli": "^11.0.0", + "express": "^5.2.1", + "mongoose": "^9.1.4", + "pg": "^8.17.2", + "zod": "^4.3.6" + }, + "devDependencies": { + "@eslint/js": "^9.39.2", + "@faker-js/faker": "^10.2.0", + "eslint": "^9.39.2", + "nodemon": "^3.1.11", + "prettier": "^3.8.0", + "prisma": "^7.3.0" + }, + "engines": { + "node": ">=22.0.0" + } + }, + "node_modules/@chevrotain/cst-dts-gen": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-10.5.0.tgz", + "integrity": "sha512-lhmC/FyqQ2o7pGK4Om+hzuDrm9rhFYIJ/AXoQBeongmn870Xeb0L6oGEiuR8nohFNL5sMaQEJWCxr1oIVIVXrw==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@chevrotain/gast": "10.5.0", + "@chevrotain/types": "10.5.0", + "lodash": "4.17.21" + } + }, + "node_modules/@chevrotain/gast": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-10.5.0.tgz", + "integrity": "sha512-pXdMJ9XeDAbgOWKuD1Fldz4ieCs6+nLNmyVhe2gZVqoO7v8HXuHYs5OV2EzUtbuai37TlOAQHrTDvxMnvMJz3A==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@chevrotain/types": "10.5.0", + "lodash": "4.17.21" + } + }, + "node_modules/@chevrotain/types": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-10.5.0.tgz", + "integrity": "sha512-f1MAia0x/pAVPWH/T73BJVyO2XU5tI4/iE7cnxb7tqdNTNhQI3Uq3XkqcoteTmD4t1aM0LbHCJOhgIDn07kl2A==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@chevrotain/utils": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-10.5.0.tgz", + "integrity": "sha512-hBzuU5+JjB2cqNZyszkDHZgOSrUUT8V3dhgRl8Q9Gp6dAj/H5+KILGjbhDpc3Iy9qmqlm/akuOI2ut9VUtzJxQ==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@electric-sql/pglite": { + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/@electric-sql/pglite/-/pglite-0.3.15.tgz", + "integrity": "sha512-Cj++n1Mekf9ETfdc16TlDi+cDDQF0W7EcbyRHYOAeZdsAe8M/FJg18itDTSwyHfar2WIezawM9o0EKaRGVKygQ==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@electric-sql/pglite-socket": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/@electric-sql/pglite-socket/-/pglite-socket-0.0.20.tgz", + "integrity": "sha512-J5nLGsicnD9wJHnno9r+DGxfcZWh+YJMCe0q/aCgtG6XOm9Z7fKeite8IZSNXgZeGltSigM9U/vAWZQWdgcSFg==", + "devOptional": true, + "license": "Apache-2.0", + "bin": { + "pglite-server": "dist/scripts/server.js" + }, + "peerDependencies": { + "@electric-sql/pglite": "0.3.15" + } + }, + "node_modules/@electric-sql/pglite-tools": { + "version": "0.2.20", + "resolved": "https://registry.npmjs.org/@electric-sql/pglite-tools/-/pglite-tools-0.2.20.tgz", + "integrity": "sha512-BK50ZnYa3IG7ztXhtgYf0Q7zijV32Iw1cYS8C+ThdQlwx12V5VZ9KRJ42y82Hyb4PkTxZQklVQA9JHyUlex33A==", + "devOptional": true, + "license": "Apache-2.0", + "peerDependencies": { + "@electric-sql/pglite": "0.3.15" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", + "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.7", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.3.tgz", + "integrity": "sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.1", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "9.39.2", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.2.tgz", + "integrity": "sha512-q1mjIoW1VX4IvSocvM/vbTiveKC4k9eLrajNEuSsmjymSDEbpGddtpfOoN7YGAqBK3NG+uqo8ia4PDTt8buCYA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@faker-js/faker": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-10.2.0.tgz", + "integrity": "sha512-rTXwAsIxpCqzUnZvrxVh3L0QA0NzToqWBLAhV+zDV3MIIwiQhAZHMdPCIaj5n/yADu/tyk12wIPgL6YHGXJP+g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/fakerjs" + } + ], + "license": "MIT", + "engines": { + "node": "^20.19.0 || ^22.13.0 || ^23.5.0 || >=24.0.0", + "npm": ">=10" + } + }, + "node_modules/@hono/node-server": { + "version": "1.19.9", + "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.9.tgz", + "integrity": "sha512-vHL6w3ecZsky+8P5MD+eFfaGTyCeOHUIFYMGpQGbrBTSmNNoxv0if69rEZ5giu36weC5saFuznL411gRX7bJDw==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=18.14.1" + }, + "peerDependencies": { + "hono": "^4" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@mongodb-js/saslprep": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.4.4.tgz", + "integrity": "sha512-p7X/ytJDIdwUfFL/CLOhKgdfJe1Fa8uw9seJYvdOmnP9JBWGWHW69HkOixXS6Wy9yvGf1MbhcS6lVmrhy4jm2g==", + "license": "MIT", + "dependencies": { + "sparse-bitfield": "^3.0.3" + } + }, + "node_modules/@mrleebo/prisma-ast": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@mrleebo/prisma-ast/-/prisma-ast-0.13.1.tgz", + "integrity": "sha512-XyroGQXcHrZdvmrGJvsA9KNeOOgGMg1Vg9OlheUsBOSKznLMDl+YChxbkboRHvtFYJEMRYmlV3uoo/njCw05iw==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "chevrotain": "^10.5.0", + "lilconfig": "^2.1.0" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@prisma/adapter-pg": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@prisma/adapter-pg/-/adapter-pg-7.3.0.tgz", + "integrity": "sha512-iuYQMbIPO6i9O45Fv8TB7vWu00BXhCaNAShenqF7gLExGDbnGp5BfFB4yz1K59zQ59jF6tQ9YHrg0P6/J3OoLg==", + "license": "Apache-2.0", + "dependencies": { + "@prisma/driver-adapter-utils": "7.3.0", + "pg": "^8.16.3", + "postgres-array": "3.0.4" + } + }, + "node_modules/@prisma/client": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-7.3.0.tgz", + "integrity": "sha512-FXBIxirqQfdC6b6HnNgxGmU7ydCPEPk7maHMOduJJfnTP+MuOGa15X4omjR/zpPUUpm8ef/mEFQjJudOGkXFcQ==", + "license": "Apache-2.0", + "dependencies": { + "@prisma/client-runtime-utils": "7.3.0" + }, + "engines": { + "node": "^20.19 || ^22.12 || >=24.0" + }, + "peerDependencies": { + "prisma": "*", + "typescript": ">=5.4.0" + }, + "peerDependenciesMeta": { + "prisma": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/@prisma/client-runtime-utils": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@prisma/client-runtime-utils/-/client-runtime-utils-7.3.0.tgz", + "integrity": "sha512-dG/ceD9c+tnXATPk8G+USxxYM9E6UdMTnQeQ+1SZUDxTz7SgQcfxEqafqIQHcjdlcNK/pvmmLfSwAs3s2gYwUw==", + "license": "Apache-2.0" + }, + "node_modules/@prisma/config": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@prisma/config/-/config-7.3.0.tgz", + "integrity": "sha512-QyMV67+eXF7uMtKxTEeQqNu/Be7iH+3iDZOQZW5ttfbSwBamCSdwPszA0dum+Wx27I7anYTPLmRmMORKViSW1A==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "c12": "3.1.0", + "deepmerge-ts": "7.1.5", + "effect": "3.18.4", + "empathic": "2.0.0" + } + }, + "node_modules/@prisma/debug": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-7.3.0.tgz", + "integrity": "sha512-yh/tHhraCzYkffsI1/3a7SHX8tpgbJu1NPnuxS4rEpJdWAUDHUH25F1EDo6PPzirpyLNkgPPZdhojQK804BGtg==", + "license": "Apache-2.0" + }, + "node_modules/@prisma/dev": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@prisma/dev/-/dev-0.20.0.tgz", + "integrity": "sha512-ovlBYwWor0OzG+yH4J3Ot+AneD818BttLA+Ii7wjbcLHUrnC4tbUPVGyNd3c/+71KETPKZfjhkTSpdS15dmXNQ==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "@electric-sql/pglite": "0.3.15", + "@electric-sql/pglite-socket": "0.0.20", + "@electric-sql/pglite-tools": "0.2.20", + "@hono/node-server": "1.19.9", + "@mrleebo/prisma-ast": "0.13.1", + "@prisma/get-platform": "7.2.0", + "@prisma/query-plan-executor": "7.2.0", + "foreground-child": "3.3.1", + "get-port-please": "3.2.0", + "hono": "4.11.4", + "http-status-codes": "2.3.0", + "pathe": "2.0.3", + "proper-lockfile": "4.1.2", + "remeda": "2.33.4", + "std-env": "3.10.0", + "valibot": "1.2.0", + "zeptomatch": "2.1.0" + } + }, + "node_modules/@prisma/driver-adapter-utils": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@prisma/driver-adapter-utils/-/driver-adapter-utils-7.3.0.tgz", + "integrity": "sha512-Wdlezh1ck0Rq2dDINkfSkwbR53q53//Eo1vVqVLwtiZ0I6fuWDGNPxwq+SNAIHnsU+FD/m3aIJKevH3vF13U3w==", + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "7.3.0" + } + }, + "node_modules/@prisma/engines": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-7.3.0.tgz", + "integrity": "sha512-cWRQoPDXPtR6stOWuWFZf9pHdQ/o8/QNWn0m0zByxf5Kd946Q875XdEJ52pEsX88vOiXUmjuPG3euw82mwQNMg==", + "devOptional": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "7.3.0", + "@prisma/engines-version": "7.3.0-16.9d6ad21cbbceab97458517b147a6a09ff43aa735", + "@prisma/fetch-engine": "7.3.0", + "@prisma/get-platform": "7.3.0" + } + }, + "node_modules/@prisma/engines-version": { + "version": "7.3.0-16.9d6ad21cbbceab97458517b147a6a09ff43aa735", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-7.3.0-16.9d6ad21cbbceab97458517b147a6a09ff43aa735.tgz", + "integrity": "sha512-IH2va2ouUHihyiTTRW889LjKAl1CusZOvFfZxCDNpjSENt7g2ndFsK0vdIw/72v7+jCN6YgkHmdAP/BI7SDgyg==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/engines/node_modules/@prisma/get-platform": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-7.3.0.tgz", + "integrity": "sha512-N7c6m4/I0Q6JYmWKP2RCD/sM9eWiyCPY98g5c0uEktObNSZnugW2U/PO+pwL0UaqzxqTXt7gTsYsb0FnMnJNbg==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "7.3.0" + } + }, + "node_modules/@prisma/fetch-engine": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-7.3.0.tgz", + "integrity": "sha512-Mm0F84JMqM9Vxk70pzfNpGJ1lE4hYjOeLMu7nOOD1i83nvp8MSAcFYBnHqLvEZiA6onUR+m8iYogtOY4oPO5lQ==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "7.3.0", + "@prisma/engines-version": "7.3.0-16.9d6ad21cbbceab97458517b147a6a09ff43aa735", + "@prisma/get-platform": "7.3.0" + } + }, + "node_modules/@prisma/fetch-engine/node_modules/@prisma/get-platform": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-7.3.0.tgz", + "integrity": "sha512-N7c6m4/I0Q6JYmWKP2RCD/sM9eWiyCPY98g5c0uEktObNSZnugW2U/PO+pwL0UaqzxqTXt7gTsYsb0FnMnJNbg==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "7.3.0" + } + }, + "node_modules/@prisma/get-platform": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-7.2.0.tgz", + "integrity": "sha512-k1V0l0Td1732EHpAfi2eySTezyllok9dXb6UQanajkJQzPUGi3vO2z7jdkz67SypFTdmbnyGYxvEvYZdZsMAVA==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "7.2.0" + } + }, + "node_modules/@prisma/get-platform/node_modules/@prisma/debug": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-7.2.0.tgz", + "integrity": "sha512-YSGTiSlBAVJPzX4ONZmMotL+ozJwQjRmZweQNIq/ER0tQJKJynNkRB3kyvt37eOfsbMCXk3gnLF6J9OJ4QWftw==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/query-plan-executor": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@prisma/query-plan-executor/-/query-plan-executor-7.2.0.tgz", + "integrity": "sha512-EOZmNzcV8uJ0mae3DhTsiHgoNCuu1J9mULQpGCh62zN3PxPTd+qI9tJvk5jOst8WHKQNwJWR3b39t0XvfBB0WQ==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/studio-core": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@prisma/studio-core/-/studio-core-0.13.1.tgz", + "integrity": "sha512-agdqaPEePRHcQ7CexEfkX1RvSH9uWDb6pXrZnhCRykhDFAV0/0P3d07WtfiY8hZWb7oRU4v+NkT4cGFHkQJIPg==", + "devOptional": true, + "license": "Apache-2.0", + "peerDependencies": { + "@types/react": "^18.0.0 || ^19.0.0", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + } + }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "19.2.9", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.9.tgz", + "integrity": "sha512-Lpo8kgb/igvMIPeNV2rsYKTgaORYdO1XGVZ4Qz3akwOj0ySGYMPlQWa8BaLn0G63D1aSaAQ5ldR06wCpChQCjA==", + "devOptional": true, + "license": "MIT", + "peer": true, + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/webidl-conversions": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz", + "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==", + "license": "MIT" + }, + "node_modules/@types/whatwg-url": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-13.0.0.tgz", + "integrity": "sha512-N8WXpbE6Wgri7KUSvrmQcqrMllKZ9uxkYWMt+mCSGwNc0Hsw9VQTW7ApqI4XNrx6/SaM2QQJCzMPDEXE058s+Q==", + "license": "MIT", + "dependencies": { + "@types/webidl-conversions": "*" + } + }, + "node_modules/accepts": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", + "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", + "license": "MIT", + "dependencies": { + "mime-types": "^3.0.0", + "negotiator": "^1.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/aws-ssl-profiles": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/aws-ssl-profiles/-/aws-ssl-profiles-1.1.2.tgz", + "integrity": "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/body-parser": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz", + "integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==", + "license": "MIT", + "dependencies": { + "bytes": "^3.1.2", + "content-type": "^1.0.5", + "debug": "^4.4.3", + "http-errors": "^2.0.0", + "iconv-lite": "^0.7.0", + "on-finished": "^2.4.1", + "qs": "^6.14.1", + "raw-body": "^3.0.1", + "type-is": "^2.0.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/bson": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/bson/-/bson-7.1.1.tgz", + "integrity": "sha512-TtJgBB+QyOlWjrbM+8bRgH84VM/xrDjyBFgSgGrfZF4xvt6gbEDtcswm27Tn9F9TWsjQybxT8b8VpCP/oJK4Dw==", + "license": "Apache-2.0", + "engines": { + "node": ">=20.19.0" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/c12": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/c12/-/c12-3.1.0.tgz", + "integrity": "sha512-uWoS8OU1MEIsOv8p/5a82c3H31LsWVR5qiyXVfBNOzfffjUWtPnhAb4BYI2uG2HfGmZmFjCtui5XNWaps+iFuw==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "chokidar": "^4.0.3", + "confbox": "^0.2.2", + "defu": "^6.1.4", + "dotenv": "^16.6.1", + "exsolve": "^1.0.7", + "giget": "^2.0.0", + "jiti": "^2.4.2", + "ohash": "^2.0.11", + "pathe": "^2.0.3", + "perfect-debounce": "^1.0.0", + "pkg-types": "^2.2.0", + "rc9": "^2.1.2" + }, + "peerDependencies": { + "magicast": "^0.3.5" + }, + "peerDependenciesMeta": { + "magicast": { + "optional": true + } + } + }, + "node_modules/c12/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/c12/node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "devOptional": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/c12/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chevrotain": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-10.5.0.tgz", + "integrity": "sha512-Pkv5rBY3+CsHOYfV5g/Vs5JY9WTHHDEKOlohI2XeygaZhUeqhAlldZ8Hz9cRmxu709bvS08YzxHdTPHhffc13A==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@chevrotain/cst-dts-gen": "10.5.0", + "@chevrotain/gast": "10.5.0", + "@chevrotain/types": "10.5.0", + "@chevrotain/utils": "10.5.0", + "lodash": "4.17.21", + "regexp-to-ast": "0.5.0" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/citty": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz", + "integrity": "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "consola": "^3.2.3" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/confbox": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.2.tgz", + "integrity": "sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/consola": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", + "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, + "node_modules/content-disposition": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz", + "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", + "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", + "license": "MIT", + "engines": { + "node": ">=6.6.0" + } + }, + "node_modules/cors": { + "version": "2.8.6", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.6.tgz", + "integrity": "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==", + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "devOptional": true, + "license": "MIT", + "peer": true + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/deepmerge-ts": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-7.1.5.tgz", + "integrity": "sha512-HOJkrhaYsweh+W+e74Yn7YStZOilkoPb6fycpwNLKzSPtruFs48nYis0zy5yJz1+ktUhHxoRDJ27RQAWLIJVJw==", + "devOptional": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/defu": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", + "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "devOptional": true, + "license": "Apache-2.0", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destr": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.5.tgz", + "integrity": "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/dotenv": { + "version": "17.2.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz", + "integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dotenv-cli": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/dotenv-cli/-/dotenv-cli-11.0.0.tgz", + "integrity": "sha512-r5pA8idbk7GFWuHEU7trSTflWcdBpQEK+Aw17UrSHjS6CReuhrrPcyC3zcQBPQvhArRHnBo/h6eLH1fkCvNlww==", + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.6", + "dotenv": "^17.1.0", + "dotenv-expand": "^12.0.0", + "minimist": "^1.2.6" + }, + "bin": { + "dotenv": "cli.js" + } + }, + "node_modules/dotenv-expand": { + "version": "12.0.3", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-12.0.3.tgz", + "integrity": "sha512-uc47g4b+4k/M/SeaW1y4OApx+mtLWl92l5LMPP0GNXctZqELk+YGgOPIIC5elYmUH4OuoK3JLhuRUYegeySiFA==", + "license": "BSD-2-Clause", + "dependencies": { + "dotenv": "^16.4.5" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dotenv-expand/node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/effect": { + "version": "3.18.4", + "resolved": "https://registry.npmjs.org/effect/-/effect-3.18.4.tgz", + "integrity": "sha512-b1LXQJLe9D11wfnOKAk3PKxuqYshQ0Heez+y5pnkd3jLj1yx9QhM72zZ9uUrOQyNvrs2GZZd/3maL0ZV18YuDA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.0.0", + "fast-check": "^3.23.1" + } + }, + "node_modules/empathic": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/empathic/-/empathic-2.0.0.tgz", + "integrity": "sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.39.2", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.2.tgz", + "integrity": "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.1", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.39.2", + "@eslint/plugin-kit": "^0.4.1", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz", + "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", + "license": "MIT", + "dependencies": { + "accepts": "^2.0.0", + "body-parser": "^2.2.1", + "content-disposition": "^1.0.0", + "content-type": "^1.0.5", + "cookie": "^0.7.1", + "cookie-signature": "^1.2.1", + "debug": "^4.4.0", + "depd": "^2.0.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "finalhandler": "^2.1.0", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "merge-descriptors": "^2.0.0", + "mime-types": "^3.0.0", + "on-finished": "^2.4.1", + "once": "^1.4.0", + "parseurl": "^1.3.3", + "proxy-addr": "^2.0.7", + "qs": "^6.14.0", + "range-parser": "^1.2.1", + "router": "^2.2.0", + "send": "^1.1.0", + "serve-static": "^2.2.0", + "statuses": "^2.0.1", + "type-is": "^2.0.1", + "vary": "^1.1.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/exsolve": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.0.8.tgz", + "integrity": "sha512-LmDxfWXwcTArk8fUEnOfSZpHOJ6zOMUJKOtFLFqJLoKJetuQG874Uc7/Kki7zFLzYybmZhp1M7+98pfMqeX8yA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/fast-check": { + "version": "3.23.2", + "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.23.2.tgz", + "integrity": "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A==", + "devOptional": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT", + "dependencies": { + "pure-rand": "^6.1.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz", + "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", + "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/generate-function": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "is-property": "^1.0.2" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-port-please": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port-please/-/get-port-please-3.2.0.tgz", + "integrity": "sha512-I9QVvBw5U/hw3RmWpYKRumUeaDgxTPd401x364rLmWBJcOQ753eov1eTgzDqRG9bqFIfDc7gfzcQEWrUri3o1A==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/giget": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/giget/-/giget-2.0.0.tgz", + "integrity": "sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.4.0", + "defu": "^6.1.4", + "node-fetch-native": "^1.6.6", + "nypm": "^0.6.0", + "pathe": "^2.0.3" + }, + "bin": { + "giget": "dist/cli.mjs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "devOptional": true, + "license": "ISC" + }, + "node_modules/grammex": { + "version": "3.1.12", + "resolved": "https://registry.npmjs.org/grammex/-/grammex-3.1.12.tgz", + "integrity": "sha512-6ufJOsSA7LcQehIJNCO7HIBykfM7DXQual0Ny780/DEcJIpBlHRvcqEBWGPYd7hrXL2GJ3oJI1MIhaXjWmLQOQ==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/graphmatch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/graphmatch/-/graphmatch-1.1.0.tgz", + "integrity": "sha512-0E62MaTW5rPZVRLyIJZG/YejmdA/Xr1QydHEw3Vt+qOKkMIOE8WDLc9ZX2bmAjtJFZcId4lEdrdmASsEy7D1QA==", + "devOptional": true + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hono": { + "version": "4.11.4", + "resolved": "https://registry.npmjs.org/hono/-/hono-4.11.4.tgz", + "integrity": "sha512-U7tt8JsyrxSRKspfhtLET79pU8K+tInj5QZXs1jSugO1Vq5dFj3kmZsRldo29mTBfcjDRVRXrEZ6LS63Cog9ZA==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/http-status-codes": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/http-status-codes/-/http-status-codes-2.3.0.tgz", + "integrity": "sha512-RJ8XvFvpPM/Dmc5SV+dC4y5PCeOhT3x1Hq0NU3rjGeg5a/CqlhZ7uudknPwZFz4aeAXDcbAyaeP7GAo9lvngtA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/iconv-lite": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", + "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "dev": true, + "license": "ISC" + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-promise": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", + "license": "MIT" + }, + "node_modules/is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" + }, + "node_modules/jiti": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", + "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", + "devOptional": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/kareem": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-3.0.0.tgz", + "integrity": "sha512-RKhaOBSPN8L7y4yAgNhDT2602G5FD6QbOIISbjN9D6mjHPeqeg7K+EB5IGSU5o81/X2Gzm3ICnAvQW3x3OP8HA==", + "license": "Apache-2.0", + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lilconfig": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", + "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/long": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/lru.min": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/lru.min/-/lru.min-1.1.3.tgz", + "integrity": "sha512-Lkk/vx6ak3rYkRR0Nhu4lFUT2VDnQSxBe8Hbl7f36358p6ow8Bnvr8lrLt98H8J1aGxfhbX4Fs5tYg2+FTwr5Q==", + "devOptional": true, + "license": "MIT", + "engines": { + "bun": ">=1.0.0", + "deno": ">=1.30.0", + "node": ">=8.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wellwelwel" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", + "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "license": "MIT" + }, + "node_modules/merge-descriptors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", + "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mongodb": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-7.0.0.tgz", + "integrity": "sha512-vG/A5cQrvGGvZm2mTnCSz1LUcbOPl83hfB6bxULKQ8oFZauyox/2xbZOoGNl+64m8VBrETkdGCDBdOsCr3F3jg==", + "license": "Apache-2.0", + "dependencies": { + "@mongodb-js/saslprep": "^1.3.0", + "bson": "^7.0.0", + "mongodb-connection-string-url": "^7.0.0" + }, + "engines": { + "node": ">=20.19.0" + }, + "peerDependencies": { + "@aws-sdk/credential-providers": "^3.806.0", + "@mongodb-js/zstd": "^7.0.0", + "gcp-metadata": "^7.0.1", + "kerberos": "^7.0.0", + "mongodb-client-encryption": ">=7.0.0 <7.1.0", + "snappy": "^7.3.2", + "socks": "^2.8.6" + }, + "peerDependenciesMeta": { + "@aws-sdk/credential-providers": { + "optional": true + }, + "@mongodb-js/zstd": { + "optional": true + }, + "gcp-metadata": { + "optional": true + }, + "kerberos": { + "optional": true + }, + "mongodb-client-encryption": { + "optional": true + }, + "snappy": { + "optional": true + }, + "socks": { + "optional": true + } + } + }, + "node_modules/mongodb-connection-string-url": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-7.0.0.tgz", + "integrity": "sha512-irhhjRVLE20hbkRl4zpAYLnDMM+zIZnp0IDB9akAFFUZp/3XdOfwwddc7y6cNvF2WCEtfTYRwYbIfYa2kVY0og==", + "license": "Apache-2.0", + "dependencies": { + "@types/whatwg-url": "^13.0.0", + "whatwg-url": "^14.1.0" + }, + "engines": { + "node": ">=20.19.0" + } + }, + "node_modules/mongoose": { + "version": "9.1.4", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-9.1.4.tgz", + "integrity": "sha512-V8JIyoWKWW+R2COlOsh6gaYw9TvczSiP/cN3Yuk1pv7ws5VNFAy5GPrK8jfz9tVYovmqdWOJRurMjL4ilYn9wA==", + "license": "MIT", + "dependencies": { + "kareem": "3.0.0", + "mongodb": "~7.0", + "mpath": "0.9.0", + "mquery": "6.0.0", + "ms": "2.1.3", + "sift": "17.1.3" + }, + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mongoose" + } + }, + "node_modules/mpath": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", + "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==", + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/mquery": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/mquery/-/mquery-6.0.0.tgz", + "integrity": "sha512-b2KQNsmgtkscfeDgkYMcWGn9vZI9YoXh802VDEwE6qc50zxBFQ0Oo8ROkawbPAsXCY1/Z1yp0MagqsZStPWJjw==", + "license": "MIT", + "engines": { + "node": ">=20.19.0" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/mysql2": { + "version": "3.15.3", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.15.3.tgz", + "integrity": "sha512-FBrGau0IXmuqg4haEZRBfHNWB5mUARw6hNwPDXXGg0XzVJ50mr/9hb267lvpVMnhZ1FON3qNd4Xfcez1rbFwSg==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "aws-ssl-profiles": "^1.1.1", + "denque": "^2.1.0", + "generate-function": "^2.3.1", + "iconv-lite": "^0.7.0", + "long": "^5.2.1", + "lru.min": "^1.0.0", + "named-placeholders": "^1.1.3", + "seq-queue": "^0.0.5", + "sqlstring": "^2.3.2" + }, + "engines": { + "node": ">= 8.0" + } + }, + "node_modules/named-placeholders": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.6.tgz", + "integrity": "sha512-Tz09sEL2EEuv5fFowm419c1+a/jSMiBjI9gHxVLrVdbUkkNUUfjsVYs9pVZu5oCon/kmRh9TfLEObFtkVxmY0w==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "lru.min": "^1.1.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-fetch-native": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.7.tgz", + "integrity": "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/nodemon": { + "version": "3.1.11", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.11.tgz", + "integrity": "sha512-is96t8F/1//UHAjNPHpbsNY46ELPpftGUoSVNXwUfMk/qdjSylYrWSu1XavVTBOn526kFiOR733ATgNBCQyH0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^3.5.2", + "debug": "^4", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^7.5.3", + "simple-update-notifier": "^2.0.0", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/nodemon/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/nodemon/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nypm": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/nypm/-/nypm-0.6.4.tgz", + "integrity": "sha512-1TvCKjZyyklN+JJj2TS3P4uSQEInrM/HkkuSXsEzm1ApPgBffOn8gFguNnZf07r/1X6vlryfIqMUkJKQMzlZiw==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "citty": "^0.2.0", + "pathe": "^2.0.3", + "tinyexec": "^1.0.2" + }, + "bin": { + "nypm": "dist/cli.mjs" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/nypm/node_modules/citty": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/citty/-/citty-0.2.0.tgz", + "integrity": "sha512-8csy5IBFI2ex2hTVpaHN2j+LNE199AgiI7y4dMintrr8i0lQiFn+0AWMZrWdHKIgMOer65f8IThysYhoReqjWA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ohash": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.11.tgz", + "integrity": "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-to-regexp": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", + "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/perfect-debounce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz", + "integrity": "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/pg": { + "version": "8.17.2", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.17.2.tgz", + "integrity": "sha512-vjbKdiBJRqzcYw1fNU5KuHyYvdJ1qpcQg1CeBrHFqV1pWgHeVR6j/+kX0E1AAXfyuLUGY1ICrN2ELKA/z2HWzw==", + "license": "MIT", + "dependencies": { + "pg-connection-string": "^2.10.1", + "pg-pool": "^3.11.0", + "pg-protocol": "^1.11.0", + "pg-types": "2.2.0", + "pgpass": "1.0.5" + }, + "engines": { + "node": ">= 16.0.0" + }, + "optionalDependencies": { + "pg-cloudflare": "^1.3.0" + }, + "peerDependencies": { + "pg-native": ">=3.0.1" + }, + "peerDependenciesMeta": { + "pg-native": { + "optional": true + } + } + }, + "node_modules/pg-cloudflare": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.3.0.tgz", + "integrity": "sha512-6lswVVSztmHiRtD6I8hw4qP/nDm1EJbKMRhf3HCYaqud7frGysPv7FYJ5noZQdhQtN2xJnimfMtvQq21pdbzyQ==", + "license": "MIT", + "optional": true + }, + "node_modules/pg-connection-string": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.10.1.tgz", + "integrity": "sha512-iNzslsoeSH2/gmDDKiyMqF64DATUCWj3YJ0wP14kqcsf2TUklwimd+66yYojKwZCA7h2yRNLGug71hCBA2a4sw==", + "license": "MIT" + }, + "node_modules/pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", + "license": "ISC", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/pg-pool": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.11.0.tgz", + "integrity": "sha512-MJYfvHwtGp870aeusDh+hg9apvOe2zmpZJpyt+BMtzUWlVqbhFmMK6bOBXLBUPd7iRtIF9fZplDc7KrPN3PN7w==", + "license": "MIT", + "peerDependencies": { + "pg": ">=8.0" + } + }, + "node_modules/pg-protocol": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.11.0.tgz", + "integrity": "sha512-pfsxk2M9M3BuGgDOfuy37VNRRX3jmKgMjcvAcWqNDpZSf4cUmv8HSOl5ViRQFsfARFn0KuUQTgLxVMbNq5NW3g==", + "license": "MIT" + }, + "node_modules/pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "license": "MIT", + "dependencies": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pg-types/node_modules/postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/pgpass": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", + "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", + "license": "MIT", + "dependencies": { + "split2": "^4.1.0" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-types": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.3.0.tgz", + "integrity": "sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "confbox": "^0.2.2", + "exsolve": "^1.0.7", + "pathe": "^2.0.3" + } + }, + "node_modules/postgres": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/postgres/-/postgres-3.4.7.tgz", + "integrity": "sha512-Jtc2612XINuBjIl/QTWsV5UvE8UHuNblcO3vVADSrKsrc6RqGX6lOW1cEo3CM2v0XG4Nat8nI+YM7/f26VxXLw==", + "devOptional": true, + "license": "Unlicense", + "engines": { + "node": ">=12" + }, + "funding": { + "type": "individual", + "url": "https://github.com/sponsors/porsager" + } + }, + "node_modules/postgres-array": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-3.0.4.tgz", + "integrity": "sha512-nAUSGfSDGOaOAEGwqsRY27GPOea7CNipJPOA7lPbdEpx5Kg3qzdP0AaWC5MlhTWV9s4hFX39nomVZ+C4tnGOJQ==", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/postgres-bytea": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.1.tgz", + "integrity": "sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "license": "MIT", + "dependencies": { + "xtend": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.0.tgz", + "integrity": "sha512-yEPsovQfpxYfgWNhCfECjG5AQaO+K3dp6XERmOepyPDVqcJm+bjyCVO3pmU+nAPe0N5dDvekfGezt/EIiRe1TA==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prisma": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-7.3.0.tgz", + "integrity": "sha512-ApYSOLHfMN8WftJA+vL6XwAPOh/aZ0BgUyyKPwUFgjARmG6EBI9LzDPf6SWULQMSAxydV9qn5gLj037nPNlg2w==", + "devOptional": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/config": "7.3.0", + "@prisma/dev": "0.20.0", + "@prisma/engines": "7.3.0", + "@prisma/studio-core": "0.13.1", + "mysql2": "3.15.3", + "postgres": "3.4.7" + }, + "bin": { + "prisma": "build/index.js" + }, + "engines": { + "node": "^20.19 || ^22.12 || >=24.0" + }, + "peerDependencies": { + "better-sqlite3": ">=9.0.0", + "typescript": ">=5.4.0" + }, + "peerDependenciesMeta": { + "better-sqlite3": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/proper-lockfile": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", + "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "retry": "^0.12.0", + "signal-exit": "^3.0.2" + } + }, + "node_modules/proper-lockfile/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "devOptional": true, + "license": "ISC" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true, + "license": "MIT" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "devOptional": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "node_modules/qs": { + "version": "6.14.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz", + "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz", + "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.7.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/rc9": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/rc9/-/rc9-2.1.2.tgz", + "integrity": "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "defu": "^6.1.4", + "destr": "^2.0.3" + } + }, + "node_modules/react": { + "version": "19.2.3", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz", + "integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==", + "devOptional": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.2.3", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.3.tgz", + "integrity": "sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==", + "devOptional": true, + "license": "MIT", + "peer": true, + "dependencies": { + "scheduler": "^0.27.0" + }, + "peerDependencies": { + "react": "^19.2.3" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/regexp-to-ast": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/regexp-to-ast/-/regexp-to-ast-0.5.0.tgz", + "integrity": "sha512-tlbJqcMHnPKI9zSrystikWKwHkBqu2a/Sgw01h3zFjvYrMxEDYHzzoMZnUrbIfpTFEsoRnnviOXNCzFiSc54Qw==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/remeda": { + "version": "2.33.4", + "resolved": "https://registry.npmjs.org/remeda/-/remeda-2.33.4.tgz", + "integrity": "sha512-ygHswjlc/opg2VrtiYvUOPLjxjtdKvjGz1/plDhkG66hjNjFr1xmfrs2ClNFo/E6TyUFiwYNh53bKV26oBoMGQ==", + "devOptional": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/remeda" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/router": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", + "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "depd": "^2.0.0", + "is-promise": "^4.0.0", + "parseurl": "^1.3.3", + "path-to-regexp": "^8.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/scheduler": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "devOptional": true, + "license": "MIT", + "peer": true + }, + "node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz", + "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.3", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "fresh": "^2.0.0", + "http-errors": "^2.0.1", + "mime-types": "^3.0.2", + "ms": "^2.1.3", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "statuses": "^2.0.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/seq-queue": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", + "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==", + "devOptional": true + }, + "node_modules/serve-static": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz", + "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==", + "license": "MIT", + "dependencies": { + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "parseurl": "^1.3.3", + "send": "^1.2.0" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sift": { + "version": "17.1.3", + "resolved": "https://registry.npmjs.org/sift/-/sift-17.1.3.tgz", + "integrity": "sha512-Rtlj66/b0ICeFzYTuNvX/EF1igRbbnGSvEyT79McoZa/DeGhMyC5pWKOEsZKnpkqtSeovd5FL/bjHWC3CIIvCQ==", + "license": "MIT" + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "devOptional": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/simple-update-notifier": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", + "license": "MIT", + "dependencies": { + "memory-pager": "^1.0.2" + } + }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "license": "ISC", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/sqlstring": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/std-env": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz", + "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tinyexec": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.2.tgz", + "integrity": "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/touch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", + "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", + "dev": true, + "license": "ISC", + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/tr46": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.1.1.tgz", + "integrity": "sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==", + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-is": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", + "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", + "license": "MIT", + "dependencies": { + "content-type": "^1.0.5", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true, + "license": "MIT" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/valibot": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/valibot/-/valibot-1.2.0.tgz", + "integrity": "sha512-mm1rxUsmOxzrwnX5arGS+U4T25RdvpPjPN4yR0u9pUBov9+zGVtO84tif1eY4r6zWxVxu3KzIyknJy3rxfRZZg==", + "devOptional": true, + "license": "MIT", + "peerDependencies": { + "typescript": ">=5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-url": { + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz", + "integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==", + "license": "MIT", + "dependencies": { + "tr46": "^5.1.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zeptomatch": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/zeptomatch/-/zeptomatch-2.1.0.tgz", + "integrity": "sha512-KiGErG2J0G82LSpniV0CtIzjlJ10E04j02VOudJsPyPwNZgGnRKQy7I1R7GMyg/QswnE4l7ohSGrQbQbjXPPDA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "grammex": "^3.1.11", + "graphmatch": "^1.1.0" + } + }, + "node_modules/zod": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", + "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..2b2f51d --- /dev/null +++ b/package.json @@ -0,0 +1,53 @@ +{ + "name": "11-sprint-mission-be", + "version": "1.0.0", + "description": "", + "main": "src/server.js", + "type": "module", + "engines": { + "node": ">=22.0.0" + }, + "imports": { + "#generated/*": "./generated/*", + "#config": "./src/config/config.js", + "#db/*": "./src/db/*", + "#repository": "./src/repository/index.js", + "#constants": "./src/constants/index.js", + "#utils": "./src/utils/index.js", + "#middlewares": "./src/middlewares/index.js", + "#exceptions": "./src/exceptions/index.js", + "#models": "./src/models/index.js" + }, + "scripts": { + "dev": "nodemon --env-file=./env/.env.development src/server.js", + "prod": "node --env-file=./env/.env.production src/server.js", + "prisma:migrate": "dotenv -e ./env/.env.development -- npx prisma migrate dev", + "prisma:studio": "dotenv -e ./env/.env.development -- npx prisma studio", + "prisma:generate": "dotenv -e ./env/.env.development -- npx prisma generate", + "seed": "node --env-file=./env/.env.development scripts/seed.js", + "format": "prettier --write src/**/*.js", + "format:check": "prettier --check src/**/*.js" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "@prisma/adapter-pg": "^7.3.0", + "@prisma/client": "^7.3.0", + "cors": "^2.8.6", + "dotenv": "^17.2.3", + "dotenv-cli": "^11.0.0", + "express": "^5.2.1", + "mongoose": "^9.1.4", + "pg": "^8.17.2", + "zod": "^4.3.6" + }, + "devDependencies": { + "@eslint/js": "^9.39.2", + "@faker-js/faker": "^10.2.0", + "eslint": "^9.39.2", + "nodemon": "^3.1.11", + "prettier": "^3.8.0", + "prisma": "^7.3.0" + } +} diff --git a/prisma.config.js b/prisma.config.js new file mode 100644 index 0000000..ee294e1 --- /dev/null +++ b/prisma.config.js @@ -0,0 +1,11 @@ +import { defineConfig, env } from 'prisma/config'; + +export default defineConfig({ + schema: 'prisma/schema.prisma', + migrations: { + path: 'prisma/migrations', + }, + datasource: { + url: env('DATABASE_URL'), + }, +}); diff --git a/prisma/migrations/20260124152207_init/migration.sql b/prisma/migrations/20260124152207_init/migration.sql new file mode 100644 index 0000000..d766536 --- /dev/null +++ b/prisma/migrations/20260124152207_init/migration.sql @@ -0,0 +1,44 @@ +-- CreateTable +CREATE TABLE "Product" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "description" TEXT NOT NULL, + "price" INTEGER NOT NULL, + "tags" TEXT[], + "images" TEXT[], + "ownerId" TEXT, + "favoriteCount" INTEGER NOT NULL DEFAULT 0, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "Product_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Article" ( + "id" TEXT NOT NULL, + "title" TEXT NOT NULL, + "content" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "Article_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Comment" ( + "id" TEXT NOT NULL, + "content" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "articleId" TEXT, + "productId" TEXT, + + CONSTRAINT "Comment_pkey" PRIMARY KEY ("id") +); + +-- AddForeignKey +ALTER TABLE "Comment" ADD CONSTRAINT "Comment_articleId_fkey" FOREIGN KEY ("articleId") REFERENCES "Article"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Comment" ADD CONSTRAINT "Comment_productId_fkey" FOREIGN KEY ("productId") REFERENCES "Product"("id") ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml new file mode 100644 index 0000000..044d57c --- /dev/null +++ b/prisma/migrations/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (e.g., Git) +provider = "postgresql" diff --git a/prisma/schema.prisma b/prisma/schema.prisma new file mode 100644 index 0000000..7ff65c0 --- /dev/null +++ b/prisma/schema.prisma @@ -0,0 +1,45 @@ +// Prisma Client 생성 μ„€μ • +generator client { + provider = "prisma-client" + output = "../generated/prisma" +} + +// λ°μ΄ν„°λ² μ΄μŠ€ μ—°κ²° μ„€μ • +datasource db { + provider = "postgresql" +} + +model Product { + id String @id @default(cuid()) + name String + description String + price Int + tags String[] + images String[] + ownerId String? + favoriteCount Int @default(0) + comments Comment[] + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +} + +model Article { + id String @id @default(cuid()) + title String + content String + comments Comment[] + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +} + +model Comment { + id String @id @default(cuid()) + content String + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + article Article? @relation(fields: [articleId], references: [id], onDelete: Cascade) + articleId String? + product Product? @relation(fields: [productId], references: [id], onDelete: Cascade) + productId String? +} diff --git a/scripts/seed.js b/scripts/seed.js new file mode 100644 index 0000000..6f20351 --- /dev/null +++ b/scripts/seed.js @@ -0,0 +1,119 @@ +import { PrismaClient } from '#generated/prisma/client.ts'; +import { PrismaPg } from '@prisma/adapter-pg'; +import { faker } from '@faker-js/faker'; +import { isDevelopment } from '#config'; + +const DEFAULT_SEED_COUNT = 5; + +const xs = (n) => Array.from({ length: n }, (_, i) => i + 1); + +const makeProductInput = () => ({ + name: faker.commerce.productName(), + description: faker.lorem.paragraph(), + price: faker.number.int({ min: 1000, max: 50000 }), +}); + +const makeCommentInputForProduct = (productId, count) => + xs(count).map(() => ({ + content: faker.lorem.sentence(), + productId, + })); + +const makeArticleInput = () => ({ + title: faker.lorem.sentence(), + content: faker.lorem.paragraphs({ min: 2, max: 5 }, '\n\n'), +}); + +const makeCommentInputForArticle = (articleId, count) => + xs(count).map(() => ({ + content: faker.lorem.sentence(), + articleId, + })); + +const resetDb = (prisma) => + prisma.$transaction([ + prisma.comment.deleteMany(), + prisma.product.deleteMany(), + prisma.article.deleteMany(), + ]); + +const seedProducts = async (prisma, count) => { + const data = xs(count).map(makeProductInput); // faker둜 κ°€μ§œ ν•„λ“œ 객체 λ°°μ—΄ λ§Œλ“€κΈ° + + const result = []; + + for (let i = 0; i < count; i++) { + // 객체 ν•˜λ‚˜μ”© κΊΌλ‚΄μ„œ id만 λͺ¨μ•„μ„œ 리턴 + const created = await prisma.product.create({ data: data[i] }); + result.push({ id: created.id }); + } + return result; +}; + +const seedCommentsForProduct = async (prisma, products) => { + const data = products + .map((p) => ({ + id: p.id, + count: faker.number.int({ min: 1, max: 3 }), + })) + .flatMap(({ id, count }) => makeCommentInputForProduct(id, count)); // ν‰ν‰ν•œ λ°°μ—΄λ‘œ λ§Œλ“€κΈ° + + await prisma.comment.createMany({ data }); +}; + +const seedArticles = async (prisma, count) => { + const data = xs(count).map(makeArticleInput); + + const result = []; + + for (let i = 0; i < count; i++) { + const created = await prisma.article.create({ data: data[i] }); + result.push({ id: created.id }); + } + return result; +}; + +const seedCommentsForArticle = async (prisma, articles) => { + const data = articles + .map((a) => ({ + id: a.id, + count: faker.number.int({ min: 1, max: 3 }), + })) + .flatMap(({ id, count }) => makeCommentInputForArticle(id, count)); // ν‰ν‰ν•œ λ°°μ—΄λ‘œ λ§Œλ“€κΈ° + + await prisma.comment.createMany({ data }); +}; + +async function main(prisma) { + if (!isDevelopment) { + throw new Error('⚠️ ν”„λ‘œλ•μ…˜ ν™˜κ²½μ—μ„œλŠ” μ‹œλ”©μ„ μ‹€ν–‰ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€'); + } + + console.log('🌱 μ‹œλ”© μ‹œμž‘...'); + + await resetDb(prisma); + console.log('βœ… κΈ°μ‘΄ 데이터 μ‚­μ œ μ™„λ£Œ'); + + const products = await seedProducts(prisma, DEFAULT_SEED_COUNT); + await seedCommentsForProduct(prisma, products); + console.log(`βœ… ${products.length}개의 μƒν’ˆμ΄ μƒμ„±λ˜μ—ˆμŠ΅λ‹ˆλ‹€`); + + const articles = await seedArticles(prisma, DEFAULT_SEED_COUNT); + await seedCommentsForArticle(prisma, articles); + console.log(`βœ… ${articles.length}개의 κ²Œμ‹œκΈ€μ΄ μƒμ„±λ˜μ—ˆμŠ΅λ‹ˆλ‹€`); + + console.log('βœ… 데이터 μ‹œλ”© μ™„λ£Œ'); +} + +const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL }); + +const prisma = new PrismaClient({ adapter }); + +main(prisma) + .catch((e) => { + console.error('❌ μ‹œλ”© μ—λŸ¬:', e); + process.exit(1); + }) + .finally(async () => { + await prisma.$disconnect(); + }); diff --git a/src/config/config.js b/src/config/config.js new file mode 100644 index 0000000..e80a996 --- /dev/null +++ b/src/config/config.js @@ -0,0 +1,33 @@ +import { flattenError, z } from 'zod'; + +// ν™˜κ²½ λ³€μˆ˜ 검증 +const envSchema = z.object({ + NODE_ENV: z + .enum(['development', 'production', 'test']) + .default('development'), + PORT: z.coerce.number().min(1000).max(65535).default(5001), + DATABASE_URL: z.url(), +}); + +const parseEnvironment = () => { + try { + return envSchema.parse({ + NODE_ENV: process.env.NODE_ENV, + PORT: process.env.PORT, + DATABASE_URL: process.env.DATABASE_URL, + }); + } catch (error) { + if (error instanceof z.ZodError) { + const flatten = flattenError(error); + console.error('ν™˜κ²½ λ³€μˆ˜ 검증 μ‹€νŒ¨:', flatten); + } + process.exit(1); + } +}; + +export const config = parseEnvironment(); + +// ν™˜κ²½λ³„ 헬퍼 μƒμˆ˜ +export const isDevelopment = config.NODE_ENV === 'development'; // boolean +export const isProduction = config.NODE_ENV === 'production'; // boolean +export const isTest = config.NODE_ENV === 'test'; // boolean diff --git a/src/constants/errors.js b/src/constants/errors.js new file mode 100644 index 0000000..726ab83 --- /dev/null +++ b/src/constants/errors.js @@ -0,0 +1,64 @@ +// Prisma μ—λŸ¬ μ½”λ“œ μƒμˆ˜ +export const PRISMA_ERROR = { + UNIQUE_CONSTRAINT: 'P2002', // Unique constraint μœ„λ°˜ + RECORD_NOT_FOUND: 'P2025', // λ ˆμ½”λ“œλ₯Ό 찾을 수 μ—†μŒ +}; + +// μ—λŸ¬ λ©”μ„Έμ§€ μƒμˆ˜ +export const ERROR_MESSAGE = { + // Product + PRODUCT_NOT_FOUND: 'Product not found', + PRODUCT_ID_REQUIRED: 'Product ID is required', + PRODUCT_NAME_REQUIRED: 'Product name is required', + PRODUCT_NAME_TOO_SHORT: 'Product name must be at least 1 character', + PRODUCT_NAME_TOO_LONG: 'Product name must be at most 10 characters', + PRODUCT_DESCRIPTION_REQUIRED: 'Product description is required', + PRODUCT_DESCRIPTION_TOO_SHORT: + 'Product description must be at least 10 characters', + PRODUCT_DESCRIPTION_TOO_LONG: + 'Product description must be at most 100 characters', + PRODUCT_PRICE_REQUIRED: 'Product price is required', + PRODUCT_PRICE_INVALID: 'Product price must be a positive number', + PRODUCT_TAG_TOO_LONG: 'Product tag must be at most 5 characters', + FAILED_TO_FETCH_PRODUCTS: 'Failed to fetch products', + FAILED_TO_CREATE_PRODUCT: 'Failed to create product', + FAILED_TO_UPDATE_PRODUCT: 'Failed to update product', + FAILED_TO_DELETE_PRODUCT: 'Failed to delete product', + + // Article + ARTICLE_NOT_FOUND: 'Article not found', + ARTICLE_ID_REQUIRED: 'Article ID is required', + ARTICLE_TITLE_REQUIRED: 'Article title is required', + ARTICLE_TITLE_TOO_SHORT: 'Article title must be at least 2 characters', + ARTICLE_TITLE_TOO_LONG: 'Article title must be at most 20 characters', + ARTICLE_CONTENT_REQUIRED: 'Article content is required', + ARTICLE_CONTENT_TOO_SHORT: 'Article content must be at least 1 character', + ARTICLE_CONTENT_TOO_LONG: 'Article content must be at most 500 characters', + FAILED_TO_FETCH_ARTICLES: 'Failed to fetch articles', + FAILED_TO_CREATE_ARTICLE: 'Failed to create article', + FAILED_TO_UPDATE_ARTICLE: 'Failed to update article', + FAILED_TO_DELETE_ARTICLE: 'Failed to delete article', + + // Comment + COMMENT_NOT_FOUND: 'Comment not found', + COMMENT_ID_REQUIRED: 'Comment ID is required', + COMMENT_CONTENT_REQUIRED: 'Comment content is required', + COMMENT_CONTENT_TOO_LONG: 'Comment content must be at most 200 characters', + FAILED_TO_FETCH_COMMENTS: 'Failed to fetch comments', + FAILED_TO_CREATE_COMMENT: 'Failed to create comment', + FAILED_TO_UPDATE_COMMENT: 'Failed to update comment', + FAILED_TO_DELETE_COMMENT: 'Failed to delete comment', + + // Pagination / Validation + INVALID_INPUT: 'Invalid input', + VALIDATION_FAILED: 'Validation failed', + INVALID_PAGE: 'Page must be a number greater than or equal to 1', + INVALID_LIMIT: 'Limit must be a number greater than or equal to 1', + INVALID_SEARCH_QUERY: 'Search query is required', + + // General + NOT_FOUND: 'Resource not found', + BAD_REQUEST: 'Bad request', + RESOURCE_CONFLICT: 'Resource already exists', + INTERNAL_SERVER_ERROR: 'Internal server error', +}; diff --git a/src/constants/http-status.js b/src/constants/http-status.js new file mode 100644 index 0000000..714ae0c --- /dev/null +++ b/src/constants/http-status.js @@ -0,0 +1,13 @@ +// HTTP μƒνƒœ μ½”λ“œ μƒμˆ˜ +export const HTTP_STATUS = { + OK: 200, + CREATED: 201, + NO_CONTENT: 204, + + BAD_REQUEST: 400, + UNAUTHORIZED: 401, + NOT_FOUND: 404, + CONFLICT: 409, + + INTERNAL_SERVER_ERROR: 500, +}; diff --git a/src/constants/index.js b/src/constants/index.js new file mode 100644 index 0000000..79b4f55 --- /dev/null +++ b/src/constants/index.js @@ -0,0 +1,2 @@ +export * from './http-status.js'; +export * from './errors.js'; diff --git a/src/db/prisma.js b/src/db/prisma.js new file mode 100644 index 0000000..f0312d8 --- /dev/null +++ b/src/db/prisma.js @@ -0,0 +1,9 @@ +import { PrismaClient } from '#generated/prisma/client.ts'; +import { PrismaPg } from '@prisma/adapter-pg'; +import { config } from '#config'; + +const adapter = new PrismaPg({ + connectionString: config.DATABASE_URL, +}); + +export const prisma = new PrismaClient({ adapter }); diff --git a/src/exceptions/BadRequestException.js b/src/exceptions/BadRequestException.js new file mode 100644 index 0000000..7a38dfd --- /dev/null +++ b/src/exceptions/BadRequestException.js @@ -0,0 +1,7 @@ +import { HttpException } from './httpException.js'; + +export class BadRequestException extends HttpException { + constructor(description = 'BAD_REQUEST') { + super(description, 400); + } +} diff --git a/src/exceptions/NotFoundException.js b/src/exceptions/NotFoundException.js new file mode 100644 index 0000000..237e930 --- /dev/null +++ b/src/exceptions/NotFoundException.js @@ -0,0 +1,7 @@ +import { HttpException } from './httpException.js'; + +export class NotFoundException extends HttpException { + constructor(description = 'NOT_FOUND') { + super(description, 404); + } +} diff --git a/src/exceptions/httpException.js b/src/exceptions/httpException.js new file mode 100644 index 0000000..2e7379d --- /dev/null +++ b/src/exceptions/httpException.js @@ -0,0 +1,8 @@ +export class HttpException extends Error { + statusCode; + constructor(description, statusCode) { + super(description); + this.name = this.constructor.name; + this.statusCode = statusCode; + } +} \ No newline at end of file diff --git a/src/exceptions/index.js b/src/exceptions/index.js new file mode 100644 index 0000000..4d9f6f5 --- /dev/null +++ b/src/exceptions/index.js @@ -0,0 +1,3 @@ +export * from './httpException.js'; +export * from './BadRequestException.js'; +export * from './NotFoundException.js'; diff --git a/src/middlewares/errorHandler.middleware.js b/src/middlewares/errorHandler.middleware.js new file mode 100644 index 0000000..eb4941d --- /dev/null +++ b/src/middlewares/errorHandler.middleware.js @@ -0,0 +1,30 @@ +import { isDevelopment } from '#config'; +import { ERROR_MESSAGE, HTTP_STATUS, PRISMA_ERROR } from '#constants'; +import { HttpException } from '#exceptions'; + +export const errorHandler = (error, req, res, _next) => { + console.error(error.stack); + + // HttpException 상속 μ—λŸ¬ + if (error instanceof HttpException) { + return res.status(error.statusCode).json({ + success: false, + message: error.message, + ...(isDevelopment && error.details && { details: error.details }), + }); + } + + // Prisma Record not found + if (error.code === PRISMA_ERROR.RECORD_NOT_FOUND) { + return res.status(HTTP_STATUS.NOT_FOUND).json({ + success: false, + message: ERROR_MESSAGE.NOT_FOUND, + }); + } + + // κ·Έ μ™Έ λͺ¨λ“  μ—λŸ¬ + res.status(HTTP_STATUS.INTERNAL_SERVER_ERROR).json({ + success: false, + message: ERROR_MESSAGE.INTERNAL_SERVER_ERROR, + }); +}; diff --git a/src/middlewares/index.js b/src/middlewares/index.js new file mode 100644 index 0000000..1a882c7 --- /dev/null +++ b/src/middlewares/index.js @@ -0,0 +1,2 @@ +export * from './errorHandler.middleware.js'; +export * from './validation.middleware.js'; diff --git a/src/middlewares/validation.middleware.js b/src/middlewares/validation.middleware.js new file mode 100644 index 0000000..88bbab2 --- /dev/null +++ b/src/middlewares/validation.middleware.js @@ -0,0 +1,40 @@ +import { isProduction } from '#config'; +import { flattenError } from 'zod'; +import { ERROR_MESSAGE } from '#constants'; +import { BadRequestException } from '#exceptions'; + +/** + * λ²”μš© 검증 미듀웨어 + * @param {string} target - 검증할 λŒ€μƒ ('body', 'params', 'query') + * @param {ZodSchema} schema - Zod μŠ€ν‚€λ§ˆ + */ +export const validate = (target, schema) => { + if (!['body', 'query', 'params'].includes(target)) { + throw new Error( + `[validate middleware] Invalid target: "${target}". Expected "body", "query", or "params".`, + ); + } + return (req, res, next) => { + try { + const result = schema.safeParse(req[target]); + + if (!result.success) { + const { fieldErrors } = flattenError(result.error); + + if (isProduction) { + throw new BadRequestException(ERROR_MESSAGE.INVALID_INPUT); + } + + throw new BadRequestException( + ERROR_MESSAGE.VALIDATION_FAILED, + fieldErrors, + ); + } + + Object.assign(req[target], result.data); + next(); + } catch (error) { + next(error); + } + }; +}; diff --git a/src/repository/articles.repository.js b/src/repository/articles.repository.js new file mode 100644 index 0000000..4943f0b --- /dev/null +++ b/src/repository/articles.repository.js @@ -0,0 +1,96 @@ +import { prisma } from '#db/prisma.js'; + +function createArticle(data) { + return prisma.article.create({ data }); +} + +function findArticleById(id) { + return prisma.article.findUnique({ + where: { id }, + }); +} + +function findAllArticles() { + return prisma.article.findMany(); +} + +function updateArticle(id, data) { + return prisma.article.update({ + where: { id }, + data, + }); +} + +function deleteArticle(id) { + return prisma.article.delete({ + where: { id }, + }); +} + +// κ²Œμ‹œκΈ€κ³Ό λŒ“κΈ€ ν•¨κ»˜ 쑰회 +function findArticleWithComments(id) { + return prisma.article.findUnique({ + where: { id }, + include: { + comments: true, + }, + }); +} + +// 검색 + νŽ˜μ΄μ§€λ„€μ΄μ…˜ +async function getArticles({ search, page = 1, limit = 10 }) { + const safePage = Number(page); + const safeLimit = Number(limit); + + const skip = (safePage - 1) * safeLimit; + + const where = search + ? { + OR: [ + { + title: { + contains: search, + mode: 'insensitive', // λŒ€μ†Œλ¬Έμž ꡬ별 x + }, + }, + { + content: { + contains: search, + mode: 'insensitive', + }, + }, + ], + } + : {}; + + const [articles, totalCount] = await Promise.all([ + prisma.article.findMany({ + where, + skip, + take: safeLimit, + orderBy: { createdAt: 'desc' }, + }), + prisma.article.count({ where }), + ]); + + return { + articles, + pagination: { + currentPage: safePage, + totalPages: Math.ceil(totalCount / safeLimit), + totalCount, + hasNext: safePage < Math.ceil(totalCount / safeLimit), + hasPrev: safePage > 1, + }, + }; +} + +export const articleRepository = { + createArticle, + findArticleById, + findAllArticles, + updateArticle, + deleteArticle, + findArticleWithComments, + getArticles, +}; diff --git a/src/repository/comments.repository.js b/src/repository/comments.repository.js new file mode 100644 index 0000000..fcaa1d2 --- /dev/null +++ b/src/repository/comments.repository.js @@ -0,0 +1,73 @@ +import { prisma } from '#db/prisma.js'; + +function createComment(data) { + return prisma.comment.create({ data }); +} + +function findCommentById(id) { + return prisma.comment.findUnique({ + where: { id }, + }); +} + +function updateComment(id, data) { + return prisma.comment.update({ + where: { id }, + data, + }); +} + +function deleteComment(id) { + return prisma.comment.delete({ + where: { id }, + }); +} + +// μƒν’ˆ λŒ“κΈ€ λͺ©λ‘ 쑰회 μ»€μ„œ νŽ˜μ΄μ§€λ„€μ΄μ…˜ +async function getProductCommentsWithCursor({ cursorId, limit = 10 }) { + const comments = await prisma.comment.findMany({ + take: limit, + skip: cursorId ? 1 : 0, // cursor 포함 μ—¬λΆ€ 쑰절 + cursor: cursorId ? { id: cursorId } : undefined, + orderBy: { createdAt: 'desc' }, + include: { + product: { + select: { name: true, description: true, price: true }, + }, + }, + }); + + return { + comments, + nextCursor: comments.length ? comments[comments.length - 1].id : null, + }; +} + +// κ²Œμ‹œκΈ€ λŒ“κΈ€ λͺ©λ‘ 쑰회 μ»€μ„œ νŽ˜μ΄μ§€λ„€μ΄μ…˜ +async function getArticleCommentsWithCursor({ cursorId, limit = 10 }) { + const comments = await prisma.comment.findMany({ + take: Number(limit), + skip: cursorId ? 1 : 0, + cursor: cursorId ? { id: Number(cursorId) } : undefined, + orderBy: { createdAt: 'desc' }, + include: { + article: { + select: { title: true, content: true }, + }, + }, + }); + + return { + comments, + nextCursor: comments.length ? comments[comments.length - 1].id : null, + }; +} + +export const commentRepository = { + createComment, + findCommentById, + updateComment, + deleteComment, + getProductCommentsWithCursor, + getArticleCommentsWithCursor, +}; diff --git a/src/repository/index.js b/src/repository/index.js new file mode 100644 index 0000000..40ec302 --- /dev/null +++ b/src/repository/index.js @@ -0,0 +1,3 @@ +export * from './products.repository.js'; +export * from './articles.repository.js'; +export * from './comments.repository.js'; diff --git a/src/repository/products.repository.js b/src/repository/products.repository.js new file mode 100644 index 0000000..1b730e4 --- /dev/null +++ b/src/repository/products.repository.js @@ -0,0 +1,102 @@ +import { prisma } from '#db/prisma.js'; + +function createProduct(data) { + return prisma.product.create({ data }); +} + +function findProductById(id) { + return prisma.product.findUnique({ + where: { id }, + }); +} + +function findAllProducts() { + return prisma.product.findMany(); +} + +function updateProduct(id, data) { + return prisma.product.update({ + where: { id }, + data, + }); +} + +function deleteProduct(id) { + return prisma.product.delete({ + where: { id }, + }); +} + +// μƒν’ˆκ³Ό λŒ“κΈ€ ν•¨κ»˜ 쑰회 +function findProductWithCommnets(id) { + return prisma.product.findUnique({ + where: { id }, + include: { comments: true }, + }); +} + +// λͺ¨λ“  μƒν’ˆκ³Ό λŒ“κΈ€ ν•¨κ»˜ 쑰회 +function findAllProductsWithCommnets() { + return prisma.product.findMany({ + include: { comments: true }, + }); +} + +// 검색 + νŽ˜μ΄μ§€λ„€μ΄μ…˜ +async function getProducts({ search, page = 1, limit = 10 }) { + const safePage = Number(page); + const safeLimit = Number(limit); + + const skip = (safePage - 1) * safeLimit; + + const where = search + ? { + OR: [ + { + name: { + contains: search, + mode: 'insensitive', // λŒ€μ†Œλ¬Έμž ꡬ별 x + }, + }, + { + description: { + contains: search, + mode: 'insensitive', + }, + }, + ], + } + : {}; + + const [products, totalCount] = await Promise.all([ + prisma.product.findMany({ + where, + skip, + take: safeLimit, + orderBy: { createdAt: 'desc' }, + }), + prisma.product.count({ where }), + ]); + + return { + products, + pagination: { + currentPage: safePage, + totalPages: Math.ceil(totalCount / safeLimit), + totalCount, + hasNext: safePage < Math.ceil(totalCount / safeLimit), + hasPrev: safePage > 1, + }, + }; +} + +export const productsRepository = { + createProduct, + findProductById, + findAllProducts, + updateProduct, + deleteProduct, + findProductWithCommnets, + findAllProductsWithCommnets, + getProducts, +}; diff --git a/src/routes/articles/articles.routes.js b/src/routes/articles/articles.routes.js new file mode 100644 index 0000000..340bad7 --- /dev/null +++ b/src/routes/articles/articles.routes.js @@ -0,0 +1,141 @@ +import express from 'express'; +import { ERROR_MESSAGE, HTTP_STATUS } from '#constants'; +import { validate } from '#middlewares'; +import { articleRepository } from '#repository'; +import { checkExists } from '#utils'; +import { + articleIdParamSchema, + createArticleSchema, + updateArticleSchema, +} from './articles.schema.js'; +import { + paginationQuerySchema, + searchQuerySchema, +} from '../common/common.schema.js'; + +export const articlesRouter = express.Router(); + +// GET /api/ariticles - 전체 κ²Œμ‹œκΈ€ λͺ©λ‘ 쑰회 ( νŽ˜μ΄μ§€λ„€μ΄μ…˜ ) +articlesRouter.get( + '/', + validate('query', paginationQuerySchema), + async (req, res, next) => { + try { + const { page = 1, limit = 10 } = req.query; + // 검색어 없이 전체 λͺ©λ‘ 쑰회 + const articles = await articleRepository.getArticles({ + undefined, + page, + limit, + }); + res.status(HTTP_STATUS.OK).json({ articles }); + } catch (error) { + next(error); + } + }, +); + +// GET /api/ariticles/search?q={검색어}&page={번호}&limit={개수} - κ²Œμ‹œκΈ€ λͺ©λ‘ 쑰회 ( 쿼리 + νŽ˜μ΄μ§€λ„€μ΄μ…˜ ) +// μš”μ²­ μ˜ˆμ‹œ: /api/articles/search?q=아이폰&page=1&limit=10 +articlesRouter.get( + '/search', + validate('query', paginationQuerySchema), + validate('query', searchQuerySchema), + async (req, res, next) => { + try { + const { q: search, page = 1, limit = 10 } = req.query; + + const articles = await articleRepository.getArticles({ + search, + page, + limit, + }); + res.status(HTTP_STATUS.OK).json({ articles }); + } catch (error) { + next(error); + } + }, +); + +// GET /api/ariticles/:id - νŠΉμ • κ²Œμ‹œκΈ€ 쑰회 +articlesRouter.get( + '/:id', + validate('params', articleIdParamSchema), + async (req, res, next) => { + try { + const { id } = req.params; + const article = await articleRepository.findArticleById(id); + + const existingArticle = await articleRepository.findArticleById(id); + checkExists(existingArticle, ERROR_MESSAGE.ARTICLE_NOT_FOUND); + + res.status(HTTP_STATUS.OK).json(article); + } catch (error) { + next(error); + } + }, +); + +// POST /api/ariticles - μƒˆ κ²Œμ‹œκΈ€ 등둝 +articlesRouter.post( + '/', + validate('body', createArticleSchema), + async (req, res, next) => { + try { + const { title, content } = req.body; + + const newArticle = await articleRepository.createArticle({ + title, + content, + }); + + res.status(HTTP_STATUS.CREATED).json(newArticle); + } catch (error) { + next(error); + } + }, +); + +// PATCH /api/ariticles/:id - κ²Œμ‹œκΈ€ μˆ˜μ • +articlesRouter.patch( + '/:id', + validate('params', articleIdParamSchema), + validate('body', updateArticleSchema), + async (req, res, next) => { + try { + const { id } = req.params; + const { title, content } = req.body; + + const existingArticle = await articleRepository.findArticleById(id); + checkExists(existingArticle, ERROR_MESSAGE.ARTICLE_NOT_FOUND); + + const updateArticle = await articleRepository.updateArticle(id, { + title, + content, + }); + + res.status(HTTP_STATUS.OK).json(updateArticle); + } catch (error) { + next(error); + } + }, +); + +// DELETE /api/ariticles/:id - κ²Œμ‹œκΈ€ μ‚­μ œ +articlesRouter.delete( + '/:id', + validate('params', articleIdParamSchema), + async (req, res, next) => { + try { + const { id } = req.params; + + const existingArticle = await articleRepository.findArticleById(id); + checkExists(existingArticle, ERROR_MESSAGE.ARTICLE_NOT_FOUND); + + await articleRepository.deleteArticle(id); + res.sendStatus(HTTP_STATUS.NO_CONTENT); + } catch (error) { + next(error); + } + }, +); diff --git a/src/routes/articles/articles.schema.js b/src/routes/articles/articles.schema.js new file mode 100644 index 0000000..f4d54dd --- /dev/null +++ b/src/routes/articles/articles.schema.js @@ -0,0 +1,33 @@ +import { z } from 'zod'; +import { ERROR_MESSAGE } from '#constants'; + +// κ²Œμ‹œκΈ€ ID νŒŒλΌλ―Έν„° 검증 μŠ€ν‚€λ§ˆ +export const articleIdParamSchema = z.object({ + id: z.string().min(1, ERROR_MESSAGE.ARTICLE_ID_REQUIRED), +}); + +// κ²Œμ‹œκΈ€ 생성 μŠ€ν‚€λ§ˆ +export const createArticleSchema = z.object({ + title: z + .string() + .min(2, ERROR_MESSAGE.ARTICLE_TITLE_TOO_SHORT) + .max(20, ERROR_MESSAGE.ARTICLE_TITLE_TOO_LONG), + content: z + .string() + .min(1, ERROR_MESSAGE.ARTICLE_CONTENT_TOO_SHORT) + .max(500, ERROR_MESSAGE.ARTICLE_CONTENT_TOO_LONG), +}); + +// κ²Œμ‹œκΈ€ μˆ˜μ • μŠ€ν‚€λ§ˆ +export const updateArticleSchema = z.object({ + title: z + .string() + .min(2, ERROR_MESSAGE.ARTICLE_TITLE_TOO_SHORT) + .max(20, ERROR_MESSAGE.ARTICLE_TITLE_TOO_LONG) + .optional(), + content: z + .string() + .min(1, ERROR_MESSAGE.ARTICLE_CONTENT_TOO_SHORT) + .max(500, ERROR_MESSAGE.ARTICLE_CONTENT_TOO_LONG) + .optional(), +}); diff --git a/src/routes/articles/comments/article-comments.routes.js b/src/routes/articles/comments/article-comments.routes.js new file mode 100644 index 0000000..dc81778 --- /dev/null +++ b/src/routes/articles/comments/article-comments.routes.js @@ -0,0 +1,51 @@ +import express from 'express'; +import { commentRepository } from '#repository'; +import { HTTP_STATUS } from '#constants'; +import { validate } from '#middlewares'; +import { paginationQuerySchema } from '../../common/common.schema.js'; +import { createCommentSchema } from '../../comments/comments.schema.js'; +import { articleIdParamSchema } from '../articles.schema.js'; + +export const articleCommentsRouter = express.Router(); + +// GET /api/articles/:articleId/comments - νŠΉμ • κ²Œμ‹œκΈ€μ˜ λŒ“κΈ€ λͺ©λ‘ 쑰회 +articleCommentsRouter.get( + '/', + validate('query', paginationQuerySchema), + async (req, res, next) => { + try { + const { cursorId, limit } = req.query; + + const comments = await commentRepository.getArticleCommentsWithCursor({ + cursorId, + limit, + }); + + res.status(HTTP_STATUS.OK).json(comments); + } catch (error) { + next(error); + } + }, +); + +// POST /api/articles/:articleId/comments - νŠΉμ • κ²Œμ‹œκΈ€μ˜ λŒ“κΈ€ 등둝 +articleCommentsRouter.post( + '/', + validate('body', createCommentSchema), + validate('params', articleIdParamSchema), + async (req, res, next) => { + try { + const { content } = req.body; + const { articleId } = req.params; + + const newComment = await commentRepository.createComment({ + content, + articleId, + }); + + res.status(HTTP_STATUS.CREATED).json(newComment); + } catch (error) { + next(error); + } + }, +); diff --git a/src/routes/articles/comments/index.js b/src/routes/articles/comments/index.js new file mode 100644 index 0000000..babaa8b --- /dev/null +++ b/src/routes/articles/comments/index.js @@ -0,0 +1,8 @@ +import express from 'express'; +import { articleCommentsRouter as router } from './article-comments.routes.js'; + +export const articleCommentsRouter = express.Router({ + mergeParams: true, +}); + +articleCommentsRouter.use('/', router); diff --git a/src/routes/articles/index.js b/src/routes/articles/index.js new file mode 100644 index 0000000..d89da76 --- /dev/null +++ b/src/routes/articles/index.js @@ -0,0 +1,8 @@ +import express from 'express'; +import { articlesRouter } from './articles.routes.js'; +import { articleCommentsRouter } from './comments/index.js'; + +export const articleRouter = express.Router(); + +articleRouter.use('/', articlesRouter); +articleRouter.use('/:id/comments', articleCommentsRouter); diff --git a/src/routes/comments/comments.routes.js b/src/routes/comments/comments.routes.js new file mode 100644 index 0000000..dae3b8e --- /dev/null +++ b/src/routes/comments/comments.routes.js @@ -0,0 +1,54 @@ +import express from 'express'; +import { commentRepository } from '#repository'; +import { ERROR_MESSAGE, HTTP_STATUS } from '#constants'; +import { checkExists } from '#utils'; +import { validate } from '#middlewares'; +import { + commentIdParamSchema, + updateCommentSchema, +} from './comments.schema.js'; + +export const commentsRouter = express.Router(); + +// PATCH /api/comments/:id - λŒ“κΈ€ μˆ˜μ • +commentsRouter.patch( + '/:id', + validate('params', commentIdParamSchema), + validate('body', updateCommentSchema), + async (req, res, next) => { + try { + const { id } = req.params; + const { content } = req.body; + + const existingComment = await commentRepository.findCommentById(id); + checkExists(existingComment, ERROR_MESSAGE.COMMENT_NOT_FOUND); + + const updateComment = await commentRepository.updateComment(id, { + content, + }); + + res.status(HTTP_STATUS.OK).json(updateComment); + } catch (error) { + next(error); + } + }, +); + +// DELETE /api/comments/:id - λŒ“κΈ€ μ‚­μ œ +commentsRouter.delete( + '/:id', + validate('params', commentIdParamSchema), + async (req, res, next) => { + try { + const { id } = req.params; + + const existingComment = await commentRepository.findCommentById(id); + checkExists(existingComment, ERROR_MESSAGE.COMMENT_NOT_FOUND); + + await commentRepository.deleteComment(id); + res.sendStatus(HTTP_STATUS.NO_CONTENT); + } catch (error) { + next(error); + } + }, +); diff --git a/src/routes/comments/comments.schema.js b/src/routes/comments/comments.schema.js new file mode 100644 index 0000000..de94bb5 --- /dev/null +++ b/src/routes/comments/comments.schema.js @@ -0,0 +1,18 @@ +import { z } from 'zod'; +import { ERROR_MESSAGE } from '#constants'; + +// λŒ“κΈ€ ID νŒŒλΌλ―Έν„° 검증 μŠ€ν‚€λ§ˆ +export const commentIdParamSchema = z.object({ + id: z.string().min(1, ERROR_MESSAGE.COMMENT_ID_REQUIRED), +}); + +// λŒ“κΈ€ 생성 μŠ€ν‚€λ§ˆ +export const createCommentSchema = z.object({ + content: z + .string() + .min(1, ERROR_MESSAGE.COMMENT_CONTENT_REQUIRED) + .max(200, ERROR_MESSAGE.COMMENT_CONTENT_TOO_LONG), +}); + +// λŒ“κΈ€ μˆ˜μ • μŠ€ν‚€λ§ˆ +export const updateCommentSchema = createCommentSchema.partial(); diff --git a/src/routes/comments/index.js b/src/routes/comments/index.js new file mode 100644 index 0000000..616bf72 --- /dev/null +++ b/src/routes/comments/index.js @@ -0,0 +1,7 @@ +import express from 'express'; +import { commentsRouter } from './comments.routes.js'; + +export const commentRouter = express.Router(); + +// Commnet CRUD 라우트 μ—°κ²° +commentRouter.use('/', commentsRouter); diff --git a/src/routes/common/common.schema.js b/src/routes/common/common.schema.js new file mode 100644 index 0000000..33e57e0 --- /dev/null +++ b/src/routes/common/common.schema.js @@ -0,0 +1,18 @@ +import { z } from 'zod'; +import { ERROR_MESSAGE } from '#constants'; + +// νŽ˜μ΄μ§€λ„€μ΄μ…˜ 쿼리 μŠ€ν‚€λ§ˆ +export const paginationQuerySchema = z.object({ + page: z.coerce.number().int().positive(ERROR_MESSAGE.INVALID_PAGE).default(1), + limit: z.coerce + .number() + .int() + .positive(ERROR_MESSAGE.INVALID_LIMIT) + .max(100) + .default(10), +}); + +// 검색 쿼리 μŠ€ν‚€λ§ˆ +export const searchQuerySchema = z.object({ + q: z.string().min(1, ERROR_MESSAGE.INVALID_SEARCH_QUERY), +}); diff --git a/src/routes/index.js b/src/routes/index.js new file mode 100644 index 0000000..1dbbaf1 --- /dev/null +++ b/src/routes/index.js @@ -0,0 +1,17 @@ +import express from 'express'; +import { productRouter } from './products/index.js'; +import { articleRouter } from './articles/index.js'; +import { commentRouter } from './comments/index.js'; +import { HTTP_STATUS } from '../constants/http-status.js'; + +export const router = express.Router(); + +router.get('/', (req, res) => { + res + .status(HTTP_STATUS.OK) + .send({ now: new Date().toISOString(), message: 'OK' }); +}); + +router.use('/products', productRouter); +router.use('/articles', articleRouter); +router.use('/comments', commentRouter); diff --git a/src/routes/products/comments/index.js b/src/routes/products/comments/index.js new file mode 100644 index 0000000..68281b3 --- /dev/null +++ b/src/routes/products/comments/index.js @@ -0,0 +1,8 @@ +import express from 'express'; +import { productCommentsRouter as router } from './product-comments.routes.js'; + +export const productCommentsRouter = express.Router({ + mergeParams: true, +}); + +productCommentsRouter.use('/', router); diff --git a/src/routes/products/comments/product-comments.routes.js b/src/routes/products/comments/product-comments.routes.js new file mode 100644 index 0000000..ba000ce --- /dev/null +++ b/src/routes/products/comments/product-comments.routes.js @@ -0,0 +1,51 @@ +import express from 'express'; +import { commentRepository } from '#repository'; +import { HTTP_STATUS } from '#constants'; +import { validate } from '#middlewares'; +import { paginationQuerySchema } from '../../common/common.schema.js'; +import { createCommentSchema } from '../../comments/comments.schema.js'; +import { productIdParamSchema } from '../products.schema.js'; + +export const productCommentsRouter = express.Router(); + +// GET /api/products/:productId/comments - νŠΉμ • μƒν’ˆμ˜ λŒ“κΈ€ λͺ©λ‘ 쑰회 +productCommentsRouter.get( + '/', + validate('query', paginationQuerySchema), + async (req, res, next) => { + try { + const { cursorId, limit } = req.query; + + const comments = await commentRepository.getProductCommentsWithCursor({ + cursorId, + limit, + }); + + res.status(HTTP_STATUS.OK).json(comments); + } catch (error) { + next(error); + } + }, +); + +// POST /api/products/:productId/comments - νŠΉμ • μƒν’ˆμ˜ λŒ“κΈ€ 등둝 +productCommentsRouter.post( + '/', + validate('body', createCommentSchema), + validate('params', productIdParamSchema), + async (req, res, next) => { + try { + const { content } = req.body; + const { productId } = req.params; + + const newComment = await commentRepository.createComment({ + content, + productId, + }); + + res.status(HTTP_STATUS.CREATED).json(newComment); + } catch (error) { + next(error); + } + }, +); diff --git a/src/routes/products/index.js b/src/routes/products/index.js new file mode 100644 index 0000000..97aded9 --- /dev/null +++ b/src/routes/products/index.js @@ -0,0 +1,8 @@ +import express from 'express'; +import { productsRouter } from './products.routes.js'; +import { productCommentsRouter } from './comments/index.js'; + +export const productRouter = express.Router(); + +productRouter.use('/', productsRouter); +productRouter.use('/:id/comments', productCommentsRouter); diff --git a/src/routes/products/products.routes.js b/src/routes/products/products.routes.js new file mode 100644 index 0000000..ab63fe3 --- /dev/null +++ b/src/routes/products/products.routes.js @@ -0,0 +1,145 @@ +import express from 'express'; +import { HTTP_STATUS, ERROR_MESSAGE } from '#constants'; +import { validate } from '#middlewares'; +import { productsRepository } from '#repository'; +import { checkExists } from '#utils'; +import { + paginationQuerySchema, + searchQuerySchema, +} from '../common/common.schema.js'; +import { + createProductSchema, + productIdParamSchema, + updateProductSchema, +} from './products.schema.js'; + +export const productsRouter = express.Router(); + +// GET /api/products - 전체 μƒν’ˆ λͺ©λ‘ 쑰회 ( νŽ˜μ΄μ§€λ„€μ΄μ…˜ ) +productsRouter.get( + '/', + validate('query', paginationQuerySchema), + async (req, res, next) => { + try { + const { page = 1, limit = 10 } = req.query; + // 검색어 없이 전체 λͺ©λ‘ 쑰회 + const products = await productsRepository.getProducts({ + undefined, + page, + limit, + }); + res.status(HTTP_STATUS.OK).json({ products }); + } catch (error) { + next(error); + } + }, +); + +// GET /api/products/search?q={검색어}&page={번호}&limit={개수} - μƒν’ˆ λͺ©λ‘ 쑰회 ( 쿼리 + νŽ˜μ΄μ§€λ„€μ΄μ…˜ ) +// μš”μ²­ μ˜ˆμ‹œ: /api/products?q=λ…ΈνŠΈλΆ&page=1&limit=10 +productsRouter.get( + '/search', + validate('query', paginationQuerySchema), + validate('query', searchQuerySchema), + async (req, res, next) => { + try { + const { q: search, page = 1, limit = 10 } = req.query; + + const products = await productsRepository.getProducts({ + search, + page, + limit, + }); + res.status(HTTP_STATUS.OK).json({ products }); + } catch (error) { + next(error); + } + }, +); + +// GET /api/products/:id - μƒν’ˆ 상세 쑰회 +productsRouter.get( + '/:id', + validate('params', productIdParamSchema), + async (req, res, next) => { + try { + const { id } = req.params; + const product = await productsRepository.findProductById(id); + + const existingProduct = await productsRepository.findProductById(id); + checkExists(existingProduct, ERROR_MESSAGE.PRODUCT_NOT_FOUND); + + res.status(HTTP_STATUS.OK).json(product); + } catch (error) { + next(error); + } + }, +); + +// POST /api/products - μƒˆ μƒν’ˆ 등둝 +productsRouter.post( + '/', + validate('body', createProductSchema), + async (req, res, next) => { + try { + const { name, description, price, tags } = req.body; + + const newProduct = await productsRepository.createProduct({ + name, + description, + price, + tags, + }); + + res.status(HTTP_STATUS.CREATED).json(newProduct); + } catch (error) { + next(error); + } + }, +); + +// PATCH /api/products/:id - μƒν’ˆ 정보 μˆ˜μ • +productsRouter.patch( + '/:id', + validate('params', productIdParamSchema), + validate('body', updateProductSchema), + async (req, res, next) => { + try { + const { id } = req.params; + const { name, description, price, tags } = req.body; + + const existingProduct = await productsRepository.findProductById(id); + checkExists(existingProduct, ERROR_MESSAGE.PRODUCT_NOT_FOUND); + + const updateProduct = await productsRepository.updateProduct(id, { + name, + description, + price, + tags, + }); + + res.status(HTTP_STATUS.OK).json(updateProduct); + } catch (error) { + next(error); + } + }, +); + +// DELETE /api/products/:id - μƒν’ˆ μ‚­μ œ +productsRouter.delete( + '/:id', + validate('params', productIdParamSchema), + async (req, res, next) => { + try { + const { id } = req.params; + + const existingProduct = await productsRepository.findProductById(id); + checkExists(existingProduct, ERROR_MESSAGE.PRODUCT_NOT_FOUND); + + await productsRepository.deleteProduct(id); + res.sendStatus(HTTP_STATUS.NO_CONTENT); + } catch (error) { + next(error); + } + }, +); diff --git a/src/routes/products/products.schema.js b/src/routes/products/products.schema.js new file mode 100644 index 0000000..9d37a08 --- /dev/null +++ b/src/routes/products/products.schema.js @@ -0,0 +1,37 @@ +import { z } from 'zod'; +import { ERROR_MESSAGE } from '#constants'; + +// μƒν’ˆ ID νŒŒλΌλ―Έν„° 검증 μŠ€ν‚€λ§ˆ +export const productIdParamSchema = z.object({ + id: z.string().min(1, ERROR_MESSAGE.PRODUCT_ID_REQUIRED), +}); + +// μƒν’ˆ 생성 μŠ€ν‚€λ§ˆ +export const createProductSchema = z.object({ + name: z + .string() + .min(1, ERROR_MESSAGE.PRODUCT_NAME_TOO_SHORT) + .max(10, ERROR_MESSAGE.PRODUCT_NAME_TOO_LONG), + description: z + .string() + .min(1, ERROR_MESSAGE.PRODUCT_DESCRIPTION_TOO_SHORT) + .max(100, ERROR_MESSAGE.PRODUCT_DESCRIPTION_TOO_LONG), + price: z.coerce.number().positive(ERROR_MESSAGE.PRODUCT_PRICE_INVALID), + tags: z.array(z.string()).optional(), + images: z.array(z.string().url()).optional(), +}); + +// μƒν’ˆ μˆ˜μ • μŠ€ν‚€λ§ˆ +export const updateProductSchema = z.object({ + name: z + .string() + .min(1, ERROR_MESSAGE.PRODUCT_DESCRIPTION_TOO_SHORT) + .max(10, ERROR_MESSAGE.PRODUCT_DESCRIPTION_TOO_LONG).optional(), + description: z + .string() + .min(1, ERROR_MESSAGE.PRODUCT_DESCRIPTION_TOO_SHORT) + .max(100, ERROR_MESSAGE.PRODUCT_DESCRIPTION_TOO_LONG).optional(), + price: z.coerce.number().positive(ERROR_MESSAGE.PRODUCT_PRICE_INVALID).optional(), + tags: z.array(z.string()).optional(), + images: z.array(z.string().url()).optional(), +}); \ No newline at end of file diff --git a/src/server.js b/src/server.js new file mode 100644 index 0000000..435e585 --- /dev/null +++ b/src/server.js @@ -0,0 +1,30 @@ +import express from 'express'; +import { prisma } from '#db/prisma.js'; +import { config } from '#config'; +import { router as apiRouter } from './routes/index.js'; +import cors from 'cors'; +import { errorHandler } from '#middlewares'; +import { setupGracefulShutdown } from './utils/graceful-shutdown.util.js'; + +const app = express(); + +// JSON νŒŒμ‹± 미듀웨어 +app.use(express.json()); + +// cors +app.use(cors()); + +// API λΌμš°ν„° 등둝 +app.use('/api', apiRouter); + +// μ—λŸ¬ 핸듀링 +app.use(errorHandler); + +const server = app.listen(config.PORT, () => { + console.log( + `[${config.NODE_ENV}] βœ… Server running at http://localhost:${config.PORT}`, + ); +}); + +// Setup graceful shutdown handlers +setupGracefulShutdown(server, prisma); diff --git a/src/utils/checkExists.util.js b/src/utils/checkExists.util.js new file mode 100644 index 0000000..85c54d7 --- /dev/null +++ b/src/utils/checkExists.util.js @@ -0,0 +1,7 @@ +import { NotFoundException } from '#exceptions'; + +export function checkExists(entity, notFoundMessage) { + if (!entity) { + throw new NotFoundException(notFoundMessage); + } +} diff --git a/src/utils/graceful-shutdown.util.js b/src/utils/graceful-shutdown.util.js new file mode 100644 index 0000000..c576277 --- /dev/null +++ b/src/utils/graceful-shutdown.util.js @@ -0,0 +1,25 @@ +export const setupGracefulShutdown = (server, prisma) => { + const shutdown = async (signal) => { + console.log(`\n${signal} μ‹ ν˜Έλ₯Ό λ°›μ•˜μŠ΅λ‹ˆλ‹€. μ„œλ²„λ₯Ό μ’…λ£Œν•©λ‹ˆλ‹€...`); + + server.close((err) => { + if (err) { + console.error('μ„œλ²„ μ’…λ£Œ 쀑 μ—λŸ¬:', err); + process.exit(1); + } + console.log('μ„œλ²„κ°€ μ’…λ£Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€.'); + }); + + try { + await prisma.$disconnect(); + console.log('λ°μ΄ν„°λ² μ΄μŠ€ 연결이 μ’…λ£Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€.'); + process.exit(0); + } catch (error) { + console.error('λ°μ΄ν„°λ² μ΄μŠ€ μ’…λ£Œ 쀑 μ—λŸ¬:', error); + process.exit(1); + } + }; + + process.on('SIGINT', () => shutdown('SIGINT')); + process.on('SIGTERM', () => shutdown('SIGTERM')); +}; diff --git a/src/utils/index.js b/src/utils/index.js new file mode 100644 index 0000000..b1d017c --- /dev/null +++ b/src/utils/index.js @@ -0,0 +1 @@ +export * from './checkExists.util.js';