
/* !!! 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('@prisma/client/runtime/client.js')


const Prisma = {}

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

/**
 * Prisma Client JS version: 7.2.0
 * Query Engine version: 0c8ef2ce45c83248ab3df073180d5eda9e8be7a3
 */
Prisma.prismaVersion = {
  client: "7.2.0",
  engine: "0c8ef2ce45c83248ab3df073180d5eda9e8be7a3"
}

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




  const path = require('path')

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

exports.Prisma.PipelineScalarFieldEnum = {
  name: 'name',
  version: 'version',
  description: 'description',
  active: 'active',
  draft: 'draft',
  createdAt: 'createdAt',
  createdFromVersion: 'createdFromVersion'
};

exports.Prisma.ColumnScalarFieldEnum = {
  id: 'id',
  slug: 'slug',
  name: 'name',
  index: 'index',
  segment: 'segment',
  pipelineName: 'pipelineName',
  pipelineVersion: 'pipelineVersion'
};

exports.Prisma.IssueScalarFieldEnum = {
  key: 'key',
  title: 'title',
  description: 'description',
  priority: 'priority',
  semver: 'semver',
  labels: 'labels',
  columnId: 'columnId',
  parentKey: 'parentKey',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.AcceptanceCriterionScalarFieldEnum = {
  id: 'id',
  issueKey: 'issueKey',
  criterion: 'criterion',
  position: 'position'
};

exports.Prisma.IssueHistoryScalarFieldEnum = {
  id: 'id',
  issueKey: 'issueKey',
  at: 'at',
  action: 'action',
  fromColumn: 'fromColumn',
  toColumn: 'toColumn',
  sessionId: 'sessionId',
  changes: 'changes'
};

exports.Prisma.ExecutionLogScalarFieldEnum = {
  sessionId: 'sessionId',
  issueKey: 'issueKey',
  columnId: 'columnId',
  prompt: 'prompt',
  terminalLog: 'terminalLog',
  createdAt: 'createdAt'
};

exports.Prisma.CommentScalarFieldEnum = {
  id: 'id',
  issueKey: 'issueKey',
  content: 'content',
  author: 'author',
  createdAt: 'createdAt'
};

exports.Prisma.AttachmentScalarFieldEnum = {
  id: 'id',
  issueKey: 'issueKey',
  filename: 'filename',
  filepath: 'filepath',
  mimetype: 'mimetype',
  size: 'size',
  createdAt: 'createdAt'
};

exports.Prisma.SequenceScalarFieldEnum = {
  name: 'name',
  currentValue: 'currentValue'
};

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

exports.Prisma.NullsOrder = {
  first: 'first',
  last: 'last'
};


exports.Prisma.ModelName = {
  Pipeline: 'Pipeline',
  Column: 'Column',
  Issue: 'Issue',
  AcceptanceCriterion: 'AcceptanceCriterion',
  IssueHistory: 'IssueHistory',
  ExecutionLog: 'ExecutionLog',
  Comment: 'Comment',
  Attachment: 'Attachment',
  Sequence: 'Sequence'
};
/**
 * Create the Client
 */
const config = {
  "previewFeatures": [],
  "clientVersion": "7.2.0",
  "engineVersion": "0c8ef2ce45c83248ab3df073180d5eda9e8be7a3",
  "activeProvider": "sqlite",
  "inlineSchema": "// AutoCode - Prisma Schema\n// Base de données SQLite par projet\n// VERSION 2.0 - Pipelines Versionnés & Immuables\n\ngenerator client {\n  provider = \"prisma-client-js\"\n}\n\ndatasource db {\n  provider = \"sqlite\"\n}\n\n// ═══════════════════════════════════════════════════════════════\n// PIPELINES & COLUMNS - VERSIONNÉS ET IMMUABLES\n// ═══════════════════════════════════════════════════════════════\n\nmodel Pipeline {\n  name               String // Partie de la clé composite\n  version            Int // v1, v2, v3... (pas semver)\n  description        String?\n  active             Boolean  @default(false)\n  draft              Boolean  @default(true) // Brouillon éditable ou verrouillé\n  createdAt          DateTime @default(now()) @map(\"created_at\")\n  createdFromVersion Int?     @map(\"created_from_version\") // Version source du brouillon\n\n  columns Column[]\n\n  @@id([name, version]) // Clé composite: nom + version\n  @@map(\"pipelines\")\n}\n\nmodel Column {\n  id              Int    @id @default(autoincrement()) // ID stable pour références\n  slug            String // \"backlog\", \"testing-unit\" (slug lisible)\n  name            String // \"Backlog\", \"Testing Unit\"\n  index           Int // Position 0, 1, 2...\n  segment         String // 'definition' | 'action' | 'finish'\n  pipelineName    String @map(\"pipeline_name\")\n  pipelineVersion Int    @map(\"pipeline_version\")\n\n  pipeline      Pipeline       @relation(fields: [pipelineName, pipelineVersion], references: [name, version], onDelete: Cascade)\n  issues        Issue[]\n  executionLogs ExecutionLog[]\n\n  @@unique([pipelineName, pipelineVersion, slug]) // Slug unique par version de pipeline\n  @@index([pipelineName, pipelineVersion])\n  @@index([index])\n  @@map(\"columns\")\n}\n\n// ═══════════════════════════════════════════════════════════════\n// ISSUES\n// ═══════════════════════════════════════════════════════════════\n\nmodel Issue {\n  key         String   @id // \"AC-000001\"\n  title       String\n  description String? // Markdown\n  priority    String   @default(\"P2\") // P0, P1, P2, P3\n  semver      String   @default(\"patch\") // patch | minor | major\n  labels      String   @default(\"[]\") // JSON array\n  columnId    Int      @map(\"column_id\") // Référence stable par ID\n  parentKey   String?  @map(\"parent_key\")\n  createdAt   DateTime @default(now()) @map(\"created_at\")\n  updatedAt   DateTime @updatedAt @map(\"updated_at\")\n\n  column             Column                @relation(fields: [columnId], references: [id])\n  parent             Issue?                @relation(\"IssueHierarchy\", fields: [parentKey], references: [key], onDelete: SetNull)\n  children           Issue[]               @relation(\"IssueHierarchy\")\n  acceptanceCriteria AcceptanceCriterion[]\n  history            IssueHistory[]\n  comments           Comment[]\n  attachments        Attachment[]\n  executionLogs      ExecutionLog[]\n\n  @@index([columnId])\n  @@index([parentKey])\n  @@index([priority])\n  @@index([updatedAt(sort: Desc)])\n  @@map(\"issues\")\n}\n\nmodel AcceptanceCriterion {\n  id        Int    @id @default(autoincrement())\n  issueKey  String @map(\"issue_key\")\n  criterion String\n  position  Int\n\n  issue Issue @relation(fields: [issueKey], references: [key], onDelete: Cascade)\n\n  @@index([issueKey])\n  @@map(\"acceptance_criteria\")\n}\n\n// ═══════════════════════════════════════════════════════════════\n// HISTORY & EXECUTION\n// ═══════════════════════════════════════════════════════════════\n\nmodel IssueHistory {\n  id         Int      @id @default(autoincrement())\n  issueKey   String   @map(\"issue_key\")\n  at         DateTime\n  action     String // 'created' | 'moved' | 'started' | 'forced' | 'edited'\n  fromColumn String?  @map(\"from_column\") // Slug pour historique (texte)\n  toColumn   String   @map(\"to_column\") // Slug pour historique (texte)\n  sessionId  String?  @map(\"session_id\") // 8 chars hex\n  changes    String? // JSON pour 'edited'\n\n  issue Issue @relation(fields: [issueKey], references: [key], onDelete: Cascade)\n\n  @@index([issueKey])\n  @@index([sessionId])\n  @@index([at(sort: Desc)])\n  @@map(\"issue_history\")\n}\n\nmodel ExecutionLog {\n  sessionId   String   @id @map(\"session_id\") // 8 chars hex\n  issueKey    String   @map(\"issue_key\")\n  columnId    Int      @map(\"column_id\") // Référence par ID\n  prompt      String? // Contenu du prompt\n  terminalLog String?  @map(\"terminal_log\") // Logs d'execution\n  createdAt   DateTime @default(now()) @map(\"created_at\")\n\n  issue  Issue  @relation(fields: [issueKey], references: [key], onDelete: Cascade)\n  column Column @relation(fields: [columnId], references: [id])\n\n  @@index([issueKey])\n  @@index([columnId])\n  @@map(\"execution_logs\")\n}\n\n// ═══════════════════════════════════════════════════════════════\n// COMMENTS & ATTACHMENTS\n// ═══════════════════════════════════════════════════════════════\n\nmodel Comment {\n  id        String   @id // Timestamp Unix en ms\n  issueKey  String   @map(\"issue_key\")\n  content   String\n  author    String\n  createdAt DateTime @default(now()) @map(\"created_at\")\n\n  issue Issue @relation(fields: [issueKey], references: [key], onDelete: Cascade)\n\n  @@index([issueKey])\n  @@index([createdAt(sort: Desc)])\n  @@map(\"comments\")\n}\n\nmodel Attachment {\n  id        Int      @id @default(autoincrement())\n  issueKey  String   @map(\"issue_key\")\n  filename  String // Nom original\n  filepath  String // Chemin relatif sur disque\n  mimetype  String?\n  size      Int? // Bytes\n  createdAt DateTime @default(now()) @map(\"created_at\")\n\n  issue Issue @relation(fields: [issueKey], references: [key], onDelete: Cascade)\n\n  @@index([issueKey])\n  @@map(\"attachments\")\n}\n\n// ═══════════════════════════════════════════════════════════════\n// SEQUENCE (pour generation AC-XXXXXX)\n// ═══════════════════════════════════════════════════════════════\n\nmodel Sequence {\n  name         String @id // 'issue_key'\n  currentValue Int    @default(0) @map(\"current_value\")\n\n  @@map(\"sequences\")\n}\n"
}

config.runtimeDataModel = JSON.parse("{\"models\":{\"Pipeline\":{\"fields\":[{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"version\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"active\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"draft\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"createdFromVersion\",\"kind\":\"scalar\",\"type\":\"Int\",\"dbName\":\"created_from_version\"},{\"name\":\"columns\",\"kind\":\"object\",\"type\":\"Column\",\"relationName\":\"ColumnToPipeline\"}],\"dbName\":\"pipelines\"},\"Column\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"slug\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"index\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"segment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"pipelineName\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"pipeline_name\"},{\"name\":\"pipelineVersion\",\"kind\":\"scalar\",\"type\":\"Int\",\"dbName\":\"pipeline_version\"},{\"name\":\"pipeline\",\"kind\":\"object\",\"type\":\"Pipeline\",\"relationName\":\"ColumnToPipeline\"},{\"name\":\"issues\",\"kind\":\"object\",\"type\":\"Issue\",\"relationName\":\"ColumnToIssue\"},{\"name\":\"executionLogs\",\"kind\":\"object\",\"type\":\"ExecutionLog\",\"relationName\":\"ColumnToExecutionLog\"}],\"dbName\":\"columns\"},\"Issue\":{\"fields\":[{\"name\":\"key\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"priority\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"semver\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"labels\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"columnId\",\"kind\":\"scalar\",\"type\":\"Int\",\"dbName\":\"column_id\"},{\"name\":\"parentKey\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"parent_key\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"column\",\"kind\":\"object\",\"type\":\"Column\",\"relationName\":\"ColumnToIssue\"},{\"name\":\"parent\",\"kind\":\"object\",\"type\":\"Issue\",\"relationName\":\"IssueHierarchy\"},{\"name\":\"children\",\"kind\":\"object\",\"type\":\"Issue\",\"relationName\":\"IssueHierarchy\"},{\"name\":\"acceptanceCriteria\",\"kind\":\"object\",\"type\":\"AcceptanceCriterion\",\"relationName\":\"AcceptanceCriterionToIssue\"},{\"name\":\"history\",\"kind\":\"object\",\"type\":\"IssueHistory\",\"relationName\":\"IssueToIssueHistory\"},{\"name\":\"comments\",\"kind\":\"object\",\"type\":\"Comment\",\"relationName\":\"CommentToIssue\"},{\"name\":\"attachments\",\"kind\":\"object\",\"type\":\"Attachment\",\"relationName\":\"AttachmentToIssue\"},{\"name\":\"executionLogs\",\"kind\":\"object\",\"type\":\"ExecutionLog\",\"relationName\":\"ExecutionLogToIssue\"}],\"dbName\":\"issues\"},\"AcceptanceCriterion\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"issueKey\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"issue_key\"},{\"name\":\"criterion\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"position\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"issue\",\"kind\":\"object\",\"type\":\"Issue\",\"relationName\":\"AcceptanceCriterionToIssue\"}],\"dbName\":\"acceptance_criteria\"},\"IssueHistory\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"issueKey\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"issue_key\"},{\"name\":\"at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"action\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fromColumn\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"from_column\"},{\"name\":\"toColumn\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"to_column\"},{\"name\":\"sessionId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"session_id\"},{\"name\":\"changes\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"issue\",\"kind\":\"object\",\"type\":\"Issue\",\"relationName\":\"IssueToIssueHistory\"}],\"dbName\":\"issue_history\"},\"ExecutionLog\":{\"fields\":[{\"name\":\"sessionId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"session_id\"},{\"name\":\"issueKey\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"issue_key\"},{\"name\":\"columnId\",\"kind\":\"scalar\",\"type\":\"Int\",\"dbName\":\"column_id\"},{\"name\":\"prompt\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"terminalLog\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"terminal_log\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"issue\",\"kind\":\"object\",\"type\":\"Issue\",\"relationName\":\"ExecutionLogToIssue\"},{\"name\":\"column\",\"kind\":\"object\",\"type\":\"Column\",\"relationName\":\"ColumnToExecutionLog\"}],\"dbName\":\"execution_logs\"},\"Comment\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"issueKey\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"issue_key\"},{\"name\":\"content\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"author\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"issue\",\"kind\":\"object\",\"type\":\"Issue\",\"relationName\":\"CommentToIssue\"}],\"dbName\":\"comments\"},\"Attachment\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"issueKey\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"issue_key\"},{\"name\":\"filename\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"filepath\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mimetype\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"size\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"issue\",\"kind\":\"object\",\"type\":\"Issue\",\"relationName\":\"AttachmentToIssue\"}],\"dbName\":\"attachments\"},\"Sequence\":{\"fields\":[{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"currentValue\",\"kind\":\"scalar\",\"type\":\"Int\",\"dbName\":\"current_value\"}],\"dbName\":\"sequences\"}},\"enums\":{},\"types\":{}}")
defineDmmfProperty(exports.Prisma, config.runtimeDataModel)
config.compilerWasm = {
      getRuntime: async () => require('./query_compiler_bg.js'),
      getQueryCompilerWasmModule: async () => {
        const { Buffer } = require('node:buffer')
        const { wasm } = require('./query_compiler_bg.wasm-base64.js')
        const queryCompilerWasmFileBytes = Buffer.from(wasm, 'base64')

        return new WebAssembly.Module(queryCompilerWasmFileBytes)
      }
    }

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