
/* !!! This is code generated by Prisma. Do not edit directly. !!!
/* eslint-disable */
// biome-ignore-all lint: generated file

Object.defineProperty(exports, "__esModule", { value: true });

const {
  PrismaClientKnownRequestError,
  PrismaClientUnknownRequestError,
  PrismaClientRustPanicError,
  PrismaClientInitializationError,
  PrismaClientValidationError,
  getPrismaClient,
  sqltag,
  empty,
  join,
  raw,
  skip,
  Decimal,
  Debug,
  DbNull,
  JsonNull,
  AnyNull,
  NullTypes,
  makeStrictEnum,
  Extensions,
  warnOnce,
  defineDmmfProperty,
  Public,
  getRuntime,
  createParam,
} = require('./runtime/wasm-compiler-edge.js')


const Prisma = {}

exports.Prisma = Prisma
exports.$Enums = {}

/**
 * Prisma Client JS version: 7.4.0
 * Query Engine version: ab56fe763f921d033a6c195e7ddeb3e255bdbb57
 */
Prisma.prismaVersion = {
  client: "7.4.0",
  engine: "ab56fe763f921d033a6c195e7ddeb3e255bdbb57"
}

Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError;
Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError
Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError
Prisma.PrismaClientInitializationError = PrismaClientInitializationError
Prisma.PrismaClientValidationError = PrismaClientValidationError
Prisma.Decimal = Decimal

/**
 * Re-export of sql-template-tag
 */
Prisma.sql = sqltag
Prisma.empty = empty
Prisma.join = join
Prisma.raw = raw
Prisma.validator = Public.validator

/**
* Extensions
*/
Prisma.getExtensionContext = Extensions.getExtensionContext
Prisma.defineExtension = Extensions.defineExtension

/**
 * Shorthand utilities for JSON filtering
 */
Prisma.DbNull = DbNull
Prisma.JsonNull = JsonNull
Prisma.AnyNull = AnyNull

Prisma.NullTypes = NullTypes





/**
 * Enums
 */
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
  ReadUncommitted: 'ReadUncommitted',
  ReadCommitted: 'ReadCommitted',
  RepeatableRead: 'RepeatableRead',
  Serializable: 'Serializable'
});

exports.Prisma.CategoryScalarFieldEnum = {
  id: 'id',
  name: 'name',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt',
  userId: 'userId'
};

exports.Prisma.ArticleScalarFieldEnum = {
  id: 'id',
  title: 'title',
  url: 'url',
  quote: 'quote',
  ogImageUrl: 'ogImageUrl',
  ogTitle: 'ogTitle',
  ogDescription: 'ogDescription',
  categoryId: 'categoryId',
  status: 'status',
  userId: 'userId',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt',
  exportedAt: 'exportedAt'
};

exports.Prisma.NoteScalarFieldEnum = {
  id: 'id',
  title: 'title',
  markdown: 'markdown',
  status: 'status',
  userId: 'userId',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt',
  exportedAt: 'exportedAt'
};

exports.Prisma.ImageScalarFieldEnum = {
  id: 'id',
  path: 'path',
  contentType: 'contentType',
  fileSize: 'fileSize',
  width: 'width',
  height: 'height',
  status: 'status',
  userId: 'userId',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt',
  exportedAt: 'exportedAt'
};

exports.Prisma.BookScalarFieldEnum = {
  id: 'id',
  isbn: 'isbn',
  title: 'title',
  googleTitle: 'googleTitle',
  googleSubTitle: 'googleSubTitle',
  googleAuthors: 'googleAuthors',
  googleDescription: 'googleDescription',
  googleImgSrc: 'googleImgSrc',
  googleHref: 'googleHref',
  imagePath: 'imagePath',
  markdown: 'markdown',
  rating: 'rating',
  tags: 'tags',
  status: 'status',
  userId: 'userId',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt',
  exportedAt: 'exportedAt'
};

exports.Prisma.SortOrder = {
  asc: 'asc',
  desc: 'desc'
};

exports.Prisma.QueryMode = {
  default: 'default',
  insensitive: 'insensitive'
};

exports.Prisma.NullsOrder = {
  first: 'first',
  last: 'last'
};
exports.Status = exports.$Enums.Status = {
  UNEXPORTED: 'UNEXPORTED',
  LAST_UPDATED: 'LAST_UPDATED',
  EXPORTED: 'EXPORTED'
};

exports.Prisma.ModelName = {
  Category: 'Category',
  Article: 'Article',
  Note: 'Note',
  Image: 'Image',
  Book: 'Book'
};
/**
 * Create the Client
 */
const config = {
  "previewFeatures": [],
  "clientVersion": "7.4.0",
  "engineVersion": "ab56fe763f921d033a6c195e7ddeb3e255bdbb57",
  "activeProvider": "postgresql",
  "inlineSchema": "generator client {\n  provider = \"prisma-client-js\"\n  output   = \"../src/generated\"\n}\n\ngenerator dbml {\n  provider   = \"prisma-dbml-generator\"\n  output     = \"../dbml\"\n  outputName = \"schema.dbml\"\n}\n\ndatasource db {\n  provider = \"postgresql\"\n}\n\nenum Status {\n  UNEXPORTED\n  LAST_UPDATED\n  EXPORTED\n}\n\nmodel Category {\n  id String @id @db.VarChar(36)\n\n  name String @db.VarChar(16)\n\n  Articles Article[]\n\n  createdAt DateTime @map(\"created_at\")\n  updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n  userId String @map(\"user_id\") @db.VarChar(128)\n\n  @@unique([name, userId])\n  @@map(\"categories\")\n}\n\nmodel Article {\n  id String @id @db.VarChar(36)\n\n  title String  @db.VarChar(128)\n  url   String  @db.VarChar(2048)\n  quote String? @db.VarChar(512)\n\n  ogImageUrl    String? @map(\"og_image_url\") @db.VarChar(4096)\n  ogTitle       String? @map(\"og_title\") @db.VarChar(512)\n  ogDescription String? @map(\"og_description\") @db.VarChar(1024)\n\n  Category   Category @relation(fields: [categoryId], references: [id], onDelete: Cascade, onUpdate: Cascade)\n  categoryId String   @map(\"category_id\") @db.VarChar(36)\n\n  status Status\n\n  userId String @map(\"user_id\") @db.VarChar(128)\n\n  createdAt  DateTime  @map(\"created_at\")\n  updatedAt  DateTime  @updatedAt @map(\"updated_at\")\n  exportedAt DateTime? @map(\"exported_at\")\n\n  @@unique([url, userId])\n  @@map(\"articles\")\n}\n\nmodel Note {\n  id String @id @db.VarChar(36)\n\n  title    String @db.VarChar(64)\n  markdown String @db.Text\n\n  status Status\n\n  userId String @map(\"user_id\") @db.VarChar(128)\n\n  createdAt  DateTime  @map(\"created_at\")\n  updatedAt  DateTime  @updatedAt @map(\"updated_at\")\n  exportedAt DateTime? @map(\"exported_at\")\n\n  @@unique([title, userId])\n  @@map(\"notes\")\n}\n\nmodel Image {\n  id String @id @db.VarChar(36)\n\n  path        String @db.VarChar(512)\n  contentType String @map(\"content_type\") @db.VarChar(32) // e.g.: image/jpeg, image/png\n  fileSize    Int?   @map(\"file_size\") // byte\n  width       Int? // pixel\n  height      Int? // pixel\n\n  status Status\n\n  userId String @map(\"user_id\") @db.VarChar(128)\n\n  createdAt  DateTime  @map(\"created_at\")\n  updatedAt  DateTime  @updatedAt @map(\"updated_at\")\n  exportedAt DateTime? @map(\"exported_at\")\n\n  @@unique([path, userId])\n  @@map(\"images\")\n}\n\nmodel Book {\n  id    String @id @db.VarChar(36)\n  isbn  String @db.VarChar(17)\n  title String @db.VarChar(256)\n\n  googleTitle       String?  @map(\"google_title\") @db.VarChar(512)\n  googleSubTitle    String?  @map(\"google_subtitle\") @db.VarChar(512)\n  googleAuthors     String[] @map(\"google_authors\")\n  googleDescription String?  @map(\"google_description\") @db.Text\n  googleImgSrc      String?  @map(\"google_img_src\") @db.VarChar(2048)\n  googleHref        String?  @map(\"google_href\") @db.VarChar(2048)\n\n  imagePath String? @map(\"image_path\") @db.VarChar(512)\n\n  markdown String? @db.Text\n\n  rating Int? // 1-5\n  tags   String[]\n\n  status Status\n\n  userId String @map(\"user_id\") @db.VarChar(128)\n\n  createdAt  DateTime  @map(\"created_at\")\n  updatedAt  DateTime  @updatedAt @map(\"updated_at\")\n  exportedAt DateTime? @map(\"exported_at\")\n\n  @@unique([isbn, userId])\n  @@map(\"books\")\n}\n"
}

config.runtimeDataModel = JSON.parse("{\"models\":{\"Category\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"Articles\",\"kind\":\"object\",\"type\":\"Article\",\"relationName\":\"ArticleToCategory\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"user_id\"}],\"dbName\":\"categories\"},\"Article\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"url\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"quote\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ogImageUrl\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"og_image_url\"},{\"name\":\"ogTitle\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"og_title\"},{\"name\":\"ogDescription\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"og_description\"},{\"name\":\"Category\",\"kind\":\"object\",\"type\":\"Category\",\"relationName\":\"ArticleToCategory\"},{\"name\":\"categoryId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"category_id\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"Status\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"user_id\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"exportedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"exported_at\"}],\"dbName\":\"articles\"},\"Note\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"markdown\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"Status\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"user_id\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"exportedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"exported_at\"}],\"dbName\":\"notes\"},\"Image\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"path\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"contentType\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"content_type\"},{\"name\":\"fileSize\",\"kind\":\"scalar\",\"type\":\"Int\",\"dbName\":\"file_size\"},{\"name\":\"width\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"height\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"Status\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"user_id\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"exportedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"exported_at\"}],\"dbName\":\"images\"},\"Book\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isbn\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"googleTitle\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"google_title\"},{\"name\":\"googleSubTitle\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"google_subtitle\"},{\"name\":\"googleAuthors\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"google_authors\"},{\"name\":\"googleDescription\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"google_description\"},{\"name\":\"googleImgSrc\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"google_img_src\"},{\"name\":\"googleHref\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"google_href\"},{\"name\":\"imagePath\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"image_path\"},{\"name\":\"markdown\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"rating\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"tags\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"Status\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"user_id\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"exportedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"exported_at\"}],\"dbName\":\"books\"}},\"enums\":{},\"types\":{}}")
defineDmmfProperty(exports.Prisma, config.runtimeDataModel)
config.parameterizationSchema = {
  strings: JSON.parse("[\"where\",\"orderBy\",\"cursor\",\"Category\",\"Articles\",\"_count\",\"Category.findUnique\",\"Category.findUniqueOrThrow\",\"Category.findFirst\",\"Category.findFirstOrThrow\",\"Category.findMany\",\"data\",\"Category.createOne\",\"Category.createMany\",\"Category.createManyAndReturn\",\"Category.updateOne\",\"Category.updateMany\",\"Category.updateManyAndReturn\",\"create\",\"update\",\"Category.upsertOne\",\"Category.deleteOne\",\"Category.deleteMany\",\"having\",\"_min\",\"_max\",\"Category.groupBy\",\"Category.aggregate\",\"Article.findUnique\",\"Article.findUniqueOrThrow\",\"Article.findFirst\",\"Article.findFirstOrThrow\",\"Article.findMany\",\"Article.createOne\",\"Article.createMany\",\"Article.createManyAndReturn\",\"Article.updateOne\",\"Article.updateMany\",\"Article.updateManyAndReturn\",\"Article.upsertOne\",\"Article.deleteOne\",\"Article.deleteMany\",\"Article.groupBy\",\"Article.aggregate\",\"Note.findUnique\",\"Note.findUniqueOrThrow\",\"Note.findFirst\",\"Note.findFirstOrThrow\",\"Note.findMany\",\"Note.createOne\",\"Note.createMany\",\"Note.createManyAndReturn\",\"Note.updateOne\",\"Note.updateMany\",\"Note.updateManyAndReturn\",\"Note.upsertOne\",\"Note.deleteOne\",\"Note.deleteMany\",\"Note.groupBy\",\"Note.aggregate\",\"Image.findUnique\",\"Image.findUniqueOrThrow\",\"Image.findFirst\",\"Image.findFirstOrThrow\",\"Image.findMany\",\"Image.createOne\",\"Image.createMany\",\"Image.createManyAndReturn\",\"Image.updateOne\",\"Image.updateMany\",\"Image.updateManyAndReturn\",\"Image.upsertOne\",\"Image.deleteOne\",\"Image.deleteMany\",\"_avg\",\"_sum\",\"Image.groupBy\",\"Image.aggregate\",\"Book.findUnique\",\"Book.findUniqueOrThrow\",\"Book.findFirst\",\"Book.findFirstOrThrow\",\"Book.findMany\",\"Book.createOne\",\"Book.createMany\",\"Book.createManyAndReturn\",\"Book.updateOne\",\"Book.updateMany\",\"Book.updateManyAndReturn\",\"Book.upsertOne\",\"Book.deleteOne\",\"Book.deleteMany\",\"Book.groupBy\",\"Book.aggregate\",\"AND\",\"OR\",\"NOT\",\"id\",\"isbn\",\"title\",\"googleTitle\",\"googleSubTitle\",\"googleAuthors\",\"googleDescription\",\"googleImgSrc\",\"googleHref\",\"imagePath\",\"markdown\",\"rating\",\"tags\",\"Status\",\"status\",\"userId\",\"createdAt\",\"updatedAt\",\"exportedAt\",\"equals\",\"in\",\"notIn\",\"lt\",\"lte\",\"gt\",\"gte\",\"not\",\"has\",\"hasEvery\",\"hasSome\",\"contains\",\"startsWith\",\"endsWith\",\"isbn_userId\",\"path\",\"contentType\",\"fileSize\",\"width\",\"height\",\"path_userId\",\"title_userId\",\"url\",\"quote\",\"ogImageUrl\",\"ogTitle\",\"ogDescription\",\"categoryId\",\"name\",\"every\",\"some\",\"none\",\"url_userId\",\"name_userId\",\"is\",\"isNot\",\"connectOrCreate\",\"upsert\",\"createMany\",\"set\",\"disconnect\",\"delete\",\"connect\",\"updateMany\",\"deleteMany\",\"push\",\"increment\",\"decrement\",\"multiply\",\"divide\"]"),
  graph: " "
}
config.compilerWasm = {
  getRuntime: async () => require('./query_compiler_fast_bg.js'),
  getQueryCompilerWasmModule: async () => {
    const loader = (await import('#wasm-compiler-loader')).default
    const compiler = (await loader).default
    return compiler
  },
  importName: './query_compiler_fast_bg.js',
}
if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || (typeof process !== 'undefined' && process.env && process.env.DEBUG) || undefined) {
  Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || (typeof process !== 'undefined' && process.env && process.env.DEBUG) || undefined)
}

const PrismaClient = getPrismaClient(config)
exports.PrismaClient = PrismaClient
Object.assign(exports, Prisma)
