/* !!! 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 = $Class.PrismaClient export { Prisma } /** * Model User * */ export type User = Prisma.UserModel /** * Model MagicLinkToken * */ export type MagicLinkToken = Prisma.MagicLinkTokenModel /** * Model AdminUser * */ export type AdminUser = Prisma.AdminUserModel /** * 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 TenantType * */ export type TenantType = Prisma.TenantTypeModel /** * 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 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 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 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 * One of a contact's phone numbers. Exactly one carries `primaer = true` * (enforced in the service), mirrored to `Kontakt.primaerTelefon`. */ 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 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:"); 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 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 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 PortalPage * */ export type PortalPage = Prisma.PortalPageModel /** * Model PortalUserRegistration * */ export type PortalUserRegistration = Prisma.PortalUserRegistrationModel /** * Model PortalSubscriptionProduct * */ export type PortalSubscriptionProduct = Prisma.PortalSubscriptionProductModel /** * Model PortalSubscriptionPrice * */ export type PortalSubscriptionPrice = Prisma.PortalSubscriptionPriceModel /** * Model PortalSubscriptionFeature * */ export type PortalSubscriptionFeature = Prisma.PortalSubscriptionFeatureModel /** * Model PortalUserSubscription * */ export type PortalUserSubscription = Prisma.PortalUserSubscriptionModel /** * Model PortalUserSubscriptionProduct * */ export type PortalUserSubscriptionProduct = Prisma.PortalUserSubscriptionProductModel /** * Model PortalUserSubscriptionProductPrice * */ export type PortalUserSubscriptionProductPrice = Prisma.PortalUserSubscriptionProductPriceModel /** * Model PortalCheckoutSessionStatus * */ export type PortalCheckoutSessionStatus = Prisma.PortalCheckoutSessionStatusModel /** * 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 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 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 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 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