@friggframework/core 2.0.0-next.80 → 2.0.0-next.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CLAUDE.md +8 -0
  2. package/generated/prisma-mongodb/edge.js +3 -3
  3. package/generated/prisma-mongodb/index.d.ts +2 -2
  4. package/generated/prisma-mongodb/index.js +9 -9
  5. package/generated/prisma-mongodb/{query-engine-debian-openssl-3.0.x → libquery_engine-debian-openssl-3.0.x.so.node} +0 -0
  6. package/generated/prisma-mongodb/{query-engine-rhel-openssl-3.0.x → libquery_engine-rhel-openssl-3.0.x.so.node} +0 -0
  7. package/generated/prisma-mongodb/package.json +1 -1
  8. package/generated/prisma-mongodb/runtime/library.js +146 -0
  9. package/generated/prisma-mongodb/schema.prisma +7 -1
  10. package/generated/prisma-mongodb/wasm.js +3 -3
  11. package/generated/prisma-postgresql/edge.js +3 -3
  12. package/generated/prisma-postgresql/index.d.ts +6 -2
  13. package/generated/prisma-postgresql/index.js +9 -9
  14. package/generated/prisma-postgresql/{query-engine-debian-openssl-3.0.x → libquery_engine-debian-openssl-3.0.x.so.node} +0 -0
  15. package/generated/prisma-postgresql/{query-engine-rhel-openssl-3.0.x → libquery_engine-rhel-openssl-3.0.x.so.node} +0 -0
  16. package/generated/prisma-postgresql/package.json +1 -1
  17. package/generated/prisma-postgresql/runtime/library.js +146 -0
  18. package/generated/prisma-postgresql/schema.prisma +7 -1
  19. package/generated/prisma-postgresql/wasm.js +3 -3
  20. package/integrations/integration-router.js +2 -1
  21. package/integrations/repositories/process-repository-documentdb.js +68 -0
  22. package/integrations/repositories/process-repository-interface.js +46 -0
  23. package/integrations/repositories/process-repository-mongo.js +72 -0
  24. package/integrations/repositories/process-repository-postgres.js +163 -0
  25. package/integrations/repositories/process-update-ops-shared.js +112 -0
  26. package/integrations/use-cases/update-process-metrics.js +106 -102
  27. package/integrations/use-cases/update-process-state.js +58 -19
  28. package/modules/module.js +3 -1
  29. package/modules/requester/requester.js +145 -37
  30. package/modules/use-cases/get-module-instance-from-type.js +4 -1
  31. package/package.json +5 -5
  32. package/prisma-mongodb/schema.prisma +7 -1
  33. package/prisma-postgresql/migrations/20260422120000_add_entity_data_column/migration.sql +10 -0
  34. package/prisma-postgresql/migrations/20260422120001_create_process_table/migration.sql +48 -0
  35. package/prisma-postgresql/schema.prisma +7 -1
  36. package/generated/prisma-mongodb/runtime/binary.d.ts +0 -1
  37. package/generated/prisma-mongodb/runtime/binary.js +0 -289
  38. package/generated/prisma-postgresql/runtime/binary.d.ts +0 -1
  39. package/generated/prisma-postgresql/runtime/binary.js +0 -289
package/CLAUDE.md CHANGED
@@ -212,6 +212,14 @@ packages/core/
212
212
  - `integration-repository-mongo.js` - MongoDB implementation
213
213
  - `integration-repository-postgres.js` - PostgreSQL implementation
214
214
  - `integration-mapping-repository-*.js` - Mapping data persistence
215
+ - `process-repository-*.js` - Process (long-running job) persistence.
216
+ Implements `applyProcessUpdate(processId, ops)` — a race-safe alternative
217
+ to `update(id, patch)` that routes increments, sets, and bounded-array
218
+ pushes through each backend's native atomic primitive (PostgreSQL
219
+ `jsonb_set` / MongoDB `$inc`/`$set`/`$push`). Use this method any time
220
+ multiple queue workers may concurrently mutate the same Process row
221
+ (counters, flags, error history). The legacy `update(id, patch)`
222
+ remains available but is clobber-prone under concurrency.
215
223
 
216
224
  **Integration developers extend IntegrationBase**:
217
225
 
@@ -271,7 +271,7 @@ const config = {
271
271
  "fromEnvVar": null
272
272
  },
273
273
  "config": {
274
- "engineType": "binary"
274
+ "engineType": "library"
275
275
  },
276
276
  "binaryTargets": [
277
277
  {
@@ -308,8 +308,8 @@ const config = {
308
308
  }
309
309
  }
310
310
  },
311
- "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",
312
- "inlineSchemaHash": "2623220d4fb31af25f8c10a67e017e0b646d9d9cb3f2c8c1c2d2b991f4e52d85",
311
+ "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 // Library engine (default since Prisma 3.x): Rust query engine loads as a\n // Node-API addon inside the same process. The binary engine forks a child\n // query-engine subprocess and communicates over a local HTTP/IPC pipe with\n // NO client-side timeout — a zombied child wedges the Node process until\n // Lambda's 900s cap. Switching to library eliminates that entire class of\n // silent hangs. See friggframework/frigg#580 for the investigation.\n engineType = \"library\"\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",
312
+ "inlineSchemaHash": "19d47c2df802693a622b31a2a012691eb073ad03d7cdb199b2098ae69f894a9c",
313
313
  "copyEngine": true
314
314
  }
315
315
  config.dirname = '/'
@@ -3,7 +3,7 @@
3
3
  * Client
4
4
  **/
5
5
 
6
- import * as runtime from './runtime/binary.js';
6
+ import * as runtime from './runtime/library.js';
7
7
  import $Types = runtime.Types // general types
8
8
  import $Public = runtime.Types.Public
9
9
  import $Utils = runtime.Types.Utils
@@ -168,7 +168,7 @@ export class PrismaClient<
168
168
  */
169
169
 
170
170
  constructor(optionsArg ?: Prisma.Subset<ClientOptions, Prisma.PrismaClientOptions>);
171
- $on<V extends (U | 'beforeExit')>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : V extends 'beforeExit' ? () => $Utils.JsPromise<void> : Prisma.LogEvent) => void): PrismaClient;
171
+ $on<V extends U>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;
172
172
 
173
173
  /**
174
174
  * Connect with the database
@@ -26,7 +26,7 @@ const {
26
26
  Public,
27
27
  getRuntime,
28
28
  createParam,
29
- } = require('./runtime/binary.js')
29
+ } = require('./runtime/library.js')
30
30
 
31
31
 
32
32
  const Prisma = {}
@@ -272,7 +272,7 @@ const config = {
272
272
  "fromEnvVar": null
273
273
  },
274
274
  "config": {
275
- "engineType": "binary"
275
+ "engineType": "library"
276
276
  },
277
277
  "binaryTargets": [
278
278
  {
@@ -309,8 +309,8 @@ const config = {
309
309
  }
310
310
  }
311
311
  },
312
- "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",
313
- "inlineSchemaHash": "2623220d4fb31af25f8c10a67e017e0b646d9d9cb3f2c8c1c2d2b991f4e52d85",
312
+ "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 // Library engine (default since Prisma 3.x): Rust query engine loads as a\n // Node-API addon inside the same process. The binary engine forks a child\n // query-engine subprocess and communicates over a local HTTP/IPC pipe with\n // NO client-side timeout — a zombied child wedges the Node process until\n // Lambda's 900s cap. Switching to library eliminates that entire class of\n // silent hangs. See friggframework/frigg#580 for the investigation.\n engineType = \"library\"\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",
313
+ "inlineSchemaHash": "19d47c2df802693a622b31a2a012691eb073ad03d7cdb199b2098ae69f894a9c",
314
314
  "copyEngine": true
315
315
  }
316
316
 
@@ -337,7 +337,7 @@ config.engineWasm = undefined
337
337
  config.compilerWasm = undefined
338
338
 
339
339
 
340
- const { warnEnvConflicts } = require('./runtime/binary.js')
340
+ const { warnEnvConflicts } = require('./runtime/library.js')
341
341
 
342
342
  warnEnvConflicts({
343
343
  rootEnvPath: config.relativeEnvPaths.rootEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.rootEnvPath),
@@ -349,12 +349,12 @@ exports.PrismaClient = PrismaClient
349
349
  Object.assign(exports, Prisma)
350
350
 
351
351
  // file annotations for bundling tools to include these files
352
- path.join(__dirname, "query-engine-debian-openssl-3.0.x");
353
- path.join(process.cwd(), "generated/prisma-mongodb/query-engine-debian-openssl-3.0.x")
352
+ path.join(__dirname, "libquery_engine-debian-openssl-3.0.x.so.node");
353
+ path.join(process.cwd(), "generated/prisma-mongodb/libquery_engine-debian-openssl-3.0.x.so.node")
354
354
 
355
355
  // file annotations for bundling tools to include these files
356
- path.join(__dirname, "query-engine-rhel-openssl-3.0.x");
357
- path.join(process.cwd(), "generated/prisma-mongodb/query-engine-rhel-openssl-3.0.x")
356
+ path.join(__dirname, "libquery_engine-rhel-openssl-3.0.x.so.node");
357
+ path.join(process.cwd(), "generated/prisma-mongodb/libquery_engine-rhel-openssl-3.0.x.so.node")
358
358
  // file annotations for bundling tools to include these files
359
359
  path.join(__dirname, "schema.prisma");
360
360
  path.join(process.cwd(), "generated/prisma-mongodb/schema.prisma")
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-c438d94a7652e3879fd7c24396554b70a611123a1ffa14085b83287e601c6b75",
2
+ "name": "prisma-client-757bb4d524e2bac575468af19db9a259a34b200e05383b08c2371dfef12e4230",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "default.js",