Files
HiveGrid-Wireframes/03 Quellen und Referenzen/hivegrid-cloud/packages/db/generated/prisma/client/client.ts
T

2138 lines
60 KiB
TypeScript

/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck
/*
* This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types.
* If you're looking for something you can import in the client-side of your application, please refer to the `browser.ts` file instead.
*
* 🟢 You can import this file directly.
*/
import * as process from 'node:process'
import * as path from 'node:path'
import { fileURLToPath } from 'node:url'
globalThis['__dirname'] = path.dirname(fileURLToPath(import.meta.url))
import * as runtime from "@prisma/client/runtime/client"
import * as $Enums from "./enums.ts"
import * as $Class from "./internal/class.ts"
import * as Prisma from "./internal/prismaNamespace.ts"
export * as $Enums from './enums.ts'
export * from "./enums.ts"
/**
* ## Prisma Client
*
* Type-safe database client for TypeScript
* @example
* ```
* const prisma = new PrismaClient({
* adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL })
* })
* // Fetch zero or more Users
* const users = await prisma.user.findMany()
* ```
*
* Read more in our [docs](https://pris.ly/d/client).
*/
export const PrismaClient = $Class.getPrismaClientClass()
export type PrismaClient<LogOpts extends Prisma.LogLevel = never, OmitOpts extends Prisma.PrismaClientOptions["omit"] = Prisma.PrismaClientOptions["omit"], ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = $Class.PrismaClient<LogOpts, OmitOpts, ExtArgs>
export { Prisma }
/**
* Model User
*
*/
export type User = Prisma.UserModel
/**
* Model MagicLinkToken
*
*/
export type MagicLinkToken = Prisma.MagicLinkTokenModel
/**
* Model Tenant
*
*/
export type Tenant = Prisma.TenantModel
/**
* Model WorkspaceAuthProvider
*
*/
export type WorkspaceAuthProvider = Prisma.WorkspaceAuthProviderModel
/**
* Model ImpersonationAudit
*
*/
export type ImpersonationAudit = Prisma.ImpersonationAuditModel
/**
* Model TenantUser
*
*/
export type TenantUser = Prisma.TenantUserModel
/**
* Model TenantUserInvitation
*
*/
export type TenantUserInvitation = Prisma.TenantUserInvitationModel
/**
* Model Registration
*
*/
export type Registration = Prisma.RegistrationModel
/**
* Model Blacklist
*
*/
export type Blacklist = Prisma.BlacklistModel
/**
* Model TenantIpAddress
*
*/
export type TenantIpAddress = Prisma.TenantIpAddressModel
/**
* Model Activity
* User-facing business activity timeline (M045 / M01 Block E).
*
* DISTINCT from the tamper-evident, hash-chained `AuditEvent` (M001): `Activity`
* is the per-entity, human-readable stream shown to tenant users (calls, notes,
* emails, status changes, …). Every writing module appends here via
* `logActivity()` from `@hivegrid/activity` (AGENTS DoD #14).
*
* `activityType` and `subjectType` are stored as strings (extensible per module —
* see the `ActivityType` / `ActivitySubjectType` unions in `@hivegrid/activity`),
* not Prisma enums, to avoid a schema migration for every new module event.
*
* Tenant isolation: RLS policy is added with M27 (Auth/Tenancy); until then access
* is App-Level-scoped via the tenant-scoped query helpers.
*/
export type Activity = Prisma.ActivityModel
/**
* Model AdminTenantNote
* AdminTenantNote — free-form operator notes pinned to a tenant.
* ENTITY-MODEL Domäne 11: markdown note_text, category, pinned.
* Written from the admin tenant-detail screen; every write also emits
* an admin AuditEvent (tenantId=null, actorType="admin").
*/
export type AdminTenantNote = Prisma.AdminTenantNoteModel
/**
* Model SupportTicketMessage
* SupportTicketMessage — conversation thread for the admin Support-Inbox.
* Extends the existing helpDesk `SupportTicket` (which already carries
* source/status/priority/tenant) with replies and internal notes.
* `internalNote=true` rows are operator-only and never surfaced to the
* tenant. A null author means an inbound message from the customer side.
*/
export type SupportTicketMessage = Prisma.SupportTicketMessageModel
/**
* Model AdminMeetingType
*
*/
export type AdminMeetingType = Prisma.AdminMeetingTypeModel
/**
* Model AdminAvailabilityRule
*
*/
export type AdminAvailabilityRule = Prisma.AdminAvailabilityRuleModel
/**
* Model AdminAvailabilityOverride
*
*/
export type AdminAvailabilityOverride = Prisma.AdminAvailabilityOverrideModel
/**
* Model AdminBookingPage
*
*/
export type AdminBookingPage = Prisma.AdminBookingPageModel
/**
* Model AdminBooking
*
*/
export type AdminBooking = Prisma.AdminBookingModel
/**
* Model AdminBookingParticipant
*
*/
export type AdminBookingParticipant = Prisma.AdminBookingParticipantModel
/**
* Model AdminBookingAssignment
*
*/
export type AdminBookingAssignment = Prisma.AdminBookingAssignmentModel
/**
* Model AdminBookingReminder
*
*/
export type AdminBookingReminder = Prisma.AdminBookingReminderModel
/**
* Model AdminCalendarConnection
*
*/
export type AdminCalendarConnection = Prisma.AdminCalendarConnectionModel
/**
* Model AdminCalendarSyncCursor
*
*/
export type AdminCalendarSyncCursor = Prisma.AdminCalendarSyncCursorModel
/**
* Model AdminDataConnection
*
*/
export type AdminDataConnection = Prisma.AdminDataConnectionModel
/**
* Model AdminConnectionCredential
*
*/
export type AdminConnectionCredential = Prisma.AdminConnectionCredentialModel
/**
* Model AdminMailbox
*
*/
export type AdminMailbox = Prisma.AdminMailboxModel
/**
* Model AdminMailboxSyncCursor
*
*/
export type AdminMailboxSyncCursor = Prisma.AdminMailboxSyncCursorModel
/**
* Model AdminMailboxWebhookEvent
*
*/
export type AdminMailboxWebhookEvent = Prisma.AdminMailboxWebhookEventModel
/**
* Model AdminEmailThread
*
*/
export type AdminEmailThread = Prisma.AdminEmailThreadModel
/**
* Model AdminEmailMessage
*
*/
export type AdminEmailMessage = Prisma.AdminEmailMessageModel
/**
* Model AdminEmailParticipant
*
*/
export type AdminEmailParticipant = Prisma.AdminEmailParticipantModel
/**
* Model AdminEmailAttachment
*
*/
export type AdminEmailAttachment = Prisma.AdminEmailAttachmentModel
/**
* Model AdminEmailEvent
*
*/
export type AdminEmailEvent = Prisma.AdminEmailEventModel
/**
* Model AdminEmailLink
*
*/
export type AdminEmailLink = Prisma.AdminEmailLinkModel
/**
* Model AdminEmailTemplate
*
*/
export type AdminEmailTemplate = Prisma.AdminEmailTemplateModel
/**
* Model AdminEmailSnippet
*
*/
export type AdminEmailSnippet = Prisma.AdminEmailSnippetModel
/**
* Model AdminEmailSignature
*
*/
export type AdminEmailSignature = Prisma.AdminEmailSignatureModel
/**
* Model AdminEmailOutboundPolicy
*
*/
export type AdminEmailOutboundPolicy = Prisma.AdminEmailOutboundPolicyModel
/**
* Model AdminScheduledEmail
*
*/
export type AdminScheduledEmail = Prisma.AdminScheduledEmailModel
/**
* Model AdminNoReplyReminder
*
*/
export type AdminNoReplyReminder = Prisma.AdminNoReplyReminderModel
/**
* Model AdminBulkEmailRun
*
*/
export type AdminBulkEmailRun = Prisma.AdminBulkEmailRunModel
/**
* Model AdminSendingDomain
*
*/
export type AdminSendingDomain = Prisma.AdminSendingDomainModel
/**
* Model AdminBccAddress
*
*/
export type AdminBccAddress = Prisma.AdminBccAddressModel
/**
* Model AdminUser
*
*/
export type AdminUser = Prisma.AdminUserModel
/**
* Model AdminSession
*
*/
export type AdminSession = Prisma.AdminSessionModel
/**
* Model AdminRole
*
*/
export type AdminRole = Prisma.AdminRoleModel
/**
* Model AdminPermission
*
*/
export type AdminPermission = Prisma.AdminPermissionModel
/**
* Model AdminRolePermission
*
*/
export type AdminRolePermission = Prisma.AdminRolePermissionModel
/**
* Model AdminUserRole
*
*/
export type AdminUserRole = Prisma.AdminUserRoleModel
/**
* Model AdminLeadSource
*
*/
export type AdminLeadSource = Prisma.AdminLeadSourceModel
/**
* Model AdminLeadSourceCredential
* Rotatable source credential. Only a one-way digest is persisted; the raw
* bearer value is returned once by the source administration service.
*/
export type AdminLeadSourceCredential = Prisma.AdminLeadSourceCredentialModel
/**
* Model AdminLead
*
*/
export type AdminLead = Prisma.AdminLeadModel
/**
* Model AdminLeadActivity
* Append-only business timeline. Notes are activities rather than a mutable
* blob on AdminLead so every operator-visible change remains attributable.
*/
export type AdminLeadActivity = Prisma.AdminLeadActivityModel
/**
* Model AdminCompany
*
*/
export type AdminCompany = Prisma.AdminCompanyModel
/**
* Model AdminContact
*
*/
export type AdminContact = Prisma.AdminContactModel
/**
* Model AdminContactChannel
*
*/
export type AdminContactChannel = Prisma.AdminContactChannelModel
/**
* Model AdminPipeline
*
*/
export type AdminPipeline = Prisma.AdminPipelineModel
/**
* Model AdminPipelineStage
*
*/
export type AdminPipelineStage = Prisma.AdminPipelineStageModel
/**
* Model AdminStageRequiredField
*
*/
export type AdminStageRequiredField = Prisma.AdminStageRequiredFieldModel
/**
* Model AdminDealLossReason
*
*/
export type AdminDealLossReason = Prisma.AdminDealLossReasonModel
/**
* Model AdminDeal
*
*/
export type AdminDeal = Prisma.AdminDealModel
/**
* Model AdminDealContact
*
*/
export type AdminDealContact = Prisma.AdminDealContactModel
/**
* Model AdminDealStageHistory
* Immutable record of every deal stage transition. The first history row has
* no fromStageId and represents entry into the pipeline.
*/
export type AdminDealStageHistory = Prisma.AdminDealStageHistoryModel
/**
* Model AdminTaskRecurrence
*
*/
export type AdminTaskRecurrence = Prisma.AdminTaskRecurrenceModel
/**
* Model AdminTask
*
*/
export type AdminTask = Prisma.AdminTaskModel
/**
* Model AdminTag
*
*/
export type AdminTag = Prisma.AdminTagModel
/**
* Model AdminContactTag
*
*/
export type AdminContactTag = Prisma.AdminContactTagModel
/**
* Model AdminCustomFieldDefinition
*
*/
export type AdminCustomFieldDefinition = Prisma.AdminCustomFieldDefinitionModel
/**
* Model AdminCustomFieldValue
*
*/
export type AdminCustomFieldValue = Prisma.AdminCustomFieldValueModel
/**
* Model AdminContactNote
*
*/
export type AdminContactNote = Prisma.AdminContactNoteModel
/**
* Model AdminImportJob
*
*/
export type AdminImportJob = Prisma.AdminImportJobModel
/**
* Model AdminImportRowError
*
*/
export type AdminImportRowError = Prisma.AdminImportRowErrorModel
/**
* Model AdminExportJob
*
*/
export type AdminExportJob = Prisma.AdminExportJobModel
/**
* Model AdminActivity
* Append-only business timeline shared by leads, contacts, companies and
* deals. At least one context id is required by the repository contract.
*/
export type AdminActivity = Prisma.AdminActivityModel
/**
* Model AdminLeadAssignmentRule
* Ordered, deterministic assignment rule. `sourceId` and `region` are ANDed;
* a null criterion is a wildcard. The mutable cursor is locked together with
* the lead so concurrent round-robin assignments cannot select the same slot.
*/
export type AdminLeadAssignmentRule = Prisma.AdminLeadAssignmentRuleModel
/**
* Model AdminLeadScoreRule
* Versionable score rule. Rules are additive and evaluated in stable
* priority/id order. The score snapshot on AdminLeadQualification records the
* rule-set version so historical decisions stay explainable.
*/
export type AdminLeadScoreRule = Prisma.AdminLeadScoreRuleModel
/**
* Model AdminLeadQualification
*
*/
export type AdminLeadQualification = Prisma.AdminLeadQualificationModel
/**
* Model AdminDuplicateCandidate
*
*/
export type AdminDuplicateCandidate = Prisma.AdminDuplicateCandidateModel
/**
* Model AdminMergeRecord
* Append-only record of a controlled lead merge. The losing lead is archived,
* never deleted, and its original activity stream remains intact.
*/
export type AdminMergeRecord = Prisma.AdminMergeRecordModel
/**
* Model AdminPhoneConnection
*
*/
export type AdminPhoneConnection = Prisma.AdminPhoneConnectionModel
/**
* Model AdminPhoneNumber
*
*/
export type AdminPhoneNumber = Prisma.AdminPhoneNumberModel
/**
* Model AdminTelephonyPolicy
*
*/
export type AdminTelephonyPolicy = Prisma.AdminTelephonyPolicyModel
/**
* Model AdminCallDisposition
*
*/
export type AdminCallDisposition = Prisma.AdminCallDispositionModel
/**
* Model AdminCallSession
*
*/
export type AdminCallSession = Prisma.AdminCallSessionModel
/**
* Model AdminCallParticipant
*
*/
export type AdminCallParticipant = Prisma.AdminCallParticipantModel
/**
* Model AdminCallEvent
*
*/
export type AdminCallEvent = Prisma.AdminCallEventModel
/**
* Model AdminCallMatchCandidate
*
*/
export type AdminCallMatchCandidate = Prisma.AdminCallMatchCandidateModel
/**
* Model AdminCallRecording
*
*/
export type AdminCallRecording = Prisma.AdminCallRecordingModel
/**
* Model AdminDialerList
*
*/
export type AdminDialerList = Prisma.AdminDialerListModel
/**
* Model AdminDialerEntry
*
*/
export type AdminDialerEntry = Prisma.AdminDialerEntryModel
/**
* Model AdminOutboundCallRequest
*
*/
export type AdminOutboundCallRequest = Prisma.AdminOutboundCallRequestModel
/**
* Model AnalyticsSettings
*
*/
export type AnalyticsSettings = Prisma.AnalyticsSettingsModel
/**
* Model AnalyticsUniqueVisitor
*
*/
export type AnalyticsUniqueVisitor = Prisma.AnalyticsUniqueVisitorModel
/**
* Model AnalyticsPageView
*
*/
export type AnalyticsPageView = Prisma.AnalyticsPageViewModel
/**
* Model AnalyticsEvent
*
*/
export type AnalyticsEvent = Prisma.AnalyticsEventModel
/**
* Model App
* Global catalog definition of an integratable app (no tenant, no RLS). The
* `connectionSchema` drives the auto-generated credential form; `connectionType`
* selects the connect flow. New apps are registered by the build-time adapter
* scan + this catalog (drift-check warns in the platform admin).
*/
export type App = Prisma.AppModel
/**
* Model DataConnection
* A tenant's connection to an App. Multiple per (tenant, app) with a user
* `label` (e.g. three Gmail mailboxes). Credentials live encrypted in
* `credentialsCiphertext`. Disconnect sets `connectionStatus = revoked` (no
* hard-delete → sync history preserved). Soft-delete via `archivedAt`.
*/
export type DataConnection = Prisma.DataConnectionModel
/**
* Model AppSyncRun
* One sync run for a DataConnection. `summaryText` is the Klartext summary.
*/
export type AppSyncRun = Prisma.AppSyncRunModel
/**
* Model AppSyncRunLog
* A log line of a sync run (Klartext `messageText` + optional `techDetails`).
*/
export type AppSyncRunLog = Prisma.AppSyncRunLogModel
/**
* Model AppSyncItem
* A single synced object: maps a HiveGrid entity (`entityType`/`entityId`) to an
* external system id (`externalId`). Polymorphic.
*/
export type AppSyncItem = Prisma.AppSyncItemModel
/**
* Model AppEntityBinding
* Durable provider-neutral identity mapping. AppSyncItem remains the history
* of one run; this row survives runs, reconnects and process restarts.
*/
export type AppEntityBinding = Prisma.AppEntityBindingModel
/**
* Model AuditChainCheckpoint
*
*/
export type AuditChainCheckpoint = Prisma.AuditChainCheckpointModel
/**
* Model AuditChainHead
*
*/
export type AuditChainHead = Prisma.AuditChainHeadModel
/**
* Model AuditChainCheckpointHead
*
*/
export type AuditChainCheckpointHead = Prisma.AuditChainCheckpointHeadModel
/**
* Model ProjektMitglied
*
*/
export type ProjektMitglied = Prisma.ProjektMitgliedModel
/**
* Model ProjektTermin
*
*/
export type ProjektTermin = Prisma.ProjektTerminModel
/**
* Model Rechnung
*
*/
export type Rechnung = Prisma.RechnungModel
/**
* Model ProjektChecklist
*
*/
export type ProjektChecklist = Prisma.ProjektChecklistModel
/**
* Model ProjektChecklistItem
*
*/
export type ProjektChecklistItem = Prisma.ProjektChecklistItemModel
/**
* Model AuftragPipelineStageConfig
*
*/
export type AuftragPipelineStageConfig = Prisma.AuftragPipelineStageConfigModel
/**
* Model AcceptanceFormTemplate
*
*/
export type AcceptanceFormTemplate = Prisma.AcceptanceFormTemplateModel
/**
* Model ProjectTemplate
*
*/
export type ProjectTemplate = Prisma.ProjectTemplateModel
/**
* Model ScheduleEntry
*
*/
export type ScheduleEntry = Prisma.ScheduleEntryModel
/**
* Model ScheduleConflict
*
*/
export type ScheduleConflict = Prisma.ScheduleConflictModel
/**
* Model AbnahmeProtokoll
*
*/
export type AbnahmeProtokoll = Prisma.AbnahmeProtokollModel
/**
* Model AbnahmeSignatur
*
*/
export type AbnahmeSignatur = Prisma.AbnahmeSignaturModel
/**
* Model OfflineSyncMutation
*
*/
export type OfflineSyncMutation = Prisma.OfflineSyncMutationModel
/**
* Model UserSession
*
*/
export type UserSession = Prisma.UserSessionModel
/**
* Model TrustedDevice
*
*/
export type TrustedDevice = Prisma.TrustedDeviceModel
/**
* Model AutomationRule
*
*/
export type AutomationRule = Prisma.AutomationRuleModel
/**
* Model AutomationRuleStep
*
*/
export type AutomationRuleStep = Prisma.AutomationRuleStepModel
/**
* Model AutomationExecution
*
*/
export type AutomationExecution = Prisma.AutomationExecutionModel
/**
* Model AutomationStepExecution
*
*/
export type AutomationStepExecution = Prisma.AutomationStepExecutionModel
/**
* Model AutomationCredential
*
*/
export type AutomationCredential = Prisma.AutomationCredentialModel
/**
* Model AutomationTemplate
*
*/
export type AutomationTemplate = Prisma.AutomationTemplateModel
/**
* Model AutomationTriggerMeter
*
*/
export type AutomationTriggerMeter = Prisma.AutomationTriggerMeterModel
/**
* Model BookingPage
* A public booking page (M06 A.1). Tenant-scoped, soft-deletable. `slug` is unique
* per tenant and powers the public URL `/b/{tenant}/{slug}`. `intakeFormId` is a
* bare reserved scalar for the AK-P16c Forms module (null = standard mini-form).
*/
export type BookingPage = Prisma.BookingPageModel
/**
* Model BookingPageProvider
* M:N between BookingPage and tenant users who hold its appointments (M06 A.2).
* `providerUserId` is a bare scalar (no @relation to User, AD-21).
*/
export type BookingPageProvider = Prisma.BookingPageProviderModel
/**
* Model AvailabilityRule
* Weekly standard availability per tenant user (M06 A.3). Several rows per weekday
* allowed (e.g. 09:00-12:00 + 14:00-17:00). Times are local "HH:mm" in `timezone`.
*/
export type AvailabilityRule = Prisma.AvailabilityRuleModel
/**
* Model AvailabilityException
* Date-specific override of the standard rules (M06 A.4). `startTime`/`endTime`
* only set when kind = custom_window (null for a full-day `unavailable`).
*/
export type AvailabilityException = Prisma.AvailabilityExceptionModel
/**
* Model Appointment
* A booked appointment (M06 A.5). Tenant-scoped. `startAt`/`endAt` are UTC;
* `timezone` records the booker's IANA zone for display. CRM/Form links are bare
* nullable scalars (kontaktId set on match/create; leadId reserved for R-P7,
* formSubmissionId reserved for AK-P16c). `intakeAnswers` holds the v1 mini-form
* payload. `internalCalendarEventId` points at the local CalendarEvent mirror that
* blocks the provider's availability (AK-P16a write-path pushes it external later).
*/
export type Appointment = Prisma.AppointmentModel
/**
* Model CalendarConnection
* A user's connection to an external calendar provider. PER-USER, tenant-scoped
* for isolation. The OAuth tokens are AES-256-GCM per-tenant-DEK envelopes
* (AD-8); never selected into a list view-model. `dataConnectionId` is an
* OPTIONAL read-only reference to the Apps-Engine DataConnection catalog entry
* (bare scalar, AD-21) — calendar runs autonomously if the catalog row is absent.
*/
export type CalendarConnection = Prisma.CalendarConnectionModel
/**
* Model CalendarEvent
* Cache of external events + HiveGrid-internal events. Tenant- and owner-scoped.
* External events are owner-only (leak-protection, DoD 3); availability reads
* only `isBusyForAvailability` busy intervals, never titles. `internalEntityLink`
* is a polymorphic JSON pointer to a Booking/Projekt/Plantafel entity.
*/
export type CalendarEvent = Prisma.CalendarEventModel
/**
* Model CalendarEventMapping
* Links a HiveGrid-internal event to its external mirror(s). One internal event
* can map to several providers/calendars (e.g. Google + Microsoft in v2).
*/
export type CalendarEventMapping = Prisma.CalendarEventMappingModel
/**
* Model CalendarSyncCursor
* Per-connection-per-calendar delta cursor (Google syncToken). Drives the
* incremental external→HiveGrid sync (M25 Block D/E).
*/
export type CalendarSyncCursor = Prisma.CalendarSyncCursorModel
/**
* Model CalendarWebhookEvent
* Persisted inbound webhook notification (idempotency + retry, M25 Block E).
* A fast 200 is returned to the provider; a worker drains `pending` rows.
*/
export type CalendarWebhookEvent = Prisma.CalendarWebhookEventModel
/**
* Model CalendarConflict
* A resolved sync conflict (DoD 4). The connection-detail view shows the latest
* 50 with a Klartext description + how it was resolved (Last-Write-Wins).
*/
export type CalendarConflict = Prisma.CalendarConflictModel
/**
* Model TeamChat
* A project-linked, group, or direct-message channel. Project and direct
* message channels are always private; group privacy is selected at creation.
* The merge migration enforces kind-specific CHECK constraints and partial
* unique indexes for active project channels and direct-message pairs.
*/
export type TeamChat = Prisma.TeamChatModel
/**
* Model TeamChatGroupSource
* Permission-group sources selected while creating a group chat. Sources are
* kept even when synchronization is disabled so the channel configuration is
* explicit and can be enabled later without guessing its original scope.
* `groupId` deliberately remains a bare cross-module identifier (AD-21).
*/
export type TeamChatGroupSource = Prisma.TeamChatGroupSourceModel
/**
* Model TeamChatEvent
* Append-only event ledger for reconnect gap-fill. The wire cursor combines
* the channel's `eventStreamId` with `sequence`, which is serialized as a
* decimal string so JavaScript clients never lose BigInt precision. Redis
* fans these events out but is never their source of truth.
*/
export type TeamChatEvent = Prisma.TeamChatEventModel
/**
* Model TeamChatMember
* One user's membership and per-channel notification/read preferences.
* Rejoining reactivates the existing row by clearing `leftAt`.
*/
export type TeamChatMember = Prisma.TeamChatMemberModel
/**
* Model TeamChatMessage
* A channel message or one-level thread reply. User-authored sends use a
* stable client id so retries and WebSocket echoes remain idempotent.
*/
export type TeamChatMessage = Prisma.TeamChatMessageModel
/**
* Model TeamChatThread
* Denormalized aggregate for the one-level reply list of a parent message.
*/
export type TeamChatThread = Prisma.TeamChatThreadModel
/**
* Model TeamChatPinnedMessage
* A channel-level message pin. Domain guards enforce the 50-pin limit and
* reject message pins for direct-message channels.
*/
export type TeamChatPinnedMessage = Prisma.TeamChatPinnedMessageModel
/**
* Model TeamChatReaction
* One user's Unicode emoji reaction to a message.
*/
export type TeamChatReaction = Prisma.TeamChatReactionModel
/**
* Model TeamChatRead
* Per-user read receipt written only after a message was visibly read.
*/
export type TeamChatRead = Prisma.TeamChatReadModel
/**
* Model CollabDoc
*
*/
export type CollabDoc = Prisma.CollabDocModel
/**
* Model AppConfiguration
*
*/
export type AppConfiguration = Prisma.AppConfigurationModel
/**
* Model Log
*
*/
export type Log = Prisma.LogModel
/**
* Model AuditEvent
*
*/
export type AuditEvent = Prisma.AuditEventModel
/**
* Model IdempotencyKey
*
*/
export type IdempotencyKey = Prisma.IdempotencyKeyModel
/**
* Model ApiKey
*
*/
export type ApiKey = Prisma.ApiKeyModel
/**
* Model ApiKeyLog
*
*/
export type ApiKeyLog = Prisma.ApiKeyLogModel
/**
* Model Event
*
*/
export type Event = Prisma.EventModel
/**
* Model EventWebhookAttempt
*
*/
export type EventWebhookAttempt = Prisma.EventWebhookAttemptModel
/**
* Model MetricLog
*
*/
export type MetricLog = Prisma.MetricLogModel
/**
* Model FileUploadProgress
*
*/
export type FileUploadProgress = Prisma.FileUploadProgressModel
/**
* Model FileChunk
*
*/
export type FileChunk = Prisma.FileChunkModel
/**
* Model FileObject
*
*/
export type FileObject = Prisma.FileObjectModel
/**
* Model IpAddress
* Privacy (AD-22): `ip` speichert einen HMAC-SHA256-Pseudonym-Hash der Client-IP, KEINE Klartext-IP.
* Persistiert wird nur das Land (countryCode/countryName); regionCode/city/zipCode/latitude/longitude
* bleiben bewusst leer. Auflösung lokal (DB-IP Lite), kein externer Transfer.
*/
export type IpAddress = Prisma.IpAddressModel
/**
* Model IpAddressLog
* Privacy (AD-22): `ip` ist der HMAC-Pseudonym-Hash der Client-IP, kein Klartext.
*/
export type IpAddressLog = Prisma.IpAddressLogModel
/**
* Model Widget
*
*/
export type Widget = Prisma.WidgetModel
/**
* Model Credential
*
*/
export type Credential = Prisma.CredentialModel
/**
* Model Kontakt
* A contact (Kontakt), the CRM core entity. Oberbegriff for both private persons
* (kontaktTyp = privatperson → vorname/nachname) and organisations
* (kontaktTyp = organisation → orgName/orgMerkmal). Scoped per tenant, soft-delete
* via `archivedAt`. `zustaendigerUserId` is the owner for the crm.read_own filter.
*/
export type Kontakt = Prisma.KontaktModel
/**
* Model KontaktRelation
* Self-referential M:N relation between contacts (e.g. organisation ↔ primary
* contact person). The `rolle` (Kontaktart) is the role of the relation itself.
*/
export type KontaktRelation = Prisma.KontaktRelationModel
/**
* Model KontaktEmail
* One of a contact's e-mail addresses. Exactly one carries `primaer = true`
* (enforced in the service), mirrored to `Kontakt.primaerEmail`.
*/
export type KontaktEmail = Prisma.KontaktEmailModel
/**
* Model KontaktTelefon
*
*/
export type KontaktTelefon = Prisma.KontaktTelefonModel
/**
* Model Adresse
* A reusable postal address. v1 is DE-only (`land` defaults to "DE").
*/
export type Adresse = Prisma.AdresseModel
/**
* Model CustomFieldDefinition
* Tenant-defined custom field for a polymorphic entity type. The actual values
* live in CustomFieldValue. `archiviert` hides the field but keeps its values.
*/
export type CustomFieldDefinition = Prisma.CustomFieldDefinitionModel
/**
* Model CustomFieldValue
* Value of a custom field for a concrete entity. Polymorphic: `entityId` carries
* NO DB foreign key — the service validates entityType match + entity existence.
*/
export type CustomFieldValue = Prisma.CustomFieldValueModel
/**
* Model Tag
* A coloured tag. Cross-cutting and polymorphic via TagAssignment.
*/
export type Tag = Prisma.TagModel
/**
* Model TagAssignment
* Polymorphic M:N link Tag ↔ any entity. `entityType` is a String (extensible,
* mirrors Activity.subjectType): kontakt | projekt | lead | rechnung | termin | …
* `entityId` carries NO DB foreign key — the service validates existence.
*/
export type TagAssignment = Prisma.TagAssignmentModel
/**
* Model TenantEncryptionKey
* One wrapped Data-Encryption-Key per tenant. `wrappedDek` is the tenant DEK
* encrypted with the app master key (never the plaintext DEK). `keyVersion`
* allows rotating the wrapping scheme without touching field ciphertext.
*/
export type TenantEncryptionKey = Prisma.TenantEncryptionKeyModel
/**
* Model Dashboard
*
*/
export type Dashboard = Prisma.DashboardModel
/**
* Model DashboardLayout
*
*/
export type DashboardLayout = Prisma.DashboardLayoutModel
/**
* Model WidgetInstance
*
*/
export type WidgetInstance = Prisma.WidgetInstanceModel
/**
* Model EmailIntegrationMailbox
* A user's connected mailbox. PER-USER, tenant-scoped. OAuth tokens are
* AES-256-GCM per-tenant-DEK envelopes (AD-8); never selected into a list
* view-model. `webhookClientState` is the per-mailbox shared secret echoed by
* Microsoft Graph notifications (its only auth mechanism) and doubles as the
* Gmail channel verification token. `dataConnectionId` is an OPTIONAL read-only
* reference to the Apps-Engine DataConnection catalog entry (bare scalar).
*/
export type EmailIntegrationMailbox = Prisma.EmailIntegrationMailboxModel
/**
* Model EmailIntegrationMessage
* Mirror of a provider message. Tenant-scoped; visibility is owner-filtered in
* code (email.read_own vs read_all). Archiving is HiveGrid-side only — the
* provider mailbox is never mutated by archive. `internetMessageId` (RFC 5322)
* is the cross-provider dedupe key: Graph sendMail returns 202 without an id,
* so the sent-items delta re-ingest must collapse onto the local outbound mirror.
*/
export type EmailIntegrationMessage = Prisma.EmailIntegrationMessageModel
/**
* Model EmailIntegrationSyncCursor
* Per-mailbox-per-folder delta cursor. Gmail uses ONE pseudo-folder (`*`,
* historyId is mailbox-global); Microsoft Graph delta is PER FOLDER (inbox +
* sentitems each get a cursor). `initialSyncProgress` keeps pageToken /
* fetchedCount / oldestFetchedAt so an aborted 90-day initial sync resumes.
*/
export type EmailIntegrationSyncCursor = Prisma.EmailIntegrationSyncCursorModel
/**
* Model EmailIntegrationWebhookEvent
* Persisted inbound provider push (idempotency + retry). Append-only; a fast
* 200/202 is returned to the provider and a worker drains `pending` rows.
* Retention: 30 days (failed rows 90 days) via the cleanup cron.
*/
export type EmailIntegrationWebhookEvent = Prisma.EmailIntegrationWebhookEventModel
/**
* Model TenantInboundAddress
*
*/
export type TenantInboundAddress = Prisma.TenantInboundAddressModel
/**
* Model Email
*
*/
export type Email = Prisma.EmailModel
/**
* Model EmailRead
*
*/
export type EmailRead = Prisma.EmailReadModel
/**
* Model EmailCc
*
*/
export type EmailCc = Prisma.EmailCcModel
/**
* Model EmailAttachment
*
*/
export type EmailAttachment = Prisma.EmailAttachmentModel
/**
* Model EmailSender
*
*/
export type EmailSender = Prisma.EmailSenderModel
/**
* Model Campaign
*
*/
export type Campaign = Prisma.CampaignModel
/**
* Model OutboundEmail
*
*/
export type OutboundEmail = Prisma.OutboundEmailModel
/**
* Model OutboundEmailOpen
*
*/
export type OutboundEmailOpen = Prisma.OutboundEmailOpenModel
/**
* Model OutboundEmailClick
*
*/
export type OutboundEmailClick = Prisma.OutboundEmailClickModel
/**
* Model TenantSendingDomain
* A per-tenant sending domain (DKIM/SPF/DMARC). The tenant publishes the public
* records (shown with copy buttons); the system auto-probes DNS every 5 minutes
* and walks `verificationStatus` pending → verifying → verified|failed. After 7
* days without success `lastError` carries a Klartext (M002) explanation. The
* DKIM private key is stored ENVELOPE-ENCRYPTED per tenant (AD-8) and never
* returned to the client. Soft-delete via `archivedAt`.
*/
export type TenantSendingDomain = Prisma.TenantSendingDomainModel
/**
* Model EmailSuppressionList
* A per-tenant suppression entry: an address that must NOT be sent to. Populated
* by bounce/complaint webhooks (reason bounce|complaint) and manual additions.
*/
export type EmailSuppressionList = Prisma.EmailSuppressionListModel
/**
* Model EmailTemplate
* A reusable email template, scoped per tenant. `isDefault` marks the seed
* starting point; `isDemoData` flags seedable demo rows. Soft-delete via
* `archivedAt`.
*/
export type EmailTemplate = Prisma.EmailTemplateModel
/**
* Model RecipientSegment
* A reusable recipient segment. `filterDefinition` is a nested AND/OR tree
* (see segmentQuery.ts) evaluated read-only against the typed Kontakt model.
* `isStaticSnapshot` freezes the resolved membership into SegmentSnapshotMember
* at creation time; a dynamic segment re-resolves on every send.
*/
export type RecipientSegment = Prisma.RecipientSegmentModel
/**
* Model SegmentSnapshotMember
* Frozen membership row of a static segment. `kontaktId` is a bare scalar
* (typed Kontakt id, no DB FK — AD-21).
*/
export type SegmentSnapshotMember = Prisma.SegmentSnapshotMemberModel
/**
* Model CampaignVariant
* One A/B variant of a campaign. The send-engine splits the audience by
* `weightPercent`; per-variant counters drive the A/B comparison report.
*/
export type CampaignVariant = Prisma.CampaignVariantModel
/**
* Model KontaktMarketingConsent
* Per-tenant marketing consent for a Kontakt. `kontaktId` is a bare scalar
* (typed Kontakt id). One row per (tenant, kontakt).
*/
export type KontaktMarketingConsent = Prisma.KontaktMarketingConsentModel
/**
* Model Unsubscribe
* An unsubscribe record (one-click / List-Unsubscribe). `kontaktId` is a bare
* scalar; `campaignId` is set only for a campaign-scoped opt-out.
*/
export type Unsubscribe = Prisma.UnsubscribeModel
/**
* Model EmailSequence
*
*/
export type EmailSequence = Prisma.EmailSequenceModel
/**
* Model EmailSequenceRun
*
*/
export type EmailSequenceRun = Prisma.EmailSequenceRunModel
/**
* Model EmailSequenceStepDelivery
*
*/
export type EmailSequenceStepDelivery = Prisma.EmailSequenceStepDeliveryModel
/**
* Model EntityLink
* A directed, role-labelled link from one entity to another, scoped per tenant.
* Idempotent on the unique tuple (upsert in entityLinkService).
*/
export type EntityLink = Prisma.EntityLinkModel
/**
* Model FeatureFlag
*
*/
export type FeatureFlag = Prisma.FeatureFlagModel
/**
* Model FeatureFlagFilter
*
*/
export type FeatureFlagFilter = Prisma.FeatureFlagFilterModel
/**
* Model AdminFeatureFlagOverride
* Operator-managed rollout override. This is deliberately not the
* subscription/entitlement TenantFeatureOverride model.
*/
export type AdminFeatureFlagOverride = Prisma.AdminFeatureFlagOverrideModel
/**
* Model FeatureFlagAudit
* Append-only audit trail for every mutation of a FeatureFlag (create / update / delete / toggle).
* Never UPDATE or DELETE rows from app code — preserves tamper-resistance for compliance.
*/
export type FeatureFlagAudit = Prisma.FeatureFlagAuditModel
/**
* Model File
* A stored file, scoped per tenant. `storageKey` points at the original object
* in the private Hetzner bucket (AD-23); delivery is only via the auth-proxy
* route. Soft-delete via `archivedAt` (archive flag). Hard-delete is a separate
* action (files.delete).
*/
export type File = Prisma.FileModel
/**
* Model FileEntityLink
* Polymorphic link of a file to any entity (cross-cutting). `entityType` +
* `entityId` address the target entity, `linkRole` is an optional role label
* (e.g. "contract", "photo").
*/
export type FileEntityLink = Prisma.FileEntityLinkModel
/**
* Model FileUpload
* Chunked-upload session (replaces spec `FileUploadProgress`, renamed to avoid
* the core collision). No resume in v1 — this session only carries progress up
* to `complete`. `expiresAt` = now + 24h; a cleanup cron sweeps expired
* sessions + temp chunks.
*/
export type FileUpload = Prisma.FileUploadModel
/**
* Model FileUploadChunk
* One uploaded chunk of a `FileUpload` session (replaces spec `FileChunk`).
* Bytes live in temp storage (`storageKey`), not in the DB.
*/
export type FileUploadChunk = Prisma.FileUploadChunkModel
/**
* Model Form
*
*/
export type Form = Prisma.FormModel
/**
* Model FormSubmission
*
*/
export type FormSubmission = Prisma.FormSubmissionModel
/**
* Model FormField
*
*/
export type FormField = Prisma.FormFieldModel
/**
* Model FormFile
*
*/
export type FormFile = Prisma.FormFileModel
/**
* Model FormAction
*
*/
export type FormAction = Prisma.FormActionModel
/**
* Model FormActionLog
*
*/
export type FormActionLog = Prisma.FormActionLogModel
/**
* Model GdprExportJob
*
*/
export type GdprExportJob = Prisma.GdprExportJobModel
/**
* Model TenantDeletionRequest
*
*/
export type TenantDeletionRequest = Prisma.TenantDeletionRequestModel
/**
* Model AvvAcceptance
*
*/
export type AvvAcceptance = Prisma.AvvAcceptanceModel
/**
* Model Subprocessor
*
*/
export type Subprocessor = Prisma.SubprocessorModel
/**
* Model Feedback
*
*/
export type Feedback = Prisma.FeedbackModel
/**
* Model SupportTicket
*
*/
export type SupportTicket = Prisma.SupportTicketModel
/**
* Model HrEmployeeProfile
* Per-tenant employee master record (1:1 with a global User). Self-maintainable
* fields (e.g. position display, team) are edited by the employee; HR-managed
* fields by HR admins (enforced in the service layer). The emergency contact is
* sensitive and stored ENVELOPE-ENCRYPTED (`emergencyContactCiphertext`, holds
* the name/phone/relation triple as encrypted JSON) — never returned without an
* explicit, permission-checked reveal.
*/
export type HrEmployeeProfile = Prisma.HrEmployeeProfileModel
/**
* Model HrLocation
* A physical company location, scoped per tenant. Soft-delete via `archivedAt`.
* Exactly one location may be the tenant default (`isDefault`); enforced in the
* service layer (set-default clears the previous default).
*/
export type HrLocation = Prisma.HrLocationModel
/**
* Model HrEmployeeDocument
* A personnel document for one employee. The bytes live in a File (files.prisma,
* referenced by bare `fileId`). `visibility` gates whether the employee sees it;
* `uploadedByOffice` marks office-uploaded documents as READ-ONLY for the
* employee (they may view/download but not edit or delete). Soft-delete via
* `archivedAt`.
*/
export type HrEmployeeDocument = Prisma.HrEmployeeDocumentModel
/**
* Model HrResource
* A shared HR resource (a link or a file) surfaced on the HR hub. Soft-delete
* via `archivedAt`. `audience` is a coarse audience marker (e.g. "all",
* "team:<id>"); fine-grained targeting is follow-up.
*/
export type HrResource = Prisma.HrResourceModel
/**
* Model HrQuickLink
* A quick link tile on the HR hub. Soft-delete via `archivedAt`.
*/
export type HrQuickLink = Prisma.HrQuickLinkModel
/**
* Model EmployeePasswordSafeVault
* A password-safe vault, scoped per tenant. Access is NOT implied by tenant
* membership — a user only sees a vault they hold an EmployeePasswordSafeAccess
* row for (or via the tenant-wide admin view, which never grants content
* access). Soft-delete via `archivedAt`.
*/
export type EmployeePasswordSafeVault = Prisma.EmployeePasswordSafeVaultModel
/**
* Model EmployeePasswordSafeEntry
* A single secret in a vault. The secret values are stored ENVELOPE-ENCRYPTED
* (`*Ciphertext`) and are NEVER selected into a list view — only an explicit,
* permission-checked + audited reveal decrypts a single value on demand.
*/
export type EmployeePasswordSafeEntry = Prisma.EmployeePasswordSafeEntryModel
/**
* Model EmployeePasswordSafeAccess
* A user's access grant on a vault (M:N user↔vault with a permission level).
*/
export type EmployeePasswordSafeAccess = Prisma.EmployeePasswordSafeAccessModel
/**
* Model EmployeeVacationRequest
* A multi-step leave/vacation request. State machine: submitted →
* {clarification ↔ submitted} → approved | rejected, or → withdrawn by the
* requester. Only `approved` requests feed the absence calendar / plantafel
* conflict feed (R-P9b). `calendarEventId` stays null until the P16 calendar
* sync lands (deferred).
*/
export type EmployeeVacationRequest = Prisma.EmployeeVacationRequestModel
/**
* Model EmployeeSickLeaveReport
* A sick-leave report, filed by the employee or by HR/office on their behalf
* (`reportedByUserId`). The AU certificate reference is stored ENVELOPE-
* ENCRYPTED (`certificateRefCiphertext`) and never returned without a
* permission-checked + audited reveal.
*/
export type EmployeeSickLeaveReport = Prisma.EmployeeSickLeaveReportModel
/**
* Model HrAnnouncement
* A company announcement. Markdown `body`, audience targeting, optional
* acknowledgement requirement (read-receipt), scheduling (`publishAt`) and
* expiry. Soft-delete via `archivedAt`.
*/
export type HrAnnouncement = Prisma.HrAnnouncementModel
/**
* Model HrAnnouncementRead
* Per-user read / acknowledgement receipt for an announcement.
* `acknowledgedAt` is set only when the announcement required acknowledgement
* and the user clicked confirm.
*/
export type HrAnnouncementRead = Prisma.HrAnnouncementReadModel
/**
* Model HrAnnouncementReaction
* A single emoji reaction by a user on an announcement.
*/
export type HrAnnouncementReaction = Prisma.HrAnnouncementReactionModel
/**
* Model HrAnnouncementComment
* A single-level comment on an announcement. Soft-delete via `archivedAt`.
*/
export type HrAnnouncementComment = Prisma.HrAnnouncementCommentModel
/**
* Model EmployeePayslip
* A payslip PDF for one employee for one period. The bytes live in a File
* (referenced by bare `fileId`). Opening the payslip marks it read
* (`isRead`/`readAt`) and writes an audit event per read. Soft-delete via
* `archivedAt`.
*/
export type EmployeePayslip = Prisma.EmployeePayslipModel
/**
* Model EmployeeUploadReminder
* An upload-reminder definition: ask a targeted audience to upload a document
* of a given kind on a cadence, optionally mandatory and escalating to the
* manager when overdue. `linkedFormId` (M05) stays null until AK-P16c.
* Soft-delete via `archivedAt`.
*/
export type EmployeeUploadReminder = Prisma.EmployeeUploadReminderModel
/**
* Model EmployeeUploadReminderDispatch
* One reminder dispatched to one employee for one due date. Idempotent per
* (reminder, employee, dueAt) so the cadence worker never double-sends.
*/
export type EmployeeUploadReminderDispatch = Prisma.EmployeeUploadReminderDispatchModel
/**
* Model HrRequestTemplate
* A reusable HR request template (expense/hardware/training/reference) with an
* optional default approver and linked M05 form (`linkedFormId`, null until
* AK-P16c). Soft-delete via `archivedAt`.
*/
export type HrRequestTemplate = Prisma.HrRequestTemplateModel
/**
* Model HrRequest
* A generic HR request submitted by an employee, optionally from a template.
* Until the M05 renderer (AK-P16c) lands, the payload is captured as a JSON
* string in `details` (transitional form); `formSubmissionId` is wired in
* later. Approval mirrors the leave state machine. Soft-delete via `archivedAt`.
*/
export type HrRequest = Prisma.HrRequestModel
/**
* Model HrSurvey
* A survey. May be anonymous (`isAnonymous`); aggregated results are gated by
* `resultVisibility`. Soft-delete via `archivedAt`.
*/
export type HrSurvey = Prisma.HrSurveyModel
/**
* Model HrSurveyItem
* One question in a survey. `options` holds the choices for `choice` items.
*/
export type HrSurveyItem = Prisma.HrSurveyItemModel
/**
* Model HrSurveySubmission
* One submission to a survey. For identified surveys `submitterUserId` is set
* and unique per survey; for anonymous surveys it is null and `submitterHash`
* (a non-reversible per-survey hash of the user) enforces one-submission
* without re-identification. `answers` maps item id → answer value.
*/
export type HrSurveySubmission = Prisma.HrSurveySubmissionModel
/**
* Model ImportJob
*
*/
export type ImportJob = Prisma.ImportJobModel
/**
* Model KnowledgeBase
*
*/
export type KnowledgeBase = Prisma.KnowledgeBaseModel
/**
* Model KnowledgeBaseCategory
*
*/
export type KnowledgeBaseCategory = Prisma.KnowledgeBaseCategoryModel
/**
* Model KnowledgeBaseCategorySection
*
*/
export type KnowledgeBaseCategorySection = Prisma.KnowledgeBaseCategorySectionModel
/**
* Model KnowledgeBaseArticle
*
*/
export type KnowledgeBaseArticle = Prisma.KnowledgeBaseArticleModel
/**
* Model KnowledgeBaseRelatedArticle
*
*/
export type KnowledgeBaseRelatedArticle = Prisma.KnowledgeBaseRelatedArticleModel
/**
* Model KnowledgeBaseViews
*
*/
export type KnowledgeBaseViews = Prisma.KnowledgeBaseViewsModel
/**
* Model KnowledgeBaseArticleViews
*
*/
export type KnowledgeBaseArticleViews = Prisma.KnowledgeBaseArticleViewsModel
/**
* Model KnowledgeBaseArticleUpvotes
*
*/
export type KnowledgeBaseArticleUpvotes = Prisma.KnowledgeBaseArticleUpvotesModel
/**
* Model KnowledgeBaseArticleDownvotes
*
*/
export type KnowledgeBaseArticleDownvotes = Prisma.KnowledgeBaseArticleDownvotesModel
/**
* Model KwpApiContractSnapshot
*
*/
export type KwpApiContractSnapshot = Prisma.KwpApiContractSnapshotModel
/**
* Model KwpCapabilityState
*
*/
export type KwpCapabilityState = Prisma.KwpCapabilityStateModel
/**
* Model KwpErrorReport
*
*/
export type KwpErrorReport = Prisma.KwpErrorReportModel
/**
* Model KwpProjectRouting
* Stable provider-status to HiveGrid Pipeline/Stage routing. Names are never
* used as runtime identifiers; archived/missing targets quarantine the item.
*/
export type KwpProjectRouting = Prisma.KwpProjectRoutingModel
/**
* Model KwpProjectCatalogState
* Connection-level progress for the automatic read-only KWP project catalog.
* Discovery is intentionally cursorless and represents only the project set
* visible through the confirmed mandant's Projektampel settings.
*/
export type KwpProjectCatalogState = Prisma.KwpProjectCatalogStateModel
/**
* Model KwpProjectCatalogItem
* Safe, normalized project fields used for cache-first KWP search. No raw
* provider payload and no prohibited financial/address-internal fields are
* persisted here.
*/
export type KwpProjectCatalogItem = Prisma.KwpProjectCatalogItemModel
/**
* Model KwpMaterialPosition
* Read-only material/ERP position mirrored from the KWP project view. KWP is
* authoritative for these fields; local project data remains independent.
*/
export type KwpMaterialPosition = Prisma.KwpMaterialPositionModel
/**
* Model InboxLead
*
*/
export type InboxLead = Prisma.InboxLeadModel
/**
* Model LeadSource
*
*/
export type LeadSource = Prisma.LeadSourceModel
/**
* Model LeadAntiSpamConfig
*
*/
export type LeadAntiSpamConfig = Prisma.LeadAntiSpamConfigModel
/**
* Model Lead
*
*/
export type Lead = Prisma.LeadModel
/**
* Model LeadEvent
*
*/
export type LeadEvent = Prisma.LeadEventModel
/**
* Model TenantAcquisition
*
*/
export type TenantAcquisition = Prisma.TenantAcquisitionModel
/**
* Model MarketingIntegration
*
*/
export type MarketingIntegration = Prisma.MarketingIntegrationModel
/**
* Model McpOAuthClient
*
*/
export type McpOAuthClient = Prisma.McpOAuthClientModel
/**
* Model McpOAuthAuthorizationCode
*
*/
export type McpOAuthAuthorizationCode = Prisma.McpOAuthAuthorizationCodeModel
/**
* Model McpOAuthAccessToken
*
*/
export type McpOAuthAccessToken = Prisma.McpOAuthAccessTokenModel
/**
* Model McpOAuthRefreshToken
*
*/
export type McpOAuthRefreshToken = Prisma.McpOAuthRefreshTokenModel
/**
* Model NotificationDelivery
*
*/
export type NotificationDelivery = Prisma.NotificationDeliveryModel
/**
* Model UserNotificationPreference
*
*/
export type UserNotificationPreference = Prisma.UserNotificationPreferenceModel
/**
* Model DeviceToken
*
*/
export type DeviceToken = Prisma.DeviceTokenModel
/**
* Model Onboarding
*
*/
export type Onboarding = Prisma.OnboardingModel
/**
* Model OnboardingFilter
*
*/
export type OnboardingFilter = Prisma.OnboardingFilterModel
/**
* Model OnboardingStep
*
*/
export type OnboardingStep = Prisma.OnboardingStepModel
/**
* Model OnboardingSession
*
*/
export type OnboardingSession = Prisma.OnboardingSessionModel
/**
* Model OnboardingSessionAction
*
*/
export type OnboardingSessionAction = Prisma.OnboardingSessionActionModel
/**
* Model OnboardingSessionFilterMatch
*
*/
export type OnboardingSessionFilterMatch = Prisma.OnboardingSessionFilterMatchModel
/**
* Model OnboardingSessionStep
*
*/
export type OnboardingSessionStep = Prisma.OnboardingSessionStepModel
/**
* Model OnboardingDemoProvisioning
*
*/
export type OnboardingDemoProvisioning = Prisma.OnboardingDemoProvisioningModel
/**
* Model OutboxEvent
*
*/
export type OutboxEvent = Prisma.OutboxEventModel
/**
* Model Role
*
*/
export type Role = Prisma.RoleModel
/**
* Model Permission
*
*/
export type Permission = Prisma.PermissionModel
/**
* Model RolePermission
*
*/
export type RolePermission = Prisma.RolePermissionModel
/**
* Model UserRole
*
*/
export type UserRole = Prisma.UserRoleModel
/**
* Model Group
*
*/
export type Group = Prisma.GroupModel
/**
* Model GroupUser
*
*/
export type GroupUser = Prisma.GroupUserModel
/**
* Model PipelineAccessRequest
*
*/
export type PipelineAccessRequest = Prisma.PipelineAccessRequestModel
/**
* Model PipelineHandover
* One completed pipeline handover of a single project. Append-only: an undo
* writes a new `ProjektStageChange`, it does not delete the handover trail.
*/
export type PipelineHandover = Prisma.PipelineHandoverModel
/**
* Model PipelineHandoverItem
* A single companion record the user ticked in M04. `sourceId` addresses the
* note/file/task/appointment; it stays a bare scalar because the four sources
* live in four different module schemas.
*/
export type PipelineHandoverItem = Prisma.PipelineHandoverItemModel
/**
* Model Plugin
*
*/
export type Plugin = Prisma.PluginModel
/**
* Model TenantPluginCapabilityGrant
*
*/
export type TenantPluginCapabilityGrant = Prisma.TenantPluginCapabilityGrantModel
/**
* Model PluginUserConfig
*
*/
export type PluginUserConfig = Prisma.PluginUserConfigModel
/**
* Model PluginInvocation
*
*/
export type PluginInvocation = Prisma.PluginInvocationModel
/**
* Model PluginCapabilityUse
*
*/
export type PluginCapabilityUse = Prisma.PluginCapabilityUseModel
/**
* Model Portal
*
*/
export type Portal = Prisma.PortalModel
/**
* Model PortalUser
*
*/
export type PortalUser = Prisma.PortalUserModel
/**
* Model PortalSession
* Server-side session for the separate customer-portal identity class. The
* raw cookie value is never stored; tenantId and portalUserId are immutable
* under the dedicated portal RLS policy.
*/
export type PortalSession = Prisma.PortalSessionModel
/**
* Model PortalDomainHostnameClaim
* Durable global hostname reservation. The row survives deprovisioning and
* carries the 30-day reclaim cooldown so a dangling CNAME cannot be claimed
* by another workspace. Only the SHA-256 TXT proof is persisted.
*/
export type PortalDomainHostnameClaim = Prisma.PortalDomainHostnameClaimModel
/**
* Model PortalCustomDomain
* Exactly one current custom-domain generation per portal. Host resolution
* reads only `active` rows with a matching claim generation and non-null
* origin through a SECURITY DEFINER function; the portal login has no direct
* table grant.
*/
export type PortalCustomDomain = Prisma.PortalCustomDomainModel
/**
* Model PortalToken
* Hashed, single-purpose portal authentication capability. Magic-link,
* first-login setup, email verification and password reset share this table
* but can never be exchanged across purposes.
*/
export type PortalToken = Prisma.PortalTokenModel
/**
* Model PortalProjectAccess
* Explicit project allow-list for one portal identity. Project visibility is
* never inferred from tenant membership alone.
*/
export type PortalProjectAccess = Prisma.PortalProjectAccessModel
/**
* Model PortalStageVisibility
* Tenant-admin configuration for the stages that an end customer may see.
*/
export type PortalStageVisibility = Prisma.PortalStageVisibilityModel
/**
* Model PortalProjectDocument
* Explicit document release. A File or FileEntityLink by itself never grants
* customer-portal read access.
*/
export type PortalProjectDocument = Prisma.PortalProjectDocumentModel
/**
* Model PortalEmailTemplate
* Stage-change mail template managed by the tenant-facing core application.
* The portal runtime only reads rendered project/status data, never edits it.
*/
export type PortalEmailTemplate = Prisma.PortalEmailTemplateModel
/**
* Model PortalUpload
* Persisted contract for one portal upload. File/FileUpload/FileEntityLink
* identifiers remain bare cross-module scalars per AD-21; the file tables
* independently carry the same PortalUser actor and tenant scope.
*/
export type PortalUpload = Prisma.PortalUploadModel
/**
* Model PortalComplaint
* Authenticated portal-form complaint. The validated form payload remains in
* FormSubmission; this row supplies the portal/project lifecycle contract.
*/
export type PortalComplaint = Prisma.PortalComplaintModel
/**
* Model PortalSubcontractorAccess
* One-to-one visibility extension for a subcontractor project grant. Customer
* access continues to use PortalProjectAccess without this restricted matrix.
*/
export type PortalSubcontractorAccess = Prisma.PortalSubcontractorAccessModel
/**
* Model PortalConfiguration
*
*/
export type PortalConfiguration = Prisma.PortalConfigurationModel
/**
* Model PortalDocumentAutoReleaseRule
*
*/
export type PortalDocumentAutoReleaseRule = Prisma.PortalDocumentAutoReleaseRuleModel
/**
* Model PortalNotificationPreference
*
*/
export type PortalNotificationPreference = Prisma.PortalNotificationPreferenceModel
/**
* Model PortalServiceInboxItem
* Persistent, seven-day internal service queue. It is written by trusted
* app/worker consumers and deliberately never exposed to hivegrid_portal.
*/
export type PortalServiceInboxItem = Prisma.PortalServiceInboxItemModel
/**
* Model PortalActivityRoutingRule
*
*/
export type PortalActivityRoutingRule = Prisma.PortalActivityRoutingRuleModel
/**
* Model PortalDeletionRequest
*
*/
export type PortalDeletionRequest = Prisma.PortalDeletionRequestModel
/**
* Model PortalGdprExportJob
*
*/
export type PortalGdprExportJob = Prisma.PortalGdprExportJobModel
/**
* Model PortalPage
*
*/
export type PortalPage = Prisma.PortalPageModel
/**
* Model HiveNumberSeq
*
*/
export type HiveNumberSeq = Prisma.HiveNumberSeqModel
/**
* Model Pipeline
*
*/
export type Pipeline = Prisma.PipelineModel
/**
* Model PipelineStage
*
*/
export type PipelineStage = Prisma.PipelineStageModel
/**
* Model PipelineAccess
*
*/
export type PipelineAccess = Prisma.PipelineAccessModel
/**
* Model PipelineFieldGroup
* WF-P8 S05: a named section of the project detail template ("Grunddaten",
* "Planung & Verantwortliche", "KWP-Integration", …). System groups ship with
* the pipeline and may be reordered but not deleted (`istSystem`).
*/
export type PipelineFieldGroup = Prisma.PipelineFieldGroupModel
/**
* Model PipelineFieldConfig
*
*/
export type PipelineFieldConfig = Prisma.PipelineFieldConfigModel
/**
* Model PipelineFieldVisibility
*
*/
export type PipelineFieldVisibility = Prisma.PipelineFieldVisibilityModel
/**
* Model LostReason
*
*/
export type LostReason = Prisma.LostReasonModel
/**
* Model Projekt
*
*/
export type Projekt = Prisma.ProjektModel
/**
* Model ProjektStageChange
*
*/
export type ProjektStageChange = Prisma.ProjektStageChangeModel
/**
* Model PipelineAggregateSnapshot
*
*/
export type PipelineAggregateSnapshot = Prisma.PipelineAggregateSnapshotModel
/**
* Model ProjektKontakt
*
*/
export type ProjektKontakt = Prisma.ProjektKontaktModel
/**
* Model ProjektAdressDetail
* The per-slot extras the S02 address group asks for on top of the shared
* `Adresse`. Deliberately NOT columns on `Adresse`: that is a shared CRM entity
* which contacts reuse, so a project's "Zahlungsziel" or "Zufahrt" would leak
* into every contact address. One row per project and slot.
*/
export type ProjektAdressDetail = Prisma.ProjektAdressDetailModel
/**
* Model ProjektNotiz
*
*/
export type ProjektNotiz = Prisma.ProjektNotizModel
/**
* Model PublicIncomingWebhookEndpoint
*
*/
export type PublicIncomingWebhookEndpoint = Prisma.PublicIncomingWebhookEndpointModel
/**
* Model PublicWebhookIngestionLog
*
*/
export type PublicWebhookIngestionLog = Prisma.PublicWebhookIngestionLogModel
/**
* Model PublicWebhookSubscription
*
*/
export type PublicWebhookSubscription = Prisma.PublicWebhookSubscriptionModel
/**
* Model PublicWebhookDeliveryLog
*
*/
export type PublicWebhookDeliveryLog = Prisma.PublicWebhookDeliveryLogModel
/**
* Model QueueFailedJob
*
*/
export type QueueFailedJob = Prisma.QueueFailedJobModel
/**
* Model ExportJob
*
*/
export type ExportJob = Prisma.ExportJobModel
/**
* Model SearchIndexEntry
*
*/
export type SearchIndexEntry = Prisma.SearchIndexEntryModel
/**
* Model RecentSearch
*
*/
export type RecentSearch = Prisma.RecentSearchModel
/**
* Model SignatureProviderConnection
*
*/
export type SignatureProviderConnection = Prisma.SignatureProviderConnectionModel
/**
* Model ProjektSignatureDocument
*
*/
export type ProjektSignatureDocument = Prisma.ProjektSignatureDocumentModel
/**
* Model ProjektSignatureSigner
*
*/
export type ProjektSignatureSigner = Prisma.ProjektSignatureSignerModel
/**
* Model SignatureEvent
*
*/
export type SignatureEvent = Prisma.SignatureEventModel
/**
* Model Site
*
*/
export type Site = Prisma.SiteModel
/**
* Model SubscriptionProduct
*
*/
export type SubscriptionProduct = Prisma.SubscriptionProductModel
/**
* Model SubscriptionPrice
*
*/
export type SubscriptionPrice = Prisma.SubscriptionPriceModel
/**
* Model SubscriptionUsageBasedPrice
*
*/
export type SubscriptionUsageBasedPrice = Prisma.SubscriptionUsageBasedPriceModel
/**
* Model SubscriptionUsageBasedTier
*
*/
export type SubscriptionUsageBasedTier = Prisma.SubscriptionUsageBasedTierModel
/**
* Model SubscriptionFeature
*
*/
export type SubscriptionFeature = Prisma.SubscriptionFeatureModel
/**
* Model TenantSubscription
*
*/
export type TenantSubscription = Prisma.TenantSubscriptionModel
/**
* Model TenantSubscriptionProduct
*
*/
export type TenantSubscriptionProduct = Prisma.TenantSubscriptionProductModel
/**
* Model TenantProductAcquisition
* Idempotent tenant-owned ledger for products acquired outside the one-base-plan
* lifecycle. `scopeKey` is the stable business scope (for example `tenant` or a
* normalized hostname) and makes provider retries safe without granting the same
* entitlement twice. Provider failures remain local to this row and must never
* mutate the base TenantSubscription status.
*/
export type TenantProductAcquisition = Prisma.TenantProductAcquisitionModel
/**
* Model TenantSubscriptionProductPrice
*
*/
export type TenantSubscriptionProductPrice = Prisma.TenantSubscriptionProductPriceModel
/**
* Model TenantSubscriptionUsageRecord
*
*/
export type TenantSubscriptionUsageRecord = Prisma.TenantSubscriptionUsageRecordModel
/**
* Model TenantProductConfiguration
*
*/
export type TenantProductConfiguration = Prisma.TenantProductConfigurationModel
/**
* Model TenantFeatureOverride
*
*/
export type TenantFeatureOverride = Prisma.TenantFeatureOverrideModel
/**
* Model CheckoutSessionStatus
*
*/
export type CheckoutSessionStatus = Prisma.CheckoutSessionStatusModel
/**
* Model BillingWebhookLog
*
*/
export type BillingWebhookLog = Prisma.BillingWebhookLogModel
/**
* Model Credit
*
*/
export type Credit = Prisma.CreditModel
/**
* Model Task
* A task, scoped per tenant. Soft-delete via `archivedAt` (archive flag). A
* completed task (`status = done`, `completedAt` set) is auto-archived 30 days
* later by a maintenance cron.
*/
export type Task = Prisma.TaskModel
/**
* Model TaskWatcher
* A user watching a task (M:N). Watchers receive reminder notifications in
* addition to the assignee.
*/
export type TaskWatcher = Prisma.TaskWatcherModel
/**
* Model TelephonyConnection
* Tenant-specific provider extension of one Apps Engine DataConnection.
* Credentials and lifecycle status remain canonical on DataConnection.
*/
export type TelephonyConnection = Prisma.TelephonyConnectionModel
/**
* Model TelephonyUserBinding
* Mapping between a HiveGrid TenantUser and a provider user (Aircall in v1).
*/
export type TelephonyUserBinding = Prisma.TelephonyUserBindingModel
/**
* Model TelephonyCallSession
* Normalized inbound or outbound call, optionally matched to one CRM entity.
*/
export type TelephonyCallSession = Prisma.TelephonyCallSessionModel
/**
* Model TelephonyWebhookEvent
* Redacted provider webhook envelope. Provider payload data is immutable;
* only processing metadata changes. Completed rows expire after 30 days and
* failed rows after 90 days through the tenant-scoped retention worker.
*/
export type TelephonyWebhookEvent = Prisma.TelephonyWebhookEventModel
/**
* Model Workflow
*
*/
export type Workflow = Prisma.WorkflowModel
/**
* Model WorkflowBlock
*
*/
export type WorkflowBlock = Prisma.WorkflowBlockModel
/**
* Model WorkflowBlockConditionGroup
*
*/
export type WorkflowBlockConditionGroup = Prisma.WorkflowBlockConditionGroupModel
/**
* Model WorkflowBlockCondition
*
*/
export type WorkflowBlockCondition = Prisma.WorkflowBlockConditionModel
/**
* Model WorkflowBlockToBlock
*
*/
export type WorkflowBlockToBlock = Prisma.WorkflowBlockToBlockModel
/**
* Model WorkflowExecution
*
*/
export type WorkflowExecution = Prisma.WorkflowExecutionModel
/**
* Model WorkflowInputExample
*
*/
export type WorkflowInputExample = Prisma.WorkflowInputExampleModel
/**
* Model WorkflowBlockExecution
*
*/
export type WorkflowBlockExecution = Prisma.WorkflowBlockExecutionModel
/**
* Model WorkflowVariable
*
*/
export type WorkflowVariable = Prisma.WorkflowVariableModel
/**
* Model WorkflowCredential
*
*/
export type WorkflowCredential = Prisma.WorkflowCredentialModel