
/* !!! This is code generated by Prisma. Do not edit directly. !!!
/* eslint-disable */

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

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


const Prisma = {}

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

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

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 = objectEnumValues.instances.DbNull
Prisma.JsonNull = objectEnumValues.instances.JsonNull
Prisma.AnyNull = objectEnumValues.instances.AnyNull

Prisma.NullTypes = {
  DbNull: objectEnumValues.classes.DbNull,
  JsonNull: objectEnumValues.classes.JsonNull,
  AnyNull: objectEnumValues.classes.AnyNull
}





/**
 * Enums
 */
exports.Prisma.UserScalarFieldEnum = {
  id: 'id',
  type: 'type',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt',
  email: 'email',
  username: 'username',
  hashword: 'hashword',
  appUserId: 'appUserId',
  organizationId: 'organizationId',
  appOrgId: 'appOrgId',
  name: 'name'
};

exports.Prisma.TokenScalarFieldEnum = {
  id: 'id',
  token: 'token',
  created: 'created',
  expires: 'expires',
  userId: 'userId'
};

exports.Prisma.CredentialScalarFieldEnum = {
  id: 'id',
  userId: 'userId',
  authIsValid: 'authIsValid',
  externalId: 'externalId',
  data: 'data',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.EntityScalarFieldEnum = {
  id: 'id',
  credentialId: 'credentialId',
  userId: 'userId',
  name: 'name',
  moduleName: 'moduleName',
  externalId: 'externalId',
  data: 'data',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt',
  integrationIds: 'integrationIds',
  syncIds: 'syncIds'
};

exports.Prisma.IntegrationScalarFieldEnum = {
  id: 'id',
  userId: 'userId',
  status: 'status',
  config: 'config',
  version: 'version',
  entityIds: 'entityIds',
  errors: 'errors',
  warnings: 'warnings',
  info: 'info',
  logs: 'logs',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.IntegrationMappingScalarFieldEnum = {
  id: 'id',
  integrationId: 'integrationId',
  sourceId: 'sourceId',
  mapping: 'mapping',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.ProcessScalarFieldEnum = {
  id: 'id',
  userId: 'userId',
  integrationId: 'integrationId',
  name: 'name',
  type: 'type',
  state: 'state',
  context: 'context',
  results: 'results',
  childProcesses: 'childProcesses',
  parentProcessId: 'parentProcessId',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.SyncScalarFieldEnum = {
  id: 'id',
  integrationId: 'integrationId',
  entityIds: 'entityIds',
  hash: 'hash',
  name: 'name'
};

exports.Prisma.DataIdentifierScalarFieldEnum = {
  id: 'id',
  syncId: 'syncId',
  entityId: 'entityId',
  idData: 'idData',
  hash: 'hash'
};

exports.Prisma.AssociationScalarFieldEnum = {
  id: 'id',
  integrationId: 'integrationId',
  name: 'name',
  type: 'type',
  primaryObject: 'primaryObject'
};

exports.Prisma.AssociationObjectScalarFieldEnum = {
  id: 'id',
  associationId: 'associationId',
  entityId: 'entityId',
  objectType: 'objectType',
  objId: 'objId',
  metadata: 'metadata'
};

exports.Prisma.StateScalarFieldEnum = {
  id: 'id',
  state: 'state'
};

exports.Prisma.WebsocketConnectionScalarFieldEnum = {
  id: 'id',
  connectionId: 'connectionId'
};

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

exports.Prisma.QueryMode = {
  default: 'default',
  insensitive: 'insensitive'
};
exports.UserType = exports.$Enums.UserType = {
  INDIVIDUAL: 'INDIVIDUAL',
  ORGANIZATION: 'ORGANIZATION'
};

exports.IntegrationStatus = exports.$Enums.IntegrationStatus = {
  ENABLED: 'ENABLED',
  NEEDS_CONFIG: 'NEEDS_CONFIG',
  PROCESSING: 'PROCESSING',
  DISABLED: 'DISABLED',
  ERROR: 'ERROR'
};

exports.AssociationType = exports.$Enums.AssociationType = {
  ONE_TO_MANY: 'ONE_TO_MANY',
  ONE_TO_ONE: 'ONE_TO_ONE',
  MANY_TO_ONE: 'MANY_TO_ONE'
};

exports.Prisma.ModelName = {
  User: 'User',
  Token: 'Token',
  Credential: 'Credential',
  Entity: 'Entity',
  Integration: 'Integration',
  IntegrationMapping: 'IntegrationMapping',
  Process: 'Process',
  Sync: 'Sync',
  DataIdentifier: 'DataIdentifier',
  Association: 'Association',
  AssociationObject: 'AssociationObject',
  State: 'State',
  WebsocketConnection: 'WebsocketConnection'
};
/**
 * Create the Client
 */
const config = {
  "generator": {
    "name": "client",
    "provider": {
      "fromEnvVar": null,
      "value": "prisma-client-js"
    },
    "output": {
      "value": "/home/runner/work/frigg/frigg/packages/core/generated/prisma-mongodb",
      "fromEnvVar": null
    },
    "config": {
      "engineType": "binary"
    },
    "binaryTargets": [
      {
        "fromEnvVar": null,
        "value": "debian-openssl-3.0.x",
        "native": true
      },
      {
        "fromEnvVar": null,
        "value": "rhel-openssl-3.0.x"
      }
    ],
    "previewFeatures": [],
    "sourceFilePath": "/home/runner/work/frigg/frigg/packages/core/prisma-mongodb/schema.prisma",
    "isCustomOutput": true
  },
  "relativeEnvPaths": {
    "rootEnvPath": null
  },
  "relativePath": "../../prisma-mongodb",
  "clientVersion": "6.17.0",
  "engineVersion": "c0aafc03b8ef6cdced8654b9a817999e02457d6a",
  "datasourceNames": [
    "db"
  ],
  "activeProvider": "mongodb",
  "postinstall": false,
  "ciName": "GitHub Actions",
  "inlineDatasources": {
    "db": {
      "url": {
        "fromEnvVar": "DATABASE_URL",
        "value": null
      }
    }
  },
  "inlineSchema": "// Frigg Framework - Prisma Schema\n// MongoDB database schema for enterprise integration platform\n// Migration from Mongoose ODM to Prisma ORM\n\ngenerator client {\n  provider      = \"prisma-client-js\"\n  output        = \"../generated/prisma-mongodb\"\n  binaryTargets = [\"native\", \"rhel-openssl-3.0.x\"] // native for local dev, rhel for Lambda deployment\n  engineType    = \"binary\" // Use binary engines (smaller size)\n}\n\ndatasource db {\n  provider = \"mongodb\"\n  url      = env(\"DATABASE_URL\")\n}\n\n// ============================================================================\n// USER MODELS\n// ============================================================================\n\n/// User model with discriminator pattern support\n/// Replaces Mongoose discriminators (IndividualUser, OrganizationUser)\nmodel User {\n  id   String   @id @default(auto()) @map(\"_id\") @db.ObjectId\n  type UserType\n\n  // Timestamps\n  createdAt DateTime @default(now())\n  updatedAt DateTime @updatedAt\n\n  // IndividualUser fields (nullable for organizations)\n  email          String?\n  username       String?\n  hashword       String? // Bcrypt hashed password (handled in application layer)\n  appUserId      String?\n  organizationId String? @db.ObjectId\n\n  // Self-referential relation for organization membership\n  organization User?  @relation(\"OrgMembers\", fields: [organizationId], references: [id], onDelete: NoAction, onUpdate: NoAction)\n  members      User[] @relation(\"OrgMembers\")\n\n  // OrganizationUser fields (nullable for individuals)\n  appOrgId String?\n  name     String?\n\n  // Relations\n  tokens       Token[]\n  credentials  Credential[]\n  entities     Entity[]\n  integrations Integration[]\n  processes    Process[]\n\n  @@unique([username, appUserId])\n  @@index([type])\n  @@index([appUserId])\n  @@map(\"User\")\n}\n\nenum UserType {\n  INDIVIDUAL\n  ORGANIZATION\n}\n\n// ============================================================================\n// AUTHENTICATION MODELS\n// ============================================================================\n\n/// Authentication tokens with expiration\n/// Bcrypt hashed tokens stored (handled in application layer)\nmodel Token {\n  id      String    @id @default(auto()) @map(\"_id\") @db.ObjectId\n  token   String // Bcrypt hashed\n  created DateTime  @default(now())\n  expires DateTime?\n  userId  String    @db.ObjectId\n  user    User      @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n  @@index([userId])\n  @@index([expires])\n  @@map(\"Token\")\n}\n\n// ============================================================================\n// CREDENTIAL & ENTITY MODELS\n// ============================================================================\n\n/// OAuth credentials and API tokens\n/// All sensitive data encrypted with KMS at rest\nmodel Credential {\n  id          String   @id @default(auto()) @map(\"_id\") @db.ObjectId\n  userId      String?  @db.ObjectId\n  user        User?    @relation(fields: [userId], references: [id], onDelete: Cascade)\n  authIsValid Boolean?\n  externalId  String?\n\n  // Dynamic OAuth fields stored as JSON (encrypted via Prisma middleware)\n  // Contains: access_token, refresh_token, domain, expires_in, token_type, etc.\n  data Json @default(\"{}\")\n\n  createdAt DateTime @default(now())\n  updatedAt DateTime @updatedAt\n\n  // Relations\n  entities Entity[]\n\n  @@index([userId])\n  @@index([externalId])\n  @@map(\"Credential\")\n}\n\n/// External service entities (API connections)\nmodel Entity {\n  id           String      @id @default(auto()) @map(\"_id\") @db.ObjectId\n  credentialId String?     @db.ObjectId\n  credential   Credential? @relation(fields: [credentialId], references: [id], onDelete: SetNull)\n  userId       String?     @db.ObjectId\n  user         User?       @relation(fields: [userId], references: [id], onDelete: Cascade)\n  name         String?\n  moduleName   String?\n  externalId   String?\n\n  data Json @default(\"{}\")\n\n  createdAt DateTime @default(now())\n  updatedAt DateTime @updatedAt\n\n  // Relations - many-to-many with scalar lists\n  integrations   Integration[] @relation(\"IntegrationEntities\", fields: [integrationIds], references: [id])\n  integrationIds String[]      @db.ObjectId\n\n  syncs   Sync[]   @relation(\"SyncEntities\", fields: [syncIds], references: [id])\n  syncIds String[] @db.ObjectId\n\n  dataIdentifiers    DataIdentifier[]\n  associationObjects AssociationObject[]\n\n  @@index([userId])\n  @@index([externalId])\n  @@index([moduleName])\n  @@index([credentialId])\n  @@map(\"Entity\")\n}\n\n// ============================================================================\n// INTEGRATION MODELS\n// ============================================================================\n\n/// Main integration configuration and state\nmodel Integration {\n  id     String            @id @default(auto()) @map(\"_id\") @db.ObjectId\n  userId String?           @db.ObjectId\n  user   User?             @relation(fields: [userId], references: [id], onDelete: Cascade)\n  status IntegrationStatus @default(ENABLED)\n\n  // Configuration and version\n  config  Json? // Integration configuration object\n  version String?\n\n  // Entity references (many-to-many via explicit scalar list)\n  entities  Entity[] @relation(\"IntegrationEntities\", fields: [entityIds], references: [id])\n  entityIds String[] @db.ObjectId\n\n  // Message arrays (stored as JSON)\n  errors   Json @default(\"[]\")\n  warnings Json @default(\"[]\")\n  info     Json @default(\"[]\")\n  logs     Json @default(\"[]\")\n\n  createdAt DateTime @default(now())\n  updatedAt DateTime @updatedAt\n\n  // Relations\n  associations Association[]\n  syncs        Sync[]\n  mappings     IntegrationMapping[]\n  processes    Process[]\n\n  @@index([userId])\n  @@index([status])\n  @@map(\"Integration\")\n}\n\nenum IntegrationStatus {\n  ENABLED\n  NEEDS_CONFIG\n  PROCESSING\n  DISABLED\n  ERROR\n}\n\n/// Integration-specific data mappings\n/// All mapping data encrypted with KMS\nmodel IntegrationMapping {\n  id            String      @id @default(auto()) @map(\"_id\") @db.ObjectId\n  integrationId String      @db.ObjectId\n  integration   Integration @relation(fields: [integrationId], references: [id], onDelete: Cascade)\n  sourceId      String?\n\n  // Encrypted mapping data (handled via Prisma middleware)\n  mapping Json?\n\n  createdAt DateTime @default(now())\n  updatedAt DateTime @updatedAt\n\n  @@unique([integrationId, sourceId])\n  @@index([integrationId])\n  @@index([sourceId])\n  @@map(\"IntegrationMapping\")\n}\n\n// ============================================================================\n// PROCESS MODELS\n// ============================================================================\n\n/// Generic Process Model - tracks any long-running operation\n/// Used for: CRM syncs, data migrations, bulk operations, etc.\nmodel Process {\n  id String @id @default(auto()) @map(\"_id\") @db.ObjectId\n\n  // Core references\n  userId        String      @db.ObjectId\n  user          User        @relation(fields: [userId], references: [id], onDelete: Cascade)\n  integrationId String      @db.ObjectId\n  integration   Integration @relation(fields: [integrationId], references: [id], onDelete: Cascade)\n\n  // Process identification\n  name String // e.g., \"zoho-crm-contact-sync\", \"pipedrive-lead-sync\"\n  type String // e.g., \"CRM_SYNC\", \"DATA_MIGRATION\", \"BULK_OPERATION\"\n\n  // State machine\n  state String // Current state (integration-defined states)\n\n  // Flexible storage\n  context Json @default(\"{}\") // Process-specific data (pagination, metadata, etc.)\n  results Json @default(\"{}\") // Process results and metrics\n\n  // Hierarchy support\n  childProcesses  String[] @db.ObjectId\n  parentProcessId String?  @db.ObjectId\n\n  // Timestamps\n  createdAt DateTime @default(now())\n  updatedAt DateTime @updatedAt\n\n  @@index([userId])\n  @@index([integrationId])\n  @@index([type])\n  @@index([state])\n  @@index([name])\n  @@map(\"Process\")\n}\n\n// ============================================================================\n// SYNC MODELS\n// ============================================================================\n\n/// Bidirectional data synchronization tracking\nmodel Sync {\n  id            String       @id @default(auto()) @map(\"_id\") @db.ObjectId\n  integrationId String?      @db.ObjectId\n  integration   Integration? @relation(fields: [integrationId], references: [id], onDelete: Cascade)\n\n  // Entity references (many-to-many via explicit scalar list)\n  entities  Entity[] @relation(\"SyncEntities\", fields: [entityIds], references: [id])\n  entityIds String[] @db.ObjectId\n\n  hash String\n  name String\n\n  // Data identifiers (extracted to separate model)\n  dataIdentifiers DataIdentifier[]\n\n  @@index([integrationId])\n  @@index([hash])\n  @@index([name])\n  @@map(\"Sync\")\n}\n\n/// Data identifier for sync operations\n/// Replaces nested array structure in Mongoose\nmodel DataIdentifier {\n  id       String  @id @default(auto()) @map(\"_id\") @db.ObjectId\n  syncId   String? @db.ObjectId\n  sync     Sync?   @relation(fields: [syncId], references: [id], onDelete: Cascade)\n  entityId String  @db.ObjectId\n  entity   Entity  @relation(fields: [entityId], references: [id], onDelete: Cascade)\n\n  // Identifier data (can be any structure)\n  idData Json\n\n  hash String\n\n  @@index([syncId])\n  @@index([entityId])\n  @@index([hash])\n  @@map(\"DataIdentifier\")\n}\n\n// ============================================================================\n// ASSOCIATION MODELS\n// ============================================================================\n\n/// Entity associations with cardinality tracking\nmodel Association {\n  id            String          @id @default(auto()) @map(\"_id\") @db.ObjectId\n  integrationId String          @db.ObjectId\n  integration   Integration     @relation(fields: [integrationId], references: [id], onDelete: Cascade)\n  name          String\n  type          AssociationType\n  primaryObject String\n\n  // Associated objects (extracted to separate model)\n  objects AssociationObject[]\n\n  @@index([integrationId])\n  @@index([name])\n  @@map(\"Association\")\n}\n\n/// Association object entry\n/// Replaces nested array structure in Mongoose\nmodel AssociationObject {\n  id            String      @id @default(auto()) @map(\"_id\") @db.ObjectId\n  associationId String      @db.ObjectId\n  association   Association @relation(fields: [associationId], references: [id], onDelete: Cascade)\n  entityId      String      @db.ObjectId\n  entity        Entity      @relation(fields: [entityId], references: [id], onDelete: Cascade)\n  objectType    String\n  objId         String\n  metadata      Json? // Optional metadata\n\n  @@index([associationId])\n  @@index([entityId])\n  @@map(\"AssociationObject\")\n}\n\nenum AssociationType {\n  ONE_TO_MANY\n  ONE_TO_ONE\n  MANY_TO_ONE\n}\n\n// ============================================================================\n// UTILITY MODELS\n// ============================================================================\n\n/// Generic state storage\nmodel State {\n  id    String @id @default(auto()) @map(\"_id\") @db.ObjectId\n  state Json?\n\n  @@map(\"State\")\n}\n\n/// AWS API Gateway WebSocket connection tracking\nmodel WebsocketConnection {\n  id           String  @id @default(auto()) @map(\"_id\") @db.ObjectId\n  connectionId String?\n\n  @@index([connectionId])\n  @@map(\"WebsocketConnection\")\n}\n",
  "inlineSchemaHash": "2623220d4fb31af25f8c10a67e017e0b646d9d9cb3f2c8c1c2d2b991f4e52d85",
  "copyEngine": true
}
config.dirname = '/'

config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"type\",\"kind\":\"enum\",\"type\":\"UserType\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"hashword\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"appUserId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"organizationId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"organization\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"OrgMembers\"},{\"name\":\"members\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"OrgMembers\"},{\"name\":\"appOrgId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tokens\",\"kind\":\"object\",\"type\":\"Token\",\"relationName\":\"TokenToUser\"},{\"name\":\"credentials\",\"kind\":\"object\",\"type\":\"Credential\",\"relationName\":\"CredentialToUser\"},{\"name\":\"entities\",\"kind\":\"object\",\"type\":\"Entity\",\"relationName\":\"EntityToUser\"},{\"name\":\"integrations\",\"kind\":\"object\",\"type\":\"Integration\",\"relationName\":\"IntegrationToUser\"},{\"name\":\"processes\",\"kind\":\"object\",\"type\":\"Process\",\"relationName\":\"ProcessToUser\"}],\"dbName\":\"User\"},\"Token\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"created\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"expires\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"TokenToUser\"}],\"dbName\":\"Token\"},\"Credential\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"CredentialToUser\"},{\"name\":\"authIsValid\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"externalId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"data\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"entities\",\"kind\":\"object\",\"type\":\"Entity\",\"relationName\":\"CredentialToEntity\"}],\"dbName\":\"Credential\"},\"Entity\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"credentialId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"credential\",\"kind\":\"object\",\"type\":\"Credential\",\"relationName\":\"CredentialToEntity\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"EntityToUser\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"moduleName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"externalId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"data\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"integrations\",\"kind\":\"object\",\"type\":\"Integration\",\"relationName\":\"IntegrationEntities\"},{\"name\":\"integrationIds\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"syncs\",\"kind\":\"object\",\"type\":\"Sync\",\"relationName\":\"SyncEntities\"},{\"name\":\"syncIds\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"dataIdentifiers\",\"kind\":\"object\",\"type\":\"DataIdentifier\",\"relationName\":\"DataIdentifierToEntity\"},{\"name\":\"associationObjects\",\"kind\":\"object\",\"type\":\"AssociationObject\",\"relationName\":\"AssociationObjectToEntity\"}],\"dbName\":\"Entity\"},\"Integration\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"IntegrationToUser\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"IntegrationStatus\"},{\"name\":\"config\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"version\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"entities\",\"kind\":\"object\",\"type\":\"Entity\",\"relationName\":\"IntegrationEntities\"},{\"name\":\"entityIds\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"errors\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"warnings\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"info\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"logs\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"associations\",\"kind\":\"object\",\"type\":\"Association\",\"relationName\":\"AssociationToIntegration\"},{\"name\":\"syncs\",\"kind\":\"object\",\"type\":\"Sync\",\"relationName\":\"IntegrationToSync\"},{\"name\":\"mappings\",\"kind\":\"object\",\"type\":\"IntegrationMapping\",\"relationName\":\"IntegrationToIntegrationMapping\"},{\"name\":\"processes\",\"kind\":\"object\",\"type\":\"Process\",\"relationName\":\"IntegrationToProcess\"}],\"dbName\":\"Integration\"},\"IntegrationMapping\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"integrationId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"integration\",\"kind\":\"object\",\"type\":\"Integration\",\"relationName\":\"IntegrationToIntegrationMapping\"},{\"name\":\"sourceId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mapping\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":\"IntegrationMapping\"},\"Process\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"ProcessToUser\"},{\"name\":\"integrationId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"integration\",\"kind\":\"object\",\"type\":\"Integration\",\"relationName\":\"IntegrationToProcess\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"state\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"context\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"results\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"childProcesses\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"parentProcessId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":\"Process\"},\"Sync\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"integrationId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"integration\",\"kind\":\"object\",\"type\":\"Integration\",\"relationName\":\"IntegrationToSync\"},{\"name\":\"entities\",\"kind\":\"object\",\"type\":\"Entity\",\"relationName\":\"SyncEntities\"},{\"name\":\"entityIds\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"hash\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"dataIdentifiers\",\"kind\":\"object\",\"type\":\"DataIdentifier\",\"relationName\":\"DataIdentifierToSync\"}],\"dbName\":\"Sync\"},\"DataIdentifier\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"syncId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sync\",\"kind\":\"object\",\"type\":\"Sync\",\"relationName\":\"DataIdentifierToSync\"},{\"name\":\"entityId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"entity\",\"kind\":\"object\",\"type\":\"Entity\",\"relationName\":\"DataIdentifierToEntity\"},{\"name\":\"idData\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"hash\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":\"DataIdentifier\"},\"Association\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"integrationId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"integration\",\"kind\":\"object\",\"type\":\"Integration\",\"relationName\":\"AssociationToIntegration\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"type\",\"kind\":\"enum\",\"type\":\"AssociationType\"},{\"name\":\"primaryObject\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"objects\",\"kind\":\"object\",\"type\":\"AssociationObject\",\"relationName\":\"AssociationToAssociationObject\"}],\"dbName\":\"Association\"},\"AssociationObject\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"associationId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"association\",\"kind\":\"object\",\"type\":\"Association\",\"relationName\":\"AssociationToAssociationObject\"},{\"name\":\"entityId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"entity\",\"kind\":\"object\",\"type\":\"Entity\",\"relationName\":\"AssociationObjectToEntity\"},{\"name\":\"objectType\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"objId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"metadata\",\"kind\":\"scalar\",\"type\":\"Json\"}],\"dbName\":\"AssociationObject\"},\"State\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"state\",\"kind\":\"scalar\",\"type\":\"Json\"}],\"dbName\":\"State\"},\"WebsocketConnection\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"connectionId\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":\"WebsocketConnection\"}},\"enums\":{},\"types\":{}}")
defineDmmfProperty(exports.Prisma, config.runtimeDataModel)
config.engineWasm = {
  getRuntime: async () => require('./query_engine_bg.js'),
  getQueryEngineWasmModule: async () => {
    const loader = (await import('#wasm-engine-loader')).default
    const engine = (await loader).default
    return engine
  }
}
config.compilerWasm = undefined

config.injectableEdgeEnv = () => ({
  parsed: {
    DATABASE_URL: typeof globalThis !== 'undefined' && globalThis['DATABASE_URL'] || typeof process !== 'undefined' && process.env && process.env.DATABASE_URL || undefined
  }
})

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)

