diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff17892..9b0a2a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,7 @@ jobs: env: # Skip environment validation during CI SKIP_ENV_VALIDATION: true + NODE_OPTIONS: --max-old-space-size=8096 steps: - name: Checkout repository diff --git a/.gitignore b/.gitignore index c24a835..63fb055 100644 --- a/.gitignore +++ b/.gitignore @@ -43,4 +43,8 @@ yarn-error.log* *.tsbuildinfo # idea files -.idea \ No newline at end of file +.idea + +# kiro + +/.kiro/specs/* \ No newline at end of file diff --git a/.kiro/steering/product.md b/.kiro/steering/product.md new file mode 100644 index 0000000..2caaa01 --- /dev/null +++ b/.kiro/steering/product.md @@ -0,0 +1,25 @@ +# OpenSyte Product Overview + +OpenSyte is an open-source all-in-one business management software designed to streamline operations for businesses of all sizes. + +## Core Features + +- **Customer Relationship Management (CRM)** - Contact management, sales pipeline tracking, lead management +- **Project Management** - Task creation, Gantt/Kanban boards, resource allocation, time tracking +- **Finance & Accounting** - Invoicing, expense tracking, financial reporting, payroll management +- **Human Resources** - Employee database, performance tracking, time-off management +- **Role-Based Access Control** - Feature-level permissions, custom roles, user management +- **Workflow Automation** - Custom workflows with templates and automation capabilities + +## Target Users + +- Small to medium businesses looking for integrated business management +- Teams needing project management with financial tracking +- Organizations requiring role-based access control and multi-tenant support + +## Key Value Propositions + +- Open source alternative to expensive proprietary business software +- Integrated approach reducing need for multiple separate tools +- Customizable workflows and permissions system +- Modern web-based interface with responsive design diff --git a/.kiro/steering/structure.md b/.kiro/steering/structure.md new file mode 100644 index 0000000..bfb20b5 --- /dev/null +++ b/.kiro/steering/structure.md @@ -0,0 +1,100 @@ +# Project Structure & Organization + +## Root Directory Structure + +``` +opensyte/ +├── .kiro/ # Kiro AI assistant configuration +├── docs/ # Documentation and guides +├── prisma/ # Database schema and migrations +│ ├── migrations/ # Database migration files +│ ├── generated/ # Generated Prisma client +│ └── schema.prisma # Main database schema +├── public/ # Static assets (icons, images) +├── src/ # Main application source code +└── start-database.sh # Local database setup script +``` + +## Source Code Organization (`src/`) + +### App Router Structure (`src/app/`) + +- `(auth)/` - Authentication pages (login, register) +- `(dashboard)/` - Main application dashboard and features +- `accept-invite/` - Organization invitation acceptance +- `api/` - API routes and endpoints + +### Components (`src/components/`) + +Organized by feature domains: + +- `ai/` - AI-related components +- `auth/` - Authentication UI components +- `crm/` - Customer relationship management +- `dashboard/` - Dashboard layouts and widgets +- `finance/` - Financial management (invoices, expenses) +- `hr/` - Human resources management +- `invitations/` - User invitation system +- `organizations/` - Multi-tenant organization management +- `projects/` - Project management features +- `rbac/` - Role-based access control +- `settings/` - Application settings +- `shared/` - Reusable components across features +- `templates/` - Workflow templates +- `ui/` - Base UI components (Shadcn/ui) +- `workflow/` & `workflows/` - Workflow automation + +### Core Infrastructure + +- `hooks/` - Custom React hooks +- `lib/` - Utility functions and business logic +- `server/` - Server-side code (API, database, email) +- `trpc/` - tRPC configuration and client setup +- `types/` - TypeScript type definitions +- `styles/` - Global CSS and Tailwind configuration + +## Key Architectural Patterns + +### Multi-Tenant Architecture + +- Organization-based data isolation +- Role-based access control (RBAC) +- Custom roles and permissions system + +### Feature-Based Organization + +- Components grouped by business domain +- Dedicated type definitions per feature +- Modular API routes in tRPC routers + +### Database Schema Organization + +- Core models: User, Organization, UserOrganization +- Feature modules: CRM, Projects, Finance, HR +- RBAC: Permissions, Roles, CustomRoles +- Workflow automation system + +## File Naming Conventions + +- **Components**: PascalCase (e.g., `CustomerList.tsx`) +- **Hooks**: camelCase with `use` prefix (e.g., `usePermissions.ts`) +- **Types**: camelCase files, PascalCase exports (e.g., `crm.ts` exports `Customer`) +- **API Routes**: kebab-case directories, camelCase files +- **Utilities**: camelCase (e.g., `auth-client.ts`) + +## Import Path Aliases + +- `~/` - Maps to `src/` directory +- `~/components` - UI components +- `~/lib` - Utility functions +- `~/hooks` - Custom hooks +- `~/types` - Type definitions +- `~/server` - Server-side code + +## Configuration Files + +- `components.json` - Shadcn/ui configuration +- `tsconfig.json` - TypeScript configuration with strict mode +- `eslint.config.js` - ESLint with TypeScript rules +- `prettier.config.js` - Code formatting with Tailwind plugin +- `postcss.config.js` - PostCSS with Tailwind CSS v4 diff --git a/.kiro/steering/tech.md b/.kiro/steering/tech.md new file mode 100644 index 0000000..1d224b8 --- /dev/null +++ b/.kiro/steering/tech.md @@ -0,0 +1,73 @@ +# Technology Stack & Development Guide + +## Core Technologies + +- **Framework**: Next.js 15 with App Router +- **Runtime**: Bun (package manager and runtime) +- **Language**: TypeScript with strict configuration +- **Database**: PostgreSQL with Prisma ORM +- **Styling**: Tailwind CSS v4 with CSS variables +- **UI Components**: Shadcn/ui (New York style) +- **API**: tRPC for type-safe APIs +- **Authentication**: Better Auth with Google OAuth +- **State Management**: Jotai for client state +- **Email**: Resend for transactional emails +- **SMS**: Twilio (optional) + +## Key Libraries + +- **Forms**: React Hook Form with Zod validation +- **UI**: Radix UI primitives, Lucide React icons +- **Data Fetching**: TanStack Query (React Query) +- **Drag & Drop**: @dnd-kit for sortable interfaces +- **Rich Text**: Tiptap editor +- **PDF Generation**: PDF-lib and PDFKit +- **Date Handling**: date-fns +- **Charts**: Custom chart components with CSS variables + +## Development Commands + +```bash +# Development +bun run dev # Start dev server with Turbo +bun run dev --turbo # Explicit turbo mode + +# Database +bun run db:push # Push schema changes to database +bun run db:generate # Generate Prisma client and run migrations +bun run db:migrate # Deploy migrations to production +bun run db:studio # Open Prisma Studio + +# Code Quality +bun run lint # Run ESLint +bun run lint:fix # Fix ESLint issues automatically +bun run typecheck # Run TypeScript compiler check +bun run check # Run both lint and typecheck + +# Formatting +bun run format:check # Check Prettier formatting +bun run format:write # Apply Prettier formatting + +# Build & Deploy +bun run build # Build for production +bun run start # Start production server +bun run preview # Build and start production server + +# UI Components +bun run shadcn # Add new Shadcn/ui components +``` + +## Environment Setup + +- Copy `.env.example` to `.env` +- Required: `DATABASE_URL`, `BETTER_AUTH_SECRET`, `RESEND_API_KEY` +- Optional: Google OAuth, Twilio SMS credentials +- Use `./start-database.sh` for local PostgreSQL (Docker/Podman) + +## Code Style & Conventions + +- ESLint with TypeScript recommended rules +- Prettier with Tailwind CSS plugin for class sorting +- Consistent type imports with `type` keyword +- Unused variables prefixed with underscore +- CSS variables for theming (light/dark mode support) diff --git a/.vscode/settings.json b/.vscode/settings.json index f4caa73..38f5dfb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -25,5 +25,7 @@ "javascriptreact", "typescript", "typescriptreact" - ] + ], + "kiroAgent.configureMCP": "Disabled", + "typescript.autoClosingTags": false } diff --git a/docs/guides/template-packs.md b/docs/guides/template-packs.md new file mode 100644 index 0000000..7d41b10 --- /dev/null +++ b/docs/guides/template-packs.md @@ -0,0 +1,38 @@ +### Template Packs: Export, Install, and Best Practices + +This document explains how Template Packs work in OpenSyte: exporting assets, installing with preflight checks, resolving variables and integrations, and testing. + +#### Export Contents + +- Workflows: full graph including nodes, triggers, connections, and action sub-entities (Email, SMS, WhatsApp, Slack, Calendar). Integration IDs are converted to placeholders `{ type, key }` based on the org's `IntegrationConfig` name. +- Reports: only `template`, `filters`, and `dateRange` are exported; no generated data. +- UI Layouts: selected `OrganizationUiConfig` keys as JSON. +- RBAC: custom roles with permission names. +- Variables: definitions with type/scope/required/default. +- Seeds: minimal sanitized records using `localKey` and foreign keys expressed via local keys. + +#### Installation Flow + +1. Preflight checks (tRPC `templates.preflight`): + - Missing integrations and variables collected from manifest. + - Name collisions computed; a plan (merge/overwrite/prefix) is suggested. +2. Install (tRPC `templates.startInstall`): + - Creates roles, variables, reports, workflows, nodes, triggers, connections. + - Resolves integration placeholders to `IntegrationConfig.id` and creates action sub-entities. + - Applies name prefix when requested. + - Writes `TemplateInstallItem` logs for each asset. +3. Seeds are applied last, resolving `localKey` to created IDs. + +#### Developer Notes + +- Never export secrets (credentials/endpoints). The exporter scrubs PII and content. +- Prefer using `OrganizationUiConfig` for feature-level UI settings to allow safe export/import. +- Keep integration keys stable (e.g., `primary_smtp`) to simplify mapping. + +#### Testing + +- Roundtrip: export a package, then install into a clean org and verify: + - Workflows can activate, nodes/triggers exist and action entities resolve integrations. + - Reports appear and render with saved template/filters/dateRange. + - UI layouts are applied or fall back via `useUiConfig` hook. +- Use `bun run check` to ensure type and lint checks pass. diff --git a/package.json b/package.json index 5f70ac2..9d405a5 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "lint:fix": "next lint --fix", "preview": "next build && next start", "start": "next start", - "typecheck": "tsc --noEmit", + "typecheck": "node --max-old-space-size=8096 ./node_modules/typescript/bin/tsc --noEmit", "shadcn": "bunx --bun shadcn@latest" }, "dependencies": { diff --git a/prisma/generated/zod/index.ts b/prisma/generated/zod/index.ts index 73e3995..33b78f9 100644 --- a/prisma/generated/zod/index.ts +++ b/prisma/generated/zod/index.ts @@ -159,8 +159,18 @@ export const FinancialReportExportScalarFieldEnumSchema = z.enum(['id','reportId export const FinancialReportScheduleScalarFieldEnumSchema = z.enum(['id','reportId','frequency','dayOfWeek','dayOfMonth','time','timezone','isActive','lastRunAt','nextRunAt','recipients','emailSubject','emailBody','createdById','createdAt','updatedAt']); +export const TemplatePackageScalarFieldEnumSchema = z.enum(['id','organizationId','name','description','category','version','visibility','status','iconUrl','tags','manifest','assetsCount','sizeBytes','createdById','createdAt','updatedAt']); + +export const TemplateVersionScalarFieldEnumSchema = z.enum(['id','templatePackageId','version','manifest','changelog','isActive','createdById','createdAt']); + +export const TemplateInstallationScalarFieldEnumSchema = z.enum(['id','organizationId','templatePackageId','templateVersionId','status','strategy','namePrefix','preflight','logs','error','createdById','createdAt','completedAt']); + +export const TemplateInstallItemScalarFieldEnumSchema = z.enum(['id','installationId','assetType','sourceKey','createdModel','createdId','status','details','createdAt']); + export const WorkflowScalarFieldEnumSchema = z.enum(['id','organizationId','name','description','version','status','isTemplate','category','canvasData','retryConfig','timeoutConfig','totalExecutions','successfulExecutions','failedExecutions','lastExecutedAt','createdById','updatedById','publishedAt','publishedById','archivedAt','createdAt','updatedAt']); +export const OrganizationUiConfigScalarFieldEnumSchema = z.enum(['id','organizationId','key','config','createdAt','updatedAt']); + export const WorkflowTriggerScalarFieldEnumSchema = z.enum(['id','workflowId','nodeId','name','description','type','module','entityType','eventType','conditions','delay','isActive','lastTriggered','triggerCount','createdAt','updatedAt']); export const WorkflowNodeScalarFieldEnumSchema = z.enum(['id','workflowId','nodeId','type','name','description','position','config','template','executionOrder','isOptional','retryLimit','timeout','conditions','createdAt','updatedAt']); @@ -199,6 +209,14 @@ export const CalendarActionScalarFieldEnumSchema = z.enum(['id','actionId','inte export const WorkflowAnalyticsScalarFieldEnumSchema = z.enum(['id','workflowId','periodStart','periodEnd','granularity','totalExecutions','successfulExecutions','failedExecutions','averageDuration','minDuration','maxDuration','p95Duration','commonErrors','errorRate','avgCpuUsage','avgMemoryUsage','createdAt','updatedAt']); +export const TemplateShareScalarFieldEnumSchema = z.enum(['id','templatePackageId','organizationId','name','shareMode','tokenHash','expiresAt','maxUses','allowExternal','notes','status','usageCount','lastAccessedAt','revokedAt','revokedById','snapshotData','snapshotVersion','createdById','createdAt','updatedAt']); + +export const TemplateShareRecipientScalarFieldEnumSchema = z.enum(['id','shareId','email','status','invitedAt','viewedAt','importedAt']); + +export const TemplateShareAccessLogScalarFieldEnumSchema = z.enum(['id','shareId','action','status','recipientEmail','userAgent','ipAddress','errorMessage','metadata','createdAt']); + +export const TemplateShareImportScalarFieldEnumSchema = z.enum(['id','shareId','organizationId','templatePackageId','importedById','importedAt','originalPackageId','originalOrgId','snapshotVersion']); + export const SortOrderSchema = z.enum(['asc','desc']); export const JsonNullValueInputSchema = z.enum(['JsonNull',]).transform((value) => (value === 'JsonNull' ? Prisma.JsonNull : value)); @@ -327,6 +345,30 @@ export const FinancialReportScheduleFrequencySchema = z.enum(['DAILY','WEEKLY',' export type FinancialReportScheduleFrequencyType = `${z.infer}` +export const TemplateVisibilitySchema = z.enum(['PRIVATE','UNLISTED','PUBLIC']); + +export type TemplateVisibilityType = `${z.infer}` + +export const TemplateStatusSchema = z.enum(['DRAFT','PUBLISHED','ARCHIVED']); + +export type TemplateStatusType = `${z.infer}` + +export const TemplateInstallStatusSchema = z.enum(['PENDING','RUNNING','COMPLETED','FAILED']); + +export type TemplateInstallStatusType = `${z.infer}` + +export const TemplateInstallStrategySchema = z.enum(['MERGE','OVERWRITE','PREFIX']); + +export type TemplateInstallStrategyType = `${z.infer}` + +export const TemplateAssetTypeSchema = z.enum(['WORKFLOW','REPORT','UILAYOUT','ROLE','VARIABLE','ACTION_TEMPLATE','DATA_SEED','PROJECT','INVOICE']); + +export type TemplateAssetTypeType = `${z.infer}` + +export const TemplateItemStatusSchema = z.enum(['CREATED','SKIPPED','UPDATED','FAILED']); + +export type TemplateItemStatusType = `${z.infer}` + export const WorkflowStatusSchema = z.enum(['DRAFT','INACTIVE','ACTIVE','PAUSED','ARCHIVED','ERROR']); export type WorkflowStatusType = `${z.infer}` @@ -379,6 +421,26 @@ export const IntegrationTypeSchema = z.enum(['EMAIL_SMTP','EMAIL_SENDGRID','EMAI export type IntegrationTypeType = `${z.infer}` +export const TemplateShareModeSchema = z.enum(['LINK','EMAIL','MIXED']); + +export type TemplateShareModeType = `${z.infer}` + +export const TemplateShareStatusSchema = z.enum(['ACTIVE','EXPIRED','REVOKED','EXHAUSTED']); + +export type TemplateShareStatusType = `${z.infer}` + +export const TemplateShareRecipientStatusSchema = z.enum(['PENDING','VIEWED','IMPORTED','DECLINED']); + +export type TemplateShareRecipientStatusType = `${z.infer}` + +export const TemplateShareAccessActionSchema = z.enum(['PREVIEW','IMPORT','DOWNLOAD']); + +export type TemplateShareAccessActionType = `${z.infer}` + +export const TemplateShareAccessStatusSchema = z.enum(['SUCCESS','BLOCKED','EXPIRED','REVOKED','EXHAUSTED','INVALID','ERROR']); + +export type TemplateShareAccessStatusType = `${z.infer}` + ///////////////////////////////////////// // MODELS ///////////////////////////////////////// @@ -1220,6 +1282,88 @@ export const FinancialReportScheduleSchema = z.object({ export type FinancialReportSchedule = z.infer +///////////////////////////////////////// +// TEMPLATE PACKAGE SCHEMA +///////////////////////////////////////// + +export const TemplatePackageSchema = z.object({ + visibility: TemplateVisibilitySchema, + status: TemplateStatusSchema, + id: z.string().cuid(), + organizationId: z.string().nullable(), + name: z.string(), + description: z.string().nullable(), + category: z.string().nullable(), + version: z.string(), + iconUrl: z.string().nullable(), + tags: JsonValueSchema.nullable(), + manifest: JsonValueSchema, + assetsCount: z.number().int(), + sizeBytes: z.number().int().nullable(), + createdById: z.string(), + createdAt: z.coerce.date(), + updatedAt: z.coerce.date(), +}) + +export type TemplatePackage = z.infer + +///////////////////////////////////////// +// TEMPLATE VERSION SCHEMA +///////////////////////////////////////// + +export const TemplateVersionSchema = z.object({ + id: z.string().cuid(), + templatePackageId: z.string(), + version: z.string(), + manifest: JsonValueSchema, + changelog: z.string().nullable(), + isActive: z.boolean(), + createdById: z.string(), + createdAt: z.coerce.date(), +}) + +export type TemplateVersion = z.infer + +///////////////////////////////////////// +// TEMPLATE INSTALLATION SCHEMA +///////////////////////////////////////// + +export const TemplateInstallationSchema = z.object({ + status: TemplateInstallStatusSchema, + strategy: TemplateInstallStrategySchema, + id: z.string().cuid(), + organizationId: z.string(), + templatePackageId: z.string().nullable(), + templateVersionId: z.string().nullable(), + namePrefix: z.string().nullable(), + preflight: JsonValueSchema.nullable(), + logs: JsonValueSchema.nullable(), + error: z.string().nullable(), + createdById: z.string(), + createdAt: z.coerce.date(), + completedAt: z.coerce.date().nullable(), +}) + +export type TemplateInstallation = z.infer + +///////////////////////////////////////// +// TEMPLATE INSTALL ITEM SCHEMA +///////////////////////////////////////// + +export const TemplateInstallItemSchema = z.object({ + assetType: TemplateAssetTypeSchema, + status: TemplateItemStatusSchema, + id: z.string().cuid(), + installationId: z.string(), + sourceKey: z.string(), + createdModel: z.string().nullable(), + createdId: z.string().nullable(), + details: JsonValueSchema.nullable(), + createdAt: z.coerce.date(), +}) + +export type TemplateInstallItem = z.infer + ///////////////////////////////////////// // WORKFLOW SCHEMA ///////////////////////////////////////// @@ -1251,6 +1395,21 @@ export const WorkflowSchema = z.object({ export type Workflow = z.infer +///////////////////////////////////////// +// ORGANIZATION UI CONFIG SCHEMA +///////////////////////////////////////// + +export const OrganizationUiConfigSchema = z.object({ + id: z.string().cuid(), + organizationId: z.string(), + key: z.string(), + config: JsonValueSchema, + createdAt: z.coerce.date(), + updatedAt: z.coerce.date(), +}) + +export type OrganizationUiConfig = z.infer + ///////////////////////////////////////// // WORKFLOW TRIGGER SCHEMA ///////////////////////////////////////// @@ -1701,6 +1860,88 @@ export const WorkflowAnalyticsSchema = z.object({ export type WorkflowAnalytics = z.infer +///////////////////////////////////////// +// TEMPLATE SHARE SCHEMA +///////////////////////////////////////// + +export const TemplateShareSchema = z.object({ + shareMode: TemplateShareModeSchema, + status: TemplateShareStatusSchema, + id: z.string().cuid(), + templatePackageId: z.string(), + organizationId: z.string(), + name: z.string().nullable(), + tokenHash: z.string().nullable(), + expiresAt: z.coerce.date().nullable(), + maxUses: z.number().int().nullable(), + allowExternal: z.boolean(), + notes: z.string().nullable(), + usageCount: z.number().int(), + lastAccessedAt: z.coerce.date().nullable(), + revokedAt: z.coerce.date().nullable(), + revokedById: z.string().nullable(), + snapshotData: JsonValueSchema, + snapshotVersion: z.string(), + createdById: z.string(), + createdAt: z.coerce.date(), + updatedAt: z.coerce.date(), +}) + +export type TemplateShare = z.infer + +///////////////////////////////////////// +// TEMPLATE SHARE RECIPIENT SCHEMA +///////////////////////////////////////// + +export const TemplateShareRecipientSchema = z.object({ + status: TemplateShareRecipientStatusSchema, + id: z.string().cuid(), + shareId: z.string(), + email: z.string(), + invitedAt: z.coerce.date(), + viewedAt: z.coerce.date().nullable(), + importedAt: z.coerce.date().nullable(), +}) + +export type TemplateShareRecipient = z.infer + +///////////////////////////////////////// +// TEMPLATE SHARE ACCESS LOG SCHEMA +///////////////////////////////////////// + +export const TemplateShareAccessLogSchema = z.object({ + action: TemplateShareAccessActionSchema, + status: TemplateShareAccessStatusSchema, + id: z.string().cuid(), + shareId: z.string(), + recipientEmail: z.string().nullable(), + userAgent: z.string().nullable(), + ipAddress: z.string().nullable(), + errorMessage: z.string().nullable(), + metadata: JsonValueSchema.nullable(), + createdAt: z.coerce.date(), +}) + +export type TemplateShareAccessLog = z.infer + +///////////////////////////////////////// +// TEMPLATE SHARE IMPORT SCHEMA +///////////////////////////////////////// + +export const TemplateShareImportSchema = z.object({ + id: z.string().cuid(), + shareId: z.string(), + organizationId: z.string(), + templatePackageId: z.string(), + importedById: z.string(), + importedAt: z.coerce.date(), + originalPackageId: z.string(), + originalOrgId: z.string(), + snapshotVersion: z.string(), +}) + +export type TemplateShareImport = z.infer + ///////////////////////////////////////// // SELECT & INCLUDE ///////////////////////////////////////// @@ -1844,6 +2085,11 @@ export const OrganizationIncludeSchema: z.ZodType = actionTemplates: z.union([z.boolean(),z.lazy(() => ActionTemplateFindManyArgsSchema)]).optional(), variableDefinitions: z.union([z.boolean(),z.lazy(() => VariableDefinitionFindManyArgsSchema)]).optional(), integrationConfigs: z.union([z.boolean(),z.lazy(() => IntegrationConfigFindManyArgsSchema)]).optional(), + templatePackages: z.union([z.boolean(),z.lazy(() => TemplatePackageFindManyArgsSchema)]).optional(), + templateInstallations: z.union([z.boolean(),z.lazy(() => TemplateInstallationFindManyArgsSchema)]).optional(), + templateShares: z.union([z.boolean(),z.lazy(() => TemplateShareFindManyArgsSchema)]).optional(), + templateShareImports: z.union([z.boolean(),z.lazy(() => TemplateShareImportFindManyArgsSchema)]).optional(), + uiConfigs: z.union([z.boolean(),z.lazy(() => OrganizationUiConfigFindManyArgsSchema)]).optional(), _count: z.union([z.boolean(),z.lazy(() => OrganizationCountOutputTypeArgsSchema)]).optional(), }).strict() @@ -1874,6 +2120,11 @@ export const OrganizationCountOutputTypeSelectSchema: z.ZodType = z.object({ @@ -1902,6 +2153,11 @@ export const OrganizationSelectSchema: z.ZodType = z. actionTemplates: z.union([z.boolean(),z.lazy(() => ActionTemplateFindManyArgsSchema)]).optional(), variableDefinitions: z.union([z.boolean(),z.lazy(() => VariableDefinitionFindManyArgsSchema)]).optional(), integrationConfigs: z.union([z.boolean(),z.lazy(() => IntegrationConfigFindManyArgsSchema)]).optional(), + templatePackages: z.union([z.boolean(),z.lazy(() => TemplatePackageFindManyArgsSchema)]).optional(), + templateInstallations: z.union([z.boolean(),z.lazy(() => TemplateInstallationFindManyArgsSchema)]).optional(), + templateShares: z.union([z.boolean(),z.lazy(() => TemplateShareFindManyArgsSchema)]).optional(), + templateShareImports: z.union([z.boolean(),z.lazy(() => TemplateShareImportFindManyArgsSchema)]).optional(), + uiConfigs: z.union([z.boolean(),z.lazy(() => OrganizationUiConfigFindManyArgsSchema)]).optional(), _count: z.union([z.boolean(),z.lazy(() => OrganizationCountOutputTypeArgsSchema)]).optional(), }).strict() @@ -3112,6 +3368,165 @@ export const FinancialReportScheduleSelectSchema: z.ZodType FinancialReportArgsSchema)]).optional(), }).strict() +// TEMPLATE PACKAGE +//------------------------------------------------------ + +export const TemplatePackageIncludeSchema: z.ZodType = z.object({ + organization: z.union([z.boolean(),z.lazy(() => OrganizationArgsSchema)]).optional(), + versions: z.union([z.boolean(),z.lazy(() => TemplateVersionFindManyArgsSchema)]).optional(), + installations: z.union([z.boolean(),z.lazy(() => TemplateInstallationFindManyArgsSchema)]).optional(), + shares: z.union([z.boolean(),z.lazy(() => TemplateShareFindManyArgsSchema)]).optional(), + shareImports: z.union([z.boolean(),z.lazy(() => TemplateShareImportFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => TemplatePackageCountOutputTypeArgsSchema)]).optional(), +}).strict() + +export const TemplatePackageArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => TemplatePackageSelectSchema).optional(), + include: z.lazy(() => TemplatePackageIncludeSchema).optional(), +}).strict(); + +export const TemplatePackageCountOutputTypeArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => TemplatePackageCountOutputTypeSelectSchema).nullish(), +}).strict(); + +export const TemplatePackageCountOutputTypeSelectSchema: z.ZodType = z.object({ + versions: z.boolean().optional(), + installations: z.boolean().optional(), + shares: z.boolean().optional(), + shareImports: z.boolean().optional(), +}).strict(); + +export const TemplatePackageSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + organizationId: z.boolean().optional(), + name: z.boolean().optional(), + description: z.boolean().optional(), + category: z.boolean().optional(), + version: z.boolean().optional(), + visibility: z.boolean().optional(), + status: z.boolean().optional(), + iconUrl: z.boolean().optional(), + tags: z.boolean().optional(), + manifest: z.boolean().optional(), + assetsCount: z.boolean().optional(), + sizeBytes: z.boolean().optional(), + createdById: z.boolean().optional(), + createdAt: z.boolean().optional(), + updatedAt: z.boolean().optional(), + organization: z.union([z.boolean(),z.lazy(() => OrganizationArgsSchema)]).optional(), + versions: z.union([z.boolean(),z.lazy(() => TemplateVersionFindManyArgsSchema)]).optional(), + installations: z.union([z.boolean(),z.lazy(() => TemplateInstallationFindManyArgsSchema)]).optional(), + shares: z.union([z.boolean(),z.lazy(() => TemplateShareFindManyArgsSchema)]).optional(), + shareImports: z.union([z.boolean(),z.lazy(() => TemplateShareImportFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => TemplatePackageCountOutputTypeArgsSchema)]).optional(), +}).strict() + +// TEMPLATE VERSION +//------------------------------------------------------ + +export const TemplateVersionIncludeSchema: z.ZodType = z.object({ + templatePackage: z.union([z.boolean(),z.lazy(() => TemplatePackageArgsSchema)]).optional(), + installations: z.union([z.boolean(),z.lazy(() => TemplateInstallationFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => TemplateVersionCountOutputTypeArgsSchema)]).optional(), +}).strict() + +export const TemplateVersionArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => TemplateVersionSelectSchema).optional(), + include: z.lazy(() => TemplateVersionIncludeSchema).optional(), +}).strict(); + +export const TemplateVersionCountOutputTypeArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => TemplateVersionCountOutputTypeSelectSchema).nullish(), +}).strict(); + +export const TemplateVersionCountOutputTypeSelectSchema: z.ZodType = z.object({ + installations: z.boolean().optional(), +}).strict(); + +export const TemplateVersionSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + templatePackageId: z.boolean().optional(), + version: z.boolean().optional(), + manifest: z.boolean().optional(), + changelog: z.boolean().optional(), + isActive: z.boolean().optional(), + createdById: z.boolean().optional(), + createdAt: z.boolean().optional(), + templatePackage: z.union([z.boolean(),z.lazy(() => TemplatePackageArgsSchema)]).optional(), + installations: z.union([z.boolean(),z.lazy(() => TemplateInstallationFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => TemplateVersionCountOutputTypeArgsSchema)]).optional(), +}).strict() + +// TEMPLATE INSTALLATION +//------------------------------------------------------ + +export const TemplateInstallationIncludeSchema: z.ZodType = z.object({ + organization: z.union([z.boolean(),z.lazy(() => OrganizationArgsSchema)]).optional(), + templatePackage: z.union([z.boolean(),z.lazy(() => TemplatePackageArgsSchema)]).optional(), + templateVersion: z.union([z.boolean(),z.lazy(() => TemplateVersionArgsSchema)]).optional(), + items: z.union([z.boolean(),z.lazy(() => TemplateInstallItemFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => TemplateInstallationCountOutputTypeArgsSchema)]).optional(), +}).strict() + +export const TemplateInstallationArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => TemplateInstallationSelectSchema).optional(), + include: z.lazy(() => TemplateInstallationIncludeSchema).optional(), +}).strict(); + +export const TemplateInstallationCountOutputTypeArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => TemplateInstallationCountOutputTypeSelectSchema).nullish(), +}).strict(); + +export const TemplateInstallationCountOutputTypeSelectSchema: z.ZodType = z.object({ + items: z.boolean().optional(), +}).strict(); + +export const TemplateInstallationSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + organizationId: z.boolean().optional(), + templatePackageId: z.boolean().optional(), + templateVersionId: z.boolean().optional(), + status: z.boolean().optional(), + strategy: z.boolean().optional(), + namePrefix: z.boolean().optional(), + preflight: z.boolean().optional(), + logs: z.boolean().optional(), + error: z.boolean().optional(), + createdById: z.boolean().optional(), + createdAt: z.boolean().optional(), + completedAt: z.boolean().optional(), + organization: z.union([z.boolean(),z.lazy(() => OrganizationArgsSchema)]).optional(), + templatePackage: z.union([z.boolean(),z.lazy(() => TemplatePackageArgsSchema)]).optional(), + templateVersion: z.union([z.boolean(),z.lazy(() => TemplateVersionArgsSchema)]).optional(), + items: z.union([z.boolean(),z.lazy(() => TemplateInstallItemFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => TemplateInstallationCountOutputTypeArgsSchema)]).optional(), +}).strict() + +// TEMPLATE INSTALL ITEM +//------------------------------------------------------ + +export const TemplateInstallItemIncludeSchema: z.ZodType = z.object({ + installation: z.union([z.boolean(),z.lazy(() => TemplateInstallationArgsSchema)]).optional(), +}).strict() + +export const TemplateInstallItemArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => TemplateInstallItemSelectSchema).optional(), + include: z.lazy(() => TemplateInstallItemIncludeSchema).optional(), +}).strict(); + +export const TemplateInstallItemSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + installationId: z.boolean().optional(), + assetType: z.boolean().optional(), + sourceKey: z.boolean().optional(), + createdModel: z.boolean().optional(), + createdId: z.boolean().optional(), + status: z.boolean().optional(), + details: z.boolean().optional(), + createdAt: z.boolean().optional(), + installation: z.union([z.boolean(),z.lazy(() => TemplateInstallationArgsSchema)]).optional(), +}).strict() + // WORKFLOW //------------------------------------------------------ @@ -3174,6 +3589,28 @@ export const WorkflowSelectSchema: z.ZodType = z.object({ _count: z.union([z.boolean(),z.lazy(() => WorkflowCountOutputTypeArgsSchema)]).optional(), }).strict() +// ORGANIZATION UI CONFIG +//------------------------------------------------------ + +export const OrganizationUiConfigIncludeSchema: z.ZodType = z.object({ + organization: z.union([z.boolean(),z.lazy(() => OrganizationArgsSchema)]).optional(), +}).strict() + +export const OrganizationUiConfigArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => OrganizationUiConfigSelectSchema).optional(), + include: z.lazy(() => OrganizationUiConfigIncludeSchema).optional(), +}).strict(); + +export const OrganizationUiConfigSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + organizationId: z.boolean().optional(), + key: z.boolean().optional(), + config: z.boolean().optional(), + createdAt: z.boolean().optional(), + updatedAt: z.boolean().optional(), + organization: z.union([z.boolean(),z.lazy(() => OrganizationArgsSchema)]).optional(), +}).strict() + // WORKFLOW TRIGGER //------------------------------------------------------ @@ -3869,6 +4306,140 @@ export const WorkflowAnalyticsSelectSchema: z.ZodType WorkflowArgsSchema)]).optional(), }).strict() +// TEMPLATE SHARE +//------------------------------------------------------ + +export const TemplateShareIncludeSchema: z.ZodType = z.object({ + templatePackage: z.union([z.boolean(),z.lazy(() => TemplatePackageArgsSchema)]).optional(), + organization: z.union([z.boolean(),z.lazy(() => OrganizationArgsSchema)]).optional(), + recipients: z.union([z.boolean(),z.lazy(() => TemplateShareRecipientFindManyArgsSchema)]).optional(), + accessLogs: z.union([z.boolean(),z.lazy(() => TemplateShareAccessLogFindManyArgsSchema)]).optional(), + imports: z.union([z.boolean(),z.lazy(() => TemplateShareImportFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => TemplateShareCountOutputTypeArgsSchema)]).optional(), +}).strict() + +export const TemplateShareArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => TemplateShareSelectSchema).optional(), + include: z.lazy(() => TemplateShareIncludeSchema).optional(), +}).strict(); + +export const TemplateShareCountOutputTypeArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => TemplateShareCountOutputTypeSelectSchema).nullish(), +}).strict(); + +export const TemplateShareCountOutputTypeSelectSchema: z.ZodType = z.object({ + recipients: z.boolean().optional(), + accessLogs: z.boolean().optional(), + imports: z.boolean().optional(), +}).strict(); + +export const TemplateShareSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + templatePackageId: z.boolean().optional(), + organizationId: z.boolean().optional(), + name: z.boolean().optional(), + shareMode: z.boolean().optional(), + tokenHash: z.boolean().optional(), + expiresAt: z.boolean().optional(), + maxUses: z.boolean().optional(), + allowExternal: z.boolean().optional(), + notes: z.boolean().optional(), + status: z.boolean().optional(), + usageCount: z.boolean().optional(), + lastAccessedAt: z.boolean().optional(), + revokedAt: z.boolean().optional(), + revokedById: z.boolean().optional(), + snapshotData: z.boolean().optional(), + snapshotVersion: z.boolean().optional(), + createdById: z.boolean().optional(), + createdAt: z.boolean().optional(), + updatedAt: z.boolean().optional(), + templatePackage: z.union([z.boolean(),z.lazy(() => TemplatePackageArgsSchema)]).optional(), + organization: z.union([z.boolean(),z.lazy(() => OrganizationArgsSchema)]).optional(), + recipients: z.union([z.boolean(),z.lazy(() => TemplateShareRecipientFindManyArgsSchema)]).optional(), + accessLogs: z.union([z.boolean(),z.lazy(() => TemplateShareAccessLogFindManyArgsSchema)]).optional(), + imports: z.union([z.boolean(),z.lazy(() => TemplateShareImportFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => TemplateShareCountOutputTypeArgsSchema)]).optional(), +}).strict() + +// TEMPLATE SHARE RECIPIENT +//------------------------------------------------------ + +export const TemplateShareRecipientIncludeSchema: z.ZodType = z.object({ + share: z.union([z.boolean(),z.lazy(() => TemplateShareArgsSchema)]).optional(), +}).strict() + +export const TemplateShareRecipientArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => TemplateShareRecipientSelectSchema).optional(), + include: z.lazy(() => TemplateShareRecipientIncludeSchema).optional(), +}).strict(); + +export const TemplateShareRecipientSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + shareId: z.boolean().optional(), + email: z.boolean().optional(), + status: z.boolean().optional(), + invitedAt: z.boolean().optional(), + viewedAt: z.boolean().optional(), + importedAt: z.boolean().optional(), + share: z.union([z.boolean(),z.lazy(() => TemplateShareArgsSchema)]).optional(), +}).strict() + +// TEMPLATE SHARE ACCESS LOG +//------------------------------------------------------ + +export const TemplateShareAccessLogIncludeSchema: z.ZodType = z.object({ + share: z.union([z.boolean(),z.lazy(() => TemplateShareArgsSchema)]).optional(), +}).strict() + +export const TemplateShareAccessLogArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => TemplateShareAccessLogSelectSchema).optional(), + include: z.lazy(() => TemplateShareAccessLogIncludeSchema).optional(), +}).strict(); + +export const TemplateShareAccessLogSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + shareId: z.boolean().optional(), + action: z.boolean().optional(), + status: z.boolean().optional(), + recipientEmail: z.boolean().optional(), + userAgent: z.boolean().optional(), + ipAddress: z.boolean().optional(), + errorMessage: z.boolean().optional(), + metadata: z.boolean().optional(), + createdAt: z.boolean().optional(), + share: z.union([z.boolean(),z.lazy(() => TemplateShareArgsSchema)]).optional(), +}).strict() + +// TEMPLATE SHARE IMPORT +//------------------------------------------------------ + +export const TemplateShareImportIncludeSchema: z.ZodType = z.object({ + share: z.union([z.boolean(),z.lazy(() => TemplateShareArgsSchema)]).optional(), + organization: z.union([z.boolean(),z.lazy(() => OrganizationArgsSchema)]).optional(), + templatePackage: z.union([z.boolean(),z.lazy(() => TemplatePackageArgsSchema)]).optional(), +}).strict() + +export const TemplateShareImportArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => TemplateShareImportSelectSchema).optional(), + include: z.lazy(() => TemplateShareImportIncludeSchema).optional(), +}).strict(); + +export const TemplateShareImportSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + shareId: z.boolean().optional(), + organizationId: z.boolean().optional(), + templatePackageId: z.boolean().optional(), + importedById: z.boolean().optional(), + importedAt: z.boolean().optional(), + originalPackageId: z.boolean().optional(), + originalOrgId: z.boolean().optional(), + snapshotVersion: z.boolean().optional(), + share: z.union([z.boolean(),z.lazy(() => TemplateShareArgsSchema)]).optional(), + organization: z.union([z.boolean(),z.lazy(() => OrganizationArgsSchema)]).optional(), + templatePackage: z.union([z.boolean(),z.lazy(() => TemplatePackageArgsSchema)]).optional(), +}).strict() + ///////////////////////////////////////// // INPUT TYPES @@ -4205,7 +4776,12 @@ export const OrganizationWhereInputSchema: z.ZodType WorkflowListRelationFilterSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateListRelationFilterSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionListRelationFilterSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigListRelationFilterSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigListRelationFilterSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageListRelationFilterSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationListRelationFilterSchema).optional(), + templateShares: z.lazy(() => TemplateShareListRelationFilterSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportListRelationFilterSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigListRelationFilterSchema).optional() }).strict(); export const OrganizationOrderByWithRelationInputSchema: z.ZodType = z.object({ @@ -4233,7 +4809,12 @@ export const OrganizationOrderByWithRelationInputSchema: z.ZodType WorkflowOrderByRelationAggregateInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateOrderByRelationAggregateInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionOrderByRelationAggregateInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigOrderByRelationAggregateInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigOrderByRelationAggregateInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageOrderByRelationAggregateInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationOrderByRelationAggregateInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareOrderByRelationAggregateInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportOrderByRelationAggregateInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigOrderByRelationAggregateInputSchema).optional() }).strict(); export const OrganizationWhereUniqueInputSchema: z.ZodType = z.object({ @@ -4267,7 +4848,12 @@ export const OrganizationWhereUniqueInputSchema: z.ZodType WorkflowListRelationFilterSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateListRelationFilterSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionListRelationFilterSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigListRelationFilterSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigListRelationFilterSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageListRelationFilterSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationListRelationFilterSchema).optional(), + templateShares: z.lazy(() => TemplateShareListRelationFilterSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportListRelationFilterSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigListRelationFilterSchema).optional() }).strict()); export const OrganizationOrderByWithAggregationInputSchema: z.ZodType = z.object({ @@ -7879,6 +8465,404 @@ export const FinancialReportScheduleScalarWhereWithAggregatesInputSchema: z.ZodT updatedAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), }).strict(); +export const TemplatePackageWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplatePackageWhereInputSchema),z.lazy(() => TemplatePackageWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplatePackageWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplatePackageWhereInputSchema),z.lazy(() => TemplatePackageWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + organizationId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + name: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + description: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + category: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + version: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + visibility: z.union([ z.lazy(() => EnumTemplateVisibilityFilterSchema),z.lazy(() => TemplateVisibilitySchema) ]).optional(), + status: z.union([ z.lazy(() => EnumTemplateStatusFilterSchema),z.lazy(() => TemplateStatusSchema) ]).optional(), + iconUrl: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + tags: z.lazy(() => JsonNullableFilterSchema).optional(), + manifest: z.lazy(() => JsonFilterSchema).optional(), + assetsCount: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), + sizeBytes: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), + createdById: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + organization: z.union([ z.lazy(() => OrganizationNullableRelationFilterSchema),z.lazy(() => OrganizationWhereInputSchema) ]).optional().nullable(), + versions: z.lazy(() => TemplateVersionListRelationFilterSchema).optional(), + installations: z.lazy(() => TemplateInstallationListRelationFilterSchema).optional(), + shares: z.lazy(() => TemplateShareListRelationFilterSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportListRelationFilterSchema).optional() +}).strict(); + +export const TemplatePackageOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + description: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + category: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + version: z.lazy(() => SortOrderSchema).optional(), + visibility: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + iconUrl: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + tags: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + manifest: z.lazy(() => SortOrderSchema).optional(), + assetsCount: z.lazy(() => SortOrderSchema).optional(), + sizeBytes: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + createdById: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + organization: z.lazy(() => OrganizationOrderByWithRelationInputSchema).optional(), + versions: z.lazy(() => TemplateVersionOrderByRelationAggregateInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationOrderByRelationAggregateInputSchema).optional(), + shares: z.lazy(() => TemplateShareOrderByRelationAggregateInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportOrderByRelationAggregateInputSchema).optional() +}).strict(); + +export const TemplatePackageWhereUniqueInputSchema: z.ZodType = z.object({ + id: z.string().cuid() +}) +.and(z.object({ + id: z.string().cuid().optional(), + AND: z.union([ z.lazy(() => TemplatePackageWhereInputSchema),z.lazy(() => TemplatePackageWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplatePackageWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplatePackageWhereInputSchema),z.lazy(() => TemplatePackageWhereInputSchema).array() ]).optional(), + organizationId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + name: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + description: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + category: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + version: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + visibility: z.union([ z.lazy(() => EnumTemplateVisibilityFilterSchema),z.lazy(() => TemplateVisibilitySchema) ]).optional(), + status: z.union([ z.lazy(() => EnumTemplateStatusFilterSchema),z.lazy(() => TemplateStatusSchema) ]).optional(), + iconUrl: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + tags: z.lazy(() => JsonNullableFilterSchema).optional(), + manifest: z.lazy(() => JsonFilterSchema).optional(), + assetsCount: z.union([ z.lazy(() => IntFilterSchema),z.number().int() ]).optional(), + sizeBytes: z.union([ z.lazy(() => IntNullableFilterSchema),z.number().int() ]).optional().nullable(), + createdById: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + organization: z.union([ z.lazy(() => OrganizationNullableRelationFilterSchema),z.lazy(() => OrganizationWhereInputSchema) ]).optional().nullable(), + versions: z.lazy(() => TemplateVersionListRelationFilterSchema).optional(), + installations: z.lazy(() => TemplateInstallationListRelationFilterSchema).optional(), + shares: z.lazy(() => TemplateShareListRelationFilterSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportListRelationFilterSchema).optional() +}).strict()); + +export const TemplatePackageOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + description: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + category: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + version: z.lazy(() => SortOrderSchema).optional(), + visibility: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + iconUrl: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + tags: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + manifest: z.lazy(() => SortOrderSchema).optional(), + assetsCount: z.lazy(() => SortOrderSchema).optional(), + sizeBytes: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + createdById: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => TemplatePackageCountOrderByAggregateInputSchema).optional(), + _avg: z.lazy(() => TemplatePackageAvgOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => TemplatePackageMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => TemplatePackageMinOrderByAggregateInputSchema).optional(), + _sum: z.lazy(() => TemplatePackageSumOrderByAggregateInputSchema).optional() +}).strict(); + +export const TemplatePackageScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplatePackageScalarWhereWithAggregatesInputSchema),z.lazy(() => TemplatePackageScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplatePackageScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplatePackageScalarWhereWithAggregatesInputSchema),z.lazy(() => TemplatePackageScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + organizationId: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + name: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + description: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + category: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + version: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + visibility: z.union([ z.lazy(() => EnumTemplateVisibilityWithAggregatesFilterSchema),z.lazy(() => TemplateVisibilitySchema) ]).optional(), + status: z.union([ z.lazy(() => EnumTemplateStatusWithAggregatesFilterSchema),z.lazy(() => TemplateStatusSchema) ]).optional(), + iconUrl: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + tags: z.lazy(() => JsonNullableWithAggregatesFilterSchema).optional(), + manifest: z.lazy(() => JsonWithAggregatesFilterSchema).optional(), + assetsCount: z.union([ z.lazy(() => IntWithAggregatesFilterSchema),z.number() ]).optional(), + sizeBytes: z.union([ z.lazy(() => IntNullableWithAggregatesFilterSchema),z.number() ]).optional().nullable(), + createdById: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), +}).strict(); + +export const TemplateVersionWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateVersionWhereInputSchema),z.lazy(() => TemplateVersionWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateVersionWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateVersionWhereInputSchema),z.lazy(() => TemplateVersionWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + templatePackageId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + version: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + manifest: z.lazy(() => JsonFilterSchema).optional(), + changelog: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + isActive: z.union([ z.lazy(() => BoolFilterSchema),z.boolean() ]).optional(), + createdById: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + templatePackage: z.union([ z.lazy(() => TemplatePackageRelationFilterSchema),z.lazy(() => TemplatePackageWhereInputSchema) ]).optional(), + installations: z.lazy(() => TemplateInstallationListRelationFilterSchema).optional() +}).strict(); + +export const TemplateVersionOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + templatePackageId: z.lazy(() => SortOrderSchema).optional(), + version: z.lazy(() => SortOrderSchema).optional(), + manifest: z.lazy(() => SortOrderSchema).optional(), + changelog: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + isActive: z.lazy(() => SortOrderSchema).optional(), + createdById: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + templatePackage: z.lazy(() => TemplatePackageOrderByWithRelationInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationOrderByRelationAggregateInputSchema).optional() +}).strict(); + +export const TemplateVersionWhereUniqueInputSchema: z.ZodType = z.union([ + z.object({ + id: z.string().cuid(), + templatePackageId_version: z.lazy(() => TemplateVersionTemplatePackageIdVersionCompoundUniqueInputSchema) + }), + z.object({ + id: z.string().cuid(), + }), + z.object({ + templatePackageId_version: z.lazy(() => TemplateVersionTemplatePackageIdVersionCompoundUniqueInputSchema), + }), +]) +.and(z.object({ + id: z.string().cuid().optional(), + templatePackageId_version: z.lazy(() => TemplateVersionTemplatePackageIdVersionCompoundUniqueInputSchema).optional(), + AND: z.union([ z.lazy(() => TemplateVersionWhereInputSchema),z.lazy(() => TemplateVersionWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateVersionWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateVersionWhereInputSchema),z.lazy(() => TemplateVersionWhereInputSchema).array() ]).optional(), + templatePackageId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + version: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + manifest: z.lazy(() => JsonFilterSchema).optional(), + changelog: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + isActive: z.union([ z.lazy(() => BoolFilterSchema),z.boolean() ]).optional(), + createdById: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + templatePackage: z.union([ z.lazy(() => TemplatePackageRelationFilterSchema),z.lazy(() => TemplatePackageWhereInputSchema) ]).optional(), + installations: z.lazy(() => TemplateInstallationListRelationFilterSchema).optional() +}).strict()); + +export const TemplateVersionOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + templatePackageId: z.lazy(() => SortOrderSchema).optional(), + version: z.lazy(() => SortOrderSchema).optional(), + manifest: z.lazy(() => SortOrderSchema).optional(), + changelog: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + isActive: z.lazy(() => SortOrderSchema).optional(), + createdById: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => TemplateVersionCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => TemplateVersionMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => TemplateVersionMinOrderByAggregateInputSchema).optional() +}).strict(); + +export const TemplateVersionScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateVersionScalarWhereWithAggregatesInputSchema),z.lazy(() => TemplateVersionScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateVersionScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateVersionScalarWhereWithAggregatesInputSchema),z.lazy(() => TemplateVersionScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + templatePackageId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + version: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + manifest: z.lazy(() => JsonWithAggregatesFilterSchema).optional(), + changelog: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + isActive: z.union([ z.lazy(() => BoolWithAggregatesFilterSchema),z.boolean() ]).optional(), + createdById: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), +}).strict(); + +export const TemplateInstallationWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateInstallationWhereInputSchema),z.lazy(() => TemplateInstallationWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateInstallationWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateInstallationWhereInputSchema),z.lazy(() => TemplateInstallationWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + organizationId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + templatePackageId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + templateVersionId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + status: z.union([ z.lazy(() => EnumTemplateInstallStatusFilterSchema),z.lazy(() => TemplateInstallStatusSchema) ]).optional(), + strategy: z.union([ z.lazy(() => EnumTemplateInstallStrategyFilterSchema),z.lazy(() => TemplateInstallStrategySchema) ]).optional(), + namePrefix: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + preflight: z.lazy(() => JsonNullableFilterSchema).optional(), + logs: z.lazy(() => JsonNullableFilterSchema).optional(), + error: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + createdById: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + completedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + organization: z.union([ z.lazy(() => OrganizationRelationFilterSchema),z.lazy(() => OrganizationWhereInputSchema) ]).optional(), + templatePackage: z.union([ z.lazy(() => TemplatePackageNullableRelationFilterSchema),z.lazy(() => TemplatePackageWhereInputSchema) ]).optional().nullable(), + templateVersion: z.union([ z.lazy(() => TemplateVersionNullableRelationFilterSchema),z.lazy(() => TemplateVersionWhereInputSchema) ]).optional().nullable(), + items: z.lazy(() => TemplateInstallItemListRelationFilterSchema).optional() +}).strict(); + +export const TemplateInstallationOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + templatePackageId: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + templateVersionId: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + strategy: z.lazy(() => SortOrderSchema).optional(), + namePrefix: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + preflight: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + logs: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + error: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + createdById: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + completedAt: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + organization: z.lazy(() => OrganizationOrderByWithRelationInputSchema).optional(), + templatePackage: z.lazy(() => TemplatePackageOrderByWithRelationInputSchema).optional(), + templateVersion: z.lazy(() => TemplateVersionOrderByWithRelationInputSchema).optional(), + items: z.lazy(() => TemplateInstallItemOrderByRelationAggregateInputSchema).optional() +}).strict(); + +export const TemplateInstallationWhereUniqueInputSchema: z.ZodType = z.object({ + id: z.string().cuid() +}) +.and(z.object({ + id: z.string().cuid().optional(), + AND: z.union([ z.lazy(() => TemplateInstallationWhereInputSchema),z.lazy(() => TemplateInstallationWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateInstallationWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateInstallationWhereInputSchema),z.lazy(() => TemplateInstallationWhereInputSchema).array() ]).optional(), + organizationId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + templatePackageId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + templateVersionId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + status: z.union([ z.lazy(() => EnumTemplateInstallStatusFilterSchema),z.lazy(() => TemplateInstallStatusSchema) ]).optional(), + strategy: z.union([ z.lazy(() => EnumTemplateInstallStrategyFilterSchema),z.lazy(() => TemplateInstallStrategySchema) ]).optional(), + namePrefix: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + preflight: z.lazy(() => JsonNullableFilterSchema).optional(), + logs: z.lazy(() => JsonNullableFilterSchema).optional(), + error: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + createdById: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + completedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + organization: z.union([ z.lazy(() => OrganizationRelationFilterSchema),z.lazy(() => OrganizationWhereInputSchema) ]).optional(), + templatePackage: z.union([ z.lazy(() => TemplatePackageNullableRelationFilterSchema),z.lazy(() => TemplatePackageWhereInputSchema) ]).optional().nullable(), + templateVersion: z.union([ z.lazy(() => TemplateVersionNullableRelationFilterSchema),z.lazy(() => TemplateVersionWhereInputSchema) ]).optional().nullable(), + items: z.lazy(() => TemplateInstallItemListRelationFilterSchema).optional() +}).strict()); + +export const TemplateInstallationOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + templatePackageId: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + templateVersionId: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + strategy: z.lazy(() => SortOrderSchema).optional(), + namePrefix: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + preflight: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + logs: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + error: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + createdById: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + completedAt: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + _count: z.lazy(() => TemplateInstallationCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => TemplateInstallationMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => TemplateInstallationMinOrderByAggregateInputSchema).optional() +}).strict(); + +export const TemplateInstallationScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateInstallationScalarWhereWithAggregatesInputSchema),z.lazy(() => TemplateInstallationScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateInstallationScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateInstallationScalarWhereWithAggregatesInputSchema),z.lazy(() => TemplateInstallationScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + organizationId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + templatePackageId: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + templateVersionId: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + status: z.union([ z.lazy(() => EnumTemplateInstallStatusWithAggregatesFilterSchema),z.lazy(() => TemplateInstallStatusSchema) ]).optional(), + strategy: z.union([ z.lazy(() => EnumTemplateInstallStrategyWithAggregatesFilterSchema),z.lazy(() => TemplateInstallStrategySchema) ]).optional(), + namePrefix: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + preflight: z.lazy(() => JsonNullableWithAggregatesFilterSchema).optional(), + logs: z.lazy(() => JsonNullableWithAggregatesFilterSchema).optional(), + error: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + createdById: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + completedAt: z.union([ z.lazy(() => DateTimeNullableWithAggregatesFilterSchema),z.coerce.date() ]).optional().nullable(), +}).strict(); + +export const TemplateInstallItemWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateInstallItemWhereInputSchema),z.lazy(() => TemplateInstallItemWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateInstallItemWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateInstallItemWhereInputSchema),z.lazy(() => TemplateInstallItemWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + installationId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + assetType: z.union([ z.lazy(() => EnumTemplateAssetTypeFilterSchema),z.lazy(() => TemplateAssetTypeSchema) ]).optional(), + sourceKey: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdModel: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + createdId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + status: z.union([ z.lazy(() => EnumTemplateItemStatusFilterSchema),z.lazy(() => TemplateItemStatusSchema) ]).optional(), + details: z.lazy(() => JsonNullableFilterSchema).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + installation: z.union([ z.lazy(() => TemplateInstallationRelationFilterSchema),z.lazy(() => TemplateInstallationWhereInputSchema) ]).optional(), +}).strict(); + +export const TemplateInstallItemOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + installationId: z.lazy(() => SortOrderSchema).optional(), + assetType: z.lazy(() => SortOrderSchema).optional(), + sourceKey: z.lazy(() => SortOrderSchema).optional(), + createdModel: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + createdId: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + details: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + installation: z.lazy(() => TemplateInstallationOrderByWithRelationInputSchema).optional() +}).strict(); + +export const TemplateInstallItemWhereUniqueInputSchema: z.ZodType = z.object({ + id: z.string().cuid() +}) +.and(z.object({ + id: z.string().cuid().optional(), + AND: z.union([ z.lazy(() => TemplateInstallItemWhereInputSchema),z.lazy(() => TemplateInstallItemWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateInstallItemWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateInstallItemWhereInputSchema),z.lazy(() => TemplateInstallItemWhereInputSchema).array() ]).optional(), + installationId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + assetType: z.union([ z.lazy(() => EnumTemplateAssetTypeFilterSchema),z.lazy(() => TemplateAssetTypeSchema) ]).optional(), + sourceKey: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdModel: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + createdId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + status: z.union([ z.lazy(() => EnumTemplateItemStatusFilterSchema),z.lazy(() => TemplateItemStatusSchema) ]).optional(), + details: z.lazy(() => JsonNullableFilterSchema).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + installation: z.union([ z.lazy(() => TemplateInstallationRelationFilterSchema),z.lazy(() => TemplateInstallationWhereInputSchema) ]).optional(), +}).strict()); + +export const TemplateInstallItemOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + installationId: z.lazy(() => SortOrderSchema).optional(), + assetType: z.lazy(() => SortOrderSchema).optional(), + sourceKey: z.lazy(() => SortOrderSchema).optional(), + createdModel: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + createdId: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + details: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => TemplateInstallItemCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => TemplateInstallItemMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => TemplateInstallItemMinOrderByAggregateInputSchema).optional() +}).strict(); + +export const TemplateInstallItemScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateInstallItemScalarWhereWithAggregatesInputSchema),z.lazy(() => TemplateInstallItemScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateInstallItemScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateInstallItemScalarWhereWithAggregatesInputSchema),z.lazy(() => TemplateInstallItemScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + installationId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + assetType: z.union([ z.lazy(() => EnumTemplateAssetTypeWithAggregatesFilterSchema),z.lazy(() => TemplateAssetTypeSchema) ]).optional(), + sourceKey: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + createdModel: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + createdId: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + status: z.union([ z.lazy(() => EnumTemplateItemStatusWithAggregatesFilterSchema),z.lazy(() => TemplateItemStatusSchema) ]).optional(), + details: z.lazy(() => JsonNullableWithAggregatesFilterSchema).optional(), + createdAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), +}).strict(); + export const WorkflowWhereInputSchema: z.ZodType = z.object({ AND: z.union([ z.lazy(() => WorkflowWhereInputSchema),z.lazy(() => WorkflowWhereInputSchema).array() ]).optional(), OR: z.lazy(() => WorkflowWhereInputSchema).array().optional(), @@ -8049,6 +9033,79 @@ export const WorkflowScalarWhereWithAggregatesInputSchema: z.ZodType DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), }).strict(); +export const OrganizationUiConfigWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => OrganizationUiConfigWhereInputSchema),z.lazy(() => OrganizationUiConfigWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => OrganizationUiConfigWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => OrganizationUiConfigWhereInputSchema),z.lazy(() => OrganizationUiConfigWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + organizationId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + key: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + config: z.lazy(() => JsonFilterSchema).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + organization: z.union([ z.lazy(() => OrganizationRelationFilterSchema),z.lazy(() => OrganizationWhereInputSchema) ]).optional(), +}).strict(); + +export const OrganizationUiConfigOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + key: z.lazy(() => SortOrderSchema).optional(), + config: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + organization: z.lazy(() => OrganizationOrderByWithRelationInputSchema).optional() +}).strict(); + +export const OrganizationUiConfigWhereUniqueInputSchema: z.ZodType = z.union([ + z.object({ + id: z.string().cuid(), + organizationId_key: z.lazy(() => OrganizationUiConfigOrganizationIdKeyCompoundUniqueInputSchema) + }), + z.object({ + id: z.string().cuid(), + }), + z.object({ + organizationId_key: z.lazy(() => OrganizationUiConfigOrganizationIdKeyCompoundUniqueInputSchema), + }), +]) +.and(z.object({ + id: z.string().cuid().optional(), + organizationId_key: z.lazy(() => OrganizationUiConfigOrganizationIdKeyCompoundUniqueInputSchema).optional(), + AND: z.union([ z.lazy(() => OrganizationUiConfigWhereInputSchema),z.lazy(() => OrganizationUiConfigWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => OrganizationUiConfigWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => OrganizationUiConfigWhereInputSchema),z.lazy(() => OrganizationUiConfigWhereInputSchema).array() ]).optional(), + organizationId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + key: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + config: z.lazy(() => JsonFilterSchema).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + organization: z.union([ z.lazy(() => OrganizationRelationFilterSchema),z.lazy(() => OrganizationWhereInputSchema) ]).optional(), +}).strict()); + +export const OrganizationUiConfigOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + key: z.lazy(() => SortOrderSchema).optional(), + config: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => OrganizationUiConfigCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => OrganizationUiConfigMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => OrganizationUiConfigMinOrderByAggregateInputSchema).optional() +}).strict(); + +export const OrganizationUiConfigScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => OrganizationUiConfigScalarWhereWithAggregatesInputSchema),z.lazy(() => OrganizationUiConfigScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => OrganizationUiConfigScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => OrganizationUiConfigScalarWhereWithAggregatesInputSchema),z.lazy(() => OrganizationUiConfigScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + organizationId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + key: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + config: z.lazy(() => JsonWithAggregatesFilterSchema).optional(), + createdAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), +}).strict(); + export const WorkflowTriggerWhereInputSchema: z.ZodType = z.object({ AND: z.union([ z.lazy(() => WorkflowTriggerWhereInputSchema),z.lazy(() => WorkflowTriggerWhereInputSchema).array() ]).optional(), OR: z.lazy(() => WorkflowTriggerWhereInputSchema).array().optional(), @@ -10331,6 +11388,407 @@ export const WorkflowAnalyticsScalarWhereWithAggregatesInputSchema: z.ZodType DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), }).strict(); +export const TemplateShareWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateShareWhereInputSchema),z.lazy(() => TemplateShareWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateShareWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateShareWhereInputSchema),z.lazy(() => TemplateShareWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + templatePackageId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + organizationId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + name: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + shareMode: z.union([ z.lazy(() => EnumTemplateShareModeFilterSchema),z.lazy(() => TemplateShareModeSchema) ]).optional(), + tokenHash: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + expiresAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + maxUses: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), + allowExternal: z.union([ z.lazy(() => BoolFilterSchema),z.boolean() ]).optional(), + notes: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + status: z.union([ z.lazy(() => EnumTemplateShareStatusFilterSchema),z.lazy(() => TemplateShareStatusSchema) ]).optional(), + usageCount: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), + lastAccessedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + revokedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + revokedById: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + snapshotData: z.lazy(() => JsonFilterSchema).optional(), + snapshotVersion: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdById: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + templatePackage: z.union([ z.lazy(() => TemplatePackageRelationFilterSchema),z.lazy(() => TemplatePackageWhereInputSchema) ]).optional(), + organization: z.union([ z.lazy(() => OrganizationRelationFilterSchema),z.lazy(() => OrganizationWhereInputSchema) ]).optional(), + recipients: z.lazy(() => TemplateShareRecipientListRelationFilterSchema).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogListRelationFilterSchema).optional(), + imports: z.lazy(() => TemplateShareImportListRelationFilterSchema).optional() +}).strict(); + +export const TemplateShareOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + templatePackageId: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + name: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + shareMode: z.lazy(() => SortOrderSchema).optional(), + tokenHash: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + expiresAt: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + maxUses: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + allowExternal: z.lazy(() => SortOrderSchema).optional(), + notes: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + usageCount: z.lazy(() => SortOrderSchema).optional(), + lastAccessedAt: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + revokedAt: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + revokedById: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + snapshotData: z.lazy(() => SortOrderSchema).optional(), + snapshotVersion: z.lazy(() => SortOrderSchema).optional(), + createdById: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + templatePackage: z.lazy(() => TemplatePackageOrderByWithRelationInputSchema).optional(), + organization: z.lazy(() => OrganizationOrderByWithRelationInputSchema).optional(), + recipients: z.lazy(() => TemplateShareRecipientOrderByRelationAggregateInputSchema).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogOrderByRelationAggregateInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportOrderByRelationAggregateInputSchema).optional() +}).strict(); + +export const TemplateShareWhereUniqueInputSchema: z.ZodType = z.union([ + z.object({ + id: z.string().cuid(), + tokenHash: z.string() + }), + z.object({ + id: z.string().cuid(), + }), + z.object({ + tokenHash: z.string(), + }), +]) +.and(z.object({ + id: z.string().cuid().optional(), + tokenHash: z.string().optional(), + AND: z.union([ z.lazy(() => TemplateShareWhereInputSchema),z.lazy(() => TemplateShareWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateShareWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateShareWhereInputSchema),z.lazy(() => TemplateShareWhereInputSchema).array() ]).optional(), + templatePackageId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + organizationId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + name: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + shareMode: z.union([ z.lazy(() => EnumTemplateShareModeFilterSchema),z.lazy(() => TemplateShareModeSchema) ]).optional(), + expiresAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + maxUses: z.union([ z.lazy(() => IntNullableFilterSchema),z.number().int() ]).optional().nullable(), + allowExternal: z.union([ z.lazy(() => BoolFilterSchema),z.boolean() ]).optional(), + notes: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + status: z.union([ z.lazy(() => EnumTemplateShareStatusFilterSchema),z.lazy(() => TemplateShareStatusSchema) ]).optional(), + usageCount: z.union([ z.lazy(() => IntFilterSchema),z.number().int() ]).optional(), + lastAccessedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + revokedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + revokedById: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + snapshotData: z.lazy(() => JsonFilterSchema).optional(), + snapshotVersion: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdById: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + templatePackage: z.union([ z.lazy(() => TemplatePackageRelationFilterSchema),z.lazy(() => TemplatePackageWhereInputSchema) ]).optional(), + organization: z.union([ z.lazy(() => OrganizationRelationFilterSchema),z.lazy(() => OrganizationWhereInputSchema) ]).optional(), + recipients: z.lazy(() => TemplateShareRecipientListRelationFilterSchema).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogListRelationFilterSchema).optional(), + imports: z.lazy(() => TemplateShareImportListRelationFilterSchema).optional() +}).strict()); + +export const TemplateShareOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + templatePackageId: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + name: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + shareMode: z.lazy(() => SortOrderSchema).optional(), + tokenHash: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + expiresAt: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + maxUses: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + allowExternal: z.lazy(() => SortOrderSchema).optional(), + notes: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + usageCount: z.lazy(() => SortOrderSchema).optional(), + lastAccessedAt: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + revokedAt: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + revokedById: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + snapshotData: z.lazy(() => SortOrderSchema).optional(), + snapshotVersion: z.lazy(() => SortOrderSchema).optional(), + createdById: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => TemplateShareCountOrderByAggregateInputSchema).optional(), + _avg: z.lazy(() => TemplateShareAvgOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => TemplateShareMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => TemplateShareMinOrderByAggregateInputSchema).optional(), + _sum: z.lazy(() => TemplateShareSumOrderByAggregateInputSchema).optional() +}).strict(); + +export const TemplateShareScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateShareScalarWhereWithAggregatesInputSchema),z.lazy(() => TemplateShareScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateShareScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateShareScalarWhereWithAggregatesInputSchema),z.lazy(() => TemplateShareScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + templatePackageId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + organizationId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + name: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + shareMode: z.union([ z.lazy(() => EnumTemplateShareModeWithAggregatesFilterSchema),z.lazy(() => TemplateShareModeSchema) ]).optional(), + tokenHash: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + expiresAt: z.union([ z.lazy(() => DateTimeNullableWithAggregatesFilterSchema),z.coerce.date() ]).optional().nullable(), + maxUses: z.union([ z.lazy(() => IntNullableWithAggregatesFilterSchema),z.number() ]).optional().nullable(), + allowExternal: z.union([ z.lazy(() => BoolWithAggregatesFilterSchema),z.boolean() ]).optional(), + notes: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + status: z.union([ z.lazy(() => EnumTemplateShareStatusWithAggregatesFilterSchema),z.lazy(() => TemplateShareStatusSchema) ]).optional(), + usageCount: z.union([ z.lazy(() => IntWithAggregatesFilterSchema),z.number() ]).optional(), + lastAccessedAt: z.union([ z.lazy(() => DateTimeNullableWithAggregatesFilterSchema),z.coerce.date() ]).optional().nullable(), + revokedAt: z.union([ z.lazy(() => DateTimeNullableWithAggregatesFilterSchema),z.coerce.date() ]).optional().nullable(), + revokedById: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + snapshotData: z.lazy(() => JsonWithAggregatesFilterSchema).optional(), + snapshotVersion: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + createdById: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), +}).strict(); + +export const TemplateShareRecipientWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateShareRecipientWhereInputSchema),z.lazy(() => TemplateShareRecipientWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateShareRecipientWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateShareRecipientWhereInputSchema),z.lazy(() => TemplateShareRecipientWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + shareId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + email: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + status: z.union([ z.lazy(() => EnumTemplateShareRecipientStatusFilterSchema),z.lazy(() => TemplateShareRecipientStatusSchema) ]).optional(), + invitedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + viewedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + importedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + share: z.union([ z.lazy(() => TemplateShareRelationFilterSchema),z.lazy(() => TemplateShareWhereInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareRecipientOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + shareId: z.lazy(() => SortOrderSchema).optional(), + email: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + invitedAt: z.lazy(() => SortOrderSchema).optional(), + viewedAt: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + importedAt: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + share: z.lazy(() => TemplateShareOrderByWithRelationInputSchema).optional() +}).strict(); + +export const TemplateShareRecipientWhereUniqueInputSchema: z.ZodType = z.union([ + z.object({ + id: z.string().cuid(), + shareId_email: z.lazy(() => TemplateShareRecipientShareIdEmailCompoundUniqueInputSchema) + }), + z.object({ + id: z.string().cuid(), + }), + z.object({ + shareId_email: z.lazy(() => TemplateShareRecipientShareIdEmailCompoundUniqueInputSchema), + }), +]) +.and(z.object({ + id: z.string().cuid().optional(), + shareId_email: z.lazy(() => TemplateShareRecipientShareIdEmailCompoundUniqueInputSchema).optional(), + AND: z.union([ z.lazy(() => TemplateShareRecipientWhereInputSchema),z.lazy(() => TemplateShareRecipientWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateShareRecipientWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateShareRecipientWhereInputSchema),z.lazy(() => TemplateShareRecipientWhereInputSchema).array() ]).optional(), + shareId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + email: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + status: z.union([ z.lazy(() => EnumTemplateShareRecipientStatusFilterSchema),z.lazy(() => TemplateShareRecipientStatusSchema) ]).optional(), + invitedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + viewedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + importedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + share: z.union([ z.lazy(() => TemplateShareRelationFilterSchema),z.lazy(() => TemplateShareWhereInputSchema) ]).optional(), +}).strict()); + +export const TemplateShareRecipientOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + shareId: z.lazy(() => SortOrderSchema).optional(), + email: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + invitedAt: z.lazy(() => SortOrderSchema).optional(), + viewedAt: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + importedAt: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + _count: z.lazy(() => TemplateShareRecipientCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => TemplateShareRecipientMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => TemplateShareRecipientMinOrderByAggregateInputSchema).optional() +}).strict(); + +export const TemplateShareRecipientScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateShareRecipientScalarWhereWithAggregatesInputSchema),z.lazy(() => TemplateShareRecipientScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateShareRecipientScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateShareRecipientScalarWhereWithAggregatesInputSchema),z.lazy(() => TemplateShareRecipientScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + shareId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + email: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + status: z.union([ z.lazy(() => EnumTemplateShareRecipientStatusWithAggregatesFilterSchema),z.lazy(() => TemplateShareRecipientStatusSchema) ]).optional(), + invitedAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + viewedAt: z.union([ z.lazy(() => DateTimeNullableWithAggregatesFilterSchema),z.coerce.date() ]).optional().nullable(), + importedAt: z.union([ z.lazy(() => DateTimeNullableWithAggregatesFilterSchema),z.coerce.date() ]).optional().nullable(), +}).strict(); + +export const TemplateShareAccessLogWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateShareAccessLogWhereInputSchema),z.lazy(() => TemplateShareAccessLogWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateShareAccessLogWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateShareAccessLogWhereInputSchema),z.lazy(() => TemplateShareAccessLogWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + shareId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + action: z.union([ z.lazy(() => EnumTemplateShareAccessActionFilterSchema),z.lazy(() => TemplateShareAccessActionSchema) ]).optional(), + status: z.union([ z.lazy(() => EnumTemplateShareAccessStatusFilterSchema),z.lazy(() => TemplateShareAccessStatusSchema) ]).optional(), + recipientEmail: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + userAgent: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + ipAddress: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + errorMessage: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + metadata: z.lazy(() => JsonNullableFilterSchema).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + share: z.union([ z.lazy(() => TemplateShareRelationFilterSchema),z.lazy(() => TemplateShareWhereInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareAccessLogOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + shareId: z.lazy(() => SortOrderSchema).optional(), + action: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + recipientEmail: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + userAgent: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + ipAddress: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + errorMessage: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + metadata: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + share: z.lazy(() => TemplateShareOrderByWithRelationInputSchema).optional() +}).strict(); + +export const TemplateShareAccessLogWhereUniqueInputSchema: z.ZodType = z.object({ + id: z.string().cuid() +}) +.and(z.object({ + id: z.string().cuid().optional(), + AND: z.union([ z.lazy(() => TemplateShareAccessLogWhereInputSchema),z.lazy(() => TemplateShareAccessLogWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateShareAccessLogWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateShareAccessLogWhereInputSchema),z.lazy(() => TemplateShareAccessLogWhereInputSchema).array() ]).optional(), + shareId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + action: z.union([ z.lazy(() => EnumTemplateShareAccessActionFilterSchema),z.lazy(() => TemplateShareAccessActionSchema) ]).optional(), + status: z.union([ z.lazy(() => EnumTemplateShareAccessStatusFilterSchema),z.lazy(() => TemplateShareAccessStatusSchema) ]).optional(), + recipientEmail: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + userAgent: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + ipAddress: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + errorMessage: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + metadata: z.lazy(() => JsonNullableFilterSchema).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + share: z.union([ z.lazy(() => TemplateShareRelationFilterSchema),z.lazy(() => TemplateShareWhereInputSchema) ]).optional(), +}).strict()); + +export const TemplateShareAccessLogOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + shareId: z.lazy(() => SortOrderSchema).optional(), + action: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + recipientEmail: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + userAgent: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + ipAddress: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + errorMessage: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + metadata: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => TemplateShareAccessLogCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => TemplateShareAccessLogMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => TemplateShareAccessLogMinOrderByAggregateInputSchema).optional() +}).strict(); + +export const TemplateShareAccessLogScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateShareAccessLogScalarWhereWithAggregatesInputSchema),z.lazy(() => TemplateShareAccessLogScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateShareAccessLogScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateShareAccessLogScalarWhereWithAggregatesInputSchema),z.lazy(() => TemplateShareAccessLogScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + shareId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + action: z.union([ z.lazy(() => EnumTemplateShareAccessActionWithAggregatesFilterSchema),z.lazy(() => TemplateShareAccessActionSchema) ]).optional(), + status: z.union([ z.lazy(() => EnumTemplateShareAccessStatusWithAggregatesFilterSchema),z.lazy(() => TemplateShareAccessStatusSchema) ]).optional(), + recipientEmail: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + userAgent: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + ipAddress: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + errorMessage: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + metadata: z.lazy(() => JsonNullableWithAggregatesFilterSchema).optional(), + createdAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), +}).strict(); + +export const TemplateShareImportWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateShareImportWhereInputSchema),z.lazy(() => TemplateShareImportWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateShareImportWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateShareImportWhereInputSchema),z.lazy(() => TemplateShareImportWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + shareId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + organizationId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + templatePackageId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + importedById: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + importedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + originalPackageId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + originalOrgId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + snapshotVersion: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + share: z.union([ z.lazy(() => TemplateShareRelationFilterSchema),z.lazy(() => TemplateShareWhereInputSchema) ]).optional(), + organization: z.union([ z.lazy(() => OrganizationRelationFilterSchema),z.lazy(() => OrganizationWhereInputSchema) ]).optional(), + templatePackage: z.union([ z.lazy(() => TemplatePackageRelationFilterSchema),z.lazy(() => TemplatePackageWhereInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareImportOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + shareId: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + templatePackageId: z.lazy(() => SortOrderSchema).optional(), + importedById: z.lazy(() => SortOrderSchema).optional(), + importedAt: z.lazy(() => SortOrderSchema).optional(), + originalPackageId: z.lazy(() => SortOrderSchema).optional(), + originalOrgId: z.lazy(() => SortOrderSchema).optional(), + snapshotVersion: z.lazy(() => SortOrderSchema).optional(), + share: z.lazy(() => TemplateShareOrderByWithRelationInputSchema).optional(), + organization: z.lazy(() => OrganizationOrderByWithRelationInputSchema).optional(), + templatePackage: z.lazy(() => TemplatePackageOrderByWithRelationInputSchema).optional() +}).strict(); + +export const TemplateShareImportWhereUniqueInputSchema: z.ZodType = z.object({ + id: z.string().cuid() +}) +.and(z.object({ + id: z.string().cuid().optional(), + AND: z.union([ z.lazy(() => TemplateShareImportWhereInputSchema),z.lazy(() => TemplateShareImportWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateShareImportWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateShareImportWhereInputSchema),z.lazy(() => TemplateShareImportWhereInputSchema).array() ]).optional(), + shareId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + organizationId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + templatePackageId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + importedById: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + importedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + originalPackageId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + originalOrgId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + snapshotVersion: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + share: z.union([ z.lazy(() => TemplateShareRelationFilterSchema),z.lazy(() => TemplateShareWhereInputSchema) ]).optional(), + organization: z.union([ z.lazy(() => OrganizationRelationFilterSchema),z.lazy(() => OrganizationWhereInputSchema) ]).optional(), + templatePackage: z.union([ z.lazy(() => TemplatePackageRelationFilterSchema),z.lazy(() => TemplatePackageWhereInputSchema) ]).optional(), +}).strict()); + +export const TemplateShareImportOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + shareId: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + templatePackageId: z.lazy(() => SortOrderSchema).optional(), + importedById: z.lazy(() => SortOrderSchema).optional(), + importedAt: z.lazy(() => SortOrderSchema).optional(), + originalPackageId: z.lazy(() => SortOrderSchema).optional(), + originalOrgId: z.lazy(() => SortOrderSchema).optional(), + snapshotVersion: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => TemplateShareImportCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => TemplateShareImportMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => TemplateShareImportMinOrderByAggregateInputSchema).optional() +}).strict(); + +export const TemplateShareImportScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateShareImportScalarWhereWithAggregatesInputSchema),z.lazy(() => TemplateShareImportScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateShareImportScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateShareImportScalarWhereWithAggregatesInputSchema),z.lazy(() => TemplateShareImportScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + shareId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + organizationId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + templatePackageId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + importedById: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + importedAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + originalPackageId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + originalOrgId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + snapshotVersion: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), +}).strict(); + export const PermissionCreateInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), name: z.string(), @@ -10620,7 +12078,12 @@ export const OrganizationCreateInputSchema: z.ZodType WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationUncheckedCreateInputSchema: z.ZodType = z.object({ @@ -10648,7 +12111,12 @@ export const OrganizationUncheckedCreateInputSchema: z.ZodType WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationUpdateInputSchema: z.ZodType = z.object({ @@ -10676,7 +12144,12 @@ export const OrganizationUpdateInputSchema: z.ZodType WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const OrganizationUncheckedUpdateInputSchema: z.ZodType = z.object({ @@ -10704,7 +12177,12 @@ export const OrganizationUncheckedUpdateInputSchema: z.ZodType WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const OrganizationCreateManyInputSchema: z.ZodType = z.object({ @@ -14619,6 +16097,430 @@ export const FinancialReportScheduleUncheckedUpdateManyInputSchema: z.ZodType DateTimeFieldUpdateOperationsInputSchema) ]).optional(), }).strict(); +export const TemplatePackageCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string(), + description: z.string().optional().nullable(), + category: z.string().optional().nullable(), + version: z.string(), + visibility: z.lazy(() => TemplateVisibilitySchema).optional(), + status: z.lazy(() => TemplateStatusSchema).optional(), + iconUrl: z.string().optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + assetsCount: z.number().int().optional(), + sizeBytes: z.number().int().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + organization: z.lazy(() => OrganizationCreateNestedOneWithoutTemplatePackagesInputSchema).optional(), + versions: z.lazy(() => TemplateVersionCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + shares: z.lazy(() => TemplateShareCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutTemplatePackageInputSchema).optional() +}).strict(); + +export const TemplatePackageUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + organizationId: z.string().optional().nullable(), + name: z.string(), + description: z.string().optional().nullable(), + category: z.string().optional().nullable(), + version: z.string(), + visibility: z.lazy(() => TemplateVisibilitySchema).optional(), + status: z.lazy(() => TemplateStatusSchema).optional(), + iconUrl: z.string().optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + assetsCount: z.number().int().optional(), + sizeBytes: z.number().int().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + versions: z.lazy(() => TemplateVersionUncheckedCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + shares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutTemplatePackageInputSchema).optional() +}).strict(); + +export const TemplatePackageUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + category: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + visibility: z.union([ z.lazy(() => TemplateVisibilitySchema),z.lazy(() => EnumTemplateVisibilityFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateStatusSchema),z.lazy(() => EnumTemplateStatusFieldUpdateOperationsInputSchema) ]).optional(), + iconUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + assetsCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + sizeBytes: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + organization: z.lazy(() => OrganizationUpdateOneWithoutTemplatePackagesNestedInputSchema).optional(), + versions: z.lazy(() => TemplateVersionUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + shares: z.lazy(() => TemplateShareUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutTemplatePackageNestedInputSchema).optional() +}).strict(); + +export const TemplatePackageUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + category: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + visibility: z.union([ z.lazy(() => TemplateVisibilitySchema),z.lazy(() => EnumTemplateVisibilityFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateStatusSchema),z.lazy(() => EnumTemplateStatusFieldUpdateOperationsInputSchema) ]).optional(), + iconUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + assetsCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + sizeBytes: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + versions: z.lazy(() => TemplateVersionUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + shares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema).optional() +}).strict(); + +export const TemplatePackageCreateManyInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + organizationId: z.string().optional().nullable(), + name: z.string(), + description: z.string().optional().nullable(), + category: z.string().optional().nullable(), + version: z.string(), + visibility: z.lazy(() => TemplateVisibilitySchema).optional(), + status: z.lazy(() => TemplateStatusSchema).optional(), + iconUrl: z.string().optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + assetsCount: z.number().int().optional(), + sizeBytes: z.number().int().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional() +}).strict(); + +export const TemplatePackageUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + category: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + visibility: z.union([ z.lazy(() => TemplateVisibilitySchema),z.lazy(() => EnumTemplateVisibilityFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateStatusSchema),z.lazy(() => EnumTemplateStatusFieldUpdateOperationsInputSchema) ]).optional(), + iconUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + assetsCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + sizeBytes: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplatePackageUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + category: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + visibility: z.union([ z.lazy(() => TemplateVisibilitySchema),z.lazy(() => EnumTemplateVisibilityFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateStatusSchema),z.lazy(() => EnumTemplateStatusFieldUpdateOperationsInputSchema) ]).optional(), + iconUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + assetsCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + sizeBytes: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateVersionCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + version: z.string(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + changelog: z.string().optional().nullable(), + isActive: z.boolean().optional(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + templatePackage: z.lazy(() => TemplatePackageCreateNestedOneWithoutVersionsInputSchema), + installations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutTemplateVersionInputSchema).optional() +}).strict(); + +export const TemplateVersionUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + templatePackageId: z.string(), + version: z.string(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + changelog: z.string().optional().nullable(), + isActive: z.boolean().optional(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + installations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutTemplateVersionInputSchema).optional() +}).strict(); + +export const TemplateVersionUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + changelog: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + isActive: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + templatePackage: z.lazy(() => TemplatePackageUpdateOneRequiredWithoutVersionsNestedInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationUpdateManyWithoutTemplateVersionNestedInputSchema).optional() +}).strict(); + +export const TemplateVersionUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + changelog: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + isActive: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + installations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutTemplateVersionNestedInputSchema).optional() +}).strict(); + +export const TemplateVersionCreateManyInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + templatePackageId: z.string(), + version: z.string(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + changelog: z.string().optional().nullable(), + isActive: z.boolean().optional(), + createdById: z.string(), + createdAt: z.coerce.date().optional() +}).strict(); + +export const TemplateVersionUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + changelog: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + isActive: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateVersionUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + changelog: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + isActive: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateInstallationCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + status: z.lazy(() => TemplateInstallStatusSchema).optional(), + strategy: z.lazy(() => TemplateInstallStrategySchema).optional(), + namePrefix: z.string().optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.string().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + completedAt: z.coerce.date().optional().nullable(), + organization: z.lazy(() => OrganizationCreateNestedOneWithoutTemplateInstallationsInputSchema), + templatePackage: z.lazy(() => TemplatePackageCreateNestedOneWithoutInstallationsInputSchema).optional(), + templateVersion: z.lazy(() => TemplateVersionCreateNestedOneWithoutInstallationsInputSchema).optional(), + items: z.lazy(() => TemplateInstallItemCreateNestedManyWithoutInstallationInputSchema).optional() +}).strict(); + +export const TemplateInstallationUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + organizationId: z.string(), + templatePackageId: z.string().optional().nullable(), + templateVersionId: z.string().optional().nullable(), + status: z.lazy(() => TemplateInstallStatusSchema).optional(), + strategy: z.lazy(() => TemplateInstallStrategySchema).optional(), + namePrefix: z.string().optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.string().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + completedAt: z.coerce.date().optional().nullable(), + items: z.lazy(() => TemplateInstallItemUncheckedCreateNestedManyWithoutInstallationInputSchema).optional() +}).strict(); + +export const TemplateInstallationUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateInstallStatusSchema),z.lazy(() => EnumTemplateInstallStatusFieldUpdateOperationsInputSchema) ]).optional(), + strategy: z.union([ z.lazy(() => TemplateInstallStrategySchema),z.lazy(() => EnumTemplateInstallStrategyFieldUpdateOperationsInputSchema) ]).optional(), + namePrefix: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + completedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + organization: z.lazy(() => OrganizationUpdateOneRequiredWithoutTemplateInstallationsNestedInputSchema).optional(), + templatePackage: z.lazy(() => TemplatePackageUpdateOneWithoutInstallationsNestedInputSchema).optional(), + templateVersion: z.lazy(() => TemplateVersionUpdateOneWithoutInstallationsNestedInputSchema).optional(), + items: z.lazy(() => TemplateInstallItemUpdateManyWithoutInstallationNestedInputSchema).optional() +}).strict(); + +export const TemplateInstallationUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + templateVersionId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateInstallStatusSchema),z.lazy(() => EnumTemplateInstallStatusFieldUpdateOperationsInputSchema) ]).optional(), + strategy: z.union([ z.lazy(() => TemplateInstallStrategySchema),z.lazy(() => EnumTemplateInstallStrategyFieldUpdateOperationsInputSchema) ]).optional(), + namePrefix: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + completedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + items: z.lazy(() => TemplateInstallItemUncheckedUpdateManyWithoutInstallationNestedInputSchema).optional() +}).strict(); + +export const TemplateInstallationCreateManyInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + organizationId: z.string(), + templatePackageId: z.string().optional().nullable(), + templateVersionId: z.string().optional().nullable(), + status: z.lazy(() => TemplateInstallStatusSchema).optional(), + strategy: z.lazy(() => TemplateInstallStrategySchema).optional(), + namePrefix: z.string().optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.string().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + completedAt: z.coerce.date().optional().nullable() +}).strict(); + +export const TemplateInstallationUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateInstallStatusSchema),z.lazy(() => EnumTemplateInstallStatusFieldUpdateOperationsInputSchema) ]).optional(), + strategy: z.union([ z.lazy(() => TemplateInstallStrategySchema),z.lazy(() => EnumTemplateInstallStrategyFieldUpdateOperationsInputSchema) ]).optional(), + namePrefix: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + completedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const TemplateInstallationUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + templateVersionId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateInstallStatusSchema),z.lazy(() => EnumTemplateInstallStatusFieldUpdateOperationsInputSchema) ]).optional(), + strategy: z.union([ z.lazy(() => TemplateInstallStrategySchema),z.lazy(() => EnumTemplateInstallStrategyFieldUpdateOperationsInputSchema) ]).optional(), + namePrefix: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + completedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const TemplateInstallItemCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + assetType: z.lazy(() => TemplateAssetTypeSchema), + sourceKey: z.string(), + createdModel: z.string().optional().nullable(), + createdId: z.string().optional().nullable(), + status: z.lazy(() => TemplateItemStatusSchema).optional(), + details: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.coerce.date().optional(), + installation: z.lazy(() => TemplateInstallationCreateNestedOneWithoutItemsInputSchema) +}).strict(); + +export const TemplateInstallItemUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + installationId: z.string(), + assetType: z.lazy(() => TemplateAssetTypeSchema), + sourceKey: z.string(), + createdModel: z.string().optional().nullable(), + createdId: z.string().optional().nullable(), + status: z.lazy(() => TemplateItemStatusSchema).optional(), + details: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.coerce.date().optional() +}).strict(); + +export const TemplateInstallItemUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + assetType: z.union([ z.lazy(() => TemplateAssetTypeSchema),z.lazy(() => EnumTemplateAssetTypeFieldUpdateOperationsInputSchema) ]).optional(), + sourceKey: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdModel: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateItemStatusSchema),z.lazy(() => EnumTemplateItemStatusFieldUpdateOperationsInputSchema) ]).optional(), + details: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + installation: z.lazy(() => TemplateInstallationUpdateOneRequiredWithoutItemsNestedInputSchema).optional() +}).strict(); + +export const TemplateInstallItemUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + installationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + assetType: z.union([ z.lazy(() => TemplateAssetTypeSchema),z.lazy(() => EnumTemplateAssetTypeFieldUpdateOperationsInputSchema) ]).optional(), + sourceKey: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdModel: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateItemStatusSchema),z.lazy(() => EnumTemplateItemStatusFieldUpdateOperationsInputSchema) ]).optional(), + details: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateInstallItemCreateManyInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + installationId: z.string(), + assetType: z.lazy(() => TemplateAssetTypeSchema), + sourceKey: z.string(), + createdModel: z.string().optional().nullable(), + createdId: z.string().optional().nullable(), + status: z.lazy(() => TemplateItemStatusSchema).optional(), + details: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.coerce.date().optional() +}).strict(); + +export const TemplateInstallItemUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + assetType: z.union([ z.lazy(() => TemplateAssetTypeSchema),z.lazy(() => EnumTemplateAssetTypeFieldUpdateOperationsInputSchema) ]).optional(), + sourceKey: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdModel: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateItemStatusSchema),z.lazy(() => EnumTemplateItemStatusFieldUpdateOperationsInputSchema) ]).optional(), + details: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateInstallItemUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + installationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + assetType: z.union([ z.lazy(() => TemplateAssetTypeSchema),z.lazy(() => EnumTemplateAssetTypeFieldUpdateOperationsInputSchema) ]).optional(), + sourceKey: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdModel: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateItemStatusSchema),z.lazy(() => EnumTemplateItemStatusFieldUpdateOperationsInputSchema) ]).optional(), + details: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + export const WorkflowCreateInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), name: z.string(), @@ -14813,6 +16715,68 @@ export const WorkflowUncheckedUpdateManyInputSchema: z.ZodType DateTimeFieldUpdateOperationsInputSchema) ]).optional(), }).strict(); +export const OrganizationUiConfigCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + key: z.string(), + config: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + organization: z.lazy(() => OrganizationCreateNestedOneWithoutUiConfigsInputSchema) +}).strict(); + +export const OrganizationUiConfigUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + organizationId: z.string(), + key: z.string(), + config: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional() +}).strict(); + +export const OrganizationUiConfigUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + key: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + config: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + organization: z.lazy(() => OrganizationUpdateOneRequiredWithoutUiConfigsNestedInputSchema).optional() +}).strict(); + +export const OrganizationUiConfigUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + key: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + config: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const OrganizationUiConfigCreateManyInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + organizationId: z.string(), + key: z.string(), + config: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional() +}).strict(); + +export const OrganizationUiConfigUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + key: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + config: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const OrganizationUiConfigUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + key: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + config: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + export const WorkflowTriggerCreateInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), name: z.string(), @@ -17214,6 +19178,417 @@ export const WorkflowAnalyticsUncheckedUpdateManyInputSchema: z.ZodType DateTimeFieldUpdateOperationsInputSchema) ]).optional(), }).strict(); +export const TemplateShareCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + shareMode: z.lazy(() => TemplateShareModeSchema).optional(), + tokenHash: z.string().optional().nullable(), + expiresAt: z.coerce.date().optional().nullable(), + maxUses: z.number().int().optional().nullable(), + allowExternal: z.boolean().optional(), + notes: z.string().optional().nullable(), + status: z.lazy(() => TemplateShareStatusSchema).optional(), + usageCount: z.number().int().optional(), + lastAccessedAt: z.coerce.date().optional().nullable(), + revokedAt: z.coerce.date().optional().nullable(), + revokedById: z.string().optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + snapshotVersion: z.string(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + templatePackage: z.lazy(() => TemplatePackageCreateNestedOneWithoutSharesInputSchema), + organization: z.lazy(() => OrganizationCreateNestedOneWithoutTemplateSharesInputSchema), + recipients: z.lazy(() => TemplateShareRecipientCreateNestedManyWithoutShareInputSchema).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogCreateNestedManyWithoutShareInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutShareInputSchema).optional() +}).strict(); + +export const TemplateShareUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + templatePackageId: z.string(), + organizationId: z.string(), + name: z.string().optional().nullable(), + shareMode: z.lazy(() => TemplateShareModeSchema).optional(), + tokenHash: z.string().optional().nullable(), + expiresAt: z.coerce.date().optional().nullable(), + maxUses: z.number().int().optional().nullable(), + allowExternal: z.boolean().optional(), + notes: z.string().optional().nullable(), + status: z.lazy(() => TemplateShareStatusSchema).optional(), + usageCount: z.number().int().optional(), + lastAccessedAt: z.coerce.date().optional().nullable(), + revokedAt: z.coerce.date().optional().nullable(), + revokedById: z.string().optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + snapshotVersion: z.string(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + recipients: z.lazy(() => TemplateShareRecipientUncheckedCreateNestedManyWithoutShareInputSchema).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogUncheckedCreateNestedManyWithoutShareInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutShareInputSchema).optional() +}).strict(); + +export const TemplateShareUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + shareMode: z.union([ z.lazy(() => TemplateShareModeSchema),z.lazy(() => EnumTemplateShareModeFieldUpdateOperationsInputSchema) ]).optional(), + tokenHash: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + maxUses: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + allowExternal: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + notes: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateShareStatusSchema),z.lazy(() => EnumTemplateShareStatusFieldUpdateOperationsInputSchema) ]).optional(), + usageCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + lastAccessedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + templatePackage: z.lazy(() => TemplatePackageUpdateOneRequiredWithoutSharesNestedInputSchema).optional(), + organization: z.lazy(() => OrganizationUpdateOneRequiredWithoutTemplateSharesNestedInputSchema).optional(), + recipients: z.lazy(() => TemplateShareRecipientUpdateManyWithoutShareNestedInputSchema).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogUpdateManyWithoutShareNestedInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportUpdateManyWithoutShareNestedInputSchema).optional() +}).strict(); + +export const TemplateShareUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + shareMode: z.union([ z.lazy(() => TemplateShareModeSchema),z.lazy(() => EnumTemplateShareModeFieldUpdateOperationsInputSchema) ]).optional(), + tokenHash: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + maxUses: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + allowExternal: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + notes: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateShareStatusSchema),z.lazy(() => EnumTemplateShareStatusFieldUpdateOperationsInputSchema) ]).optional(), + usageCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + lastAccessedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + recipients: z.lazy(() => TemplateShareRecipientUncheckedUpdateManyWithoutShareNestedInputSchema).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogUncheckedUpdateManyWithoutShareNestedInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutShareNestedInputSchema).optional() +}).strict(); + +export const TemplateShareCreateManyInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + templatePackageId: z.string(), + organizationId: z.string(), + name: z.string().optional().nullable(), + shareMode: z.lazy(() => TemplateShareModeSchema).optional(), + tokenHash: z.string().optional().nullable(), + expiresAt: z.coerce.date().optional().nullable(), + maxUses: z.number().int().optional().nullable(), + allowExternal: z.boolean().optional(), + notes: z.string().optional().nullable(), + status: z.lazy(() => TemplateShareStatusSchema).optional(), + usageCount: z.number().int().optional(), + lastAccessedAt: z.coerce.date().optional().nullable(), + revokedAt: z.coerce.date().optional().nullable(), + revokedById: z.string().optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + snapshotVersion: z.string(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional() +}).strict(); + +export const TemplateShareUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + shareMode: z.union([ z.lazy(() => TemplateShareModeSchema),z.lazy(() => EnumTemplateShareModeFieldUpdateOperationsInputSchema) ]).optional(), + tokenHash: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + maxUses: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + allowExternal: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + notes: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateShareStatusSchema),z.lazy(() => EnumTemplateShareStatusFieldUpdateOperationsInputSchema) ]).optional(), + usageCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + lastAccessedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + shareMode: z.union([ z.lazy(() => TemplateShareModeSchema),z.lazy(() => EnumTemplateShareModeFieldUpdateOperationsInputSchema) ]).optional(), + tokenHash: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + maxUses: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + allowExternal: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + notes: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateShareStatusSchema),z.lazy(() => EnumTemplateShareStatusFieldUpdateOperationsInputSchema) ]).optional(), + usageCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + lastAccessedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareRecipientCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + email: z.string(), + status: z.lazy(() => TemplateShareRecipientStatusSchema).optional(), + invitedAt: z.coerce.date().optional(), + viewedAt: z.coerce.date().optional().nullable(), + importedAt: z.coerce.date().optional().nullable(), + share: z.lazy(() => TemplateShareCreateNestedOneWithoutRecipientsInputSchema) +}).strict(); + +export const TemplateShareRecipientUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + shareId: z.string(), + email: z.string(), + status: z.lazy(() => TemplateShareRecipientStatusSchema).optional(), + invitedAt: z.coerce.date().optional(), + viewedAt: z.coerce.date().optional().nullable(), + importedAt: z.coerce.date().optional().nullable() +}).strict(); + +export const TemplateShareRecipientUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateShareRecipientStatusSchema),z.lazy(() => EnumTemplateShareRecipientStatusFieldUpdateOperationsInputSchema) ]).optional(), + invitedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + viewedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + importedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + share: z.lazy(() => TemplateShareUpdateOneRequiredWithoutRecipientsNestedInputSchema).optional() +}).strict(); + +export const TemplateShareRecipientUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + shareId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateShareRecipientStatusSchema),z.lazy(() => EnumTemplateShareRecipientStatusFieldUpdateOperationsInputSchema) ]).optional(), + invitedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + viewedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + importedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const TemplateShareRecipientCreateManyInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + shareId: z.string(), + email: z.string(), + status: z.lazy(() => TemplateShareRecipientStatusSchema).optional(), + invitedAt: z.coerce.date().optional(), + viewedAt: z.coerce.date().optional().nullable(), + importedAt: z.coerce.date().optional().nullable() +}).strict(); + +export const TemplateShareRecipientUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateShareRecipientStatusSchema),z.lazy(() => EnumTemplateShareRecipientStatusFieldUpdateOperationsInputSchema) ]).optional(), + invitedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + viewedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + importedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const TemplateShareRecipientUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + shareId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateShareRecipientStatusSchema),z.lazy(() => EnumTemplateShareRecipientStatusFieldUpdateOperationsInputSchema) ]).optional(), + invitedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + viewedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + importedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const TemplateShareAccessLogCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + action: z.lazy(() => TemplateShareAccessActionSchema), + status: z.lazy(() => TemplateShareAccessStatusSchema), + recipientEmail: z.string().optional().nullable(), + userAgent: z.string().optional().nullable(), + ipAddress: z.string().optional().nullable(), + errorMessage: z.string().optional().nullable(), + metadata: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.coerce.date().optional(), + share: z.lazy(() => TemplateShareCreateNestedOneWithoutAccessLogsInputSchema) +}).strict(); + +export const TemplateShareAccessLogUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + shareId: z.string(), + action: z.lazy(() => TemplateShareAccessActionSchema), + status: z.lazy(() => TemplateShareAccessStatusSchema), + recipientEmail: z.string().optional().nullable(), + userAgent: z.string().optional().nullable(), + ipAddress: z.string().optional().nullable(), + errorMessage: z.string().optional().nullable(), + metadata: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.coerce.date().optional() +}).strict(); + +export const TemplateShareAccessLogUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + action: z.union([ z.lazy(() => TemplateShareAccessActionSchema),z.lazy(() => EnumTemplateShareAccessActionFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateShareAccessStatusSchema),z.lazy(() => EnumTemplateShareAccessStatusFieldUpdateOperationsInputSchema) ]).optional(), + recipientEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + userAgent: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + ipAddress: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + errorMessage: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + metadata: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + share: z.lazy(() => TemplateShareUpdateOneRequiredWithoutAccessLogsNestedInputSchema).optional() +}).strict(); + +export const TemplateShareAccessLogUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + shareId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + action: z.union([ z.lazy(() => TemplateShareAccessActionSchema),z.lazy(() => EnumTemplateShareAccessActionFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateShareAccessStatusSchema),z.lazy(() => EnumTemplateShareAccessStatusFieldUpdateOperationsInputSchema) ]).optional(), + recipientEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + userAgent: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + ipAddress: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + errorMessage: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + metadata: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareAccessLogCreateManyInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + shareId: z.string(), + action: z.lazy(() => TemplateShareAccessActionSchema), + status: z.lazy(() => TemplateShareAccessStatusSchema), + recipientEmail: z.string().optional().nullable(), + userAgent: z.string().optional().nullable(), + ipAddress: z.string().optional().nullable(), + errorMessage: z.string().optional().nullable(), + metadata: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.coerce.date().optional() +}).strict(); + +export const TemplateShareAccessLogUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + action: z.union([ z.lazy(() => TemplateShareAccessActionSchema),z.lazy(() => EnumTemplateShareAccessActionFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateShareAccessStatusSchema),z.lazy(() => EnumTemplateShareAccessStatusFieldUpdateOperationsInputSchema) ]).optional(), + recipientEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + userAgent: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + ipAddress: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + errorMessage: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + metadata: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareAccessLogUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + shareId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + action: z.union([ z.lazy(() => TemplateShareAccessActionSchema),z.lazy(() => EnumTemplateShareAccessActionFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateShareAccessStatusSchema),z.lazy(() => EnumTemplateShareAccessStatusFieldUpdateOperationsInputSchema) ]).optional(), + recipientEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + userAgent: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + ipAddress: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + errorMessage: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + metadata: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareImportCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + importedById: z.string(), + importedAt: z.coerce.date().optional(), + originalPackageId: z.string(), + originalOrgId: z.string(), + snapshotVersion: z.string(), + share: z.lazy(() => TemplateShareCreateNestedOneWithoutImportsInputSchema), + organization: z.lazy(() => OrganizationCreateNestedOneWithoutTemplateShareImportsInputSchema), + templatePackage: z.lazy(() => TemplatePackageCreateNestedOneWithoutShareImportsInputSchema) +}).strict(); + +export const TemplateShareImportUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + shareId: z.string(), + organizationId: z.string(), + templatePackageId: z.string(), + importedById: z.string(), + importedAt: z.coerce.date().optional(), + originalPackageId: z.string(), + originalOrgId: z.string(), + snapshotVersion: z.string() +}).strict(); + +export const TemplateShareImportUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + originalPackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + originalOrgId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + share: z.lazy(() => TemplateShareUpdateOneRequiredWithoutImportsNestedInputSchema).optional(), + organization: z.lazy(() => OrganizationUpdateOneRequiredWithoutTemplateShareImportsNestedInputSchema).optional(), + templatePackage: z.lazy(() => TemplatePackageUpdateOneRequiredWithoutShareImportsNestedInputSchema).optional() +}).strict(); + +export const TemplateShareImportUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + shareId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + originalPackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + originalOrgId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareImportCreateManyInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + shareId: z.string(), + organizationId: z.string(), + templatePackageId: z.string(), + importedById: z.string(), + importedAt: z.coerce.date().optional(), + originalPackageId: z.string(), + originalOrgId: z.string(), + snapshotVersion: z.string() +}).strict(); + +export const TemplateShareImportUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + originalPackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + originalOrgId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareImportUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + shareId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + originalPackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + originalOrgId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + export const StringFilterSchema: z.ZodType = z.object({ equals: z.string().optional(), in: z.string().array().optional(), @@ -17604,6 +19979,36 @@ export const IntegrationConfigListRelationFilterSchema: z.ZodType IntegrationConfigWhereInputSchema).optional() }).strict(); +export const TemplatePackageListRelationFilterSchema: z.ZodType = z.object({ + every: z.lazy(() => TemplatePackageWhereInputSchema).optional(), + some: z.lazy(() => TemplatePackageWhereInputSchema).optional(), + none: z.lazy(() => TemplatePackageWhereInputSchema).optional() +}).strict(); + +export const TemplateInstallationListRelationFilterSchema: z.ZodType = z.object({ + every: z.lazy(() => TemplateInstallationWhereInputSchema).optional(), + some: z.lazy(() => TemplateInstallationWhereInputSchema).optional(), + none: z.lazy(() => TemplateInstallationWhereInputSchema).optional() +}).strict(); + +export const TemplateShareListRelationFilterSchema: z.ZodType = z.object({ + every: z.lazy(() => TemplateShareWhereInputSchema).optional(), + some: z.lazy(() => TemplateShareWhereInputSchema).optional(), + none: z.lazy(() => TemplateShareWhereInputSchema).optional() +}).strict(); + +export const TemplateShareImportListRelationFilterSchema: z.ZodType = z.object({ + every: z.lazy(() => TemplateShareImportWhereInputSchema).optional(), + some: z.lazy(() => TemplateShareImportWhereInputSchema).optional(), + none: z.lazy(() => TemplateShareImportWhereInputSchema).optional() +}).strict(); + +export const OrganizationUiConfigListRelationFilterSchema: z.ZodType = z.object({ + every: z.lazy(() => OrganizationUiConfigWhereInputSchema).optional(), + some: z.lazy(() => OrganizationUiConfigWhereInputSchema).optional(), + none: z.lazy(() => OrganizationUiConfigWhereInputSchema).optional() +}).strict(); + export const CustomerOrderByRelationAggregateInputSchema: z.ZodType = z.object({ _count: z.lazy(() => SortOrderSchema).optional() }).strict(); @@ -17668,6 +20073,26 @@ export const IntegrationConfigOrderByRelationAggregateInputSchema: z.ZodType SortOrderSchema).optional() }).strict(); +export const TemplatePackageOrderByRelationAggregateInputSchema: z.ZodType = z.object({ + _count: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateInstallationOrderByRelationAggregateInputSchema: z.ZodType = z.object({ + _count: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateShareOrderByRelationAggregateInputSchema: z.ZodType = z.object({ + _count: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateShareImportOrderByRelationAggregateInputSchema: z.ZodType = z.object({ + _count: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const OrganizationUiConfigOrderByRelationAggregateInputSchema: z.ZodType = z.object({ + _count: z.lazy(() => SortOrderSchema).optional() +}).strict(); + export const OrganizationCountOrderByAggregateInputSchema: z.ZodType = z.object({ id: z.lazy(() => SortOrderSchema).optional(), name: z.lazy(() => SortOrderSchema).optional(), @@ -20604,6 +23029,330 @@ export const EnumFinancialReportScheduleFrequencyWithAggregatesFilterSchema: z.Z _max: z.lazy(() => NestedEnumFinancialReportScheduleFrequencyFilterSchema).optional() }).strict(); +export const EnumTemplateVisibilityFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateVisibilitySchema).optional(), + in: z.lazy(() => TemplateVisibilitySchema).array().optional(), + notIn: z.lazy(() => TemplateVisibilitySchema).array().optional(), + not: z.union([ z.lazy(() => TemplateVisibilitySchema),z.lazy(() => NestedEnumTemplateVisibilityFilterSchema) ]).optional(), +}).strict(); + +export const EnumTemplateStatusFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateStatusSchema).optional(), + in: z.lazy(() => TemplateStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateStatusSchema),z.lazy(() => NestedEnumTemplateStatusFilterSchema) ]).optional(), +}).strict(); + +export const OrganizationNullableRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => OrganizationWhereInputSchema).optional().nullable(), + isNot: z.lazy(() => OrganizationWhereInputSchema).optional().nullable() +}).strict(); + +export const TemplateVersionListRelationFilterSchema: z.ZodType = z.object({ + every: z.lazy(() => TemplateVersionWhereInputSchema).optional(), + some: z.lazy(() => TemplateVersionWhereInputSchema).optional(), + none: z.lazy(() => TemplateVersionWhereInputSchema).optional() +}).strict(); + +export const TemplateVersionOrderByRelationAggregateInputSchema: z.ZodType = z.object({ + _count: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplatePackageCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + description: z.lazy(() => SortOrderSchema).optional(), + category: z.lazy(() => SortOrderSchema).optional(), + version: z.lazy(() => SortOrderSchema).optional(), + visibility: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + iconUrl: z.lazy(() => SortOrderSchema).optional(), + tags: z.lazy(() => SortOrderSchema).optional(), + manifest: z.lazy(() => SortOrderSchema).optional(), + assetsCount: z.lazy(() => SortOrderSchema).optional(), + sizeBytes: z.lazy(() => SortOrderSchema).optional(), + createdById: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplatePackageAvgOrderByAggregateInputSchema: z.ZodType = z.object({ + assetsCount: z.lazy(() => SortOrderSchema).optional(), + sizeBytes: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplatePackageMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + description: z.lazy(() => SortOrderSchema).optional(), + category: z.lazy(() => SortOrderSchema).optional(), + version: z.lazy(() => SortOrderSchema).optional(), + visibility: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + iconUrl: z.lazy(() => SortOrderSchema).optional(), + assetsCount: z.lazy(() => SortOrderSchema).optional(), + sizeBytes: z.lazy(() => SortOrderSchema).optional(), + createdById: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplatePackageMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + description: z.lazy(() => SortOrderSchema).optional(), + category: z.lazy(() => SortOrderSchema).optional(), + version: z.lazy(() => SortOrderSchema).optional(), + visibility: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + iconUrl: z.lazy(() => SortOrderSchema).optional(), + assetsCount: z.lazy(() => SortOrderSchema).optional(), + sizeBytes: z.lazy(() => SortOrderSchema).optional(), + createdById: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplatePackageSumOrderByAggregateInputSchema: z.ZodType = z.object({ + assetsCount: z.lazy(() => SortOrderSchema).optional(), + sizeBytes: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const EnumTemplateVisibilityWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateVisibilitySchema).optional(), + in: z.lazy(() => TemplateVisibilitySchema).array().optional(), + notIn: z.lazy(() => TemplateVisibilitySchema).array().optional(), + not: z.union([ z.lazy(() => TemplateVisibilitySchema),z.lazy(() => NestedEnumTemplateVisibilityWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateVisibilityFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateVisibilityFilterSchema).optional() +}).strict(); + +export const EnumTemplateStatusWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateStatusSchema).optional(), + in: z.lazy(() => TemplateStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateStatusSchema),z.lazy(() => NestedEnumTemplateStatusWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateStatusFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateStatusFilterSchema).optional() +}).strict(); + +export const TemplatePackageRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => TemplatePackageWhereInputSchema).optional(), + isNot: z.lazy(() => TemplatePackageWhereInputSchema).optional() +}).strict(); + +export const TemplateVersionTemplatePackageIdVersionCompoundUniqueInputSchema: z.ZodType = z.object({ + templatePackageId: z.string(), + version: z.string() +}).strict(); + +export const TemplateVersionCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + templatePackageId: z.lazy(() => SortOrderSchema).optional(), + version: z.lazy(() => SortOrderSchema).optional(), + manifest: z.lazy(() => SortOrderSchema).optional(), + changelog: z.lazy(() => SortOrderSchema).optional(), + isActive: z.lazy(() => SortOrderSchema).optional(), + createdById: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateVersionMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + templatePackageId: z.lazy(() => SortOrderSchema).optional(), + version: z.lazy(() => SortOrderSchema).optional(), + changelog: z.lazy(() => SortOrderSchema).optional(), + isActive: z.lazy(() => SortOrderSchema).optional(), + createdById: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateVersionMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + templatePackageId: z.lazy(() => SortOrderSchema).optional(), + version: z.lazy(() => SortOrderSchema).optional(), + changelog: z.lazy(() => SortOrderSchema).optional(), + isActive: z.lazy(() => SortOrderSchema).optional(), + createdById: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const EnumTemplateInstallStatusFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateInstallStatusSchema).optional(), + in: z.lazy(() => TemplateInstallStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateInstallStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateInstallStatusSchema),z.lazy(() => NestedEnumTemplateInstallStatusFilterSchema) ]).optional(), +}).strict(); + +export const EnumTemplateInstallStrategyFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateInstallStrategySchema).optional(), + in: z.lazy(() => TemplateInstallStrategySchema).array().optional(), + notIn: z.lazy(() => TemplateInstallStrategySchema).array().optional(), + not: z.union([ z.lazy(() => TemplateInstallStrategySchema),z.lazy(() => NestedEnumTemplateInstallStrategyFilterSchema) ]).optional(), +}).strict(); + +export const TemplatePackageNullableRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => TemplatePackageWhereInputSchema).optional().nullable(), + isNot: z.lazy(() => TemplatePackageWhereInputSchema).optional().nullable() +}).strict(); + +export const TemplateVersionNullableRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => TemplateVersionWhereInputSchema).optional().nullable(), + isNot: z.lazy(() => TemplateVersionWhereInputSchema).optional().nullable() +}).strict(); + +export const TemplateInstallItemListRelationFilterSchema: z.ZodType = z.object({ + every: z.lazy(() => TemplateInstallItemWhereInputSchema).optional(), + some: z.lazy(() => TemplateInstallItemWhereInputSchema).optional(), + none: z.lazy(() => TemplateInstallItemWhereInputSchema).optional() +}).strict(); + +export const TemplateInstallItemOrderByRelationAggregateInputSchema: z.ZodType = z.object({ + _count: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateInstallationCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + templatePackageId: z.lazy(() => SortOrderSchema).optional(), + templateVersionId: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + strategy: z.lazy(() => SortOrderSchema).optional(), + namePrefix: z.lazy(() => SortOrderSchema).optional(), + preflight: z.lazy(() => SortOrderSchema).optional(), + logs: z.lazy(() => SortOrderSchema).optional(), + error: z.lazy(() => SortOrderSchema).optional(), + createdById: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + completedAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateInstallationMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + templatePackageId: z.lazy(() => SortOrderSchema).optional(), + templateVersionId: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + strategy: z.lazy(() => SortOrderSchema).optional(), + namePrefix: z.lazy(() => SortOrderSchema).optional(), + error: z.lazy(() => SortOrderSchema).optional(), + createdById: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + completedAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateInstallationMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + templatePackageId: z.lazy(() => SortOrderSchema).optional(), + templateVersionId: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + strategy: z.lazy(() => SortOrderSchema).optional(), + namePrefix: z.lazy(() => SortOrderSchema).optional(), + error: z.lazy(() => SortOrderSchema).optional(), + createdById: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + completedAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const EnumTemplateInstallStatusWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateInstallStatusSchema).optional(), + in: z.lazy(() => TemplateInstallStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateInstallStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateInstallStatusSchema),z.lazy(() => NestedEnumTemplateInstallStatusWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateInstallStatusFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateInstallStatusFilterSchema).optional() +}).strict(); + +export const EnumTemplateInstallStrategyWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateInstallStrategySchema).optional(), + in: z.lazy(() => TemplateInstallStrategySchema).array().optional(), + notIn: z.lazy(() => TemplateInstallStrategySchema).array().optional(), + not: z.union([ z.lazy(() => TemplateInstallStrategySchema),z.lazy(() => NestedEnumTemplateInstallStrategyWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateInstallStrategyFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateInstallStrategyFilterSchema).optional() +}).strict(); + +export const EnumTemplateAssetTypeFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateAssetTypeSchema).optional(), + in: z.lazy(() => TemplateAssetTypeSchema).array().optional(), + notIn: z.lazy(() => TemplateAssetTypeSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateAssetTypeSchema),z.lazy(() => NestedEnumTemplateAssetTypeFilterSchema) ]).optional(), +}).strict(); + +export const EnumTemplateItemStatusFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateItemStatusSchema).optional(), + in: z.lazy(() => TemplateItemStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateItemStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateItemStatusSchema),z.lazy(() => NestedEnumTemplateItemStatusFilterSchema) ]).optional(), +}).strict(); + +export const TemplateInstallationRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => TemplateInstallationWhereInputSchema).optional(), + isNot: z.lazy(() => TemplateInstallationWhereInputSchema).optional() +}).strict(); + +export const TemplateInstallItemCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + installationId: z.lazy(() => SortOrderSchema).optional(), + assetType: z.lazy(() => SortOrderSchema).optional(), + sourceKey: z.lazy(() => SortOrderSchema).optional(), + createdModel: z.lazy(() => SortOrderSchema).optional(), + createdId: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + details: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateInstallItemMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + installationId: z.lazy(() => SortOrderSchema).optional(), + assetType: z.lazy(() => SortOrderSchema).optional(), + sourceKey: z.lazy(() => SortOrderSchema).optional(), + createdModel: z.lazy(() => SortOrderSchema).optional(), + createdId: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateInstallItemMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + installationId: z.lazy(() => SortOrderSchema).optional(), + assetType: z.lazy(() => SortOrderSchema).optional(), + sourceKey: z.lazy(() => SortOrderSchema).optional(), + createdModel: z.lazy(() => SortOrderSchema).optional(), + createdId: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const EnumTemplateAssetTypeWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateAssetTypeSchema).optional(), + in: z.lazy(() => TemplateAssetTypeSchema).array().optional(), + notIn: z.lazy(() => TemplateAssetTypeSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateAssetTypeSchema),z.lazy(() => NestedEnumTemplateAssetTypeWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateAssetTypeFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateAssetTypeFilterSchema).optional() +}).strict(); + +export const EnumTemplateItemStatusWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateItemStatusSchema).optional(), + in: z.lazy(() => TemplateItemStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateItemStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateItemStatusSchema),z.lazy(() => NestedEnumTemplateItemStatusWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateItemStatusFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateItemStatusFilterSchema).optional() +}).strict(); + export const EnumWorkflowStatusFilterSchema: z.ZodType = z.object({ equals: z.lazy(() => WorkflowStatusSchema).optional(), in: z.lazy(() => WorkflowStatusSchema).array().optional(), @@ -20760,6 +23509,36 @@ export const EnumWorkflowStatusWithAggregatesFilterSchema: z.ZodType NestedEnumWorkflowStatusFilterSchema).optional() }).strict(); +export const OrganizationUiConfigOrganizationIdKeyCompoundUniqueInputSchema: z.ZodType = z.object({ + organizationId: z.string(), + key: z.string() +}).strict(); + +export const OrganizationUiConfigCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + key: z.lazy(() => SortOrderSchema).optional(), + config: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const OrganizationUiConfigMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + key: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const OrganizationUiConfigMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + key: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + export const EnumWorkflowTriggerTypeFilterSchema: z.ZodType = z.object({ equals: z.lazy(() => WorkflowTriggerTypeSchema).optional(), in: z.lazy(() => WorkflowTriggerTypeSchema).array().optional(), @@ -21123,11 +23902,6 @@ export const EnumActionTemplateCategoryFilterSchema: z.ZodType ActionTemplateCategorySchema),z.lazy(() => NestedEnumActionTemplateCategoryFilterSchema) ]).optional(), }).strict(); -export const OrganizationNullableRelationFilterSchema: z.ZodType = z.object({ - is: z.lazy(() => OrganizationWhereInputSchema).optional().nullable(), - isNot: z.lazy(() => OrganizationWhereInputSchema).optional().nullable() -}).strict(); - export const ActionTemplateVersionListRelationFilterSchema: z.ZodType = z.object({ every: z.lazy(() => ActionTemplateVersionWhereInputSchema).optional(), some: z.lazy(() => ActionTemplateVersionWhereInputSchema).optional(), @@ -22180,6 +24954,301 @@ export const WorkflowAnalyticsSumOrderByAggregateInputSchema: z.ZodType SortOrderSchema).optional() }).strict(); +export const EnumTemplateShareModeFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateShareModeSchema).optional(), + in: z.lazy(() => TemplateShareModeSchema).array().optional(), + notIn: z.lazy(() => TemplateShareModeSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateShareModeSchema),z.lazy(() => NestedEnumTemplateShareModeFilterSchema) ]).optional(), +}).strict(); + +export const EnumTemplateShareStatusFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateShareStatusSchema).optional(), + in: z.lazy(() => TemplateShareStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateShareStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateShareStatusSchema),z.lazy(() => NestedEnumTemplateShareStatusFilterSchema) ]).optional(), +}).strict(); + +export const TemplateShareRecipientListRelationFilterSchema: z.ZodType = z.object({ + every: z.lazy(() => TemplateShareRecipientWhereInputSchema).optional(), + some: z.lazy(() => TemplateShareRecipientWhereInputSchema).optional(), + none: z.lazy(() => TemplateShareRecipientWhereInputSchema).optional() +}).strict(); + +export const TemplateShareAccessLogListRelationFilterSchema: z.ZodType = z.object({ + every: z.lazy(() => TemplateShareAccessLogWhereInputSchema).optional(), + some: z.lazy(() => TemplateShareAccessLogWhereInputSchema).optional(), + none: z.lazy(() => TemplateShareAccessLogWhereInputSchema).optional() +}).strict(); + +export const TemplateShareRecipientOrderByRelationAggregateInputSchema: z.ZodType = z.object({ + _count: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateShareAccessLogOrderByRelationAggregateInputSchema: z.ZodType = z.object({ + _count: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateShareCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + templatePackageId: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + shareMode: z.lazy(() => SortOrderSchema).optional(), + tokenHash: z.lazy(() => SortOrderSchema).optional(), + expiresAt: z.lazy(() => SortOrderSchema).optional(), + maxUses: z.lazy(() => SortOrderSchema).optional(), + allowExternal: z.lazy(() => SortOrderSchema).optional(), + notes: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + usageCount: z.lazy(() => SortOrderSchema).optional(), + lastAccessedAt: z.lazy(() => SortOrderSchema).optional(), + revokedAt: z.lazy(() => SortOrderSchema).optional(), + revokedById: z.lazy(() => SortOrderSchema).optional(), + snapshotData: z.lazy(() => SortOrderSchema).optional(), + snapshotVersion: z.lazy(() => SortOrderSchema).optional(), + createdById: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateShareAvgOrderByAggregateInputSchema: z.ZodType = z.object({ + maxUses: z.lazy(() => SortOrderSchema).optional(), + usageCount: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateShareMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + templatePackageId: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + shareMode: z.lazy(() => SortOrderSchema).optional(), + tokenHash: z.lazy(() => SortOrderSchema).optional(), + expiresAt: z.lazy(() => SortOrderSchema).optional(), + maxUses: z.lazy(() => SortOrderSchema).optional(), + allowExternal: z.lazy(() => SortOrderSchema).optional(), + notes: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + usageCount: z.lazy(() => SortOrderSchema).optional(), + lastAccessedAt: z.lazy(() => SortOrderSchema).optional(), + revokedAt: z.lazy(() => SortOrderSchema).optional(), + revokedById: z.lazy(() => SortOrderSchema).optional(), + snapshotVersion: z.lazy(() => SortOrderSchema).optional(), + createdById: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateShareMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + templatePackageId: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + shareMode: z.lazy(() => SortOrderSchema).optional(), + tokenHash: z.lazy(() => SortOrderSchema).optional(), + expiresAt: z.lazy(() => SortOrderSchema).optional(), + maxUses: z.lazy(() => SortOrderSchema).optional(), + allowExternal: z.lazy(() => SortOrderSchema).optional(), + notes: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + usageCount: z.lazy(() => SortOrderSchema).optional(), + lastAccessedAt: z.lazy(() => SortOrderSchema).optional(), + revokedAt: z.lazy(() => SortOrderSchema).optional(), + revokedById: z.lazy(() => SortOrderSchema).optional(), + snapshotVersion: z.lazy(() => SortOrderSchema).optional(), + createdById: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateShareSumOrderByAggregateInputSchema: z.ZodType = z.object({ + maxUses: z.lazy(() => SortOrderSchema).optional(), + usageCount: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const EnumTemplateShareModeWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateShareModeSchema).optional(), + in: z.lazy(() => TemplateShareModeSchema).array().optional(), + notIn: z.lazy(() => TemplateShareModeSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateShareModeSchema),z.lazy(() => NestedEnumTemplateShareModeWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateShareModeFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateShareModeFilterSchema).optional() +}).strict(); + +export const EnumTemplateShareStatusWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateShareStatusSchema).optional(), + in: z.lazy(() => TemplateShareStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateShareStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateShareStatusSchema),z.lazy(() => NestedEnumTemplateShareStatusWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateShareStatusFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateShareStatusFilterSchema).optional() +}).strict(); + +export const EnumTemplateShareRecipientStatusFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateShareRecipientStatusSchema).optional(), + in: z.lazy(() => TemplateShareRecipientStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateShareRecipientStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateShareRecipientStatusSchema),z.lazy(() => NestedEnumTemplateShareRecipientStatusFilterSchema) ]).optional(), +}).strict(); + +export const TemplateShareRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => TemplateShareWhereInputSchema).optional(), + isNot: z.lazy(() => TemplateShareWhereInputSchema).optional() +}).strict(); + +export const TemplateShareRecipientShareIdEmailCompoundUniqueInputSchema: z.ZodType = z.object({ + shareId: z.string(), + email: z.string() +}).strict(); + +export const TemplateShareRecipientCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + shareId: z.lazy(() => SortOrderSchema).optional(), + email: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + invitedAt: z.lazy(() => SortOrderSchema).optional(), + viewedAt: z.lazy(() => SortOrderSchema).optional(), + importedAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateShareRecipientMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + shareId: z.lazy(() => SortOrderSchema).optional(), + email: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + invitedAt: z.lazy(() => SortOrderSchema).optional(), + viewedAt: z.lazy(() => SortOrderSchema).optional(), + importedAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateShareRecipientMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + shareId: z.lazy(() => SortOrderSchema).optional(), + email: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + invitedAt: z.lazy(() => SortOrderSchema).optional(), + viewedAt: z.lazy(() => SortOrderSchema).optional(), + importedAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const EnumTemplateShareRecipientStatusWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateShareRecipientStatusSchema).optional(), + in: z.lazy(() => TemplateShareRecipientStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateShareRecipientStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateShareRecipientStatusSchema),z.lazy(() => NestedEnumTemplateShareRecipientStatusWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateShareRecipientStatusFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateShareRecipientStatusFilterSchema).optional() +}).strict(); + +export const EnumTemplateShareAccessActionFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateShareAccessActionSchema).optional(), + in: z.lazy(() => TemplateShareAccessActionSchema).array().optional(), + notIn: z.lazy(() => TemplateShareAccessActionSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateShareAccessActionSchema),z.lazy(() => NestedEnumTemplateShareAccessActionFilterSchema) ]).optional(), +}).strict(); + +export const EnumTemplateShareAccessStatusFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateShareAccessStatusSchema).optional(), + in: z.lazy(() => TemplateShareAccessStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateShareAccessStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateShareAccessStatusSchema),z.lazy(() => NestedEnumTemplateShareAccessStatusFilterSchema) ]).optional(), +}).strict(); + +export const TemplateShareAccessLogCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + shareId: z.lazy(() => SortOrderSchema).optional(), + action: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + recipientEmail: z.lazy(() => SortOrderSchema).optional(), + userAgent: z.lazy(() => SortOrderSchema).optional(), + ipAddress: z.lazy(() => SortOrderSchema).optional(), + errorMessage: z.lazy(() => SortOrderSchema).optional(), + metadata: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateShareAccessLogMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + shareId: z.lazy(() => SortOrderSchema).optional(), + action: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + recipientEmail: z.lazy(() => SortOrderSchema).optional(), + userAgent: z.lazy(() => SortOrderSchema).optional(), + ipAddress: z.lazy(() => SortOrderSchema).optional(), + errorMessage: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateShareAccessLogMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + shareId: z.lazy(() => SortOrderSchema).optional(), + action: z.lazy(() => SortOrderSchema).optional(), + status: z.lazy(() => SortOrderSchema).optional(), + recipientEmail: z.lazy(() => SortOrderSchema).optional(), + userAgent: z.lazy(() => SortOrderSchema).optional(), + ipAddress: z.lazy(() => SortOrderSchema).optional(), + errorMessage: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const EnumTemplateShareAccessActionWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateShareAccessActionSchema).optional(), + in: z.lazy(() => TemplateShareAccessActionSchema).array().optional(), + notIn: z.lazy(() => TemplateShareAccessActionSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateShareAccessActionSchema),z.lazy(() => NestedEnumTemplateShareAccessActionWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateShareAccessActionFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateShareAccessActionFilterSchema).optional() +}).strict(); + +export const EnumTemplateShareAccessStatusWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateShareAccessStatusSchema).optional(), + in: z.lazy(() => TemplateShareAccessStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateShareAccessStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateShareAccessStatusSchema),z.lazy(() => NestedEnumTemplateShareAccessStatusWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateShareAccessStatusFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateShareAccessStatusFilterSchema).optional() +}).strict(); + +export const TemplateShareImportCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + shareId: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + templatePackageId: z.lazy(() => SortOrderSchema).optional(), + importedById: z.lazy(() => SortOrderSchema).optional(), + importedAt: z.lazy(() => SortOrderSchema).optional(), + originalPackageId: z.lazy(() => SortOrderSchema).optional(), + originalOrgId: z.lazy(() => SortOrderSchema).optional(), + snapshotVersion: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateShareImportMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + shareId: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + templatePackageId: z.lazy(() => SortOrderSchema).optional(), + importedById: z.lazy(() => SortOrderSchema).optional(), + importedAt: z.lazy(() => SortOrderSchema).optional(), + originalPackageId: z.lazy(() => SortOrderSchema).optional(), + originalOrgId: z.lazy(() => SortOrderSchema).optional(), + snapshotVersion: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TemplateShareImportMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + shareId: z.lazy(() => SortOrderSchema).optional(), + organizationId: z.lazy(() => SortOrderSchema).optional(), + templatePackageId: z.lazy(() => SortOrderSchema).optional(), + importedById: z.lazy(() => SortOrderSchema).optional(), + importedAt: z.lazy(() => SortOrderSchema).optional(), + originalPackageId: z.lazy(() => SortOrderSchema).optional(), + originalOrgId: z.lazy(() => SortOrderSchema).optional(), + snapshotVersion: z.lazy(() => SortOrderSchema).optional() +}).strict(); + export const RolePermissionCreateNestedManyWithoutPermissionInputSchema: z.ZodType = z.object({ create: z.union([ z.lazy(() => RolePermissionCreateWithoutPermissionInputSchema),z.lazy(() => RolePermissionCreateWithoutPermissionInputSchema).array(),z.lazy(() => RolePermissionUncheckedCreateWithoutPermissionInputSchema),z.lazy(() => RolePermissionUncheckedCreateWithoutPermissionInputSchema).array() ]).optional(), connectOrCreate: z.union([ z.lazy(() => RolePermissionCreateOrConnectWithoutPermissionInputSchema),z.lazy(() => RolePermissionCreateOrConnectWithoutPermissionInputSchema).array() ]).optional(), @@ -22543,6 +25612,41 @@ export const IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema: z. connect: z.union([ z.lazy(() => IntegrationConfigWhereUniqueInputSchema),z.lazy(() => IntegrationConfigWhereUniqueInputSchema).array() ]).optional(), }).strict(); +export const TemplatePackageCreateNestedManyWithoutOrganizationInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageCreateWithoutOrganizationInputSchema).array(),z.lazy(() => TemplatePackageUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplatePackageCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplatePackageCreateManyOrganizationInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplatePackageWhereUniqueInputSchema),z.lazy(() => TemplatePackageWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationCreateWithoutOrganizationInputSchema).array(),z.lazy(() => TemplateInstallationUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateInstallationCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateInstallationCreateManyOrganizationInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareCreateNestedManyWithoutOrganizationInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareCreateWithoutOrganizationInputSchema).array(),z.lazy(() => TemplateShareUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => TemplateShareCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareCreateManyOrganizationInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateShareWhereUniqueInputSchema),z.lazy(() => TemplateShareWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareImportCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportCreateWithoutOrganizationInputSchema).array(),z.lazy(() => TemplateShareImportUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareImportCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareImportCreateManyOrganizationInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => OrganizationUiConfigCreateWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigCreateWithoutOrganizationInputSchema).array(),z.lazy(() => OrganizationUiConfigUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => OrganizationUiConfigCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), + createMany: z.lazy(() => OrganizationUiConfigCreateManyOrganizationInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema),z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + export const UserOrganizationUncheckedCreateNestedManyWithoutOrganizationInputSchema: z.ZodType = z.object({ create: z.union([ z.lazy(() => UserOrganizationCreateWithoutOrganizationInputSchema),z.lazy(() => UserOrganizationCreateWithoutOrganizationInputSchema).array(),z.lazy(() => UserOrganizationUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => UserOrganizationUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), connectOrCreate: z.union([ z.lazy(() => UserOrganizationCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => UserOrganizationCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), @@ -22662,6 +25766,41 @@ export const IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputS connect: z.union([ z.lazy(() => IntegrationConfigWhereUniqueInputSchema),z.lazy(() => IntegrationConfigWhereUniqueInputSchema).array() ]).optional(), }).strict(); +export const TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageCreateWithoutOrganizationInputSchema).array(),z.lazy(() => TemplatePackageUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplatePackageCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplatePackageCreateManyOrganizationInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplatePackageWhereUniqueInputSchema),z.lazy(() => TemplatePackageWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationCreateWithoutOrganizationInputSchema).array(),z.lazy(() => TemplateInstallationUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateInstallationCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateInstallationCreateManyOrganizationInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareCreateWithoutOrganizationInputSchema).array(),z.lazy(() => TemplateShareUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => TemplateShareCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareCreateManyOrganizationInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateShareWhereUniqueInputSchema),z.lazy(() => TemplateShareWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareImportCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportCreateWithoutOrganizationInputSchema).array(),z.lazy(() => TemplateShareImportUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareImportCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareImportCreateManyOrganizationInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => OrganizationUiConfigCreateWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigCreateWithoutOrganizationInputSchema).array(),z.lazy(() => OrganizationUiConfigUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => OrganizationUiConfigCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), + createMany: z.lazy(() => OrganizationUiConfigCreateManyOrganizationInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema),z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + export const UserOrganizationUpdateManyWithoutOrganizationNestedInputSchema: z.ZodType = z.object({ create: z.union([ z.lazy(() => UserOrganizationCreateWithoutOrganizationInputSchema),z.lazy(() => UserOrganizationCreateWithoutOrganizationInputSchema).array(),z.lazy(() => UserOrganizationUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => UserOrganizationUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), connectOrCreate: z.union([ z.lazy(() => UserOrganizationCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => UserOrganizationCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), @@ -22900,6 +26039,76 @@ export const IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema: z. deleteMany: z.union([ z.lazy(() => IntegrationConfigScalarWhereInputSchema),z.lazy(() => IntegrationConfigScalarWhereInputSchema).array() ]).optional(), }).strict(); +export const TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageCreateWithoutOrganizationInputSchema).array(),z.lazy(() => TemplatePackageUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplatePackageCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplatePackageUpsertWithWhereUniqueWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageUpsertWithWhereUniqueWithoutOrganizationInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplatePackageCreateManyOrganizationInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplatePackageWhereUniqueInputSchema),z.lazy(() => TemplatePackageWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplatePackageWhereUniqueInputSchema),z.lazy(() => TemplatePackageWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplatePackageWhereUniqueInputSchema),z.lazy(() => TemplatePackageWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplatePackageWhereUniqueInputSchema),z.lazy(() => TemplatePackageWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplatePackageUpdateWithWhereUniqueWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageUpdateWithWhereUniqueWithoutOrganizationInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplatePackageUpdateManyWithWhereWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageUpdateManyWithWhereWithoutOrganizationInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplatePackageScalarWhereInputSchema),z.lazy(() => TemplatePackageScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationCreateWithoutOrganizationInputSchema).array(),z.lazy(() => TemplateInstallationUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateInstallationCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateInstallationUpsertWithWhereUniqueWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationUpsertWithWhereUniqueWithoutOrganizationInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateInstallationCreateManyOrganizationInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateInstallationUpdateWithWhereUniqueWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationUpdateWithWhereUniqueWithoutOrganizationInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateInstallationUpdateManyWithWhereWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationUpdateManyWithWhereWithoutOrganizationInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateInstallationScalarWhereInputSchema),z.lazy(() => TemplateInstallationScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareUpdateManyWithoutOrganizationNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareCreateWithoutOrganizationInputSchema).array(),z.lazy(() => TemplateShareUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => TemplateShareCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateShareUpsertWithWhereUniqueWithoutOrganizationInputSchema),z.lazy(() => TemplateShareUpsertWithWhereUniqueWithoutOrganizationInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareCreateManyOrganizationInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateShareWhereUniqueInputSchema),z.lazy(() => TemplateShareWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateShareWhereUniqueInputSchema),z.lazy(() => TemplateShareWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateShareWhereUniqueInputSchema),z.lazy(() => TemplateShareWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateShareWhereUniqueInputSchema),z.lazy(() => TemplateShareWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateShareUpdateWithWhereUniqueWithoutOrganizationInputSchema),z.lazy(() => TemplateShareUpdateWithWhereUniqueWithoutOrganizationInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateShareUpdateManyWithWhereWithoutOrganizationInputSchema),z.lazy(() => TemplateShareUpdateManyWithWhereWithoutOrganizationInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateShareScalarWhereInputSchema),z.lazy(() => TemplateShareScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareImportCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportCreateWithoutOrganizationInputSchema).array(),z.lazy(() => TemplateShareImportUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareImportCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateShareImportUpsertWithWhereUniqueWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportUpsertWithWhereUniqueWithoutOrganizationInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareImportCreateManyOrganizationInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateShareImportUpdateWithWhereUniqueWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportUpdateWithWhereUniqueWithoutOrganizationInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateShareImportUpdateManyWithWhereWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportUpdateManyWithWhereWithoutOrganizationInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateShareImportScalarWhereInputSchema),z.lazy(() => TemplateShareImportScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => OrganizationUiConfigCreateWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigCreateWithoutOrganizationInputSchema).array(),z.lazy(() => OrganizationUiConfigUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => OrganizationUiConfigCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => OrganizationUiConfigUpsertWithWhereUniqueWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigUpsertWithWhereUniqueWithoutOrganizationInputSchema).array() ]).optional(), + createMany: z.lazy(() => OrganizationUiConfigCreateManyOrganizationInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema),z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema),z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema),z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema),z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => OrganizationUiConfigUpdateWithWhereUniqueWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigUpdateWithWhereUniqueWithoutOrganizationInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => OrganizationUiConfigUpdateManyWithWhereWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigUpdateManyWithWhereWithoutOrganizationInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => OrganizationUiConfigScalarWhereInputSchema),z.lazy(() => OrganizationUiConfigScalarWhereInputSchema).array() ]).optional(), +}).strict(); + export const UserOrganizationUncheckedUpdateManyWithoutOrganizationNestedInputSchema: z.ZodType = z.object({ create: z.union([ z.lazy(() => UserOrganizationCreateWithoutOrganizationInputSchema),z.lazy(() => UserOrganizationCreateWithoutOrganizationInputSchema).array(),z.lazy(() => UserOrganizationUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => UserOrganizationUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), connectOrCreate: z.union([ z.lazy(() => UserOrganizationCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => UserOrganizationCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), @@ -23138,6 +26347,76 @@ export const IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputS deleteMany: z.union([ z.lazy(() => IntegrationConfigScalarWhereInputSchema),z.lazy(() => IntegrationConfigScalarWhereInputSchema).array() ]).optional(), }).strict(); +export const TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageCreateWithoutOrganizationInputSchema).array(),z.lazy(() => TemplatePackageUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplatePackageCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplatePackageUpsertWithWhereUniqueWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageUpsertWithWhereUniqueWithoutOrganizationInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplatePackageCreateManyOrganizationInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplatePackageWhereUniqueInputSchema),z.lazy(() => TemplatePackageWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplatePackageWhereUniqueInputSchema),z.lazy(() => TemplatePackageWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplatePackageWhereUniqueInputSchema),z.lazy(() => TemplatePackageWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplatePackageWhereUniqueInputSchema),z.lazy(() => TemplatePackageWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplatePackageUpdateWithWhereUniqueWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageUpdateWithWhereUniqueWithoutOrganizationInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplatePackageUpdateManyWithWhereWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageUpdateManyWithWhereWithoutOrganizationInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplatePackageScalarWhereInputSchema),z.lazy(() => TemplatePackageScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationCreateWithoutOrganizationInputSchema).array(),z.lazy(() => TemplateInstallationUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateInstallationCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateInstallationUpsertWithWhereUniqueWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationUpsertWithWhereUniqueWithoutOrganizationInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateInstallationCreateManyOrganizationInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateInstallationUpdateWithWhereUniqueWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationUpdateWithWhereUniqueWithoutOrganizationInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateInstallationUpdateManyWithWhereWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationUpdateManyWithWhereWithoutOrganizationInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateInstallationScalarWhereInputSchema),z.lazy(() => TemplateInstallationScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareCreateWithoutOrganizationInputSchema).array(),z.lazy(() => TemplateShareUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => TemplateShareCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateShareUpsertWithWhereUniqueWithoutOrganizationInputSchema),z.lazy(() => TemplateShareUpsertWithWhereUniqueWithoutOrganizationInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareCreateManyOrganizationInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateShareWhereUniqueInputSchema),z.lazy(() => TemplateShareWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateShareWhereUniqueInputSchema),z.lazy(() => TemplateShareWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateShareWhereUniqueInputSchema),z.lazy(() => TemplateShareWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateShareWhereUniqueInputSchema),z.lazy(() => TemplateShareWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateShareUpdateWithWhereUniqueWithoutOrganizationInputSchema),z.lazy(() => TemplateShareUpdateWithWhereUniqueWithoutOrganizationInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateShareUpdateManyWithWhereWithoutOrganizationInputSchema),z.lazy(() => TemplateShareUpdateManyWithWhereWithoutOrganizationInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateShareScalarWhereInputSchema),z.lazy(() => TemplateShareScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareImportCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportCreateWithoutOrganizationInputSchema).array(),z.lazy(() => TemplateShareImportUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareImportCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateShareImportUpsertWithWhereUniqueWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportUpsertWithWhereUniqueWithoutOrganizationInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareImportCreateManyOrganizationInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateShareImportUpdateWithWhereUniqueWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportUpdateWithWhereUniqueWithoutOrganizationInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateShareImportUpdateManyWithWhereWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportUpdateManyWithWhereWithoutOrganizationInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateShareImportScalarWhereInputSchema),z.lazy(() => TemplateShareImportScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => OrganizationUiConfigCreateWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigCreateWithoutOrganizationInputSchema).array(),z.lazy(() => OrganizationUiConfigUncheckedCreateWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigUncheckedCreateWithoutOrganizationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => OrganizationUiConfigCreateOrConnectWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigCreateOrConnectWithoutOrganizationInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => OrganizationUiConfigUpsertWithWhereUniqueWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigUpsertWithWhereUniqueWithoutOrganizationInputSchema).array() ]).optional(), + createMany: z.lazy(() => OrganizationUiConfigCreateManyOrganizationInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema),z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema),z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema),z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema),z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => OrganizationUiConfigUpdateWithWhereUniqueWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigUpdateWithWhereUniqueWithoutOrganizationInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => OrganizationUiConfigUpdateManyWithWhereWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigUpdateManyWithWhereWithoutOrganizationInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => OrganizationUiConfigScalarWhereInputSchema),z.lazy(() => OrganizationUiConfigScalarWhereInputSchema).array() ]).optional(), +}).strict(); + export const OrganizationCreateNestedOneWithoutUsersInputSchema: z.ZodType = z.object({ create: z.union([ z.lazy(() => OrganizationCreateWithoutUsersInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutUsersInputSchema) ]).optional(), connectOrCreate: z.lazy(() => OrganizationCreateOrConnectWithoutUsersInputSchema).optional(), @@ -25076,6 +28355,372 @@ export const FinancialReportUpdateOneRequiredWithoutSchedulesNestedInputSchema: update: z.union([ z.lazy(() => FinancialReportUpdateToOneWithWhereWithoutSchedulesInputSchema),z.lazy(() => FinancialReportUpdateWithoutSchedulesInputSchema),z.lazy(() => FinancialReportUncheckedUpdateWithoutSchedulesInputSchema) ]).optional(), }).strict(); +export const OrganizationCreateNestedOneWithoutTemplatePackagesInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => OrganizationCreateWithoutTemplatePackagesInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutTemplatePackagesInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => OrganizationCreateOrConnectWithoutTemplatePackagesInputSchema).optional(), + connect: z.lazy(() => OrganizationWhereUniqueInputSchema).optional() +}).strict(); + +export const TemplateVersionCreateNestedManyWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateVersionCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionCreateWithoutTemplatePackageInputSchema).array(),z.lazy(() => TemplateVersionUncheckedCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionUncheckedCreateWithoutTemplatePackageInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateVersionCreateOrConnectWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionCreateOrConnectWithoutTemplatePackageInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateVersionCreateManyTemplatePackageInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateVersionWhereUniqueInputSchema),z.lazy(() => TemplateVersionWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateInstallationCreateNestedManyWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationCreateWithoutTemplatePackageInputSchema).array(),z.lazy(() => TemplateInstallationUncheckedCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutTemplatePackageInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateInstallationCreateOrConnectWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationCreateOrConnectWithoutTemplatePackageInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateInstallationCreateManyTemplatePackageInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareCreateNestedManyWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareCreateWithoutTemplatePackageInputSchema).array(),z.lazy(() => TemplateShareUncheckedCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutTemplatePackageInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareCreateOrConnectWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareCreateOrConnectWithoutTemplatePackageInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareCreateManyTemplatePackageInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateShareWhereUniqueInputSchema),z.lazy(() => TemplateShareWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareImportCreateNestedManyWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareImportCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportCreateWithoutTemplatePackageInputSchema).array(),z.lazy(() => TemplateShareImportUncheckedCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportUncheckedCreateWithoutTemplatePackageInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareImportCreateOrConnectWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportCreateOrConnectWithoutTemplatePackageInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareImportCreateManyTemplatePackageInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateVersionUncheckedCreateNestedManyWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateVersionCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionCreateWithoutTemplatePackageInputSchema).array(),z.lazy(() => TemplateVersionUncheckedCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionUncheckedCreateWithoutTemplatePackageInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateVersionCreateOrConnectWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionCreateOrConnectWithoutTemplatePackageInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateVersionCreateManyTemplatePackageInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateVersionWhereUniqueInputSchema),z.lazy(() => TemplateVersionWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateInstallationUncheckedCreateNestedManyWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationCreateWithoutTemplatePackageInputSchema).array(),z.lazy(() => TemplateInstallationUncheckedCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutTemplatePackageInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateInstallationCreateOrConnectWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationCreateOrConnectWithoutTemplatePackageInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateInstallationCreateManyTemplatePackageInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareUncheckedCreateNestedManyWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareCreateWithoutTemplatePackageInputSchema).array(),z.lazy(() => TemplateShareUncheckedCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutTemplatePackageInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareCreateOrConnectWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareCreateOrConnectWithoutTemplatePackageInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareCreateManyTemplatePackageInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateShareWhereUniqueInputSchema),z.lazy(() => TemplateShareWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareImportUncheckedCreateNestedManyWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareImportCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportCreateWithoutTemplatePackageInputSchema).array(),z.lazy(() => TemplateShareImportUncheckedCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportUncheckedCreateWithoutTemplatePackageInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareImportCreateOrConnectWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportCreateOrConnectWithoutTemplatePackageInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareImportCreateManyTemplatePackageInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const EnumTemplateVisibilityFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.lazy(() => TemplateVisibilitySchema).optional() +}).strict(); + +export const EnumTemplateStatusFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.lazy(() => TemplateStatusSchema).optional() +}).strict(); + +export const OrganizationUpdateOneWithoutTemplatePackagesNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => OrganizationCreateWithoutTemplatePackagesInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutTemplatePackagesInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => OrganizationCreateOrConnectWithoutTemplatePackagesInputSchema).optional(), + upsert: z.lazy(() => OrganizationUpsertWithoutTemplatePackagesInputSchema).optional(), + disconnect: z.union([ z.boolean(),z.lazy(() => OrganizationWhereInputSchema) ]).optional(), + delete: z.union([ z.boolean(),z.lazy(() => OrganizationWhereInputSchema) ]).optional(), + connect: z.lazy(() => OrganizationWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => OrganizationUpdateToOneWithWhereWithoutTemplatePackagesInputSchema),z.lazy(() => OrganizationUpdateWithoutTemplatePackagesInputSchema),z.lazy(() => OrganizationUncheckedUpdateWithoutTemplatePackagesInputSchema) ]).optional(), +}).strict(); + +export const TemplateVersionUpdateManyWithoutTemplatePackageNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateVersionCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionCreateWithoutTemplatePackageInputSchema).array(),z.lazy(() => TemplateVersionUncheckedCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionUncheckedCreateWithoutTemplatePackageInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateVersionCreateOrConnectWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionCreateOrConnectWithoutTemplatePackageInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateVersionUpsertWithWhereUniqueWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionUpsertWithWhereUniqueWithoutTemplatePackageInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateVersionCreateManyTemplatePackageInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateVersionWhereUniqueInputSchema),z.lazy(() => TemplateVersionWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateVersionWhereUniqueInputSchema),z.lazy(() => TemplateVersionWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateVersionWhereUniqueInputSchema),z.lazy(() => TemplateVersionWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateVersionWhereUniqueInputSchema),z.lazy(() => TemplateVersionWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateVersionUpdateWithWhereUniqueWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionUpdateWithWhereUniqueWithoutTemplatePackageInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateVersionUpdateManyWithWhereWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionUpdateManyWithWhereWithoutTemplatePackageInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateVersionScalarWhereInputSchema),z.lazy(() => TemplateVersionScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateInstallationUpdateManyWithoutTemplatePackageNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationCreateWithoutTemplatePackageInputSchema).array(),z.lazy(() => TemplateInstallationUncheckedCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutTemplatePackageInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateInstallationCreateOrConnectWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationCreateOrConnectWithoutTemplatePackageInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateInstallationUpsertWithWhereUniqueWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationUpsertWithWhereUniqueWithoutTemplatePackageInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateInstallationCreateManyTemplatePackageInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateInstallationUpdateWithWhereUniqueWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationUpdateWithWhereUniqueWithoutTemplatePackageInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateInstallationUpdateManyWithWhereWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationUpdateManyWithWhereWithoutTemplatePackageInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateInstallationScalarWhereInputSchema),z.lazy(() => TemplateInstallationScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareUpdateManyWithoutTemplatePackageNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareCreateWithoutTemplatePackageInputSchema).array(),z.lazy(() => TemplateShareUncheckedCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutTemplatePackageInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareCreateOrConnectWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareCreateOrConnectWithoutTemplatePackageInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateShareUpsertWithWhereUniqueWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareUpsertWithWhereUniqueWithoutTemplatePackageInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareCreateManyTemplatePackageInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateShareWhereUniqueInputSchema),z.lazy(() => TemplateShareWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateShareWhereUniqueInputSchema),z.lazy(() => TemplateShareWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateShareWhereUniqueInputSchema),z.lazy(() => TemplateShareWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateShareWhereUniqueInputSchema),z.lazy(() => TemplateShareWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateShareUpdateWithWhereUniqueWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareUpdateWithWhereUniqueWithoutTemplatePackageInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateShareUpdateManyWithWhereWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareUpdateManyWithWhereWithoutTemplatePackageInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateShareScalarWhereInputSchema),z.lazy(() => TemplateShareScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareImportUpdateManyWithoutTemplatePackageNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareImportCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportCreateWithoutTemplatePackageInputSchema).array(),z.lazy(() => TemplateShareImportUncheckedCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportUncheckedCreateWithoutTemplatePackageInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareImportCreateOrConnectWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportCreateOrConnectWithoutTemplatePackageInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateShareImportUpsertWithWhereUniqueWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportUpsertWithWhereUniqueWithoutTemplatePackageInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareImportCreateManyTemplatePackageInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateShareImportUpdateWithWhereUniqueWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportUpdateWithWhereUniqueWithoutTemplatePackageInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateShareImportUpdateManyWithWhereWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportUpdateManyWithWhereWithoutTemplatePackageInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateShareImportScalarWhereInputSchema),z.lazy(() => TemplateShareImportScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateVersionUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateVersionCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionCreateWithoutTemplatePackageInputSchema).array(),z.lazy(() => TemplateVersionUncheckedCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionUncheckedCreateWithoutTemplatePackageInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateVersionCreateOrConnectWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionCreateOrConnectWithoutTemplatePackageInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateVersionUpsertWithWhereUniqueWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionUpsertWithWhereUniqueWithoutTemplatePackageInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateVersionCreateManyTemplatePackageInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateVersionWhereUniqueInputSchema),z.lazy(() => TemplateVersionWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateVersionWhereUniqueInputSchema),z.lazy(() => TemplateVersionWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateVersionWhereUniqueInputSchema),z.lazy(() => TemplateVersionWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateVersionWhereUniqueInputSchema),z.lazy(() => TemplateVersionWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateVersionUpdateWithWhereUniqueWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionUpdateWithWhereUniqueWithoutTemplatePackageInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateVersionUpdateManyWithWhereWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionUpdateManyWithWhereWithoutTemplatePackageInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateVersionScalarWhereInputSchema),z.lazy(() => TemplateVersionScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateInstallationUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationCreateWithoutTemplatePackageInputSchema).array(),z.lazy(() => TemplateInstallationUncheckedCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutTemplatePackageInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateInstallationCreateOrConnectWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationCreateOrConnectWithoutTemplatePackageInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateInstallationUpsertWithWhereUniqueWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationUpsertWithWhereUniqueWithoutTemplatePackageInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateInstallationCreateManyTemplatePackageInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateInstallationUpdateWithWhereUniqueWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationUpdateWithWhereUniqueWithoutTemplatePackageInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateInstallationUpdateManyWithWhereWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationUpdateManyWithWhereWithoutTemplatePackageInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateInstallationScalarWhereInputSchema),z.lazy(() => TemplateInstallationScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareCreateWithoutTemplatePackageInputSchema).array(),z.lazy(() => TemplateShareUncheckedCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutTemplatePackageInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareCreateOrConnectWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareCreateOrConnectWithoutTemplatePackageInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateShareUpsertWithWhereUniqueWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareUpsertWithWhereUniqueWithoutTemplatePackageInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareCreateManyTemplatePackageInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateShareWhereUniqueInputSchema),z.lazy(() => TemplateShareWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateShareWhereUniqueInputSchema),z.lazy(() => TemplateShareWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateShareWhereUniqueInputSchema),z.lazy(() => TemplateShareWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateShareWhereUniqueInputSchema),z.lazy(() => TemplateShareWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateShareUpdateWithWhereUniqueWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareUpdateWithWhereUniqueWithoutTemplatePackageInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateShareUpdateManyWithWhereWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareUpdateManyWithWhereWithoutTemplatePackageInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateShareScalarWhereInputSchema),z.lazy(() => TemplateShareScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareImportUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareImportCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportCreateWithoutTemplatePackageInputSchema).array(),z.lazy(() => TemplateShareImportUncheckedCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportUncheckedCreateWithoutTemplatePackageInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareImportCreateOrConnectWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportCreateOrConnectWithoutTemplatePackageInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateShareImportUpsertWithWhereUniqueWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportUpsertWithWhereUniqueWithoutTemplatePackageInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareImportCreateManyTemplatePackageInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateShareImportUpdateWithWhereUniqueWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportUpdateWithWhereUniqueWithoutTemplatePackageInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateShareImportUpdateManyWithWhereWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportUpdateManyWithWhereWithoutTemplatePackageInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateShareImportScalarWhereInputSchema),z.lazy(() => TemplateShareImportScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplatePackageCreateNestedOneWithoutVersionsInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutVersionsInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutVersionsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => TemplatePackageCreateOrConnectWithoutVersionsInputSchema).optional(), + connect: z.lazy(() => TemplatePackageWhereUniqueInputSchema).optional() +}).strict(); + +export const TemplateInstallationCreateNestedManyWithoutTemplateVersionInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationCreateWithoutTemplateVersionInputSchema).array(),z.lazy(() => TemplateInstallationUncheckedCreateWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutTemplateVersionInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateInstallationCreateOrConnectWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationCreateOrConnectWithoutTemplateVersionInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateInstallationCreateManyTemplateVersionInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateInstallationUncheckedCreateNestedManyWithoutTemplateVersionInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationCreateWithoutTemplateVersionInputSchema).array(),z.lazy(() => TemplateInstallationUncheckedCreateWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutTemplateVersionInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateInstallationCreateOrConnectWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationCreateOrConnectWithoutTemplateVersionInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateInstallationCreateManyTemplateVersionInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplatePackageUpdateOneRequiredWithoutVersionsNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutVersionsInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutVersionsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => TemplatePackageCreateOrConnectWithoutVersionsInputSchema).optional(), + upsert: z.lazy(() => TemplatePackageUpsertWithoutVersionsInputSchema).optional(), + connect: z.lazy(() => TemplatePackageWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => TemplatePackageUpdateToOneWithWhereWithoutVersionsInputSchema),z.lazy(() => TemplatePackageUpdateWithoutVersionsInputSchema),z.lazy(() => TemplatePackageUncheckedUpdateWithoutVersionsInputSchema) ]).optional(), +}).strict(); + +export const TemplateInstallationUpdateManyWithoutTemplateVersionNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationCreateWithoutTemplateVersionInputSchema).array(),z.lazy(() => TemplateInstallationUncheckedCreateWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutTemplateVersionInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateInstallationCreateOrConnectWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationCreateOrConnectWithoutTemplateVersionInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateInstallationUpsertWithWhereUniqueWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationUpsertWithWhereUniqueWithoutTemplateVersionInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateInstallationCreateManyTemplateVersionInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateInstallationUpdateWithWhereUniqueWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationUpdateWithWhereUniqueWithoutTemplateVersionInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateInstallationUpdateManyWithWhereWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationUpdateManyWithWhereWithoutTemplateVersionInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateInstallationScalarWhereInputSchema),z.lazy(() => TemplateInstallationScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateInstallationUncheckedUpdateManyWithoutTemplateVersionNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationCreateWithoutTemplateVersionInputSchema).array(),z.lazy(() => TemplateInstallationUncheckedCreateWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutTemplateVersionInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateInstallationCreateOrConnectWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationCreateOrConnectWithoutTemplateVersionInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateInstallationUpsertWithWhereUniqueWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationUpsertWithWhereUniqueWithoutTemplateVersionInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateInstallationCreateManyTemplateVersionInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateInstallationWhereUniqueInputSchema),z.lazy(() => TemplateInstallationWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateInstallationUpdateWithWhereUniqueWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationUpdateWithWhereUniqueWithoutTemplateVersionInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateInstallationUpdateManyWithWhereWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationUpdateManyWithWhereWithoutTemplateVersionInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateInstallationScalarWhereInputSchema),z.lazy(() => TemplateInstallationScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const OrganizationCreateNestedOneWithoutTemplateInstallationsInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => OrganizationCreateWithoutTemplateInstallationsInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutTemplateInstallationsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => OrganizationCreateOrConnectWithoutTemplateInstallationsInputSchema).optional(), + connect: z.lazy(() => OrganizationWhereUniqueInputSchema).optional() +}).strict(); + +export const TemplatePackageCreateNestedOneWithoutInstallationsInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutInstallationsInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutInstallationsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => TemplatePackageCreateOrConnectWithoutInstallationsInputSchema).optional(), + connect: z.lazy(() => TemplatePackageWhereUniqueInputSchema).optional() +}).strict(); + +export const TemplateVersionCreateNestedOneWithoutInstallationsInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateVersionCreateWithoutInstallationsInputSchema),z.lazy(() => TemplateVersionUncheckedCreateWithoutInstallationsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => TemplateVersionCreateOrConnectWithoutInstallationsInputSchema).optional(), + connect: z.lazy(() => TemplateVersionWhereUniqueInputSchema).optional() +}).strict(); + +export const TemplateInstallItemCreateNestedManyWithoutInstallationInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateInstallItemCreateWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemCreateWithoutInstallationInputSchema).array(),z.lazy(() => TemplateInstallItemUncheckedCreateWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemUncheckedCreateWithoutInstallationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateInstallItemCreateOrConnectWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemCreateOrConnectWithoutInstallationInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateInstallItemCreateManyInstallationInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateInstallItemWhereUniqueInputSchema),z.lazy(() => TemplateInstallItemWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateInstallItemUncheckedCreateNestedManyWithoutInstallationInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateInstallItemCreateWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemCreateWithoutInstallationInputSchema).array(),z.lazy(() => TemplateInstallItemUncheckedCreateWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemUncheckedCreateWithoutInstallationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateInstallItemCreateOrConnectWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemCreateOrConnectWithoutInstallationInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateInstallItemCreateManyInstallationInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateInstallItemWhereUniqueInputSchema),z.lazy(() => TemplateInstallItemWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const EnumTemplateInstallStatusFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.lazy(() => TemplateInstallStatusSchema).optional() +}).strict(); + +export const EnumTemplateInstallStrategyFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.lazy(() => TemplateInstallStrategySchema).optional() +}).strict(); + +export const OrganizationUpdateOneRequiredWithoutTemplateInstallationsNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => OrganizationCreateWithoutTemplateInstallationsInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutTemplateInstallationsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => OrganizationCreateOrConnectWithoutTemplateInstallationsInputSchema).optional(), + upsert: z.lazy(() => OrganizationUpsertWithoutTemplateInstallationsInputSchema).optional(), + connect: z.lazy(() => OrganizationWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => OrganizationUpdateToOneWithWhereWithoutTemplateInstallationsInputSchema),z.lazy(() => OrganizationUpdateWithoutTemplateInstallationsInputSchema),z.lazy(() => OrganizationUncheckedUpdateWithoutTemplateInstallationsInputSchema) ]).optional(), +}).strict(); + +export const TemplatePackageUpdateOneWithoutInstallationsNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutInstallationsInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutInstallationsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => TemplatePackageCreateOrConnectWithoutInstallationsInputSchema).optional(), + upsert: z.lazy(() => TemplatePackageUpsertWithoutInstallationsInputSchema).optional(), + disconnect: z.union([ z.boolean(),z.lazy(() => TemplatePackageWhereInputSchema) ]).optional(), + delete: z.union([ z.boolean(),z.lazy(() => TemplatePackageWhereInputSchema) ]).optional(), + connect: z.lazy(() => TemplatePackageWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => TemplatePackageUpdateToOneWithWhereWithoutInstallationsInputSchema),z.lazy(() => TemplatePackageUpdateWithoutInstallationsInputSchema),z.lazy(() => TemplatePackageUncheckedUpdateWithoutInstallationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateVersionUpdateOneWithoutInstallationsNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateVersionCreateWithoutInstallationsInputSchema),z.lazy(() => TemplateVersionUncheckedCreateWithoutInstallationsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => TemplateVersionCreateOrConnectWithoutInstallationsInputSchema).optional(), + upsert: z.lazy(() => TemplateVersionUpsertWithoutInstallationsInputSchema).optional(), + disconnect: z.union([ z.boolean(),z.lazy(() => TemplateVersionWhereInputSchema) ]).optional(), + delete: z.union([ z.boolean(),z.lazy(() => TemplateVersionWhereInputSchema) ]).optional(), + connect: z.lazy(() => TemplateVersionWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => TemplateVersionUpdateToOneWithWhereWithoutInstallationsInputSchema),z.lazy(() => TemplateVersionUpdateWithoutInstallationsInputSchema),z.lazy(() => TemplateVersionUncheckedUpdateWithoutInstallationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateInstallItemUpdateManyWithoutInstallationNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateInstallItemCreateWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemCreateWithoutInstallationInputSchema).array(),z.lazy(() => TemplateInstallItemUncheckedCreateWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemUncheckedCreateWithoutInstallationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateInstallItemCreateOrConnectWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemCreateOrConnectWithoutInstallationInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateInstallItemUpsertWithWhereUniqueWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemUpsertWithWhereUniqueWithoutInstallationInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateInstallItemCreateManyInstallationInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateInstallItemWhereUniqueInputSchema),z.lazy(() => TemplateInstallItemWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateInstallItemWhereUniqueInputSchema),z.lazy(() => TemplateInstallItemWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateInstallItemWhereUniqueInputSchema),z.lazy(() => TemplateInstallItemWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateInstallItemWhereUniqueInputSchema),z.lazy(() => TemplateInstallItemWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateInstallItemUpdateWithWhereUniqueWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemUpdateWithWhereUniqueWithoutInstallationInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateInstallItemUpdateManyWithWhereWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemUpdateManyWithWhereWithoutInstallationInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateInstallItemScalarWhereInputSchema),z.lazy(() => TemplateInstallItemScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateInstallItemUncheckedUpdateManyWithoutInstallationNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateInstallItemCreateWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemCreateWithoutInstallationInputSchema).array(),z.lazy(() => TemplateInstallItemUncheckedCreateWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemUncheckedCreateWithoutInstallationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateInstallItemCreateOrConnectWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemCreateOrConnectWithoutInstallationInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateInstallItemUpsertWithWhereUniqueWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemUpsertWithWhereUniqueWithoutInstallationInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateInstallItemCreateManyInstallationInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateInstallItemWhereUniqueInputSchema),z.lazy(() => TemplateInstallItemWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateInstallItemWhereUniqueInputSchema),z.lazy(() => TemplateInstallItemWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateInstallItemWhereUniqueInputSchema),z.lazy(() => TemplateInstallItemWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateInstallItemWhereUniqueInputSchema),z.lazy(() => TemplateInstallItemWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateInstallItemUpdateWithWhereUniqueWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemUpdateWithWhereUniqueWithoutInstallationInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateInstallItemUpdateManyWithWhereWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemUpdateManyWithWhereWithoutInstallationInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateInstallItemScalarWhereInputSchema),z.lazy(() => TemplateInstallItemScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateInstallationCreateNestedOneWithoutItemsInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutItemsInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutItemsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => TemplateInstallationCreateOrConnectWithoutItemsInputSchema).optional(), + connect: z.lazy(() => TemplateInstallationWhereUniqueInputSchema).optional() +}).strict(); + +export const EnumTemplateAssetTypeFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.lazy(() => TemplateAssetTypeSchema).optional() +}).strict(); + +export const EnumTemplateItemStatusFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.lazy(() => TemplateItemStatusSchema).optional() +}).strict(); + +export const TemplateInstallationUpdateOneRequiredWithoutItemsNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutItemsInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutItemsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => TemplateInstallationCreateOrConnectWithoutItemsInputSchema).optional(), + upsert: z.lazy(() => TemplateInstallationUpsertWithoutItemsInputSchema).optional(), + connect: z.lazy(() => TemplateInstallationWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => TemplateInstallationUpdateToOneWithWhereWithoutItemsInputSchema),z.lazy(() => TemplateInstallationUpdateWithoutItemsInputSchema),z.lazy(() => TemplateInstallationUncheckedUpdateWithoutItemsInputSchema) ]).optional(), +}).strict(); + export const OrganizationCreateNestedOneWithoutWorkflowsInputSchema: z.ZodType = z.object({ create: z.union([ z.lazy(() => OrganizationCreateWithoutWorkflowsInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutWorkflowsInputSchema) ]).optional(), connectOrCreate: z.lazy(() => OrganizationCreateOrConnectWithoutWorkflowsInputSchema).optional(), @@ -25304,6 +28949,20 @@ export const WorkflowAnalyticsUncheckedUpdateManyWithoutWorkflowNestedInputSchem deleteMany: z.union([ z.lazy(() => WorkflowAnalyticsScalarWhereInputSchema),z.lazy(() => WorkflowAnalyticsScalarWhereInputSchema).array() ]).optional(), }).strict(); +export const OrganizationCreateNestedOneWithoutUiConfigsInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => OrganizationCreateWithoutUiConfigsInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutUiConfigsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => OrganizationCreateOrConnectWithoutUiConfigsInputSchema).optional(), + connect: z.lazy(() => OrganizationWhereUniqueInputSchema).optional() +}).strict(); + +export const OrganizationUpdateOneRequiredWithoutUiConfigsNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => OrganizationCreateWithoutUiConfigsInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutUiConfigsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => OrganizationCreateOrConnectWithoutUiConfigsInputSchema).optional(), + upsert: z.lazy(() => OrganizationUpsertWithoutUiConfigsInputSchema).optional(), + connect: z.lazy(() => OrganizationWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => OrganizationUpdateToOneWithWhereWithoutUiConfigsInputSchema),z.lazy(() => OrganizationUpdateWithoutUiConfigsInputSchema),z.lazy(() => OrganizationUncheckedUpdateWithoutUiConfigsInputSchema) ]).optional(), +}).strict(); + export const WorkflowCreateNestedOneWithoutTriggersInputSchema: z.ZodType = z.object({ create: z.union([ z.lazy(() => WorkflowCreateWithoutTriggersInputSchema),z.lazy(() => WorkflowUncheckedCreateWithoutTriggersInputSchema) ]).optional(), connectOrCreate: z.lazy(() => WorkflowCreateOrConnectWithoutTriggersInputSchema).optional(), @@ -26478,6 +30137,250 @@ export const WorkflowUpdateOneRequiredWithoutAnalyticsNestedInputSchema: z.ZodTy update: z.union([ z.lazy(() => WorkflowUpdateToOneWithWhereWithoutAnalyticsInputSchema),z.lazy(() => WorkflowUpdateWithoutAnalyticsInputSchema),z.lazy(() => WorkflowUncheckedUpdateWithoutAnalyticsInputSchema) ]).optional(), }).strict(); +export const TemplatePackageCreateNestedOneWithoutSharesInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutSharesInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutSharesInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => TemplatePackageCreateOrConnectWithoutSharesInputSchema).optional(), + connect: z.lazy(() => TemplatePackageWhereUniqueInputSchema).optional() +}).strict(); + +export const OrganizationCreateNestedOneWithoutTemplateSharesInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => OrganizationCreateWithoutTemplateSharesInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutTemplateSharesInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => OrganizationCreateOrConnectWithoutTemplateSharesInputSchema).optional(), + connect: z.lazy(() => OrganizationWhereUniqueInputSchema).optional() +}).strict(); + +export const TemplateShareRecipientCreateNestedManyWithoutShareInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareRecipientCreateWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientCreateWithoutShareInputSchema).array(),z.lazy(() => TemplateShareRecipientUncheckedCreateWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientUncheckedCreateWithoutShareInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareRecipientCreateOrConnectWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientCreateOrConnectWithoutShareInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareRecipientCreateManyShareInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema),z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareAccessLogCreateNestedManyWithoutShareInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareAccessLogCreateWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogCreateWithoutShareInputSchema).array(),z.lazy(() => TemplateShareAccessLogUncheckedCreateWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogUncheckedCreateWithoutShareInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareAccessLogCreateOrConnectWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogCreateOrConnectWithoutShareInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareAccessLogCreateManyShareInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema),z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareImportCreateNestedManyWithoutShareInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareImportCreateWithoutShareInputSchema),z.lazy(() => TemplateShareImportCreateWithoutShareInputSchema).array(),z.lazy(() => TemplateShareImportUncheckedCreateWithoutShareInputSchema),z.lazy(() => TemplateShareImportUncheckedCreateWithoutShareInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareImportCreateOrConnectWithoutShareInputSchema),z.lazy(() => TemplateShareImportCreateOrConnectWithoutShareInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareImportCreateManyShareInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareRecipientUncheckedCreateNestedManyWithoutShareInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareRecipientCreateWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientCreateWithoutShareInputSchema).array(),z.lazy(() => TemplateShareRecipientUncheckedCreateWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientUncheckedCreateWithoutShareInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareRecipientCreateOrConnectWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientCreateOrConnectWithoutShareInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareRecipientCreateManyShareInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema),z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareAccessLogUncheckedCreateNestedManyWithoutShareInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareAccessLogCreateWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogCreateWithoutShareInputSchema).array(),z.lazy(() => TemplateShareAccessLogUncheckedCreateWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogUncheckedCreateWithoutShareInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareAccessLogCreateOrConnectWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogCreateOrConnectWithoutShareInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareAccessLogCreateManyShareInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema),z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareImportUncheckedCreateNestedManyWithoutShareInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareImportCreateWithoutShareInputSchema),z.lazy(() => TemplateShareImportCreateWithoutShareInputSchema).array(),z.lazy(() => TemplateShareImportUncheckedCreateWithoutShareInputSchema),z.lazy(() => TemplateShareImportUncheckedCreateWithoutShareInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareImportCreateOrConnectWithoutShareInputSchema),z.lazy(() => TemplateShareImportCreateOrConnectWithoutShareInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareImportCreateManyShareInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const EnumTemplateShareModeFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.lazy(() => TemplateShareModeSchema).optional() +}).strict(); + +export const EnumTemplateShareStatusFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.lazy(() => TemplateShareStatusSchema).optional() +}).strict(); + +export const TemplatePackageUpdateOneRequiredWithoutSharesNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutSharesInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutSharesInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => TemplatePackageCreateOrConnectWithoutSharesInputSchema).optional(), + upsert: z.lazy(() => TemplatePackageUpsertWithoutSharesInputSchema).optional(), + connect: z.lazy(() => TemplatePackageWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => TemplatePackageUpdateToOneWithWhereWithoutSharesInputSchema),z.lazy(() => TemplatePackageUpdateWithoutSharesInputSchema),z.lazy(() => TemplatePackageUncheckedUpdateWithoutSharesInputSchema) ]).optional(), +}).strict(); + +export const OrganizationUpdateOneRequiredWithoutTemplateSharesNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => OrganizationCreateWithoutTemplateSharesInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutTemplateSharesInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => OrganizationCreateOrConnectWithoutTemplateSharesInputSchema).optional(), + upsert: z.lazy(() => OrganizationUpsertWithoutTemplateSharesInputSchema).optional(), + connect: z.lazy(() => OrganizationWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => OrganizationUpdateToOneWithWhereWithoutTemplateSharesInputSchema),z.lazy(() => OrganizationUpdateWithoutTemplateSharesInputSchema),z.lazy(() => OrganizationUncheckedUpdateWithoutTemplateSharesInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareRecipientUpdateManyWithoutShareNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareRecipientCreateWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientCreateWithoutShareInputSchema).array(),z.lazy(() => TemplateShareRecipientUncheckedCreateWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientUncheckedCreateWithoutShareInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareRecipientCreateOrConnectWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientCreateOrConnectWithoutShareInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateShareRecipientUpsertWithWhereUniqueWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientUpsertWithWhereUniqueWithoutShareInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareRecipientCreateManyShareInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema),z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema),z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema),z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema),z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateShareRecipientUpdateWithWhereUniqueWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientUpdateWithWhereUniqueWithoutShareInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateShareRecipientUpdateManyWithWhereWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientUpdateManyWithWhereWithoutShareInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateShareRecipientScalarWhereInputSchema),z.lazy(() => TemplateShareRecipientScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareAccessLogUpdateManyWithoutShareNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareAccessLogCreateWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogCreateWithoutShareInputSchema).array(),z.lazy(() => TemplateShareAccessLogUncheckedCreateWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogUncheckedCreateWithoutShareInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareAccessLogCreateOrConnectWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogCreateOrConnectWithoutShareInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateShareAccessLogUpsertWithWhereUniqueWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogUpsertWithWhereUniqueWithoutShareInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareAccessLogCreateManyShareInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema),z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema),z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema),z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema),z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateShareAccessLogUpdateWithWhereUniqueWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogUpdateWithWhereUniqueWithoutShareInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateShareAccessLogUpdateManyWithWhereWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogUpdateManyWithWhereWithoutShareInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateShareAccessLogScalarWhereInputSchema),z.lazy(() => TemplateShareAccessLogScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareImportUpdateManyWithoutShareNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareImportCreateWithoutShareInputSchema),z.lazy(() => TemplateShareImportCreateWithoutShareInputSchema).array(),z.lazy(() => TemplateShareImportUncheckedCreateWithoutShareInputSchema),z.lazy(() => TemplateShareImportUncheckedCreateWithoutShareInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareImportCreateOrConnectWithoutShareInputSchema),z.lazy(() => TemplateShareImportCreateOrConnectWithoutShareInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateShareImportUpsertWithWhereUniqueWithoutShareInputSchema),z.lazy(() => TemplateShareImportUpsertWithWhereUniqueWithoutShareInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareImportCreateManyShareInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateShareImportUpdateWithWhereUniqueWithoutShareInputSchema),z.lazy(() => TemplateShareImportUpdateWithWhereUniqueWithoutShareInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateShareImportUpdateManyWithWhereWithoutShareInputSchema),z.lazy(() => TemplateShareImportUpdateManyWithWhereWithoutShareInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateShareImportScalarWhereInputSchema),z.lazy(() => TemplateShareImportScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareRecipientUncheckedUpdateManyWithoutShareNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareRecipientCreateWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientCreateWithoutShareInputSchema).array(),z.lazy(() => TemplateShareRecipientUncheckedCreateWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientUncheckedCreateWithoutShareInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareRecipientCreateOrConnectWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientCreateOrConnectWithoutShareInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateShareRecipientUpsertWithWhereUniqueWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientUpsertWithWhereUniqueWithoutShareInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareRecipientCreateManyShareInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema),z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema),z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema),z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema),z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateShareRecipientUpdateWithWhereUniqueWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientUpdateWithWhereUniqueWithoutShareInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateShareRecipientUpdateManyWithWhereWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientUpdateManyWithWhereWithoutShareInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateShareRecipientScalarWhereInputSchema),z.lazy(() => TemplateShareRecipientScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareAccessLogUncheckedUpdateManyWithoutShareNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareAccessLogCreateWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogCreateWithoutShareInputSchema).array(),z.lazy(() => TemplateShareAccessLogUncheckedCreateWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogUncheckedCreateWithoutShareInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareAccessLogCreateOrConnectWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogCreateOrConnectWithoutShareInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateShareAccessLogUpsertWithWhereUniqueWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogUpsertWithWhereUniqueWithoutShareInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareAccessLogCreateManyShareInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema),z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema),z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema),z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema),z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateShareAccessLogUpdateWithWhereUniqueWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogUpdateWithWhereUniqueWithoutShareInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateShareAccessLogUpdateManyWithWhereWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogUpdateManyWithWhereWithoutShareInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateShareAccessLogScalarWhereInputSchema),z.lazy(() => TemplateShareAccessLogScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareImportUncheckedUpdateManyWithoutShareNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareImportCreateWithoutShareInputSchema),z.lazy(() => TemplateShareImportCreateWithoutShareInputSchema).array(),z.lazy(() => TemplateShareImportUncheckedCreateWithoutShareInputSchema),z.lazy(() => TemplateShareImportUncheckedCreateWithoutShareInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TemplateShareImportCreateOrConnectWithoutShareInputSchema),z.lazy(() => TemplateShareImportCreateOrConnectWithoutShareInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TemplateShareImportUpsertWithWhereUniqueWithoutShareInputSchema),z.lazy(() => TemplateShareImportUpsertWithWhereUniqueWithoutShareInputSchema).array() ]).optional(), + createMany: z.lazy(() => TemplateShareImportCreateManyShareInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TemplateShareImportWhereUniqueInputSchema),z.lazy(() => TemplateShareImportWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TemplateShareImportUpdateWithWhereUniqueWithoutShareInputSchema),z.lazy(() => TemplateShareImportUpdateWithWhereUniqueWithoutShareInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TemplateShareImportUpdateManyWithWhereWithoutShareInputSchema),z.lazy(() => TemplateShareImportUpdateManyWithWhereWithoutShareInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TemplateShareImportScalarWhereInputSchema),z.lazy(() => TemplateShareImportScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TemplateShareCreateNestedOneWithoutRecipientsInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareCreateWithoutRecipientsInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutRecipientsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => TemplateShareCreateOrConnectWithoutRecipientsInputSchema).optional(), + connect: z.lazy(() => TemplateShareWhereUniqueInputSchema).optional() +}).strict(); + +export const EnumTemplateShareRecipientStatusFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.lazy(() => TemplateShareRecipientStatusSchema).optional() +}).strict(); + +export const TemplateShareUpdateOneRequiredWithoutRecipientsNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareCreateWithoutRecipientsInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutRecipientsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => TemplateShareCreateOrConnectWithoutRecipientsInputSchema).optional(), + upsert: z.lazy(() => TemplateShareUpsertWithoutRecipientsInputSchema).optional(), + connect: z.lazy(() => TemplateShareWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => TemplateShareUpdateToOneWithWhereWithoutRecipientsInputSchema),z.lazy(() => TemplateShareUpdateWithoutRecipientsInputSchema),z.lazy(() => TemplateShareUncheckedUpdateWithoutRecipientsInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareCreateNestedOneWithoutAccessLogsInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareCreateWithoutAccessLogsInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutAccessLogsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => TemplateShareCreateOrConnectWithoutAccessLogsInputSchema).optional(), + connect: z.lazy(() => TemplateShareWhereUniqueInputSchema).optional() +}).strict(); + +export const EnumTemplateShareAccessActionFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.lazy(() => TemplateShareAccessActionSchema).optional() +}).strict(); + +export const EnumTemplateShareAccessStatusFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.lazy(() => TemplateShareAccessStatusSchema).optional() +}).strict(); + +export const TemplateShareUpdateOneRequiredWithoutAccessLogsNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareCreateWithoutAccessLogsInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutAccessLogsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => TemplateShareCreateOrConnectWithoutAccessLogsInputSchema).optional(), + upsert: z.lazy(() => TemplateShareUpsertWithoutAccessLogsInputSchema).optional(), + connect: z.lazy(() => TemplateShareWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => TemplateShareUpdateToOneWithWhereWithoutAccessLogsInputSchema),z.lazy(() => TemplateShareUpdateWithoutAccessLogsInputSchema),z.lazy(() => TemplateShareUncheckedUpdateWithoutAccessLogsInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareCreateNestedOneWithoutImportsInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareCreateWithoutImportsInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutImportsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => TemplateShareCreateOrConnectWithoutImportsInputSchema).optional(), + connect: z.lazy(() => TemplateShareWhereUniqueInputSchema).optional() +}).strict(); + +export const OrganizationCreateNestedOneWithoutTemplateShareImportsInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => OrganizationCreateWithoutTemplateShareImportsInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutTemplateShareImportsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => OrganizationCreateOrConnectWithoutTemplateShareImportsInputSchema).optional(), + connect: z.lazy(() => OrganizationWhereUniqueInputSchema).optional() +}).strict(); + +export const TemplatePackageCreateNestedOneWithoutShareImportsInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutShareImportsInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutShareImportsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => TemplatePackageCreateOrConnectWithoutShareImportsInputSchema).optional(), + connect: z.lazy(() => TemplatePackageWhereUniqueInputSchema).optional() +}).strict(); + +export const TemplateShareUpdateOneRequiredWithoutImportsNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplateShareCreateWithoutImportsInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutImportsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => TemplateShareCreateOrConnectWithoutImportsInputSchema).optional(), + upsert: z.lazy(() => TemplateShareUpsertWithoutImportsInputSchema).optional(), + connect: z.lazy(() => TemplateShareWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => TemplateShareUpdateToOneWithWhereWithoutImportsInputSchema),z.lazy(() => TemplateShareUpdateWithoutImportsInputSchema),z.lazy(() => TemplateShareUncheckedUpdateWithoutImportsInputSchema) ]).optional(), +}).strict(); + +export const OrganizationUpdateOneRequiredWithoutTemplateShareImportsNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => OrganizationCreateWithoutTemplateShareImportsInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutTemplateShareImportsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => OrganizationCreateOrConnectWithoutTemplateShareImportsInputSchema).optional(), + upsert: z.lazy(() => OrganizationUpsertWithoutTemplateShareImportsInputSchema).optional(), + connect: z.lazy(() => OrganizationWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => OrganizationUpdateToOneWithWhereWithoutTemplateShareImportsInputSchema),z.lazy(() => OrganizationUpdateWithoutTemplateShareImportsInputSchema),z.lazy(() => OrganizationUncheckedUpdateWithoutTemplateShareImportsInputSchema) ]).optional(), +}).strict(); + +export const TemplatePackageUpdateOneRequiredWithoutShareImportsNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutShareImportsInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutShareImportsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => TemplatePackageCreateOrConnectWithoutShareImportsInputSchema).optional(), + upsert: z.lazy(() => TemplatePackageUpsertWithoutShareImportsInputSchema).optional(), + connect: z.lazy(() => TemplatePackageWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => TemplatePackageUpdateToOneWithWhereWithoutShareImportsInputSchema),z.lazy(() => TemplatePackageUpdateWithoutShareImportsInputSchema),z.lazy(() => TemplatePackageUncheckedUpdateWithoutShareImportsInputSchema) ]).optional(), +}).strict(); + export const NestedStringFilterSchema: z.ZodType = z.object({ equals: z.string().optional(), in: z.string().array().optional(), @@ -27324,6 +31227,108 @@ export const NestedEnumFinancialReportScheduleFrequencyWithAggregatesFilterSchem _max: z.lazy(() => NestedEnumFinancialReportScheduleFrequencyFilterSchema).optional() }).strict(); +export const NestedEnumTemplateVisibilityFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateVisibilitySchema).optional(), + in: z.lazy(() => TemplateVisibilitySchema).array().optional(), + notIn: z.lazy(() => TemplateVisibilitySchema).array().optional(), + not: z.union([ z.lazy(() => TemplateVisibilitySchema),z.lazy(() => NestedEnumTemplateVisibilityFilterSchema) ]).optional(), +}).strict(); + +export const NestedEnumTemplateStatusFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateStatusSchema).optional(), + in: z.lazy(() => TemplateStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateStatusSchema),z.lazy(() => NestedEnumTemplateStatusFilterSchema) ]).optional(), +}).strict(); + +export const NestedEnumTemplateVisibilityWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateVisibilitySchema).optional(), + in: z.lazy(() => TemplateVisibilitySchema).array().optional(), + notIn: z.lazy(() => TemplateVisibilitySchema).array().optional(), + not: z.union([ z.lazy(() => TemplateVisibilitySchema),z.lazy(() => NestedEnumTemplateVisibilityWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateVisibilityFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateVisibilityFilterSchema).optional() +}).strict(); + +export const NestedEnumTemplateStatusWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateStatusSchema).optional(), + in: z.lazy(() => TemplateStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateStatusSchema),z.lazy(() => NestedEnumTemplateStatusWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateStatusFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateStatusFilterSchema).optional() +}).strict(); + +export const NestedEnumTemplateInstallStatusFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateInstallStatusSchema).optional(), + in: z.lazy(() => TemplateInstallStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateInstallStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateInstallStatusSchema),z.lazy(() => NestedEnumTemplateInstallStatusFilterSchema) ]).optional(), +}).strict(); + +export const NestedEnumTemplateInstallStrategyFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateInstallStrategySchema).optional(), + in: z.lazy(() => TemplateInstallStrategySchema).array().optional(), + notIn: z.lazy(() => TemplateInstallStrategySchema).array().optional(), + not: z.union([ z.lazy(() => TemplateInstallStrategySchema),z.lazy(() => NestedEnumTemplateInstallStrategyFilterSchema) ]).optional(), +}).strict(); + +export const NestedEnumTemplateInstallStatusWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateInstallStatusSchema).optional(), + in: z.lazy(() => TemplateInstallStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateInstallStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateInstallStatusSchema),z.lazy(() => NestedEnumTemplateInstallStatusWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateInstallStatusFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateInstallStatusFilterSchema).optional() +}).strict(); + +export const NestedEnumTemplateInstallStrategyWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateInstallStrategySchema).optional(), + in: z.lazy(() => TemplateInstallStrategySchema).array().optional(), + notIn: z.lazy(() => TemplateInstallStrategySchema).array().optional(), + not: z.union([ z.lazy(() => TemplateInstallStrategySchema),z.lazy(() => NestedEnumTemplateInstallStrategyWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateInstallStrategyFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateInstallStrategyFilterSchema).optional() +}).strict(); + +export const NestedEnumTemplateAssetTypeFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateAssetTypeSchema).optional(), + in: z.lazy(() => TemplateAssetTypeSchema).array().optional(), + notIn: z.lazy(() => TemplateAssetTypeSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateAssetTypeSchema),z.lazy(() => NestedEnumTemplateAssetTypeFilterSchema) ]).optional(), +}).strict(); + +export const NestedEnumTemplateItemStatusFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateItemStatusSchema).optional(), + in: z.lazy(() => TemplateItemStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateItemStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateItemStatusSchema),z.lazy(() => NestedEnumTemplateItemStatusFilterSchema) ]).optional(), +}).strict(); + +export const NestedEnumTemplateAssetTypeWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateAssetTypeSchema).optional(), + in: z.lazy(() => TemplateAssetTypeSchema).array().optional(), + notIn: z.lazy(() => TemplateAssetTypeSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateAssetTypeSchema),z.lazy(() => NestedEnumTemplateAssetTypeWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateAssetTypeFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateAssetTypeFilterSchema).optional() +}).strict(); + +export const NestedEnumTemplateItemStatusWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateItemStatusSchema).optional(), + in: z.lazy(() => TemplateItemStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateItemStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateItemStatusSchema),z.lazy(() => NestedEnumTemplateItemStatusWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateItemStatusFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateItemStatusFilterSchema).optional() +}).strict(); + export const NestedEnumWorkflowStatusFilterSchema: z.ZodType = z.object({ equals: z.lazy(() => WorkflowStatusSchema).optional(), in: z.lazy(() => WorkflowStatusSchema).array().optional(), @@ -27545,6 +31550,91 @@ export const NestedEnumWhatsAppMessageTypeWithAggregatesFilterSchema: z.ZodType< _max: z.lazy(() => NestedEnumWhatsAppMessageTypeFilterSchema).optional() }).strict(); +export const NestedEnumTemplateShareModeFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateShareModeSchema).optional(), + in: z.lazy(() => TemplateShareModeSchema).array().optional(), + notIn: z.lazy(() => TemplateShareModeSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateShareModeSchema),z.lazy(() => NestedEnumTemplateShareModeFilterSchema) ]).optional(), +}).strict(); + +export const NestedEnumTemplateShareStatusFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateShareStatusSchema).optional(), + in: z.lazy(() => TemplateShareStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateShareStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateShareStatusSchema),z.lazy(() => NestedEnumTemplateShareStatusFilterSchema) ]).optional(), +}).strict(); + +export const NestedEnumTemplateShareModeWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateShareModeSchema).optional(), + in: z.lazy(() => TemplateShareModeSchema).array().optional(), + notIn: z.lazy(() => TemplateShareModeSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateShareModeSchema),z.lazy(() => NestedEnumTemplateShareModeWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateShareModeFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateShareModeFilterSchema).optional() +}).strict(); + +export const NestedEnumTemplateShareStatusWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateShareStatusSchema).optional(), + in: z.lazy(() => TemplateShareStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateShareStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateShareStatusSchema),z.lazy(() => NestedEnumTemplateShareStatusWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateShareStatusFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateShareStatusFilterSchema).optional() +}).strict(); + +export const NestedEnumTemplateShareRecipientStatusFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateShareRecipientStatusSchema).optional(), + in: z.lazy(() => TemplateShareRecipientStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateShareRecipientStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateShareRecipientStatusSchema),z.lazy(() => NestedEnumTemplateShareRecipientStatusFilterSchema) ]).optional(), +}).strict(); + +export const NestedEnumTemplateShareRecipientStatusWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateShareRecipientStatusSchema).optional(), + in: z.lazy(() => TemplateShareRecipientStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateShareRecipientStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateShareRecipientStatusSchema),z.lazy(() => NestedEnumTemplateShareRecipientStatusWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateShareRecipientStatusFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateShareRecipientStatusFilterSchema).optional() +}).strict(); + +export const NestedEnumTemplateShareAccessActionFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateShareAccessActionSchema).optional(), + in: z.lazy(() => TemplateShareAccessActionSchema).array().optional(), + notIn: z.lazy(() => TemplateShareAccessActionSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateShareAccessActionSchema),z.lazy(() => NestedEnumTemplateShareAccessActionFilterSchema) ]).optional(), +}).strict(); + +export const NestedEnumTemplateShareAccessStatusFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateShareAccessStatusSchema).optional(), + in: z.lazy(() => TemplateShareAccessStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateShareAccessStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateShareAccessStatusSchema),z.lazy(() => NestedEnumTemplateShareAccessStatusFilterSchema) ]).optional(), +}).strict(); + +export const NestedEnumTemplateShareAccessActionWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateShareAccessActionSchema).optional(), + in: z.lazy(() => TemplateShareAccessActionSchema).array().optional(), + notIn: z.lazy(() => TemplateShareAccessActionSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateShareAccessActionSchema),z.lazy(() => NestedEnumTemplateShareAccessActionWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateShareAccessActionFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateShareAccessActionFilterSchema).optional() +}).strict(); + +export const NestedEnumTemplateShareAccessStatusWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => TemplateShareAccessStatusSchema).optional(), + in: z.lazy(() => TemplateShareAccessStatusSchema).array().optional(), + notIn: z.lazy(() => TemplateShareAccessStatusSchema).array().optional(), + not: z.union([ z.lazy(() => TemplateShareAccessStatusSchema),z.lazy(() => NestedEnumTemplateShareAccessStatusWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTemplateShareAccessStatusFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTemplateShareAccessStatusFilterSchema).optional() +}).strict(); + export const RolePermissionCreateWithoutPermissionInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), role: z.lazy(() => UserRoleSchema), @@ -27725,7 +31815,12 @@ export const OrganizationCreateWithoutCustomRolesInputSchema: z.ZodType WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationUncheckedCreateWithoutCustomRolesInputSchema: z.ZodType = z.object({ @@ -27752,7 +31847,12 @@ export const OrganizationUncheckedCreateWithoutCustomRolesInputSchema: z.ZodType workflows: z.lazy(() => WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationCreateOrConnectWithoutCustomRolesInputSchema: z.ZodType = z.object({ @@ -27841,7 +31941,12 @@ export const OrganizationUpdateWithoutCustomRolesInputSchema: z.ZodType WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const OrganizationUncheckedUpdateWithoutCustomRolesInputSchema: z.ZodType = z.object({ @@ -27868,7 +31973,12 @@ export const OrganizationUncheckedUpdateWithoutCustomRolesInputSchema: z.ZodType workflows: z.lazy(() => WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const CustomRolePermissionUpsertWithWhereUniqueWithoutCustomRoleInputSchema: z.ZodType = z.object({ @@ -28894,6 +33004,220 @@ export const IntegrationConfigCreateManyOrganizationInputEnvelopeSchema: z.ZodTy skipDuplicates: z.boolean().optional() }).strict(); +export const TemplatePackageCreateWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string(), + description: z.string().optional().nullable(), + category: z.string().optional().nullable(), + version: z.string(), + visibility: z.lazy(() => TemplateVisibilitySchema).optional(), + status: z.lazy(() => TemplateStatusSchema).optional(), + iconUrl: z.string().optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + assetsCount: z.number().int().optional(), + sizeBytes: z.number().int().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + versions: z.lazy(() => TemplateVersionCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + shares: z.lazy(() => TemplateShareCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutTemplatePackageInputSchema).optional() +}).strict(); + +export const TemplatePackageUncheckedCreateWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string(), + description: z.string().optional().nullable(), + category: z.string().optional().nullable(), + version: z.string(), + visibility: z.lazy(() => TemplateVisibilitySchema).optional(), + status: z.lazy(() => TemplateStatusSchema).optional(), + iconUrl: z.string().optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + assetsCount: z.number().int().optional(), + sizeBytes: z.number().int().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + versions: z.lazy(() => TemplateVersionUncheckedCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + shares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutTemplatePackageInputSchema).optional() +}).strict(); + +export const TemplatePackageCreateOrConnectWithoutOrganizationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplatePackageWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutOrganizationInputSchema) ]), +}).strict(); + +export const TemplatePackageCreateManyOrganizationInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => TemplatePackageCreateManyOrganizationInputSchema),z.lazy(() => TemplatePackageCreateManyOrganizationInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const TemplateInstallationCreateWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + status: z.lazy(() => TemplateInstallStatusSchema).optional(), + strategy: z.lazy(() => TemplateInstallStrategySchema).optional(), + namePrefix: z.string().optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.string().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + completedAt: z.coerce.date().optional().nullable(), + templatePackage: z.lazy(() => TemplatePackageCreateNestedOneWithoutInstallationsInputSchema).optional(), + templateVersion: z.lazy(() => TemplateVersionCreateNestedOneWithoutInstallationsInputSchema).optional(), + items: z.lazy(() => TemplateInstallItemCreateNestedManyWithoutInstallationInputSchema).optional() +}).strict(); + +export const TemplateInstallationUncheckedCreateWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + templatePackageId: z.string().optional().nullable(), + templateVersionId: z.string().optional().nullable(), + status: z.lazy(() => TemplateInstallStatusSchema).optional(), + strategy: z.lazy(() => TemplateInstallStrategySchema).optional(), + namePrefix: z.string().optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.string().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + completedAt: z.coerce.date().optional().nullable(), + items: z.lazy(() => TemplateInstallItemUncheckedCreateNestedManyWithoutInstallationInputSchema).optional() +}).strict(); + +export const TemplateInstallationCreateOrConnectWithoutOrganizationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateInstallationWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutOrganizationInputSchema) ]), +}).strict(); + +export const TemplateInstallationCreateManyOrganizationInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => TemplateInstallationCreateManyOrganizationInputSchema),z.lazy(() => TemplateInstallationCreateManyOrganizationInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const TemplateShareCreateWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + shareMode: z.lazy(() => TemplateShareModeSchema).optional(), + tokenHash: z.string().optional().nullable(), + expiresAt: z.coerce.date().optional().nullable(), + maxUses: z.number().int().optional().nullable(), + allowExternal: z.boolean().optional(), + notes: z.string().optional().nullable(), + status: z.lazy(() => TemplateShareStatusSchema).optional(), + usageCount: z.number().int().optional(), + lastAccessedAt: z.coerce.date().optional().nullable(), + revokedAt: z.coerce.date().optional().nullable(), + revokedById: z.string().optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + snapshotVersion: z.string(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + templatePackage: z.lazy(() => TemplatePackageCreateNestedOneWithoutSharesInputSchema), + recipients: z.lazy(() => TemplateShareRecipientCreateNestedManyWithoutShareInputSchema).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogCreateNestedManyWithoutShareInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutShareInputSchema).optional() +}).strict(); + +export const TemplateShareUncheckedCreateWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + templatePackageId: z.string(), + name: z.string().optional().nullable(), + shareMode: z.lazy(() => TemplateShareModeSchema).optional(), + tokenHash: z.string().optional().nullable(), + expiresAt: z.coerce.date().optional().nullable(), + maxUses: z.number().int().optional().nullable(), + allowExternal: z.boolean().optional(), + notes: z.string().optional().nullable(), + status: z.lazy(() => TemplateShareStatusSchema).optional(), + usageCount: z.number().int().optional(), + lastAccessedAt: z.coerce.date().optional().nullable(), + revokedAt: z.coerce.date().optional().nullable(), + revokedById: z.string().optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + snapshotVersion: z.string(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + recipients: z.lazy(() => TemplateShareRecipientUncheckedCreateNestedManyWithoutShareInputSchema).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogUncheckedCreateNestedManyWithoutShareInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutShareInputSchema).optional() +}).strict(); + +export const TemplateShareCreateOrConnectWithoutOrganizationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplateShareCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutOrganizationInputSchema) ]), +}).strict(); + +export const TemplateShareCreateManyOrganizationInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => TemplateShareCreateManyOrganizationInputSchema),z.lazy(() => TemplateShareCreateManyOrganizationInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const TemplateShareImportCreateWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + importedById: z.string(), + importedAt: z.coerce.date().optional(), + originalPackageId: z.string(), + originalOrgId: z.string(), + snapshotVersion: z.string(), + share: z.lazy(() => TemplateShareCreateNestedOneWithoutImportsInputSchema), + templatePackage: z.lazy(() => TemplatePackageCreateNestedOneWithoutShareImportsInputSchema) +}).strict(); + +export const TemplateShareImportUncheckedCreateWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + shareId: z.string(), + templatePackageId: z.string(), + importedById: z.string(), + importedAt: z.coerce.date().optional(), + originalPackageId: z.string(), + originalOrgId: z.string(), + snapshotVersion: z.string() +}).strict(); + +export const TemplateShareImportCreateOrConnectWithoutOrganizationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareImportWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplateShareImportCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportUncheckedCreateWithoutOrganizationInputSchema) ]), +}).strict(); + +export const TemplateShareImportCreateManyOrganizationInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => TemplateShareImportCreateManyOrganizationInputSchema),z.lazy(() => TemplateShareImportCreateManyOrganizationInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const OrganizationUiConfigCreateWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + key: z.string(), + config: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional() +}).strict(); + +export const OrganizationUiConfigUncheckedCreateWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + key: z.string(), + config: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional() +}).strict(); + +export const OrganizationUiConfigCreateOrConnectWithoutOrganizationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema), + create: z.union([ z.lazy(() => OrganizationUiConfigCreateWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigUncheckedCreateWithoutOrganizationInputSchema) ]), +}).strict(); + +export const OrganizationUiConfigCreateManyOrganizationInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => OrganizationUiConfigCreateManyOrganizationInputSchema),z.lazy(() => OrganizationUiConfigCreateManyOrganizationInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + export const UserOrganizationUpsertWithWhereUniqueWithoutOrganizationInputSchema: z.ZodType = z.object({ where: z.lazy(() => UserOrganizationWhereUniqueInputSchema), update: z.union([ z.lazy(() => UserOrganizationUpdateWithoutOrganizationInputSchema),z.lazy(() => UserOrganizationUncheckedUpdateWithoutOrganizationInputSchema) ]), @@ -29530,6 +33854,180 @@ export const IntegrationConfigScalarWhereInputSchema: z.ZodType DateTimeFilterSchema),z.coerce.date() ]).optional(), }).strict(); +export const TemplatePackageUpsertWithWhereUniqueWithoutOrganizationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplatePackageWhereUniqueInputSchema), + update: z.union([ z.lazy(() => TemplatePackageUpdateWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageUncheckedUpdateWithoutOrganizationInputSchema) ]), + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutOrganizationInputSchema) ]), +}).strict(); + +export const TemplatePackageUpdateWithWhereUniqueWithoutOrganizationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplatePackageWhereUniqueInputSchema), + data: z.union([ z.lazy(() => TemplatePackageUpdateWithoutOrganizationInputSchema),z.lazy(() => TemplatePackageUncheckedUpdateWithoutOrganizationInputSchema) ]), +}).strict(); + +export const TemplatePackageUpdateManyWithWhereWithoutOrganizationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplatePackageScalarWhereInputSchema), + data: z.union([ z.lazy(() => TemplatePackageUpdateManyMutationInputSchema),z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationInputSchema) ]), +}).strict(); + +export const TemplatePackageScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplatePackageScalarWhereInputSchema),z.lazy(() => TemplatePackageScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplatePackageScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplatePackageScalarWhereInputSchema),z.lazy(() => TemplatePackageScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + organizationId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + name: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + description: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + category: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + version: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + visibility: z.union([ z.lazy(() => EnumTemplateVisibilityFilterSchema),z.lazy(() => TemplateVisibilitySchema) ]).optional(), + status: z.union([ z.lazy(() => EnumTemplateStatusFilterSchema),z.lazy(() => TemplateStatusSchema) ]).optional(), + iconUrl: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + tags: z.lazy(() => JsonNullableFilterSchema).optional(), + manifest: z.lazy(() => JsonFilterSchema).optional(), + assetsCount: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), + sizeBytes: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), + createdById: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), +}).strict(); + +export const TemplateInstallationUpsertWithWhereUniqueWithoutOrganizationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateInstallationWhereUniqueInputSchema), + update: z.union([ z.lazy(() => TemplateInstallationUpdateWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationUncheckedUpdateWithoutOrganizationInputSchema) ]), + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutOrganizationInputSchema) ]), +}).strict(); + +export const TemplateInstallationUpdateWithWhereUniqueWithoutOrganizationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateInstallationWhereUniqueInputSchema), + data: z.union([ z.lazy(() => TemplateInstallationUpdateWithoutOrganizationInputSchema),z.lazy(() => TemplateInstallationUncheckedUpdateWithoutOrganizationInputSchema) ]), +}).strict(); + +export const TemplateInstallationUpdateManyWithWhereWithoutOrganizationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateInstallationScalarWhereInputSchema), + data: z.union([ z.lazy(() => TemplateInstallationUpdateManyMutationInputSchema),z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationInputSchema) ]), +}).strict(); + +export const TemplateInstallationScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateInstallationScalarWhereInputSchema),z.lazy(() => TemplateInstallationScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateInstallationScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateInstallationScalarWhereInputSchema),z.lazy(() => TemplateInstallationScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + organizationId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + templatePackageId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + templateVersionId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + status: z.union([ z.lazy(() => EnumTemplateInstallStatusFilterSchema),z.lazy(() => TemplateInstallStatusSchema) ]).optional(), + strategy: z.union([ z.lazy(() => EnumTemplateInstallStrategyFilterSchema),z.lazy(() => TemplateInstallStrategySchema) ]).optional(), + namePrefix: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + preflight: z.lazy(() => JsonNullableFilterSchema).optional(), + logs: z.lazy(() => JsonNullableFilterSchema).optional(), + error: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + createdById: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + completedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), +}).strict(); + +export const TemplateShareUpsertWithWhereUniqueWithoutOrganizationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareWhereUniqueInputSchema), + update: z.union([ z.lazy(() => TemplateShareUpdateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareUncheckedUpdateWithoutOrganizationInputSchema) ]), + create: z.union([ z.lazy(() => TemplateShareCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutOrganizationInputSchema) ]), +}).strict(); + +export const TemplateShareUpdateWithWhereUniqueWithoutOrganizationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareWhereUniqueInputSchema), + data: z.union([ z.lazy(() => TemplateShareUpdateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareUncheckedUpdateWithoutOrganizationInputSchema) ]), +}).strict(); + +export const TemplateShareUpdateManyWithWhereWithoutOrganizationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareScalarWhereInputSchema), + data: z.union([ z.lazy(() => TemplateShareUpdateManyMutationInputSchema),z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationInputSchema) ]), +}).strict(); + +export const TemplateShareScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateShareScalarWhereInputSchema),z.lazy(() => TemplateShareScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateShareScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateShareScalarWhereInputSchema),z.lazy(() => TemplateShareScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + templatePackageId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + organizationId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + name: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + shareMode: z.union([ z.lazy(() => EnumTemplateShareModeFilterSchema),z.lazy(() => TemplateShareModeSchema) ]).optional(), + tokenHash: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + expiresAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + maxUses: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), + allowExternal: z.union([ z.lazy(() => BoolFilterSchema),z.boolean() ]).optional(), + notes: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + status: z.union([ z.lazy(() => EnumTemplateShareStatusFilterSchema),z.lazy(() => TemplateShareStatusSchema) ]).optional(), + usageCount: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), + lastAccessedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + revokedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + revokedById: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + snapshotData: z.lazy(() => JsonFilterSchema).optional(), + snapshotVersion: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdById: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), +}).strict(); + +export const TemplateShareImportUpsertWithWhereUniqueWithoutOrganizationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareImportWhereUniqueInputSchema), + update: z.union([ z.lazy(() => TemplateShareImportUpdateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportUncheckedUpdateWithoutOrganizationInputSchema) ]), + create: z.union([ z.lazy(() => TemplateShareImportCreateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportUncheckedCreateWithoutOrganizationInputSchema) ]), +}).strict(); + +export const TemplateShareImportUpdateWithWhereUniqueWithoutOrganizationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareImportWhereUniqueInputSchema), + data: z.union([ z.lazy(() => TemplateShareImportUpdateWithoutOrganizationInputSchema),z.lazy(() => TemplateShareImportUncheckedUpdateWithoutOrganizationInputSchema) ]), +}).strict(); + +export const TemplateShareImportUpdateManyWithWhereWithoutOrganizationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareImportScalarWhereInputSchema), + data: z.union([ z.lazy(() => TemplateShareImportUpdateManyMutationInputSchema),z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationInputSchema) ]), +}).strict(); + +export const TemplateShareImportScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateShareImportScalarWhereInputSchema),z.lazy(() => TemplateShareImportScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateShareImportScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateShareImportScalarWhereInputSchema),z.lazy(() => TemplateShareImportScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + shareId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + organizationId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + templatePackageId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + importedById: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + importedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + originalPackageId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + originalOrgId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + snapshotVersion: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), +}).strict(); + +export const OrganizationUiConfigUpsertWithWhereUniqueWithoutOrganizationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema), + update: z.union([ z.lazy(() => OrganizationUiConfigUpdateWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigUncheckedUpdateWithoutOrganizationInputSchema) ]), + create: z.union([ z.lazy(() => OrganizationUiConfigCreateWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigUncheckedCreateWithoutOrganizationInputSchema) ]), +}).strict(); + +export const OrganizationUiConfigUpdateWithWhereUniqueWithoutOrganizationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => OrganizationUiConfigWhereUniqueInputSchema), + data: z.union([ z.lazy(() => OrganizationUiConfigUpdateWithoutOrganizationInputSchema),z.lazy(() => OrganizationUiConfigUncheckedUpdateWithoutOrganizationInputSchema) ]), +}).strict(); + +export const OrganizationUiConfigUpdateManyWithWhereWithoutOrganizationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => OrganizationUiConfigScalarWhereInputSchema), + data: z.union([ z.lazy(() => OrganizationUiConfigUpdateManyMutationInputSchema),z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationInputSchema) ]), +}).strict(); + +export const OrganizationUiConfigScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => OrganizationUiConfigScalarWhereInputSchema),z.lazy(() => OrganizationUiConfigScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => OrganizationUiConfigScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => OrganizationUiConfigScalarWhereInputSchema),z.lazy(() => OrganizationUiConfigScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + organizationId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + key: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + config: z.lazy(() => JsonFilterSchema).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), +}).strict(); + export const OrganizationCreateWithoutUsersInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), name: z.string(), @@ -29554,7 +34052,12 @@ export const OrganizationCreateWithoutUsersInputSchema: z.ZodType WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationUncheckedCreateWithoutUsersInputSchema: z.ZodType = z.object({ @@ -29581,7 +34084,12 @@ export const OrganizationUncheckedCreateWithoutUsersInputSchema: z.ZodType WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationCreateOrConnectWithoutUsersInputSchema: z.ZodType = z.object({ @@ -29655,7 +34163,12 @@ export const OrganizationUpdateWithoutUsersInputSchema: z.ZodType WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const OrganizationUncheckedUpdateWithoutUsersInputSchema: z.ZodType = z.object({ @@ -29682,7 +34195,12 @@ export const OrganizationUncheckedUpdateWithoutUsersInputSchema: z.ZodType WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const CustomRoleUpsertWithoutUserAssignmentsInputSchema: z.ZodType = z.object({ @@ -29746,7 +34264,12 @@ export const OrganizationCreateWithoutCustomersInputSchema: z.ZodType WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationUncheckedCreateWithoutCustomersInputSchema: z.ZodType = z.object({ @@ -29773,7 +34296,12 @@ export const OrganizationUncheckedCreateWithoutCustomersInputSchema: z.ZodType

WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationCreateOrConnectWithoutCustomersInputSchema: z.ZodType = z.object({ @@ -29976,7 +34504,12 @@ export const OrganizationUpdateWithoutCustomersInputSchema: z.ZodType WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const OrganizationUncheckedUpdateWithoutCustomersInputSchema: z.ZodType = z.object({ @@ -30003,7 +34536,12 @@ export const OrganizationUncheckedUpdateWithoutCustomersInputSchema: z.ZodType

WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const CustomerInteractionUpsertWithWhereUniqueWithoutCustomerInputSchema: z.ZodType = z.object({ @@ -30415,7 +34953,12 @@ export const OrganizationCreateWithoutProjectsInputSchema: z.ZodType WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationUncheckedCreateWithoutProjectsInputSchema: z.ZodType = z.object({ @@ -30442,7 +34985,12 @@ export const OrganizationUncheckedCreateWithoutProjectsInputSchema: z.ZodType WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationCreateOrConnectWithoutProjectsInputSchema: z.ZodType = z.object({ @@ -30685,7 +35233,12 @@ export const OrganizationUpdateWithoutProjectsInputSchema: z.ZodType WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const OrganizationUncheckedUpdateWithoutProjectsInputSchema: z.ZodType = z.object({ @@ -30712,7 +35265,12 @@ export const OrganizationUncheckedUpdateWithoutProjectsInputSchema: z.ZodType WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const TaskUpsertWithWhereUniqueWithoutProjectInputSchema: z.ZodType = z.object({ @@ -30838,7 +35396,12 @@ export const OrganizationCreateWithoutTasksInputSchema: z.ZodType WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationUncheckedCreateWithoutTasksInputSchema: z.ZodType = z.object({ @@ -30865,7 +35428,12 @@ export const OrganizationUncheckedCreateWithoutTasksInputSchema: z.ZodType WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationCreateOrConnectWithoutTasksInputSchema: z.ZodType = z.object({ @@ -31195,7 +35763,12 @@ export const OrganizationUpdateWithoutTasksInputSchema: z.ZodType WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const OrganizationUncheckedUpdateWithoutTasksInputSchema: z.ZodType = z.object({ @@ -31222,7 +35795,12 @@ export const OrganizationUncheckedUpdateWithoutTasksInputSchema: z.ZodType WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const ProjectUpsertWithoutTasksInputSchema: z.ZodType = z.object({ @@ -31779,7 +36357,12 @@ export const OrganizationCreateWithoutInvoicesInputSchema: z.ZodType WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationUncheckedCreateWithoutInvoicesInputSchema: z.ZodType = z.object({ @@ -31806,7 +36389,12 @@ export const OrganizationUncheckedCreateWithoutInvoicesInputSchema: z.ZodType WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationCreateOrConnectWithoutInvoicesInputSchema: z.ZodType = z.object({ @@ -31984,7 +36572,12 @@ export const OrganizationUpdateWithoutInvoicesInputSchema: z.ZodType WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const OrganizationUncheckedUpdateWithoutInvoicesInputSchema: z.ZodType = z.object({ @@ -32011,7 +36604,12 @@ export const OrganizationUncheckedUpdateWithoutInvoicesInputSchema: z.ZodType WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const CustomerUpsertWithoutInvoicesInputSchema: z.ZodType = z.object({ @@ -32480,7 +37078,12 @@ export const OrganizationCreateWithoutExpensesInputSchema: z.ZodType WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationUncheckedCreateWithoutExpensesInputSchema: z.ZodType = z.object({ @@ -32507,7 +37110,12 @@ export const OrganizationUncheckedCreateWithoutExpensesInputSchema: z.ZodType WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationCreateOrConnectWithoutExpensesInputSchema: z.ZodType = z.object({ @@ -32636,7 +37244,12 @@ export const OrganizationUpdateWithoutExpensesInputSchema: z.ZodType WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const OrganizationUncheckedUpdateWithoutExpensesInputSchema: z.ZodType = z.object({ @@ -32663,7 +37276,12 @@ export const OrganizationUncheckedUpdateWithoutExpensesInputSchema: z.ZodType WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const ExpenseCategoryUpsertWithoutExpensesInputSchema: z.ZodType = z.object({ @@ -32794,7 +37412,12 @@ export const OrganizationCreateWithoutExpenseCategoriesInputSchema: z.ZodType WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationUncheckedCreateWithoutExpenseCategoriesInputSchema: z.ZodType = z.object({ @@ -32821,7 +37444,12 @@ export const OrganizationUncheckedCreateWithoutExpenseCategoriesInputSchema: z.Z workflows: z.lazy(() => WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationCreateOrConnectWithoutExpenseCategoriesInputSchema: z.ZodType = z.object({ @@ -32930,7 +37558,12 @@ export const OrganizationUpdateWithoutExpenseCategoriesInputSchema: z.ZodType WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const OrganizationUncheckedUpdateWithoutExpenseCategoriesInputSchema: z.ZodType = z.object({ @@ -32957,7 +37590,12 @@ export const OrganizationUncheckedUpdateWithoutExpenseCategoriesInputSchema: z.Z workflows: z.lazy(() => WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const ExpenseUpsertWithWhereUniqueWithoutCategoryInputSchema: z.ZodType = z.object({ @@ -33000,7 +37638,12 @@ export const OrganizationCreateWithoutExpenseTagsInputSchema: z.ZodType WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationUncheckedCreateWithoutExpenseTagsInputSchema: z.ZodType = z.object({ @@ -33027,7 +37670,12 @@ export const OrganizationUncheckedCreateWithoutExpenseTagsInputSchema: z.ZodType workflows: z.lazy(() => WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationCreateOrConnectWithoutExpenseTagsInputSchema: z.ZodType = z.object({ @@ -33088,7 +37736,12 @@ export const OrganizationUpdateWithoutExpenseTagsInputSchema: z.ZodType WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const OrganizationUncheckedUpdateWithoutExpenseTagsInputSchema: z.ZodType = z.object({ @@ -33115,7 +37768,12 @@ export const OrganizationUncheckedUpdateWithoutExpenseTagsInputSchema: z.ZodType workflows: z.lazy(() => WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const ExpenseToTagUpsertWithWhereUniqueWithoutTagInputSchema: z.ZodType = z.object({ @@ -33685,7 +38343,12 @@ export const OrganizationCreateWithoutInvitationsInputSchema: z.ZodType WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationUncheckedCreateWithoutInvitationsInputSchema: z.ZodType = z.object({ @@ -33712,7 +38375,12 @@ export const OrganizationUncheckedCreateWithoutInvitationsInputSchema: z.ZodType workflows: z.lazy(() => WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationCreateOrConnectWithoutInvitationsInputSchema: z.ZodType = z.object({ @@ -33755,7 +38423,12 @@ export const OrganizationUpdateWithoutInvitationsInputSchema: z.ZodType WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const OrganizationUncheckedUpdateWithoutInvitationsInputSchema: z.ZodType = z.object({ @@ -33782,7 +38455,12 @@ export const OrganizationUncheckedUpdateWithoutInvitationsInputSchema: z.ZodType workflows: z.lazy(() => WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const OrganizationCreateWithoutEmployeesInputSchema: z.ZodType = z.object({ @@ -33809,7 +38487,12 @@ export const OrganizationCreateWithoutEmployeesInputSchema: z.ZodType WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationUncheckedCreateWithoutEmployeesInputSchema: z.ZodType = z.object({ @@ -33836,7 +38519,12 @@ export const OrganizationUncheckedCreateWithoutEmployeesInputSchema: z.ZodType

WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationCreateOrConnectWithoutEmployeesInputSchema: z.ZodType = z.object({ @@ -34005,7 +38693,12 @@ export const OrganizationUpdateWithoutEmployeesInputSchema: z.ZodType WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const OrganizationUncheckedUpdateWithoutEmployeesInputSchema: z.ZodType = z.object({ @@ -34032,7 +38725,12 @@ export const OrganizationUncheckedUpdateWithoutEmployeesInputSchema: z.ZodType

WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const PayrollUpsertWithWhereUniqueWithoutEmployeeInputSchema: z.ZodType = z.object({ @@ -34551,7 +39249,12 @@ export const OrganizationCreateWithoutCampaignsInputSchema: z.ZodType WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationUncheckedCreateWithoutCampaignsInputSchema: z.ZodType = z.object({ @@ -34578,7 +39281,12 @@ export const OrganizationUncheckedCreateWithoutCampaignsInputSchema: z.ZodType

WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationCreateOrConnectWithoutCampaignsInputSchema: z.ZodType = z.object({ @@ -34697,7 +39405,12 @@ export const OrganizationUpdateWithoutCampaignsInputSchema: z.ZodType WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const OrganizationUncheckedUpdateWithoutCampaignsInputSchema: z.ZodType = z.object({ @@ -34724,7 +39437,12 @@ export const OrganizationUncheckedUpdateWithoutCampaignsInputSchema: z.ZodType

WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const EmailCampaignUpsertWithWhereUniqueWithoutCampaignInputSchema: z.ZodType = z.object({ @@ -35250,7 +39968,12 @@ export const OrganizationCreateWithoutFinancialReportsInputSchema: z.ZodType WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationUncheckedCreateWithoutFinancialReportsInputSchema: z.ZodType = z.object({ @@ -35277,7 +40000,12 @@ export const OrganizationUncheckedCreateWithoutFinancialReportsInputSchema: z.Zo workflows: z.lazy(() => WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationCreateOrConnectWithoutFinancialReportsInputSchema: z.ZodType = z.object({ @@ -35426,7 +40154,12 @@ export const OrganizationUpdateWithoutFinancialReportsInputSchema: z.ZodType WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const OrganizationUncheckedUpdateWithoutFinancialReportsInputSchema: z.ZodType = z.object({ @@ -35453,7 +40186,12 @@ export const OrganizationUncheckedUpdateWithoutFinancialReportsInputSchema: z.Zo workflows: z.lazy(() => WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const FinancialReportDataUpsertWithWhereUniqueWithoutReportInputSchema: z.ZodType = z.object({ @@ -35866,7 +40604,7 @@ export const FinancialReportUncheckedUpdateWithoutSchedulesInputSchema: z.ZodTyp exports: z.lazy(() => FinancialReportExportUncheckedUpdateManyWithoutReportNestedInputSchema).optional() }).strict(); -export const OrganizationCreateWithoutWorkflowsInputSchema: z.ZodType = z.object({ +export const OrganizationCreateWithoutTemplatePackagesInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), name: z.string(), logo: z.string().optional().nullable(), @@ -35888,12 +40626,17 @@ export const OrganizationCreateWithoutWorkflowsInputSchema: z.ZodType InvitationCreateNestedManyWithoutOrganizationInputSchema).optional(), customRoles: z.lazy(() => CustomRoleCreateNestedManyWithoutOrganizationInputSchema).optional(), financialReports: z.lazy(() => FinancialReportCreateNestedManyWithoutOrganizationInputSchema).optional(), + workflows: z.lazy(() => WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); -export const OrganizationUncheckedCreateWithoutWorkflowsInputSchema: z.ZodType = z.object({ +export const OrganizationUncheckedCreateWithoutTemplatePackagesInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), name: z.string(), logo: z.string().optional().nullable(), @@ -35915,302 +40658,1308 @@ export const OrganizationUncheckedCreateWithoutWorkflowsInputSchema: z.ZodType

InvitationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), customRoles: z.lazy(() => CustomRoleUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), financialReports: z.lazy(() => FinancialReportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + workflows: z.lazy(() => WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); -export const OrganizationCreateOrConnectWithoutWorkflowsInputSchema: z.ZodType = z.object({ +export const OrganizationCreateOrConnectWithoutTemplatePackagesInputSchema: z.ZodType = z.object({ where: z.lazy(() => OrganizationWhereUniqueInputSchema), - create: z.union([ z.lazy(() => OrganizationCreateWithoutWorkflowsInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutWorkflowsInputSchema) ]), + create: z.union([ z.lazy(() => OrganizationCreateWithoutTemplatePackagesInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutTemplatePackagesInputSchema) ]), }).strict(); -export const WorkflowTriggerCreateWithoutWorkflowInputSchema: z.ZodType = z.object({ +export const TemplateVersionCreateWithoutTemplatePackageInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), - name: z.string(), - description: z.string().optional().nullable(), - type: z.lazy(() => WorkflowTriggerTypeSchema), - module: z.string(), - entityType: z.string().optional().nullable(), - eventType: z.string(), - conditions: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - delay: z.number().int().optional().nullable(), + version: z.string(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + changelog: z.string().optional().nullable(), isActive: z.boolean().optional(), - lastTriggered: z.coerce.date().optional().nullable(), - triggerCount: z.number().int().optional(), + createdById: z.string(), createdAt: z.coerce.date().optional(), - updatedAt: z.coerce.date().optional(), - executions: z.lazy(() => WorkflowExecutionCreateNestedManyWithoutTriggerInputSchema).optional(), - variables: z.lazy(() => TriggerVariableCreateNestedManyWithoutTriggerInputSchema).optional(), - node: z.lazy(() => WorkflowNodeCreateNestedOneWithoutTriggerInputSchema).optional() + installations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutTemplateVersionInputSchema).optional() }).strict(); -export const WorkflowTriggerUncheckedCreateWithoutWorkflowInputSchema: z.ZodType = z.object({ +export const TemplateVersionUncheckedCreateWithoutTemplatePackageInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), - nodeId: z.string().optional().nullable(), - name: z.string(), - description: z.string().optional().nullable(), - type: z.lazy(() => WorkflowTriggerTypeSchema), - module: z.string(), - entityType: z.string().optional().nullable(), - eventType: z.string(), - conditions: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - delay: z.number().int().optional().nullable(), + version: z.string(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + changelog: z.string().optional().nullable(), isActive: z.boolean().optional(), - lastTriggered: z.coerce.date().optional().nullable(), - triggerCount: z.number().int().optional(), - createdAt: z.coerce.date().optional(), - updatedAt: z.coerce.date().optional(), - executions: z.lazy(() => WorkflowExecutionUncheckedCreateNestedManyWithoutTriggerInputSchema).optional(), - variables: z.lazy(() => TriggerVariableUncheckedCreateNestedManyWithoutTriggerInputSchema).optional() -}).strict(); - -export const WorkflowTriggerCreateOrConnectWithoutWorkflowInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowTriggerWhereUniqueInputSchema), - create: z.union([ z.lazy(() => WorkflowTriggerCreateWithoutWorkflowInputSchema),z.lazy(() => WorkflowTriggerUncheckedCreateWithoutWorkflowInputSchema) ]), -}).strict(); - -export const WorkflowTriggerCreateManyWorkflowInputEnvelopeSchema: z.ZodType = z.object({ - data: z.union([ z.lazy(() => WorkflowTriggerCreateManyWorkflowInputSchema),z.lazy(() => WorkflowTriggerCreateManyWorkflowInputSchema).array() ]), - skipDuplicates: z.boolean().optional() -}).strict(); - -export const WorkflowNodeCreateWithoutWorkflowInputSchema: z.ZodType = z.object({ - id: z.string().cuid().optional(), - nodeId: z.string(), - type: z.lazy(() => WorkflowNodeTypeSchema), - name: z.string(), - description: z.string().optional().nullable(), - position: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), - config: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - template: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - executionOrder: z.number().int().optional().nullable(), - isOptional: z.boolean().optional(), - retryLimit: z.number().int().optional(), - timeout: z.number().int().optional().nullable(), - conditions: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - createdAt: z.coerce.date().optional(), - updatedAt: z.coerce.date().optional(), - executions: z.lazy(() => NodeExecutionCreateNestedManyWithoutNodeInputSchema).optional(), - dependencies: z.lazy(() => NodeDependencyCreateNestedManyWithoutDependentNodeInputSchema).optional(), - dependents: z.lazy(() => NodeDependencyCreateNestedManyWithoutPrerequisiteNodeInputSchema).optional(), - sourceConnections: z.lazy(() => WorkflowConnectionCreateNestedManyWithoutSourceNodeInputSchema).optional(), - targetConnections: z.lazy(() => WorkflowConnectionCreateNestedManyWithoutTargetNodeInputSchema).optional(), - emailAction: z.lazy(() => EmailActionCreateNestedOneWithoutActionInputSchema).optional(), - smsAction: z.lazy(() => SmsActionCreateNestedOneWithoutActionInputSchema).optional(), - whatsAppAction: z.lazy(() => WhatsAppActionCreateNestedOneWithoutActionInputSchema).optional(), - slackAction: z.lazy(() => SlackActionCreateNestedOneWithoutActionInputSchema).optional(), - calendarAction: z.lazy(() => CalendarActionCreateNestedOneWithoutActionInputSchema).optional(), - trigger: z.lazy(() => WorkflowTriggerCreateNestedOneWithoutNodeInputSchema).optional() -}).strict(); - -export const WorkflowNodeUncheckedCreateWithoutWorkflowInputSchema: z.ZodType = z.object({ - id: z.string().cuid().optional(), - nodeId: z.string(), - type: z.lazy(() => WorkflowNodeTypeSchema), - name: z.string(), - description: z.string().optional().nullable(), - position: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), - config: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - template: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - executionOrder: z.number().int().optional().nullable(), - isOptional: z.boolean().optional(), - retryLimit: z.number().int().optional(), - timeout: z.number().int().optional().nullable(), - conditions: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdById: z.string(), createdAt: z.coerce.date().optional(), - updatedAt: z.coerce.date().optional(), - executions: z.lazy(() => NodeExecutionUncheckedCreateNestedManyWithoutNodeInputSchema).optional(), - dependencies: z.lazy(() => NodeDependencyUncheckedCreateNestedManyWithoutDependentNodeInputSchema).optional(), - dependents: z.lazy(() => NodeDependencyUncheckedCreateNestedManyWithoutPrerequisiteNodeInputSchema).optional(), - sourceConnections: z.lazy(() => WorkflowConnectionUncheckedCreateNestedManyWithoutSourceNodeInputSchema).optional(), - targetConnections: z.lazy(() => WorkflowConnectionUncheckedCreateNestedManyWithoutTargetNodeInputSchema).optional(), - emailAction: z.lazy(() => EmailActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), - smsAction: z.lazy(() => SmsActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), - whatsAppAction: z.lazy(() => WhatsAppActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), - slackAction: z.lazy(() => SlackActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), - calendarAction: z.lazy(() => CalendarActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), - trigger: z.lazy(() => WorkflowTriggerUncheckedCreateNestedOneWithoutNodeInputSchema).optional() + installations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutTemplateVersionInputSchema).optional() }).strict(); -export const WorkflowNodeCreateOrConnectWithoutWorkflowInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowNodeWhereUniqueInputSchema), - create: z.union([ z.lazy(() => WorkflowNodeCreateWithoutWorkflowInputSchema),z.lazy(() => WorkflowNodeUncheckedCreateWithoutWorkflowInputSchema) ]), +export const TemplateVersionCreateOrConnectWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateVersionWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplateVersionCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionUncheckedCreateWithoutTemplatePackageInputSchema) ]), }).strict(); -export const WorkflowNodeCreateManyWorkflowInputEnvelopeSchema: z.ZodType = z.object({ - data: z.union([ z.lazy(() => WorkflowNodeCreateManyWorkflowInputSchema),z.lazy(() => WorkflowNodeCreateManyWorkflowInputSchema).array() ]), +export const TemplateVersionCreateManyTemplatePackageInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => TemplateVersionCreateManyTemplatePackageInputSchema),z.lazy(() => TemplateVersionCreateManyTemplatePackageInputSchema).array() ]), skipDuplicates: z.boolean().optional() }).strict(); -export const WorkflowConnectionCreateWithoutWorkflowInputSchema: z.ZodType = z.object({ +export const TemplateInstallationCreateWithoutTemplatePackageInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), - executionOrder: z.number().int().optional(), - label: z.string().optional().nullable(), - conditions: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - edgeId: z.string().optional().nullable(), - sourceHandle: z.string().optional().nullable(), - targetHandle: z.string().optional().nullable(), - style: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - animated: z.boolean().optional(), + status: z.lazy(() => TemplateInstallStatusSchema).optional(), + strategy: z.lazy(() => TemplateInstallStrategySchema).optional(), + namePrefix: z.string().optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.string().optional().nullable(), + createdById: z.string(), createdAt: z.coerce.date().optional(), - updatedAt: z.coerce.date().optional(), - sourceNode: z.lazy(() => WorkflowNodeCreateNestedOneWithoutSourceConnectionsInputSchema), - targetNode: z.lazy(() => WorkflowNodeCreateNestedOneWithoutTargetConnectionsInputSchema) + completedAt: z.coerce.date().optional().nullable(), + organization: z.lazy(() => OrganizationCreateNestedOneWithoutTemplateInstallationsInputSchema), + templateVersion: z.lazy(() => TemplateVersionCreateNestedOneWithoutInstallationsInputSchema).optional(), + items: z.lazy(() => TemplateInstallItemCreateNestedManyWithoutInstallationInputSchema).optional() }).strict(); -export const WorkflowConnectionUncheckedCreateWithoutWorkflowInputSchema: z.ZodType = z.object({ +export const TemplateInstallationUncheckedCreateWithoutTemplatePackageInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), - sourceNodeId: z.string(), - targetNodeId: z.string(), - executionOrder: z.number().int().optional(), - label: z.string().optional().nullable(), - conditions: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - edgeId: z.string().optional().nullable(), - sourceHandle: z.string().optional().nullable(), - targetHandle: z.string().optional().nullable(), - style: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - animated: z.boolean().optional(), + organizationId: z.string(), + templateVersionId: z.string().optional().nullable(), + status: z.lazy(() => TemplateInstallStatusSchema).optional(), + strategy: z.lazy(() => TemplateInstallStrategySchema).optional(), + namePrefix: z.string().optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.string().optional().nullable(), + createdById: z.string(), createdAt: z.coerce.date().optional(), - updatedAt: z.coerce.date().optional() + completedAt: z.coerce.date().optional().nullable(), + items: z.lazy(() => TemplateInstallItemUncheckedCreateNestedManyWithoutInstallationInputSchema).optional() }).strict(); -export const WorkflowConnectionCreateOrConnectWithoutWorkflowInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowConnectionWhereUniqueInputSchema), - create: z.union([ z.lazy(() => WorkflowConnectionCreateWithoutWorkflowInputSchema),z.lazy(() => WorkflowConnectionUncheckedCreateWithoutWorkflowInputSchema) ]), +export const TemplateInstallationCreateOrConnectWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateInstallationWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutTemplatePackageInputSchema) ]), }).strict(); -export const WorkflowConnectionCreateManyWorkflowInputEnvelopeSchema: z.ZodType = z.object({ - data: z.union([ z.lazy(() => WorkflowConnectionCreateManyWorkflowInputSchema),z.lazy(() => WorkflowConnectionCreateManyWorkflowInputSchema).array() ]), +export const TemplateInstallationCreateManyTemplatePackageInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => TemplateInstallationCreateManyTemplatePackageInputSchema),z.lazy(() => TemplateInstallationCreateManyTemplatePackageInputSchema).array() ]), skipDuplicates: z.boolean().optional() }).strict(); -export const WorkflowExecutionCreateWithoutWorkflowInputSchema: z.ZodType = z.object({ +export const TemplateShareCreateWithoutTemplatePackageInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), - executionId: z.string(), - status: z.lazy(() => WorkflowExecutionStatusSchema).optional(), - priority: z.lazy(() => ExecutionPrioritySchema).optional(), - triggerData: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - triggerContext: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - currentNodeId: z.string().optional().nullable(), - progress: z.number().optional(), - startedAt: z.coerce.date().optional().nullable(), - completedAt: z.coerce.date().optional().nullable(), - failedAt: z.coerce.date().optional().nullable(), - duration: z.number().int().optional().nullable(), - result: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - error: z.string().optional().nullable(), - errorDetails: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - retryCount: z.number().int().optional(), - maxRetries: z.number().int().optional(), - retryDelay: z.number().int().optional(), + name: z.string().optional().nullable(), + shareMode: z.lazy(() => TemplateShareModeSchema).optional(), + tokenHash: z.string().optional().nullable(), + expiresAt: z.coerce.date().optional().nullable(), + maxUses: z.number().int().optional().nullable(), + allowExternal: z.boolean().optional(), + notes: z.string().optional().nullable(), + status: z.lazy(() => TemplateShareStatusSchema).optional(), + usageCount: z.number().int().optional(), + lastAccessedAt: z.coerce.date().optional().nullable(), + revokedAt: z.coerce.date().optional().nullable(), + revokedById: z.string().optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + snapshotVersion: z.string(), + createdById: z.string(), createdAt: z.coerce.date().optional(), updatedAt: z.coerce.date().optional(), - trigger: z.lazy(() => WorkflowTriggerCreateNestedOneWithoutExecutionsInputSchema).optional(), - nodeExecutions: z.lazy(() => NodeExecutionCreateNestedManyWithoutWorkflowExecutionInputSchema).optional(), - variables: z.lazy(() => ExecutionVariableCreateNestedManyWithoutWorkflowExecutionInputSchema).optional(), - logs: z.lazy(() => ExecutionLogCreateNestedManyWithoutWorkflowExecutionInputSchema).optional() + organization: z.lazy(() => OrganizationCreateNestedOneWithoutTemplateSharesInputSchema), + recipients: z.lazy(() => TemplateShareRecipientCreateNestedManyWithoutShareInputSchema).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogCreateNestedManyWithoutShareInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutShareInputSchema).optional() }).strict(); -export const WorkflowExecutionUncheckedCreateWithoutWorkflowInputSchema: z.ZodType = z.object({ +export const TemplateShareUncheckedCreateWithoutTemplatePackageInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), - triggerId: z.string().optional().nullable(), - executionId: z.string(), - status: z.lazy(() => WorkflowExecutionStatusSchema).optional(), - priority: z.lazy(() => ExecutionPrioritySchema).optional(), - triggerData: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - triggerContext: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - currentNodeId: z.string().optional().nullable(), - progress: z.number().optional(), - startedAt: z.coerce.date().optional().nullable(), - completedAt: z.coerce.date().optional().nullable(), - failedAt: z.coerce.date().optional().nullable(), - duration: z.number().int().optional().nullable(), - result: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - error: z.string().optional().nullable(), - errorDetails: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - retryCount: z.number().int().optional(), - maxRetries: z.number().int().optional(), - retryDelay: z.number().int().optional(), + organizationId: z.string(), + name: z.string().optional().nullable(), + shareMode: z.lazy(() => TemplateShareModeSchema).optional(), + tokenHash: z.string().optional().nullable(), + expiresAt: z.coerce.date().optional().nullable(), + maxUses: z.number().int().optional().nullable(), + allowExternal: z.boolean().optional(), + notes: z.string().optional().nullable(), + status: z.lazy(() => TemplateShareStatusSchema).optional(), + usageCount: z.number().int().optional(), + lastAccessedAt: z.coerce.date().optional().nullable(), + revokedAt: z.coerce.date().optional().nullable(), + revokedById: z.string().optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + snapshotVersion: z.string(), + createdById: z.string(), createdAt: z.coerce.date().optional(), updatedAt: z.coerce.date().optional(), - nodeExecutions: z.lazy(() => NodeExecutionUncheckedCreateNestedManyWithoutWorkflowExecutionInputSchema).optional(), - variables: z.lazy(() => ExecutionVariableUncheckedCreateNestedManyWithoutWorkflowExecutionInputSchema).optional(), - logs: z.lazy(() => ExecutionLogUncheckedCreateNestedManyWithoutWorkflowExecutionInputSchema).optional() + recipients: z.lazy(() => TemplateShareRecipientUncheckedCreateNestedManyWithoutShareInputSchema).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogUncheckedCreateNestedManyWithoutShareInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutShareInputSchema).optional() }).strict(); -export const WorkflowExecutionCreateOrConnectWithoutWorkflowInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowExecutionWhereUniqueInputSchema), - create: z.union([ z.lazy(() => WorkflowExecutionCreateWithoutWorkflowInputSchema),z.lazy(() => WorkflowExecutionUncheckedCreateWithoutWorkflowInputSchema) ]), +export const TemplateShareCreateOrConnectWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplateShareCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutTemplatePackageInputSchema) ]), }).strict(); -export const WorkflowExecutionCreateManyWorkflowInputEnvelopeSchema: z.ZodType = z.object({ - data: z.union([ z.lazy(() => WorkflowExecutionCreateManyWorkflowInputSchema),z.lazy(() => WorkflowExecutionCreateManyWorkflowInputSchema).array() ]), +export const TemplateShareCreateManyTemplatePackageInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => TemplateShareCreateManyTemplatePackageInputSchema),z.lazy(() => TemplateShareCreateManyTemplatePackageInputSchema).array() ]), skipDuplicates: z.boolean().optional() }).strict(); -export const WorkflowAnalyticsCreateWithoutWorkflowInputSchema: z.ZodType = z.object({ +export const TemplateShareImportCreateWithoutTemplatePackageInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), - periodStart: z.coerce.date(), - periodEnd: z.coerce.date(), - granularity: z.string().optional(), - totalExecutions: z.number().int().optional(), - successfulExecutions: z.number().int().optional(), - failedExecutions: z.number().int().optional(), - averageDuration: z.number().optional().nullable(), - minDuration: z.number().int().optional().nullable(), - maxDuration: z.number().int().optional().nullable(), - p95Duration: z.number().int().optional().nullable(), - commonErrors: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - errorRate: z.number().optional().nullable(), - avgCpuUsage: z.number().optional().nullable(), - avgMemoryUsage: z.number().optional().nullable(), - createdAt: z.coerce.date().optional(), - updatedAt: z.coerce.date().optional() + importedById: z.string(), + importedAt: z.coerce.date().optional(), + originalPackageId: z.string(), + originalOrgId: z.string(), + snapshotVersion: z.string(), + share: z.lazy(() => TemplateShareCreateNestedOneWithoutImportsInputSchema), + organization: z.lazy(() => OrganizationCreateNestedOneWithoutTemplateShareImportsInputSchema) }).strict(); -export const WorkflowAnalyticsUncheckedCreateWithoutWorkflowInputSchema: z.ZodType = z.object({ +export const TemplateShareImportUncheckedCreateWithoutTemplatePackageInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), - periodStart: z.coerce.date(), - periodEnd: z.coerce.date(), - granularity: z.string().optional(), - totalExecutions: z.number().int().optional(), - successfulExecutions: z.number().int().optional(), - failedExecutions: z.number().int().optional(), - averageDuration: z.number().optional().nullable(), - minDuration: z.number().int().optional().nullable(), - maxDuration: z.number().int().optional().nullable(), - p95Duration: z.number().int().optional().nullable(), - commonErrors: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - errorRate: z.number().optional().nullable(), - avgCpuUsage: z.number().optional().nullable(), - avgMemoryUsage: z.number().optional().nullable(), - createdAt: z.coerce.date().optional(), - updatedAt: z.coerce.date().optional() + shareId: z.string(), + organizationId: z.string(), + importedById: z.string(), + importedAt: z.coerce.date().optional(), + originalPackageId: z.string(), + originalOrgId: z.string(), + snapshotVersion: z.string() }).strict(); -export const WorkflowAnalyticsCreateOrConnectWithoutWorkflowInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowAnalyticsWhereUniqueInputSchema), - create: z.union([ z.lazy(() => WorkflowAnalyticsCreateWithoutWorkflowInputSchema),z.lazy(() => WorkflowAnalyticsUncheckedCreateWithoutWorkflowInputSchema) ]), +export const TemplateShareImportCreateOrConnectWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareImportWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplateShareImportCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportUncheckedCreateWithoutTemplatePackageInputSchema) ]), }).strict(); -export const WorkflowAnalyticsCreateManyWorkflowInputEnvelopeSchema: z.ZodType = z.object({ - data: z.union([ z.lazy(() => WorkflowAnalyticsCreateManyWorkflowInputSchema),z.lazy(() => WorkflowAnalyticsCreateManyWorkflowInputSchema).array() ]), +export const TemplateShareImportCreateManyTemplatePackageInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => TemplateShareImportCreateManyTemplatePackageInputSchema),z.lazy(() => TemplateShareImportCreateManyTemplatePackageInputSchema).array() ]), skipDuplicates: z.boolean().optional() }).strict(); -export const OrganizationUpsertWithoutWorkflowsInputSchema: z.ZodType = z.object({ - update: z.union([ z.lazy(() => OrganizationUpdateWithoutWorkflowsInputSchema),z.lazy(() => OrganizationUncheckedUpdateWithoutWorkflowsInputSchema) ]), - create: z.union([ z.lazy(() => OrganizationCreateWithoutWorkflowsInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutWorkflowsInputSchema) ]), +export const OrganizationUpsertWithoutTemplatePackagesInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => OrganizationUpdateWithoutTemplatePackagesInputSchema),z.lazy(() => OrganizationUncheckedUpdateWithoutTemplatePackagesInputSchema) ]), + create: z.union([ z.lazy(() => OrganizationCreateWithoutTemplatePackagesInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutTemplatePackagesInputSchema) ]), where: z.lazy(() => OrganizationWhereInputSchema).optional() }).strict(); -export const OrganizationUpdateToOneWithWhereWithoutWorkflowsInputSchema: z.ZodType = z.object({ +export const OrganizationUpdateToOneWithWhereWithoutTemplatePackagesInputSchema: z.ZodType = z.object({ where: z.lazy(() => OrganizationWhereInputSchema).optional(), - data: z.union([ z.lazy(() => OrganizationUpdateWithoutWorkflowsInputSchema),z.lazy(() => OrganizationUncheckedUpdateWithoutWorkflowsInputSchema) ]), + data: z.union([ z.lazy(() => OrganizationUpdateWithoutTemplatePackagesInputSchema),z.lazy(() => OrganizationUncheckedUpdateWithoutTemplatePackagesInputSchema) ]), }).strict(); -export const OrganizationUpdateWithoutWorkflowsInputSchema: z.ZodType = z.object({ +export const OrganizationUpdateWithoutTemplatePackagesInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + logo: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + website: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + industry: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + users: z.lazy(() => UserOrganizationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + customers: z.lazy(() => CustomerUpdateManyWithoutOrganizationNestedInputSchema).optional(), + projects: z.lazy(() => ProjectUpdateManyWithoutOrganizationNestedInputSchema).optional(), + tasks: z.lazy(() => TaskUpdateManyWithoutOrganizationNestedInputSchema).optional(), + invoices: z.lazy(() => InvoiceUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenses: z.lazy(() => ExpenseUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenseCategories: z.lazy(() => ExpenseCategoryUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenseTags: z.lazy(() => ExpenseTagUpdateManyWithoutOrganizationNestedInputSchema).optional(), + employees: z.lazy(() => EmployeeUpdateManyWithoutOrganizationNestedInputSchema).optional(), + campaigns: z.lazy(() => MarketingCampaignUpdateManyWithoutOrganizationNestedInputSchema).optional(), + invitations: z.lazy(() => InvitationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + customRoles: z.lazy(() => CustomRoleUpdateManyWithoutOrganizationNestedInputSchema).optional(), + financialReports: z.lazy(() => FinancialReportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + workflows: z.lazy(() => WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), + actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), + variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() +}).strict(); + +export const OrganizationUncheckedUpdateWithoutTemplatePackagesInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + logo: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + website: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + industry: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + users: z.lazy(() => UserOrganizationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + customers: z.lazy(() => CustomerUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + projects: z.lazy(() => ProjectUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + tasks: z.lazy(() => TaskUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + invoices: z.lazy(() => InvoiceUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenses: z.lazy(() => ExpenseUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenseCategories: z.lazy(() => ExpenseCategoryUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenseTags: z.lazy(() => ExpenseTagUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + employees: z.lazy(() => EmployeeUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + campaigns: z.lazy(() => MarketingCampaignUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + invitations: z.lazy(() => InvitationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + customRoles: z.lazy(() => CustomRoleUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + financialReports: z.lazy(() => FinancialReportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + workflows: z.lazy(() => WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() +}).strict(); + +export const TemplateVersionUpsertWithWhereUniqueWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateVersionWhereUniqueInputSchema), + update: z.union([ z.lazy(() => TemplateVersionUpdateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionUncheckedUpdateWithoutTemplatePackageInputSchema) ]), + create: z.union([ z.lazy(() => TemplateVersionCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionUncheckedCreateWithoutTemplatePackageInputSchema) ]), +}).strict(); + +export const TemplateVersionUpdateWithWhereUniqueWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateVersionWhereUniqueInputSchema), + data: z.union([ z.lazy(() => TemplateVersionUpdateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateVersionUncheckedUpdateWithoutTemplatePackageInputSchema) ]), +}).strict(); + +export const TemplateVersionUpdateManyWithWhereWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateVersionScalarWhereInputSchema), + data: z.union([ z.lazy(() => TemplateVersionUpdateManyMutationInputSchema),z.lazy(() => TemplateVersionUncheckedUpdateManyWithoutTemplatePackageInputSchema) ]), +}).strict(); + +export const TemplateVersionScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateVersionScalarWhereInputSchema),z.lazy(() => TemplateVersionScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateVersionScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateVersionScalarWhereInputSchema),z.lazy(() => TemplateVersionScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + templatePackageId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + version: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + manifest: z.lazy(() => JsonFilterSchema).optional(), + changelog: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + isActive: z.union([ z.lazy(() => BoolFilterSchema),z.boolean() ]).optional(), + createdById: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), +}).strict(); + +export const TemplateInstallationUpsertWithWhereUniqueWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateInstallationWhereUniqueInputSchema), + update: z.union([ z.lazy(() => TemplateInstallationUpdateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationUncheckedUpdateWithoutTemplatePackageInputSchema) ]), + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutTemplatePackageInputSchema) ]), +}).strict(); + +export const TemplateInstallationUpdateWithWhereUniqueWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateInstallationWhereUniqueInputSchema), + data: z.union([ z.lazy(() => TemplateInstallationUpdateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateInstallationUncheckedUpdateWithoutTemplatePackageInputSchema) ]), +}).strict(); + +export const TemplateInstallationUpdateManyWithWhereWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateInstallationScalarWhereInputSchema), + data: z.union([ z.lazy(() => TemplateInstallationUpdateManyMutationInputSchema),z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutTemplatePackageInputSchema) ]), +}).strict(); + +export const TemplateShareUpsertWithWhereUniqueWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareWhereUniqueInputSchema), + update: z.union([ z.lazy(() => TemplateShareUpdateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareUncheckedUpdateWithoutTemplatePackageInputSchema) ]), + create: z.union([ z.lazy(() => TemplateShareCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutTemplatePackageInputSchema) ]), +}).strict(); + +export const TemplateShareUpdateWithWhereUniqueWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareWhereUniqueInputSchema), + data: z.union([ z.lazy(() => TemplateShareUpdateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareUncheckedUpdateWithoutTemplatePackageInputSchema) ]), +}).strict(); + +export const TemplateShareUpdateManyWithWhereWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareScalarWhereInputSchema), + data: z.union([ z.lazy(() => TemplateShareUpdateManyMutationInputSchema),z.lazy(() => TemplateShareUncheckedUpdateManyWithoutTemplatePackageInputSchema) ]), +}).strict(); + +export const TemplateShareImportUpsertWithWhereUniqueWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareImportWhereUniqueInputSchema), + update: z.union([ z.lazy(() => TemplateShareImportUpdateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportUncheckedUpdateWithoutTemplatePackageInputSchema) ]), + create: z.union([ z.lazy(() => TemplateShareImportCreateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportUncheckedCreateWithoutTemplatePackageInputSchema) ]), +}).strict(); + +export const TemplateShareImportUpdateWithWhereUniqueWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareImportWhereUniqueInputSchema), + data: z.union([ z.lazy(() => TemplateShareImportUpdateWithoutTemplatePackageInputSchema),z.lazy(() => TemplateShareImportUncheckedUpdateWithoutTemplatePackageInputSchema) ]), +}).strict(); + +export const TemplateShareImportUpdateManyWithWhereWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareImportScalarWhereInputSchema), + data: z.union([ z.lazy(() => TemplateShareImportUpdateManyMutationInputSchema),z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutTemplatePackageInputSchema) ]), +}).strict(); + +export const TemplatePackageCreateWithoutVersionsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string(), + description: z.string().optional().nullable(), + category: z.string().optional().nullable(), + version: z.string(), + visibility: z.lazy(() => TemplateVisibilitySchema).optional(), + status: z.lazy(() => TemplateStatusSchema).optional(), + iconUrl: z.string().optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + assetsCount: z.number().int().optional(), + sizeBytes: z.number().int().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + organization: z.lazy(() => OrganizationCreateNestedOneWithoutTemplatePackagesInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + shares: z.lazy(() => TemplateShareCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutTemplatePackageInputSchema).optional() +}).strict(); + +export const TemplatePackageUncheckedCreateWithoutVersionsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + organizationId: z.string().optional().nullable(), + name: z.string(), + description: z.string().optional().nullable(), + category: z.string().optional().nullable(), + version: z.string(), + visibility: z.lazy(() => TemplateVisibilitySchema).optional(), + status: z.lazy(() => TemplateStatusSchema).optional(), + iconUrl: z.string().optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + assetsCount: z.number().int().optional(), + sizeBytes: z.number().int().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + installations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + shares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutTemplatePackageInputSchema).optional() +}).strict(); + +export const TemplatePackageCreateOrConnectWithoutVersionsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplatePackageWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutVersionsInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutVersionsInputSchema) ]), +}).strict(); + +export const TemplateInstallationCreateWithoutTemplateVersionInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + status: z.lazy(() => TemplateInstallStatusSchema).optional(), + strategy: z.lazy(() => TemplateInstallStrategySchema).optional(), + namePrefix: z.string().optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.string().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + completedAt: z.coerce.date().optional().nullable(), + organization: z.lazy(() => OrganizationCreateNestedOneWithoutTemplateInstallationsInputSchema), + templatePackage: z.lazy(() => TemplatePackageCreateNestedOneWithoutInstallationsInputSchema).optional(), + items: z.lazy(() => TemplateInstallItemCreateNestedManyWithoutInstallationInputSchema).optional() +}).strict(); + +export const TemplateInstallationUncheckedCreateWithoutTemplateVersionInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + organizationId: z.string(), + templatePackageId: z.string().optional().nullable(), + status: z.lazy(() => TemplateInstallStatusSchema).optional(), + strategy: z.lazy(() => TemplateInstallStrategySchema).optional(), + namePrefix: z.string().optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.string().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + completedAt: z.coerce.date().optional().nullable(), + items: z.lazy(() => TemplateInstallItemUncheckedCreateNestedManyWithoutInstallationInputSchema).optional() +}).strict(); + +export const TemplateInstallationCreateOrConnectWithoutTemplateVersionInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateInstallationWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutTemplateVersionInputSchema) ]), +}).strict(); + +export const TemplateInstallationCreateManyTemplateVersionInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => TemplateInstallationCreateManyTemplateVersionInputSchema),z.lazy(() => TemplateInstallationCreateManyTemplateVersionInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const TemplatePackageUpsertWithoutVersionsInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => TemplatePackageUpdateWithoutVersionsInputSchema),z.lazy(() => TemplatePackageUncheckedUpdateWithoutVersionsInputSchema) ]), + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutVersionsInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutVersionsInputSchema) ]), + where: z.lazy(() => TemplatePackageWhereInputSchema).optional() +}).strict(); + +export const TemplatePackageUpdateToOneWithWhereWithoutVersionsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplatePackageWhereInputSchema).optional(), + data: z.union([ z.lazy(() => TemplatePackageUpdateWithoutVersionsInputSchema),z.lazy(() => TemplatePackageUncheckedUpdateWithoutVersionsInputSchema) ]), +}).strict(); + +export const TemplatePackageUpdateWithoutVersionsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + category: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + visibility: z.union([ z.lazy(() => TemplateVisibilitySchema),z.lazy(() => EnumTemplateVisibilityFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateStatusSchema),z.lazy(() => EnumTemplateStatusFieldUpdateOperationsInputSchema) ]).optional(), + iconUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + assetsCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + sizeBytes: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + organization: z.lazy(() => OrganizationUpdateOneWithoutTemplatePackagesNestedInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + shares: z.lazy(() => TemplateShareUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutTemplatePackageNestedInputSchema).optional() +}).strict(); + +export const TemplatePackageUncheckedUpdateWithoutVersionsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + category: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + visibility: z.union([ z.lazy(() => TemplateVisibilitySchema),z.lazy(() => EnumTemplateVisibilityFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateStatusSchema),z.lazy(() => EnumTemplateStatusFieldUpdateOperationsInputSchema) ]).optional(), + iconUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + assetsCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + sizeBytes: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + installations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + shares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema).optional() +}).strict(); + +export const TemplateInstallationUpsertWithWhereUniqueWithoutTemplateVersionInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateInstallationWhereUniqueInputSchema), + update: z.union([ z.lazy(() => TemplateInstallationUpdateWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationUncheckedUpdateWithoutTemplateVersionInputSchema) ]), + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutTemplateVersionInputSchema) ]), +}).strict(); + +export const TemplateInstallationUpdateWithWhereUniqueWithoutTemplateVersionInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateInstallationWhereUniqueInputSchema), + data: z.union([ z.lazy(() => TemplateInstallationUpdateWithoutTemplateVersionInputSchema),z.lazy(() => TemplateInstallationUncheckedUpdateWithoutTemplateVersionInputSchema) ]), +}).strict(); + +export const TemplateInstallationUpdateManyWithWhereWithoutTemplateVersionInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateInstallationScalarWhereInputSchema), + data: z.union([ z.lazy(() => TemplateInstallationUpdateManyMutationInputSchema),z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutTemplateVersionInputSchema) ]), +}).strict(); + +export const OrganizationCreateWithoutTemplateInstallationsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string(), + logo: z.string().optional().nullable(), + website: z.string().optional().nullable(), + industry: z.string().optional().nullable(), + description: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + users: z.lazy(() => UserOrganizationCreateNestedManyWithoutOrganizationInputSchema).optional(), + customers: z.lazy(() => CustomerCreateNestedManyWithoutOrganizationInputSchema).optional(), + projects: z.lazy(() => ProjectCreateNestedManyWithoutOrganizationInputSchema).optional(), + tasks: z.lazy(() => TaskCreateNestedManyWithoutOrganizationInputSchema).optional(), + invoices: z.lazy(() => InvoiceCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenses: z.lazy(() => ExpenseCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenseCategories: z.lazy(() => ExpenseCategoryCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenseTags: z.lazy(() => ExpenseTagCreateNestedManyWithoutOrganizationInputSchema).optional(), + employees: z.lazy(() => EmployeeCreateNestedManyWithoutOrganizationInputSchema).optional(), + campaigns: z.lazy(() => MarketingCampaignCreateNestedManyWithoutOrganizationInputSchema).optional(), + invitations: z.lazy(() => InvitationCreateNestedManyWithoutOrganizationInputSchema).optional(), + customRoles: z.lazy(() => CustomRoleCreateNestedManyWithoutOrganizationInputSchema).optional(), + financialReports: z.lazy(() => FinancialReportCreateNestedManyWithoutOrganizationInputSchema).optional(), + workflows: z.lazy(() => WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), + actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), + variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() +}).strict(); + +export const OrganizationUncheckedCreateWithoutTemplateInstallationsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string(), + logo: z.string().optional().nullable(), + website: z.string().optional().nullable(), + industry: z.string().optional().nullable(), + description: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + users: z.lazy(() => UserOrganizationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + customers: z.lazy(() => CustomerUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + projects: z.lazy(() => ProjectUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + tasks: z.lazy(() => TaskUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + invoices: z.lazy(() => InvoiceUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenses: z.lazy(() => ExpenseUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenseCategories: z.lazy(() => ExpenseCategoryUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenseTags: z.lazy(() => ExpenseTagUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + employees: z.lazy(() => EmployeeUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + campaigns: z.lazy(() => MarketingCampaignUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + invitations: z.lazy(() => InvitationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + customRoles: z.lazy(() => CustomRoleUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + financialReports: z.lazy(() => FinancialReportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + workflows: z.lazy(() => WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() +}).strict(); + +export const OrganizationCreateOrConnectWithoutTemplateInstallationsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => OrganizationWhereUniqueInputSchema), + create: z.union([ z.lazy(() => OrganizationCreateWithoutTemplateInstallationsInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutTemplateInstallationsInputSchema) ]), +}).strict(); + +export const TemplatePackageCreateWithoutInstallationsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string(), + description: z.string().optional().nullable(), + category: z.string().optional().nullable(), + version: z.string(), + visibility: z.lazy(() => TemplateVisibilitySchema).optional(), + status: z.lazy(() => TemplateStatusSchema).optional(), + iconUrl: z.string().optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + assetsCount: z.number().int().optional(), + sizeBytes: z.number().int().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + organization: z.lazy(() => OrganizationCreateNestedOneWithoutTemplatePackagesInputSchema).optional(), + versions: z.lazy(() => TemplateVersionCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + shares: z.lazy(() => TemplateShareCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutTemplatePackageInputSchema).optional() +}).strict(); + +export const TemplatePackageUncheckedCreateWithoutInstallationsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + organizationId: z.string().optional().nullable(), + name: z.string(), + description: z.string().optional().nullable(), + category: z.string().optional().nullable(), + version: z.string(), + visibility: z.lazy(() => TemplateVisibilitySchema).optional(), + status: z.lazy(() => TemplateStatusSchema).optional(), + iconUrl: z.string().optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + assetsCount: z.number().int().optional(), + sizeBytes: z.number().int().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + versions: z.lazy(() => TemplateVersionUncheckedCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + shares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutTemplatePackageInputSchema).optional() +}).strict(); + +export const TemplatePackageCreateOrConnectWithoutInstallationsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplatePackageWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutInstallationsInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutInstallationsInputSchema) ]), +}).strict(); + +export const TemplateVersionCreateWithoutInstallationsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + version: z.string(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + changelog: z.string().optional().nullable(), + isActive: z.boolean().optional(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + templatePackage: z.lazy(() => TemplatePackageCreateNestedOneWithoutVersionsInputSchema) +}).strict(); + +export const TemplateVersionUncheckedCreateWithoutInstallationsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + templatePackageId: z.string(), + version: z.string(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + changelog: z.string().optional().nullable(), + isActive: z.boolean().optional(), + createdById: z.string(), + createdAt: z.coerce.date().optional() +}).strict(); + +export const TemplateVersionCreateOrConnectWithoutInstallationsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateVersionWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplateVersionCreateWithoutInstallationsInputSchema),z.lazy(() => TemplateVersionUncheckedCreateWithoutInstallationsInputSchema) ]), +}).strict(); + +export const TemplateInstallItemCreateWithoutInstallationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + assetType: z.lazy(() => TemplateAssetTypeSchema), + sourceKey: z.string(), + createdModel: z.string().optional().nullable(), + createdId: z.string().optional().nullable(), + status: z.lazy(() => TemplateItemStatusSchema).optional(), + details: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.coerce.date().optional() +}).strict(); + +export const TemplateInstallItemUncheckedCreateWithoutInstallationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + assetType: z.lazy(() => TemplateAssetTypeSchema), + sourceKey: z.string(), + createdModel: z.string().optional().nullable(), + createdId: z.string().optional().nullable(), + status: z.lazy(() => TemplateItemStatusSchema).optional(), + details: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.coerce.date().optional() +}).strict(); + +export const TemplateInstallItemCreateOrConnectWithoutInstallationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateInstallItemWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplateInstallItemCreateWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemUncheckedCreateWithoutInstallationInputSchema) ]), +}).strict(); + +export const TemplateInstallItemCreateManyInstallationInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => TemplateInstallItemCreateManyInstallationInputSchema),z.lazy(() => TemplateInstallItemCreateManyInstallationInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const OrganizationUpsertWithoutTemplateInstallationsInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => OrganizationUpdateWithoutTemplateInstallationsInputSchema),z.lazy(() => OrganizationUncheckedUpdateWithoutTemplateInstallationsInputSchema) ]), + create: z.union([ z.lazy(() => OrganizationCreateWithoutTemplateInstallationsInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutTemplateInstallationsInputSchema) ]), + where: z.lazy(() => OrganizationWhereInputSchema).optional() +}).strict(); + +export const OrganizationUpdateToOneWithWhereWithoutTemplateInstallationsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => OrganizationWhereInputSchema).optional(), + data: z.union([ z.lazy(() => OrganizationUpdateWithoutTemplateInstallationsInputSchema),z.lazy(() => OrganizationUncheckedUpdateWithoutTemplateInstallationsInputSchema) ]), +}).strict(); + +export const OrganizationUpdateWithoutTemplateInstallationsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + logo: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + website: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + industry: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + users: z.lazy(() => UserOrganizationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + customers: z.lazy(() => CustomerUpdateManyWithoutOrganizationNestedInputSchema).optional(), + projects: z.lazy(() => ProjectUpdateManyWithoutOrganizationNestedInputSchema).optional(), + tasks: z.lazy(() => TaskUpdateManyWithoutOrganizationNestedInputSchema).optional(), + invoices: z.lazy(() => InvoiceUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenses: z.lazy(() => ExpenseUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenseCategories: z.lazy(() => ExpenseCategoryUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenseTags: z.lazy(() => ExpenseTagUpdateManyWithoutOrganizationNestedInputSchema).optional(), + employees: z.lazy(() => EmployeeUpdateManyWithoutOrganizationNestedInputSchema).optional(), + campaigns: z.lazy(() => MarketingCampaignUpdateManyWithoutOrganizationNestedInputSchema).optional(), + invitations: z.lazy(() => InvitationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + customRoles: z.lazy(() => CustomRoleUpdateManyWithoutOrganizationNestedInputSchema).optional(), + financialReports: z.lazy(() => FinancialReportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + workflows: z.lazy(() => WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), + actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), + variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() +}).strict(); + +export const OrganizationUncheckedUpdateWithoutTemplateInstallationsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + logo: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + website: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + industry: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + users: z.lazy(() => UserOrganizationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + customers: z.lazy(() => CustomerUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + projects: z.lazy(() => ProjectUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + tasks: z.lazy(() => TaskUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + invoices: z.lazy(() => InvoiceUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenses: z.lazy(() => ExpenseUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenseCategories: z.lazy(() => ExpenseCategoryUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenseTags: z.lazy(() => ExpenseTagUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + employees: z.lazy(() => EmployeeUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + campaigns: z.lazy(() => MarketingCampaignUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + invitations: z.lazy(() => InvitationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + customRoles: z.lazy(() => CustomRoleUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + financialReports: z.lazy(() => FinancialReportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + workflows: z.lazy(() => WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() +}).strict(); + +export const TemplatePackageUpsertWithoutInstallationsInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => TemplatePackageUpdateWithoutInstallationsInputSchema),z.lazy(() => TemplatePackageUncheckedUpdateWithoutInstallationsInputSchema) ]), + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutInstallationsInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutInstallationsInputSchema) ]), + where: z.lazy(() => TemplatePackageWhereInputSchema).optional() +}).strict(); + +export const TemplatePackageUpdateToOneWithWhereWithoutInstallationsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplatePackageWhereInputSchema).optional(), + data: z.union([ z.lazy(() => TemplatePackageUpdateWithoutInstallationsInputSchema),z.lazy(() => TemplatePackageUncheckedUpdateWithoutInstallationsInputSchema) ]), +}).strict(); + +export const TemplatePackageUpdateWithoutInstallationsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + category: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + visibility: z.union([ z.lazy(() => TemplateVisibilitySchema),z.lazy(() => EnumTemplateVisibilityFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateStatusSchema),z.lazy(() => EnumTemplateStatusFieldUpdateOperationsInputSchema) ]).optional(), + iconUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + assetsCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + sizeBytes: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + organization: z.lazy(() => OrganizationUpdateOneWithoutTemplatePackagesNestedInputSchema).optional(), + versions: z.lazy(() => TemplateVersionUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + shares: z.lazy(() => TemplateShareUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutTemplatePackageNestedInputSchema).optional() +}).strict(); + +export const TemplatePackageUncheckedUpdateWithoutInstallationsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + category: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + visibility: z.union([ z.lazy(() => TemplateVisibilitySchema),z.lazy(() => EnumTemplateVisibilityFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateStatusSchema),z.lazy(() => EnumTemplateStatusFieldUpdateOperationsInputSchema) ]).optional(), + iconUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + assetsCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + sizeBytes: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + versions: z.lazy(() => TemplateVersionUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + shares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema).optional() +}).strict(); + +export const TemplateVersionUpsertWithoutInstallationsInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => TemplateVersionUpdateWithoutInstallationsInputSchema),z.lazy(() => TemplateVersionUncheckedUpdateWithoutInstallationsInputSchema) ]), + create: z.union([ z.lazy(() => TemplateVersionCreateWithoutInstallationsInputSchema),z.lazy(() => TemplateVersionUncheckedCreateWithoutInstallationsInputSchema) ]), + where: z.lazy(() => TemplateVersionWhereInputSchema).optional() +}).strict(); + +export const TemplateVersionUpdateToOneWithWhereWithoutInstallationsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateVersionWhereInputSchema).optional(), + data: z.union([ z.lazy(() => TemplateVersionUpdateWithoutInstallationsInputSchema),z.lazy(() => TemplateVersionUncheckedUpdateWithoutInstallationsInputSchema) ]), +}).strict(); + +export const TemplateVersionUpdateWithoutInstallationsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + changelog: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + isActive: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + templatePackage: z.lazy(() => TemplatePackageUpdateOneRequiredWithoutVersionsNestedInputSchema).optional() +}).strict(); + +export const TemplateVersionUncheckedUpdateWithoutInstallationsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + changelog: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + isActive: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateInstallItemUpsertWithWhereUniqueWithoutInstallationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateInstallItemWhereUniqueInputSchema), + update: z.union([ z.lazy(() => TemplateInstallItemUpdateWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemUncheckedUpdateWithoutInstallationInputSchema) ]), + create: z.union([ z.lazy(() => TemplateInstallItemCreateWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemUncheckedCreateWithoutInstallationInputSchema) ]), +}).strict(); + +export const TemplateInstallItemUpdateWithWhereUniqueWithoutInstallationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateInstallItemWhereUniqueInputSchema), + data: z.union([ z.lazy(() => TemplateInstallItemUpdateWithoutInstallationInputSchema),z.lazy(() => TemplateInstallItemUncheckedUpdateWithoutInstallationInputSchema) ]), +}).strict(); + +export const TemplateInstallItemUpdateManyWithWhereWithoutInstallationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateInstallItemScalarWhereInputSchema), + data: z.union([ z.lazy(() => TemplateInstallItemUpdateManyMutationInputSchema),z.lazy(() => TemplateInstallItemUncheckedUpdateManyWithoutInstallationInputSchema) ]), +}).strict(); + +export const TemplateInstallItemScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateInstallItemScalarWhereInputSchema),z.lazy(() => TemplateInstallItemScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateInstallItemScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateInstallItemScalarWhereInputSchema),z.lazy(() => TemplateInstallItemScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + installationId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + assetType: z.union([ z.lazy(() => EnumTemplateAssetTypeFilterSchema),z.lazy(() => TemplateAssetTypeSchema) ]).optional(), + sourceKey: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdModel: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + createdId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + status: z.union([ z.lazy(() => EnumTemplateItemStatusFilterSchema),z.lazy(() => TemplateItemStatusSchema) ]).optional(), + details: z.lazy(() => JsonNullableFilterSchema).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), +}).strict(); + +export const TemplateInstallationCreateWithoutItemsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + status: z.lazy(() => TemplateInstallStatusSchema).optional(), + strategy: z.lazy(() => TemplateInstallStrategySchema).optional(), + namePrefix: z.string().optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.string().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + completedAt: z.coerce.date().optional().nullable(), + organization: z.lazy(() => OrganizationCreateNestedOneWithoutTemplateInstallationsInputSchema), + templatePackage: z.lazy(() => TemplatePackageCreateNestedOneWithoutInstallationsInputSchema).optional(), + templateVersion: z.lazy(() => TemplateVersionCreateNestedOneWithoutInstallationsInputSchema).optional() +}).strict(); + +export const TemplateInstallationUncheckedCreateWithoutItemsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + organizationId: z.string(), + templatePackageId: z.string().optional().nullable(), + templateVersionId: z.string().optional().nullable(), + status: z.lazy(() => TemplateInstallStatusSchema).optional(), + strategy: z.lazy(() => TemplateInstallStrategySchema).optional(), + namePrefix: z.string().optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.string().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + completedAt: z.coerce.date().optional().nullable() +}).strict(); + +export const TemplateInstallationCreateOrConnectWithoutItemsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateInstallationWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutItemsInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutItemsInputSchema) ]), +}).strict(); + +export const TemplateInstallationUpsertWithoutItemsInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => TemplateInstallationUpdateWithoutItemsInputSchema),z.lazy(() => TemplateInstallationUncheckedUpdateWithoutItemsInputSchema) ]), + create: z.union([ z.lazy(() => TemplateInstallationCreateWithoutItemsInputSchema),z.lazy(() => TemplateInstallationUncheckedCreateWithoutItemsInputSchema) ]), + where: z.lazy(() => TemplateInstallationWhereInputSchema).optional() +}).strict(); + +export const TemplateInstallationUpdateToOneWithWhereWithoutItemsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateInstallationWhereInputSchema).optional(), + data: z.union([ z.lazy(() => TemplateInstallationUpdateWithoutItemsInputSchema),z.lazy(() => TemplateInstallationUncheckedUpdateWithoutItemsInputSchema) ]), +}).strict(); + +export const TemplateInstallationUpdateWithoutItemsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateInstallStatusSchema),z.lazy(() => EnumTemplateInstallStatusFieldUpdateOperationsInputSchema) ]).optional(), + strategy: z.union([ z.lazy(() => TemplateInstallStrategySchema),z.lazy(() => EnumTemplateInstallStrategyFieldUpdateOperationsInputSchema) ]).optional(), + namePrefix: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + completedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + organization: z.lazy(() => OrganizationUpdateOneRequiredWithoutTemplateInstallationsNestedInputSchema).optional(), + templatePackage: z.lazy(() => TemplatePackageUpdateOneWithoutInstallationsNestedInputSchema).optional(), + templateVersion: z.lazy(() => TemplateVersionUpdateOneWithoutInstallationsNestedInputSchema).optional() +}).strict(); + +export const TemplateInstallationUncheckedUpdateWithoutItemsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + templateVersionId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateInstallStatusSchema),z.lazy(() => EnumTemplateInstallStatusFieldUpdateOperationsInputSchema) ]).optional(), + strategy: z.union([ z.lazy(() => TemplateInstallStrategySchema),z.lazy(() => EnumTemplateInstallStrategyFieldUpdateOperationsInputSchema) ]).optional(), + namePrefix: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + completedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const OrganizationCreateWithoutWorkflowsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string(), + logo: z.string().optional().nullable(), + website: z.string().optional().nullable(), + industry: z.string().optional().nullable(), + description: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + users: z.lazy(() => UserOrganizationCreateNestedManyWithoutOrganizationInputSchema).optional(), + customers: z.lazy(() => CustomerCreateNestedManyWithoutOrganizationInputSchema).optional(), + projects: z.lazy(() => ProjectCreateNestedManyWithoutOrganizationInputSchema).optional(), + tasks: z.lazy(() => TaskCreateNestedManyWithoutOrganizationInputSchema).optional(), + invoices: z.lazy(() => InvoiceCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenses: z.lazy(() => ExpenseCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenseCategories: z.lazy(() => ExpenseCategoryCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenseTags: z.lazy(() => ExpenseTagCreateNestedManyWithoutOrganizationInputSchema).optional(), + employees: z.lazy(() => EmployeeCreateNestedManyWithoutOrganizationInputSchema).optional(), + campaigns: z.lazy(() => MarketingCampaignCreateNestedManyWithoutOrganizationInputSchema).optional(), + invitations: z.lazy(() => InvitationCreateNestedManyWithoutOrganizationInputSchema).optional(), + customRoles: z.lazy(() => CustomRoleCreateNestedManyWithoutOrganizationInputSchema).optional(), + financialReports: z.lazy(() => FinancialReportCreateNestedManyWithoutOrganizationInputSchema).optional(), + actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), + variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() +}).strict(); + +export const OrganizationUncheckedCreateWithoutWorkflowsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string(), + logo: z.string().optional().nullable(), + website: z.string().optional().nullable(), + industry: z.string().optional().nullable(), + description: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + users: z.lazy(() => UserOrganizationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + customers: z.lazy(() => CustomerUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + projects: z.lazy(() => ProjectUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + tasks: z.lazy(() => TaskUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + invoices: z.lazy(() => InvoiceUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenses: z.lazy(() => ExpenseUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenseCategories: z.lazy(() => ExpenseCategoryUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenseTags: z.lazy(() => ExpenseTagUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + employees: z.lazy(() => EmployeeUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + campaigns: z.lazy(() => MarketingCampaignUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + invitations: z.lazy(() => InvitationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + customRoles: z.lazy(() => CustomRoleUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + financialReports: z.lazy(() => FinancialReportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() +}).strict(); + +export const OrganizationCreateOrConnectWithoutWorkflowsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => OrganizationWhereUniqueInputSchema), + create: z.union([ z.lazy(() => OrganizationCreateWithoutWorkflowsInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutWorkflowsInputSchema) ]), +}).strict(); + +export const WorkflowTriggerCreateWithoutWorkflowInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string(), + description: z.string().optional().nullable(), + type: z.lazy(() => WorkflowTriggerTypeSchema), + module: z.string(), + entityType: z.string().optional().nullable(), + eventType: z.string(), + conditions: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + delay: z.number().int().optional().nullable(), + isActive: z.boolean().optional(), + lastTriggered: z.coerce.date().optional().nullable(), + triggerCount: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + executions: z.lazy(() => WorkflowExecutionCreateNestedManyWithoutTriggerInputSchema).optional(), + variables: z.lazy(() => TriggerVariableCreateNestedManyWithoutTriggerInputSchema).optional(), + node: z.lazy(() => WorkflowNodeCreateNestedOneWithoutTriggerInputSchema).optional() +}).strict(); + +export const WorkflowTriggerUncheckedCreateWithoutWorkflowInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + nodeId: z.string().optional().nullable(), + name: z.string(), + description: z.string().optional().nullable(), + type: z.lazy(() => WorkflowTriggerTypeSchema), + module: z.string(), + entityType: z.string().optional().nullable(), + eventType: z.string(), + conditions: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + delay: z.number().int().optional().nullable(), + isActive: z.boolean().optional(), + lastTriggered: z.coerce.date().optional().nullable(), + triggerCount: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + executions: z.lazy(() => WorkflowExecutionUncheckedCreateNestedManyWithoutTriggerInputSchema).optional(), + variables: z.lazy(() => TriggerVariableUncheckedCreateNestedManyWithoutTriggerInputSchema).optional() +}).strict(); + +export const WorkflowTriggerCreateOrConnectWithoutWorkflowInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowTriggerWhereUniqueInputSchema), + create: z.union([ z.lazy(() => WorkflowTriggerCreateWithoutWorkflowInputSchema),z.lazy(() => WorkflowTriggerUncheckedCreateWithoutWorkflowInputSchema) ]), +}).strict(); + +export const WorkflowTriggerCreateManyWorkflowInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => WorkflowTriggerCreateManyWorkflowInputSchema),z.lazy(() => WorkflowTriggerCreateManyWorkflowInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const WorkflowNodeCreateWithoutWorkflowInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + nodeId: z.string(), + type: z.lazy(() => WorkflowNodeTypeSchema), + name: z.string(), + description: z.string().optional().nullable(), + position: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + config: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + template: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + executionOrder: z.number().int().optional().nullable(), + isOptional: z.boolean().optional(), + retryLimit: z.number().int().optional(), + timeout: z.number().int().optional().nullable(), + conditions: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + executions: z.lazy(() => NodeExecutionCreateNestedManyWithoutNodeInputSchema).optional(), + dependencies: z.lazy(() => NodeDependencyCreateNestedManyWithoutDependentNodeInputSchema).optional(), + dependents: z.lazy(() => NodeDependencyCreateNestedManyWithoutPrerequisiteNodeInputSchema).optional(), + sourceConnections: z.lazy(() => WorkflowConnectionCreateNestedManyWithoutSourceNodeInputSchema).optional(), + targetConnections: z.lazy(() => WorkflowConnectionCreateNestedManyWithoutTargetNodeInputSchema).optional(), + emailAction: z.lazy(() => EmailActionCreateNestedOneWithoutActionInputSchema).optional(), + smsAction: z.lazy(() => SmsActionCreateNestedOneWithoutActionInputSchema).optional(), + whatsAppAction: z.lazy(() => WhatsAppActionCreateNestedOneWithoutActionInputSchema).optional(), + slackAction: z.lazy(() => SlackActionCreateNestedOneWithoutActionInputSchema).optional(), + calendarAction: z.lazy(() => CalendarActionCreateNestedOneWithoutActionInputSchema).optional(), + trigger: z.lazy(() => WorkflowTriggerCreateNestedOneWithoutNodeInputSchema).optional() +}).strict(); + +export const WorkflowNodeUncheckedCreateWithoutWorkflowInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + nodeId: z.string(), + type: z.lazy(() => WorkflowNodeTypeSchema), + name: z.string(), + description: z.string().optional().nullable(), + position: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + config: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + template: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + executionOrder: z.number().int().optional().nullable(), + isOptional: z.boolean().optional(), + retryLimit: z.number().int().optional(), + timeout: z.number().int().optional().nullable(), + conditions: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + executions: z.lazy(() => NodeExecutionUncheckedCreateNestedManyWithoutNodeInputSchema).optional(), + dependencies: z.lazy(() => NodeDependencyUncheckedCreateNestedManyWithoutDependentNodeInputSchema).optional(), + dependents: z.lazy(() => NodeDependencyUncheckedCreateNestedManyWithoutPrerequisiteNodeInputSchema).optional(), + sourceConnections: z.lazy(() => WorkflowConnectionUncheckedCreateNestedManyWithoutSourceNodeInputSchema).optional(), + targetConnections: z.lazy(() => WorkflowConnectionUncheckedCreateNestedManyWithoutTargetNodeInputSchema).optional(), + emailAction: z.lazy(() => EmailActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), + smsAction: z.lazy(() => SmsActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), + whatsAppAction: z.lazy(() => WhatsAppActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), + slackAction: z.lazy(() => SlackActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), + calendarAction: z.lazy(() => CalendarActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), + trigger: z.lazy(() => WorkflowTriggerUncheckedCreateNestedOneWithoutNodeInputSchema).optional() +}).strict(); + +export const WorkflowNodeCreateOrConnectWithoutWorkflowInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowNodeWhereUniqueInputSchema), + create: z.union([ z.lazy(() => WorkflowNodeCreateWithoutWorkflowInputSchema),z.lazy(() => WorkflowNodeUncheckedCreateWithoutWorkflowInputSchema) ]), +}).strict(); + +export const WorkflowNodeCreateManyWorkflowInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => WorkflowNodeCreateManyWorkflowInputSchema),z.lazy(() => WorkflowNodeCreateManyWorkflowInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const WorkflowConnectionCreateWithoutWorkflowInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + executionOrder: z.number().int().optional(), + label: z.string().optional().nullable(), + conditions: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + edgeId: z.string().optional().nullable(), + sourceHandle: z.string().optional().nullable(), + targetHandle: z.string().optional().nullable(), + style: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + animated: z.boolean().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + sourceNode: z.lazy(() => WorkflowNodeCreateNestedOneWithoutSourceConnectionsInputSchema), + targetNode: z.lazy(() => WorkflowNodeCreateNestedOneWithoutTargetConnectionsInputSchema) +}).strict(); + +export const WorkflowConnectionUncheckedCreateWithoutWorkflowInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + sourceNodeId: z.string(), + targetNodeId: z.string(), + executionOrder: z.number().int().optional(), + label: z.string().optional().nullable(), + conditions: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + edgeId: z.string().optional().nullable(), + sourceHandle: z.string().optional().nullable(), + targetHandle: z.string().optional().nullable(), + style: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + animated: z.boolean().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional() +}).strict(); + +export const WorkflowConnectionCreateOrConnectWithoutWorkflowInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowConnectionWhereUniqueInputSchema), + create: z.union([ z.lazy(() => WorkflowConnectionCreateWithoutWorkflowInputSchema),z.lazy(() => WorkflowConnectionUncheckedCreateWithoutWorkflowInputSchema) ]), +}).strict(); + +export const WorkflowConnectionCreateManyWorkflowInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => WorkflowConnectionCreateManyWorkflowInputSchema),z.lazy(() => WorkflowConnectionCreateManyWorkflowInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const WorkflowExecutionCreateWithoutWorkflowInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + executionId: z.string(), + status: z.lazy(() => WorkflowExecutionStatusSchema).optional(), + priority: z.lazy(() => ExecutionPrioritySchema).optional(), + triggerData: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + triggerContext: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + currentNodeId: z.string().optional().nullable(), + progress: z.number().optional(), + startedAt: z.coerce.date().optional().nullable(), + completedAt: z.coerce.date().optional().nullable(), + failedAt: z.coerce.date().optional().nullable(), + duration: z.number().int().optional().nullable(), + result: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.string().optional().nullable(), + errorDetails: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + retryCount: z.number().int().optional(), + maxRetries: z.number().int().optional(), + retryDelay: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + trigger: z.lazy(() => WorkflowTriggerCreateNestedOneWithoutExecutionsInputSchema).optional(), + nodeExecutions: z.lazy(() => NodeExecutionCreateNestedManyWithoutWorkflowExecutionInputSchema).optional(), + variables: z.lazy(() => ExecutionVariableCreateNestedManyWithoutWorkflowExecutionInputSchema).optional(), + logs: z.lazy(() => ExecutionLogCreateNestedManyWithoutWorkflowExecutionInputSchema).optional() +}).strict(); + +export const WorkflowExecutionUncheckedCreateWithoutWorkflowInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + triggerId: z.string().optional().nullable(), + executionId: z.string(), + status: z.lazy(() => WorkflowExecutionStatusSchema).optional(), + priority: z.lazy(() => ExecutionPrioritySchema).optional(), + triggerData: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + triggerContext: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + currentNodeId: z.string().optional().nullable(), + progress: z.number().optional(), + startedAt: z.coerce.date().optional().nullable(), + completedAt: z.coerce.date().optional().nullable(), + failedAt: z.coerce.date().optional().nullable(), + duration: z.number().int().optional().nullable(), + result: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.string().optional().nullable(), + errorDetails: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + retryCount: z.number().int().optional(), + maxRetries: z.number().int().optional(), + retryDelay: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + nodeExecutions: z.lazy(() => NodeExecutionUncheckedCreateNestedManyWithoutWorkflowExecutionInputSchema).optional(), + variables: z.lazy(() => ExecutionVariableUncheckedCreateNestedManyWithoutWorkflowExecutionInputSchema).optional(), + logs: z.lazy(() => ExecutionLogUncheckedCreateNestedManyWithoutWorkflowExecutionInputSchema).optional() +}).strict(); + +export const WorkflowExecutionCreateOrConnectWithoutWorkflowInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowExecutionWhereUniqueInputSchema), + create: z.union([ z.lazy(() => WorkflowExecutionCreateWithoutWorkflowInputSchema),z.lazy(() => WorkflowExecutionUncheckedCreateWithoutWorkflowInputSchema) ]), +}).strict(); + +export const WorkflowExecutionCreateManyWorkflowInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => WorkflowExecutionCreateManyWorkflowInputSchema),z.lazy(() => WorkflowExecutionCreateManyWorkflowInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const WorkflowAnalyticsCreateWithoutWorkflowInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + periodStart: z.coerce.date(), + periodEnd: z.coerce.date(), + granularity: z.string().optional(), + totalExecutions: z.number().int().optional(), + successfulExecutions: z.number().int().optional(), + failedExecutions: z.number().int().optional(), + averageDuration: z.number().optional().nullable(), + minDuration: z.number().int().optional().nullable(), + maxDuration: z.number().int().optional().nullable(), + p95Duration: z.number().int().optional().nullable(), + commonErrors: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + errorRate: z.number().optional().nullable(), + avgCpuUsage: z.number().optional().nullable(), + avgMemoryUsage: z.number().optional().nullable(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional() +}).strict(); + +export const WorkflowAnalyticsUncheckedCreateWithoutWorkflowInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + periodStart: z.coerce.date(), + periodEnd: z.coerce.date(), + granularity: z.string().optional(), + totalExecutions: z.number().int().optional(), + successfulExecutions: z.number().int().optional(), + failedExecutions: z.number().int().optional(), + averageDuration: z.number().optional().nullable(), + minDuration: z.number().int().optional().nullable(), + maxDuration: z.number().int().optional().nullable(), + p95Duration: z.number().int().optional().nullable(), + commonErrors: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + errorRate: z.number().optional().nullable(), + avgCpuUsage: z.number().optional().nullable(), + avgMemoryUsage: z.number().optional().nullable(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional() +}).strict(); + +export const WorkflowAnalyticsCreateOrConnectWithoutWorkflowInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowAnalyticsWhereUniqueInputSchema), + create: z.union([ z.lazy(() => WorkflowAnalyticsCreateWithoutWorkflowInputSchema),z.lazy(() => WorkflowAnalyticsUncheckedCreateWithoutWorkflowInputSchema) ]), +}).strict(); + +export const WorkflowAnalyticsCreateManyWorkflowInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => WorkflowAnalyticsCreateManyWorkflowInputSchema),z.lazy(() => WorkflowAnalyticsCreateManyWorkflowInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const OrganizationUpsertWithoutWorkflowsInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => OrganizationUpdateWithoutWorkflowsInputSchema),z.lazy(() => OrganizationUncheckedUpdateWithoutWorkflowsInputSchema) ]), + create: z.union([ z.lazy(() => OrganizationCreateWithoutWorkflowsInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutWorkflowsInputSchema) ]), + where: z.lazy(() => OrganizationWhereInputSchema).optional() +}).strict(); + +export const OrganizationUpdateToOneWithWhereWithoutWorkflowsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => OrganizationWhereInputSchema).optional(), + data: z.union([ z.lazy(() => OrganizationUpdateWithoutWorkflowsInputSchema),z.lazy(() => OrganizationUncheckedUpdateWithoutWorkflowsInputSchema) ]), +}).strict(); + +export const OrganizationUpdateWithoutWorkflowsInputSchema: z.ZodType = z.object({ id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), logo: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), @@ -36234,7 +41983,12 @@ export const OrganizationUpdateWithoutWorkflowsInputSchema: z.ZodType FinancialReportUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const OrganizationUncheckedUpdateWithoutWorkflowsInputSchema: z.ZodType = z.object({ @@ -36261,203 +42015,352 @@ export const OrganizationUncheckedUpdateWithoutWorkflowsInputSchema: z.ZodType

FinancialReportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() -}).strict(); - -export const WorkflowTriggerUpsertWithWhereUniqueWithoutWorkflowInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowTriggerWhereUniqueInputSchema), - update: z.union([ z.lazy(() => WorkflowTriggerUpdateWithoutWorkflowInputSchema),z.lazy(() => WorkflowTriggerUncheckedUpdateWithoutWorkflowInputSchema) ]), - create: z.union([ z.lazy(() => WorkflowTriggerCreateWithoutWorkflowInputSchema),z.lazy(() => WorkflowTriggerUncheckedCreateWithoutWorkflowInputSchema) ]), -}).strict(); - -export const WorkflowTriggerUpdateWithWhereUniqueWithoutWorkflowInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowTriggerWhereUniqueInputSchema), - data: z.union([ z.lazy(() => WorkflowTriggerUpdateWithoutWorkflowInputSchema),z.lazy(() => WorkflowTriggerUncheckedUpdateWithoutWorkflowInputSchema) ]), -}).strict(); - -export const WorkflowTriggerUpdateManyWithWhereWithoutWorkflowInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowTriggerScalarWhereInputSchema), - data: z.union([ z.lazy(() => WorkflowTriggerUpdateManyMutationInputSchema),z.lazy(() => WorkflowTriggerUncheckedUpdateManyWithoutWorkflowInputSchema) ]), -}).strict(); - -export const WorkflowTriggerScalarWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => WorkflowTriggerScalarWhereInputSchema),z.lazy(() => WorkflowTriggerScalarWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => WorkflowTriggerScalarWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => WorkflowTriggerScalarWhereInputSchema),z.lazy(() => WorkflowTriggerScalarWhereInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - workflowId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - nodeId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - name: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - description: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - type: z.union([ z.lazy(() => EnumWorkflowTriggerTypeFilterSchema),z.lazy(() => WorkflowTriggerTypeSchema) ]).optional(), - module: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - entityType: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - eventType: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - conditions: z.lazy(() => JsonNullableFilterSchema).optional(), - delay: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), - isActive: z.union([ z.lazy(() => BoolFilterSchema),z.boolean() ]).optional(), - lastTriggered: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), - triggerCount: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), - createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), - updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), -}).strict(); - -export const WorkflowNodeUpsertWithWhereUniqueWithoutWorkflowInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowNodeWhereUniqueInputSchema), - update: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutWorkflowInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutWorkflowInputSchema) ]), - create: z.union([ z.lazy(() => WorkflowNodeCreateWithoutWorkflowInputSchema),z.lazy(() => WorkflowNodeUncheckedCreateWithoutWorkflowInputSchema) ]), -}).strict(); - -export const WorkflowNodeUpdateWithWhereUniqueWithoutWorkflowInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowNodeWhereUniqueInputSchema), - data: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutWorkflowInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutWorkflowInputSchema) ]), -}).strict(); - -export const WorkflowNodeUpdateManyWithWhereWithoutWorkflowInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowNodeScalarWhereInputSchema), - data: z.union([ z.lazy(() => WorkflowNodeUpdateManyMutationInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateManyWithoutWorkflowInputSchema) ]), -}).strict(); - -export const WorkflowNodeScalarWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => WorkflowNodeScalarWhereInputSchema),z.lazy(() => WorkflowNodeScalarWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => WorkflowNodeScalarWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => WorkflowNodeScalarWhereInputSchema),z.lazy(() => WorkflowNodeScalarWhereInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - workflowId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - nodeId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - type: z.union([ z.lazy(() => EnumWorkflowNodeTypeFilterSchema),z.lazy(() => WorkflowNodeTypeSchema) ]).optional(), - name: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - description: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - position: z.lazy(() => JsonFilterSchema).optional(), - config: z.lazy(() => JsonNullableFilterSchema).optional(), - template: z.lazy(() => JsonNullableFilterSchema).optional(), - executionOrder: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), - isOptional: z.union([ z.lazy(() => BoolFilterSchema),z.boolean() ]).optional(), - retryLimit: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), - timeout: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), - conditions: z.lazy(() => JsonNullableFilterSchema).optional(), - createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), - updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), -}).strict(); - -export const WorkflowConnectionUpsertWithWhereUniqueWithoutWorkflowInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowConnectionWhereUniqueInputSchema), - update: z.union([ z.lazy(() => WorkflowConnectionUpdateWithoutWorkflowInputSchema),z.lazy(() => WorkflowConnectionUncheckedUpdateWithoutWorkflowInputSchema) ]), - create: z.union([ z.lazy(() => WorkflowConnectionCreateWithoutWorkflowInputSchema),z.lazy(() => WorkflowConnectionUncheckedCreateWithoutWorkflowInputSchema) ]), -}).strict(); - -export const WorkflowConnectionUpdateWithWhereUniqueWithoutWorkflowInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowConnectionWhereUniqueInputSchema), - data: z.union([ z.lazy(() => WorkflowConnectionUpdateWithoutWorkflowInputSchema),z.lazy(() => WorkflowConnectionUncheckedUpdateWithoutWorkflowInputSchema) ]), -}).strict(); - -export const WorkflowConnectionUpdateManyWithWhereWithoutWorkflowInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowConnectionScalarWhereInputSchema), - data: z.union([ z.lazy(() => WorkflowConnectionUpdateManyMutationInputSchema),z.lazy(() => WorkflowConnectionUncheckedUpdateManyWithoutWorkflowInputSchema) ]), -}).strict(); - -export const WorkflowConnectionScalarWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => WorkflowConnectionScalarWhereInputSchema),z.lazy(() => WorkflowConnectionScalarWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => WorkflowConnectionScalarWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => WorkflowConnectionScalarWhereInputSchema),z.lazy(() => WorkflowConnectionScalarWhereInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - workflowId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - sourceNodeId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - targetNodeId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - executionOrder: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), - label: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - conditions: z.lazy(() => JsonNullableFilterSchema).optional(), - edgeId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - sourceHandle: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - targetHandle: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - style: z.lazy(() => JsonNullableFilterSchema).optional(), - animated: z.union([ z.lazy(() => BoolFilterSchema),z.boolean() ]).optional(), - createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), - updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), -}).strict(); - -export const WorkflowExecutionUpsertWithWhereUniqueWithoutWorkflowInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowExecutionWhereUniqueInputSchema), - update: z.union([ z.lazy(() => WorkflowExecutionUpdateWithoutWorkflowInputSchema),z.lazy(() => WorkflowExecutionUncheckedUpdateWithoutWorkflowInputSchema) ]), - create: z.union([ z.lazy(() => WorkflowExecutionCreateWithoutWorkflowInputSchema),z.lazy(() => WorkflowExecutionUncheckedCreateWithoutWorkflowInputSchema) ]), -}).strict(); - -export const WorkflowExecutionUpdateWithWhereUniqueWithoutWorkflowInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowExecutionWhereUniqueInputSchema), - data: z.union([ z.lazy(() => WorkflowExecutionUpdateWithoutWorkflowInputSchema),z.lazy(() => WorkflowExecutionUncheckedUpdateWithoutWorkflowInputSchema) ]), -}).strict(); - -export const WorkflowExecutionUpdateManyWithWhereWithoutWorkflowInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowExecutionScalarWhereInputSchema), - data: z.union([ z.lazy(() => WorkflowExecutionUpdateManyMutationInputSchema),z.lazy(() => WorkflowExecutionUncheckedUpdateManyWithoutWorkflowInputSchema) ]), -}).strict(); - -export const WorkflowExecutionScalarWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => WorkflowExecutionScalarWhereInputSchema),z.lazy(() => WorkflowExecutionScalarWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => WorkflowExecutionScalarWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => WorkflowExecutionScalarWhereInputSchema),z.lazy(() => WorkflowExecutionScalarWhereInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - workflowId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - triggerId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - executionId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - status: z.union([ z.lazy(() => EnumWorkflowExecutionStatusFilterSchema),z.lazy(() => WorkflowExecutionStatusSchema) ]).optional(), - priority: z.union([ z.lazy(() => EnumExecutionPriorityFilterSchema),z.lazy(() => ExecutionPrioritySchema) ]).optional(), - triggerData: z.lazy(() => JsonNullableFilterSchema).optional(), - triggerContext: z.lazy(() => JsonNullableFilterSchema).optional(), - currentNodeId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - progress: z.union([ z.lazy(() => FloatFilterSchema),z.number() ]).optional(), - startedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), - completedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), - failedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), - duration: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), - result: z.lazy(() => JsonNullableFilterSchema).optional(), - error: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - errorDetails: z.lazy(() => JsonNullableFilterSchema).optional(), - retryCount: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), - maxRetries: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), - retryDelay: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), - createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), - updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), -}).strict(); - -export const WorkflowAnalyticsUpsertWithWhereUniqueWithoutWorkflowInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowAnalyticsWhereUniqueInputSchema), - update: z.union([ z.lazy(() => WorkflowAnalyticsUpdateWithoutWorkflowInputSchema),z.lazy(() => WorkflowAnalyticsUncheckedUpdateWithoutWorkflowInputSchema) ]), - create: z.union([ z.lazy(() => WorkflowAnalyticsCreateWithoutWorkflowInputSchema),z.lazy(() => WorkflowAnalyticsUncheckedCreateWithoutWorkflowInputSchema) ]), -}).strict(); - -export const WorkflowAnalyticsUpdateWithWhereUniqueWithoutWorkflowInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowAnalyticsWhereUniqueInputSchema), - data: z.union([ z.lazy(() => WorkflowAnalyticsUpdateWithoutWorkflowInputSchema),z.lazy(() => WorkflowAnalyticsUncheckedUpdateWithoutWorkflowInputSchema) ]), -}).strict(); - -export const WorkflowAnalyticsUpdateManyWithWhereWithoutWorkflowInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowAnalyticsScalarWhereInputSchema), - data: z.union([ z.lazy(() => WorkflowAnalyticsUpdateManyMutationInputSchema),z.lazy(() => WorkflowAnalyticsUncheckedUpdateManyWithoutWorkflowInputSchema) ]), -}).strict(); - -export const WorkflowAnalyticsScalarWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => WorkflowAnalyticsScalarWhereInputSchema),z.lazy(() => WorkflowAnalyticsScalarWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => WorkflowAnalyticsScalarWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => WorkflowAnalyticsScalarWhereInputSchema),z.lazy(() => WorkflowAnalyticsScalarWhereInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - workflowId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - periodStart: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), - periodEnd: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), - granularity: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - totalExecutions: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), - successfulExecutions: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), - failedExecutions: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), - averageDuration: z.union([ z.lazy(() => FloatNullableFilterSchema),z.number() ]).optional().nullable(), - minDuration: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), - maxDuration: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), - p95Duration: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), - commonErrors: z.lazy(() => JsonNullableFilterSchema).optional(), - errorRate: z.union([ z.lazy(() => FloatNullableFilterSchema),z.number() ]).optional().nullable(), - avgCpuUsage: z.union([ z.lazy(() => FloatNullableFilterSchema),z.number() ]).optional().nullable(), - avgMemoryUsage: z.union([ z.lazy(() => FloatNullableFilterSchema),z.number() ]).optional().nullable(), - createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), - updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() +}).strict(); + +export const WorkflowTriggerUpsertWithWhereUniqueWithoutWorkflowInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowTriggerWhereUniqueInputSchema), + update: z.union([ z.lazy(() => WorkflowTriggerUpdateWithoutWorkflowInputSchema),z.lazy(() => WorkflowTriggerUncheckedUpdateWithoutWorkflowInputSchema) ]), + create: z.union([ z.lazy(() => WorkflowTriggerCreateWithoutWorkflowInputSchema),z.lazy(() => WorkflowTriggerUncheckedCreateWithoutWorkflowInputSchema) ]), +}).strict(); + +export const WorkflowTriggerUpdateWithWhereUniqueWithoutWorkflowInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowTriggerWhereUniqueInputSchema), + data: z.union([ z.lazy(() => WorkflowTriggerUpdateWithoutWorkflowInputSchema),z.lazy(() => WorkflowTriggerUncheckedUpdateWithoutWorkflowInputSchema) ]), +}).strict(); + +export const WorkflowTriggerUpdateManyWithWhereWithoutWorkflowInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowTriggerScalarWhereInputSchema), + data: z.union([ z.lazy(() => WorkflowTriggerUpdateManyMutationInputSchema),z.lazy(() => WorkflowTriggerUncheckedUpdateManyWithoutWorkflowInputSchema) ]), +}).strict(); + +export const WorkflowTriggerScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => WorkflowTriggerScalarWhereInputSchema),z.lazy(() => WorkflowTriggerScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => WorkflowTriggerScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => WorkflowTriggerScalarWhereInputSchema),z.lazy(() => WorkflowTriggerScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + workflowId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + nodeId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + name: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + description: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + type: z.union([ z.lazy(() => EnumWorkflowTriggerTypeFilterSchema),z.lazy(() => WorkflowTriggerTypeSchema) ]).optional(), + module: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + entityType: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + eventType: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + conditions: z.lazy(() => JsonNullableFilterSchema).optional(), + delay: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), + isActive: z.union([ z.lazy(() => BoolFilterSchema),z.boolean() ]).optional(), + lastTriggered: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + triggerCount: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), +}).strict(); + +export const WorkflowNodeUpsertWithWhereUniqueWithoutWorkflowInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowNodeWhereUniqueInputSchema), + update: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutWorkflowInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutWorkflowInputSchema) ]), + create: z.union([ z.lazy(() => WorkflowNodeCreateWithoutWorkflowInputSchema),z.lazy(() => WorkflowNodeUncheckedCreateWithoutWorkflowInputSchema) ]), +}).strict(); + +export const WorkflowNodeUpdateWithWhereUniqueWithoutWorkflowInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowNodeWhereUniqueInputSchema), + data: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutWorkflowInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutWorkflowInputSchema) ]), +}).strict(); + +export const WorkflowNodeUpdateManyWithWhereWithoutWorkflowInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowNodeScalarWhereInputSchema), + data: z.union([ z.lazy(() => WorkflowNodeUpdateManyMutationInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateManyWithoutWorkflowInputSchema) ]), +}).strict(); + +export const WorkflowNodeScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => WorkflowNodeScalarWhereInputSchema),z.lazy(() => WorkflowNodeScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => WorkflowNodeScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => WorkflowNodeScalarWhereInputSchema),z.lazy(() => WorkflowNodeScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + workflowId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + nodeId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + type: z.union([ z.lazy(() => EnumWorkflowNodeTypeFilterSchema),z.lazy(() => WorkflowNodeTypeSchema) ]).optional(), + name: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + description: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + position: z.lazy(() => JsonFilterSchema).optional(), + config: z.lazy(() => JsonNullableFilterSchema).optional(), + template: z.lazy(() => JsonNullableFilterSchema).optional(), + executionOrder: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), + isOptional: z.union([ z.lazy(() => BoolFilterSchema),z.boolean() ]).optional(), + retryLimit: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), + timeout: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), + conditions: z.lazy(() => JsonNullableFilterSchema).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), +}).strict(); + +export const WorkflowConnectionUpsertWithWhereUniqueWithoutWorkflowInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowConnectionWhereUniqueInputSchema), + update: z.union([ z.lazy(() => WorkflowConnectionUpdateWithoutWorkflowInputSchema),z.lazy(() => WorkflowConnectionUncheckedUpdateWithoutWorkflowInputSchema) ]), + create: z.union([ z.lazy(() => WorkflowConnectionCreateWithoutWorkflowInputSchema),z.lazy(() => WorkflowConnectionUncheckedCreateWithoutWorkflowInputSchema) ]), +}).strict(); + +export const WorkflowConnectionUpdateWithWhereUniqueWithoutWorkflowInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowConnectionWhereUniqueInputSchema), + data: z.union([ z.lazy(() => WorkflowConnectionUpdateWithoutWorkflowInputSchema),z.lazy(() => WorkflowConnectionUncheckedUpdateWithoutWorkflowInputSchema) ]), +}).strict(); + +export const WorkflowConnectionUpdateManyWithWhereWithoutWorkflowInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowConnectionScalarWhereInputSchema), + data: z.union([ z.lazy(() => WorkflowConnectionUpdateManyMutationInputSchema),z.lazy(() => WorkflowConnectionUncheckedUpdateManyWithoutWorkflowInputSchema) ]), +}).strict(); + +export const WorkflowConnectionScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => WorkflowConnectionScalarWhereInputSchema),z.lazy(() => WorkflowConnectionScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => WorkflowConnectionScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => WorkflowConnectionScalarWhereInputSchema),z.lazy(() => WorkflowConnectionScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + workflowId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + sourceNodeId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + targetNodeId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + executionOrder: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), + label: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + conditions: z.lazy(() => JsonNullableFilterSchema).optional(), + edgeId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + sourceHandle: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + targetHandle: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + style: z.lazy(() => JsonNullableFilterSchema).optional(), + animated: z.union([ z.lazy(() => BoolFilterSchema),z.boolean() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), +}).strict(); + +export const WorkflowExecutionUpsertWithWhereUniqueWithoutWorkflowInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowExecutionWhereUniqueInputSchema), + update: z.union([ z.lazy(() => WorkflowExecutionUpdateWithoutWorkflowInputSchema),z.lazy(() => WorkflowExecutionUncheckedUpdateWithoutWorkflowInputSchema) ]), + create: z.union([ z.lazy(() => WorkflowExecutionCreateWithoutWorkflowInputSchema),z.lazy(() => WorkflowExecutionUncheckedCreateWithoutWorkflowInputSchema) ]), +}).strict(); + +export const WorkflowExecutionUpdateWithWhereUniqueWithoutWorkflowInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowExecutionWhereUniqueInputSchema), + data: z.union([ z.lazy(() => WorkflowExecutionUpdateWithoutWorkflowInputSchema),z.lazy(() => WorkflowExecutionUncheckedUpdateWithoutWorkflowInputSchema) ]), +}).strict(); + +export const WorkflowExecutionUpdateManyWithWhereWithoutWorkflowInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowExecutionScalarWhereInputSchema), + data: z.union([ z.lazy(() => WorkflowExecutionUpdateManyMutationInputSchema),z.lazy(() => WorkflowExecutionUncheckedUpdateManyWithoutWorkflowInputSchema) ]), +}).strict(); + +export const WorkflowExecutionScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => WorkflowExecutionScalarWhereInputSchema),z.lazy(() => WorkflowExecutionScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => WorkflowExecutionScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => WorkflowExecutionScalarWhereInputSchema),z.lazy(() => WorkflowExecutionScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + workflowId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + triggerId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + executionId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + status: z.union([ z.lazy(() => EnumWorkflowExecutionStatusFilterSchema),z.lazy(() => WorkflowExecutionStatusSchema) ]).optional(), + priority: z.union([ z.lazy(() => EnumExecutionPriorityFilterSchema),z.lazy(() => ExecutionPrioritySchema) ]).optional(), + triggerData: z.lazy(() => JsonNullableFilterSchema).optional(), + triggerContext: z.lazy(() => JsonNullableFilterSchema).optional(), + currentNodeId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + progress: z.union([ z.lazy(() => FloatFilterSchema),z.number() ]).optional(), + startedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + completedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + failedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + duration: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), + result: z.lazy(() => JsonNullableFilterSchema).optional(), + error: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + errorDetails: z.lazy(() => JsonNullableFilterSchema).optional(), + retryCount: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), + maxRetries: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), + retryDelay: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), +}).strict(); + +export const WorkflowAnalyticsUpsertWithWhereUniqueWithoutWorkflowInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowAnalyticsWhereUniqueInputSchema), + update: z.union([ z.lazy(() => WorkflowAnalyticsUpdateWithoutWorkflowInputSchema),z.lazy(() => WorkflowAnalyticsUncheckedUpdateWithoutWorkflowInputSchema) ]), + create: z.union([ z.lazy(() => WorkflowAnalyticsCreateWithoutWorkflowInputSchema),z.lazy(() => WorkflowAnalyticsUncheckedCreateWithoutWorkflowInputSchema) ]), +}).strict(); + +export const WorkflowAnalyticsUpdateWithWhereUniqueWithoutWorkflowInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowAnalyticsWhereUniqueInputSchema), + data: z.union([ z.lazy(() => WorkflowAnalyticsUpdateWithoutWorkflowInputSchema),z.lazy(() => WorkflowAnalyticsUncheckedUpdateWithoutWorkflowInputSchema) ]), +}).strict(); + +export const WorkflowAnalyticsUpdateManyWithWhereWithoutWorkflowInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowAnalyticsScalarWhereInputSchema), + data: z.union([ z.lazy(() => WorkflowAnalyticsUpdateManyMutationInputSchema),z.lazy(() => WorkflowAnalyticsUncheckedUpdateManyWithoutWorkflowInputSchema) ]), +}).strict(); + +export const WorkflowAnalyticsScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => WorkflowAnalyticsScalarWhereInputSchema),z.lazy(() => WorkflowAnalyticsScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => WorkflowAnalyticsScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => WorkflowAnalyticsScalarWhereInputSchema),z.lazy(() => WorkflowAnalyticsScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + workflowId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + periodStart: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + periodEnd: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + granularity: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + totalExecutions: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), + successfulExecutions: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), + failedExecutions: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), + averageDuration: z.union([ z.lazy(() => FloatNullableFilterSchema),z.number() ]).optional().nullable(), + minDuration: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), + maxDuration: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), + p95Duration: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), + commonErrors: z.lazy(() => JsonNullableFilterSchema).optional(), + errorRate: z.union([ z.lazy(() => FloatNullableFilterSchema),z.number() ]).optional().nullable(), + avgCpuUsage: z.union([ z.lazy(() => FloatNullableFilterSchema),z.number() ]).optional().nullable(), + avgMemoryUsage: z.union([ z.lazy(() => FloatNullableFilterSchema),z.number() ]).optional().nullable(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), +}).strict(); + +export const OrganizationCreateWithoutUiConfigsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string(), + logo: z.string().optional().nullable(), + website: z.string().optional().nullable(), + industry: z.string().optional().nullable(), + description: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + users: z.lazy(() => UserOrganizationCreateNestedManyWithoutOrganizationInputSchema).optional(), + customers: z.lazy(() => CustomerCreateNestedManyWithoutOrganizationInputSchema).optional(), + projects: z.lazy(() => ProjectCreateNestedManyWithoutOrganizationInputSchema).optional(), + tasks: z.lazy(() => TaskCreateNestedManyWithoutOrganizationInputSchema).optional(), + invoices: z.lazy(() => InvoiceCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenses: z.lazy(() => ExpenseCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenseCategories: z.lazy(() => ExpenseCategoryCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenseTags: z.lazy(() => ExpenseTagCreateNestedManyWithoutOrganizationInputSchema).optional(), + employees: z.lazy(() => EmployeeCreateNestedManyWithoutOrganizationInputSchema).optional(), + campaigns: z.lazy(() => MarketingCampaignCreateNestedManyWithoutOrganizationInputSchema).optional(), + invitations: z.lazy(() => InvitationCreateNestedManyWithoutOrganizationInputSchema).optional(), + customRoles: z.lazy(() => CustomRoleCreateNestedManyWithoutOrganizationInputSchema).optional(), + financialReports: z.lazy(() => FinancialReportCreateNestedManyWithoutOrganizationInputSchema).optional(), + workflows: z.lazy(() => WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), + actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), + variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional() +}).strict(); + +export const OrganizationUncheckedCreateWithoutUiConfigsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string(), + logo: z.string().optional().nullable(), + website: z.string().optional().nullable(), + industry: z.string().optional().nullable(), + description: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + users: z.lazy(() => UserOrganizationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + customers: z.lazy(() => CustomerUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + projects: z.lazy(() => ProjectUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + tasks: z.lazy(() => TaskUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + invoices: z.lazy(() => InvoiceUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenses: z.lazy(() => ExpenseUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenseCategories: z.lazy(() => ExpenseCategoryUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenseTags: z.lazy(() => ExpenseTagUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + employees: z.lazy(() => EmployeeUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + campaigns: z.lazy(() => MarketingCampaignUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + invitations: z.lazy(() => InvitationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + customRoles: z.lazy(() => CustomRoleUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + financialReports: z.lazy(() => FinancialReportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + workflows: z.lazy(() => WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() +}).strict(); + +export const OrganizationCreateOrConnectWithoutUiConfigsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => OrganizationWhereUniqueInputSchema), + create: z.union([ z.lazy(() => OrganizationCreateWithoutUiConfigsInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutUiConfigsInputSchema) ]), +}).strict(); + +export const OrganizationUpsertWithoutUiConfigsInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => OrganizationUpdateWithoutUiConfigsInputSchema),z.lazy(() => OrganizationUncheckedUpdateWithoutUiConfigsInputSchema) ]), + create: z.union([ z.lazy(() => OrganizationCreateWithoutUiConfigsInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutUiConfigsInputSchema) ]), + where: z.lazy(() => OrganizationWhereInputSchema).optional() +}).strict(); + +export const OrganizationUpdateToOneWithWhereWithoutUiConfigsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => OrganizationWhereInputSchema).optional(), + data: z.union([ z.lazy(() => OrganizationUpdateWithoutUiConfigsInputSchema),z.lazy(() => OrganizationUncheckedUpdateWithoutUiConfigsInputSchema) ]), +}).strict(); + +export const OrganizationUpdateWithoutUiConfigsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + logo: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + website: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + industry: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + users: z.lazy(() => UserOrganizationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + customers: z.lazy(() => CustomerUpdateManyWithoutOrganizationNestedInputSchema).optional(), + projects: z.lazy(() => ProjectUpdateManyWithoutOrganizationNestedInputSchema).optional(), + tasks: z.lazy(() => TaskUpdateManyWithoutOrganizationNestedInputSchema).optional(), + invoices: z.lazy(() => InvoiceUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenses: z.lazy(() => ExpenseUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenseCategories: z.lazy(() => ExpenseCategoryUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenseTags: z.lazy(() => ExpenseTagUpdateManyWithoutOrganizationNestedInputSchema).optional(), + employees: z.lazy(() => EmployeeUpdateManyWithoutOrganizationNestedInputSchema).optional(), + campaigns: z.lazy(() => MarketingCampaignUpdateManyWithoutOrganizationNestedInputSchema).optional(), + invitations: z.lazy(() => InvitationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + customRoles: z.lazy(() => CustomRoleUpdateManyWithoutOrganizationNestedInputSchema).optional(), + financialReports: z.lazy(() => FinancialReportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + workflows: z.lazy(() => WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), + actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), + variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional() +}).strict(); + +export const OrganizationUncheckedUpdateWithoutUiConfigsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + logo: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + website: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + industry: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + users: z.lazy(() => UserOrganizationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + customers: z.lazy(() => CustomerUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + projects: z.lazy(() => ProjectUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + tasks: z.lazy(() => TaskUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + invoices: z.lazy(() => InvoiceUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenses: z.lazy(() => ExpenseUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenseCategories: z.lazy(() => ExpenseCategoryUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenseTags: z.lazy(() => ExpenseTagUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + employees: z.lazy(() => EmployeeUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + campaigns: z.lazy(() => MarketingCampaignUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + invitations: z.lazy(() => InvitationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + customRoles: z.lazy(() => CustomRoleUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + financialReports: z.lazy(() => FinancialReportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + workflows: z.lazy(() => WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const WorkflowCreateWithoutTriggersInputSchema: z.ZodType = z.object({ @@ -38512,7 +44415,12 @@ export const OrganizationCreateWithoutActionTemplatesInputSchema: z.ZodType FinancialReportCreateNestedManyWithoutOrganizationInputSchema).optional(), workflows: z.lazy(() => WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationUncheckedCreateWithoutActionTemplatesInputSchema: z.ZodType = z.object({ @@ -38539,7 +44447,12 @@ export const OrganizationUncheckedCreateWithoutActionTemplatesInputSchema: z.Zod financialReports: z.lazy(() => FinancialReportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), workflows: z.lazy(() => WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationCreateOrConnectWithoutActionTemplatesInputSchema: z.ZodType = z.object({ @@ -38612,7 +44525,12 @@ export const OrganizationUpdateWithoutActionTemplatesInputSchema: z.ZodType FinancialReportUpdateManyWithoutOrganizationNestedInputSchema).optional(), workflows: z.lazy(() => WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const OrganizationUncheckedUpdateWithoutActionTemplatesInputSchema: z.ZodType = z.object({ @@ -38639,7 +44557,12 @@ export const OrganizationUncheckedUpdateWithoutActionTemplatesInputSchema: z.Zod financialReports: z.lazy(() => FinancialReportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), workflows: z.lazy(() => WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const ActionTemplateVersionUpsertWithWhereUniqueWithoutActionTemplateInputSchema: z.ZodType = z.object({ @@ -38800,7 +44723,12 @@ export const OrganizationCreateWithoutVariableDefinitionsInputSchema: z.ZodType< financialReports: z.lazy(() => FinancialReportCreateNestedManyWithoutOrganizationInputSchema).optional(), workflows: z.lazy(() => WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationUncheckedCreateWithoutVariableDefinitionsInputSchema: z.ZodType = z.object({ @@ -38827,7 +44755,12 @@ export const OrganizationUncheckedCreateWithoutVariableDefinitionsInputSchema: z financialReports: z.lazy(() => FinancialReportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), workflows: z.lazy(() => WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationCreateOrConnectWithoutVariableDefinitionsInputSchema: z.ZodType = z.object({ @@ -38936,7 +44869,12 @@ export const OrganizationUpdateWithoutVariableDefinitionsInputSchema: z.ZodType< financialReports: z.lazy(() => FinancialReportUpdateManyWithoutOrganizationNestedInputSchema).optional(), workflows: z.lazy(() => WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const OrganizationUncheckedUpdateWithoutVariableDefinitionsInputSchema: z.ZodType = z.object({ @@ -38963,7 +44901,12 @@ export const OrganizationUncheckedUpdateWithoutVariableDefinitionsInputSchema: z financialReports: z.lazy(() => FinancialReportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), workflows: z.lazy(() => WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), - integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const TriggerVariableUpsertWithWhereUniqueWithoutVariableInputSchema: z.ZodType = z.object({ @@ -40249,7 +46192,12 @@ export const OrganizationCreateWithoutIntegrationConfigsInputSchema: z.ZodType

FinancialReportCreateNestedManyWithoutOrganizationInputSchema).optional(), workflows: z.lazy(() => WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), - variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional() + variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationUncheckedCreateWithoutIntegrationConfigsInputSchema: z.ZodType = z.object({ @@ -40276,7 +46224,12 @@ export const OrganizationUncheckedCreateWithoutIntegrationConfigsInputSchema: z. financialReports: z.lazy(() => FinancialReportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), workflows: z.lazy(() => WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), - variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() + variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() }).strict(); export const OrganizationCreateOrConnectWithoutIntegrationConfigsInputSchema: z.ZodType = z.object({ @@ -40319,7 +46272,12 @@ export const OrganizationUpdateWithoutIntegrationConfigsInputSchema: z.ZodType

FinancialReportUpdateManyWithoutOrganizationNestedInputSchema).optional(), workflows: z.lazy(() => WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), - variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional() + variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const OrganizationUncheckedUpdateWithoutIntegrationConfigsInputSchema: z.ZodType = z.object({ @@ -40346,7 +46304,12 @@ export const OrganizationUncheckedUpdateWithoutIntegrationConfigsInputSchema: z. financialReports: z.lazy(() => FinancialReportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), workflows: z.lazy(() => WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), - variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() + variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() }).strict(); export const WorkflowNodeCreateWithoutEmailActionInputSchema: z.ZodType = z.object({ @@ -40423,7 +46386,139 @@ export const WorkflowNodeUpdateToOneWithWhereWithoutEmailActionInputSchema: z.Zo data: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutEmailActionInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutEmailActionInputSchema) ]), }).strict(); -export const WorkflowNodeUpdateWithoutEmailActionInputSchema: z.ZodType = z.object({ +export const WorkflowNodeUpdateWithoutEmailActionInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + nodeId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + type: z.union([ z.lazy(() => WorkflowNodeTypeSchema),z.lazy(() => EnumWorkflowNodeTypeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + position: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + config: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + template: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + executionOrder: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + isOptional: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + retryLimit: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + timeout: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + conditions: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + workflow: z.lazy(() => WorkflowUpdateOneRequiredWithoutNodesNestedInputSchema).optional(), + executions: z.lazy(() => NodeExecutionUpdateManyWithoutNodeNestedInputSchema).optional(), + dependencies: z.lazy(() => NodeDependencyUpdateManyWithoutDependentNodeNestedInputSchema).optional(), + dependents: z.lazy(() => NodeDependencyUpdateManyWithoutPrerequisiteNodeNestedInputSchema).optional(), + sourceConnections: z.lazy(() => WorkflowConnectionUpdateManyWithoutSourceNodeNestedInputSchema).optional(), + targetConnections: z.lazy(() => WorkflowConnectionUpdateManyWithoutTargetNodeNestedInputSchema).optional(), + smsAction: z.lazy(() => SmsActionUpdateOneWithoutActionNestedInputSchema).optional(), + whatsAppAction: z.lazy(() => WhatsAppActionUpdateOneWithoutActionNestedInputSchema).optional(), + slackAction: z.lazy(() => SlackActionUpdateOneWithoutActionNestedInputSchema).optional(), + calendarAction: z.lazy(() => CalendarActionUpdateOneWithoutActionNestedInputSchema).optional(), + trigger: z.lazy(() => WorkflowTriggerUpdateOneWithoutNodeNestedInputSchema).optional() +}).strict(); + +export const WorkflowNodeUncheckedUpdateWithoutEmailActionInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + workflowId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + nodeId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + type: z.union([ z.lazy(() => WorkflowNodeTypeSchema),z.lazy(() => EnumWorkflowNodeTypeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + position: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + config: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + template: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + executionOrder: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + isOptional: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + retryLimit: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + timeout: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + conditions: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + executions: z.lazy(() => NodeExecutionUncheckedUpdateManyWithoutNodeNestedInputSchema).optional(), + dependencies: z.lazy(() => NodeDependencyUncheckedUpdateManyWithoutDependentNodeNestedInputSchema).optional(), + dependents: z.lazy(() => NodeDependencyUncheckedUpdateManyWithoutPrerequisiteNodeNestedInputSchema).optional(), + sourceConnections: z.lazy(() => WorkflowConnectionUncheckedUpdateManyWithoutSourceNodeNestedInputSchema).optional(), + targetConnections: z.lazy(() => WorkflowConnectionUncheckedUpdateManyWithoutTargetNodeNestedInputSchema).optional(), + smsAction: z.lazy(() => SmsActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), + whatsAppAction: z.lazy(() => WhatsAppActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), + slackAction: z.lazy(() => SlackActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), + calendarAction: z.lazy(() => CalendarActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), + trigger: z.lazy(() => WorkflowTriggerUncheckedUpdateOneWithoutNodeNestedInputSchema).optional() +}).strict(); + +export const WorkflowNodeCreateWithoutSmsActionInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + nodeId: z.string(), + type: z.lazy(() => WorkflowNodeTypeSchema), + name: z.string(), + description: z.string().optional().nullable(), + position: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + config: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + template: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + executionOrder: z.number().int().optional().nullable(), + isOptional: z.boolean().optional(), + retryLimit: z.number().int().optional(), + timeout: z.number().int().optional().nullable(), + conditions: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + workflow: z.lazy(() => WorkflowCreateNestedOneWithoutNodesInputSchema), + executions: z.lazy(() => NodeExecutionCreateNestedManyWithoutNodeInputSchema).optional(), + dependencies: z.lazy(() => NodeDependencyCreateNestedManyWithoutDependentNodeInputSchema).optional(), + dependents: z.lazy(() => NodeDependencyCreateNestedManyWithoutPrerequisiteNodeInputSchema).optional(), + sourceConnections: z.lazy(() => WorkflowConnectionCreateNestedManyWithoutSourceNodeInputSchema).optional(), + targetConnections: z.lazy(() => WorkflowConnectionCreateNestedManyWithoutTargetNodeInputSchema).optional(), + emailAction: z.lazy(() => EmailActionCreateNestedOneWithoutActionInputSchema).optional(), + whatsAppAction: z.lazy(() => WhatsAppActionCreateNestedOneWithoutActionInputSchema).optional(), + slackAction: z.lazy(() => SlackActionCreateNestedOneWithoutActionInputSchema).optional(), + calendarAction: z.lazy(() => CalendarActionCreateNestedOneWithoutActionInputSchema).optional(), + trigger: z.lazy(() => WorkflowTriggerCreateNestedOneWithoutNodeInputSchema).optional() +}).strict(); + +export const WorkflowNodeUncheckedCreateWithoutSmsActionInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + workflowId: z.string(), + nodeId: z.string(), + type: z.lazy(() => WorkflowNodeTypeSchema), + name: z.string(), + description: z.string().optional().nullable(), + position: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + config: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + template: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + executionOrder: z.number().int().optional().nullable(), + isOptional: z.boolean().optional(), + retryLimit: z.number().int().optional(), + timeout: z.number().int().optional().nullable(), + conditions: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + executions: z.lazy(() => NodeExecutionUncheckedCreateNestedManyWithoutNodeInputSchema).optional(), + dependencies: z.lazy(() => NodeDependencyUncheckedCreateNestedManyWithoutDependentNodeInputSchema).optional(), + dependents: z.lazy(() => NodeDependencyUncheckedCreateNestedManyWithoutPrerequisiteNodeInputSchema).optional(), + sourceConnections: z.lazy(() => WorkflowConnectionUncheckedCreateNestedManyWithoutSourceNodeInputSchema).optional(), + targetConnections: z.lazy(() => WorkflowConnectionUncheckedCreateNestedManyWithoutTargetNodeInputSchema).optional(), + emailAction: z.lazy(() => EmailActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), + whatsAppAction: z.lazy(() => WhatsAppActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), + slackAction: z.lazy(() => SlackActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), + calendarAction: z.lazy(() => CalendarActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), + trigger: z.lazy(() => WorkflowTriggerUncheckedCreateNestedOneWithoutNodeInputSchema).optional() +}).strict(); + +export const WorkflowNodeCreateOrConnectWithoutSmsActionInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowNodeWhereUniqueInputSchema), + create: z.union([ z.lazy(() => WorkflowNodeCreateWithoutSmsActionInputSchema),z.lazy(() => WorkflowNodeUncheckedCreateWithoutSmsActionInputSchema) ]), +}).strict(); + +export const WorkflowNodeUpsertWithoutSmsActionInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutSmsActionInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutSmsActionInputSchema) ]), + create: z.union([ z.lazy(() => WorkflowNodeCreateWithoutSmsActionInputSchema),z.lazy(() => WorkflowNodeUncheckedCreateWithoutSmsActionInputSchema) ]), + where: z.lazy(() => WorkflowNodeWhereInputSchema).optional() +}).strict(); + +export const WorkflowNodeUpdateToOneWithWhereWithoutSmsActionInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowNodeWhereInputSchema).optional(), + data: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutSmsActionInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutSmsActionInputSchema) ]), +}).strict(); + +export const WorkflowNodeUpdateWithoutSmsActionInputSchema: z.ZodType = z.object({ id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), nodeId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), type: z.union([ z.lazy(() => WorkflowNodeTypeSchema),z.lazy(() => EnumWorkflowNodeTypeFieldUpdateOperationsInputSchema) ]).optional(), @@ -40445,14 +46540,14 @@ export const WorkflowNodeUpdateWithoutEmailActionInputSchema: z.ZodType NodeDependencyUpdateManyWithoutPrerequisiteNodeNestedInputSchema).optional(), sourceConnections: z.lazy(() => WorkflowConnectionUpdateManyWithoutSourceNodeNestedInputSchema).optional(), targetConnections: z.lazy(() => WorkflowConnectionUpdateManyWithoutTargetNodeNestedInputSchema).optional(), - smsAction: z.lazy(() => SmsActionUpdateOneWithoutActionNestedInputSchema).optional(), + emailAction: z.lazy(() => EmailActionUpdateOneWithoutActionNestedInputSchema).optional(), whatsAppAction: z.lazy(() => WhatsAppActionUpdateOneWithoutActionNestedInputSchema).optional(), slackAction: z.lazy(() => SlackActionUpdateOneWithoutActionNestedInputSchema).optional(), calendarAction: z.lazy(() => CalendarActionUpdateOneWithoutActionNestedInputSchema).optional(), trigger: z.lazy(() => WorkflowTriggerUpdateOneWithoutNodeNestedInputSchema).optional() }).strict(); -export const WorkflowNodeUncheckedUpdateWithoutEmailActionInputSchema: z.ZodType = z.object({ +export const WorkflowNodeUncheckedUpdateWithoutSmsActionInputSchema: z.ZodType = z.object({ id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), workflowId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), nodeId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), @@ -40474,14 +46569,14 @@ export const WorkflowNodeUncheckedUpdateWithoutEmailActionInputSchema: z.ZodType dependents: z.lazy(() => NodeDependencyUncheckedUpdateManyWithoutPrerequisiteNodeNestedInputSchema).optional(), sourceConnections: z.lazy(() => WorkflowConnectionUncheckedUpdateManyWithoutSourceNodeNestedInputSchema).optional(), targetConnections: z.lazy(() => WorkflowConnectionUncheckedUpdateManyWithoutTargetNodeNestedInputSchema).optional(), - smsAction: z.lazy(() => SmsActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), + emailAction: z.lazy(() => EmailActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), whatsAppAction: z.lazy(() => WhatsAppActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), slackAction: z.lazy(() => SlackActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), calendarAction: z.lazy(() => CalendarActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), trigger: z.lazy(() => WorkflowTriggerUncheckedUpdateOneWithoutNodeNestedInputSchema).optional() }).strict(); -export const WorkflowNodeCreateWithoutSmsActionInputSchema: z.ZodType = z.object({ +export const WorkflowNodeCreateWithoutWhatsAppActionInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), nodeId: z.string(), type: z.lazy(() => WorkflowNodeTypeSchema), @@ -40504,13 +46599,13 @@ export const WorkflowNodeCreateWithoutSmsActionInputSchema: z.ZodType WorkflowConnectionCreateNestedManyWithoutSourceNodeInputSchema).optional(), targetConnections: z.lazy(() => WorkflowConnectionCreateNestedManyWithoutTargetNodeInputSchema).optional(), emailAction: z.lazy(() => EmailActionCreateNestedOneWithoutActionInputSchema).optional(), - whatsAppAction: z.lazy(() => WhatsAppActionCreateNestedOneWithoutActionInputSchema).optional(), + smsAction: z.lazy(() => SmsActionCreateNestedOneWithoutActionInputSchema).optional(), slackAction: z.lazy(() => SlackActionCreateNestedOneWithoutActionInputSchema).optional(), calendarAction: z.lazy(() => CalendarActionCreateNestedOneWithoutActionInputSchema).optional(), trigger: z.lazy(() => WorkflowTriggerCreateNestedOneWithoutNodeInputSchema).optional() }).strict(); -export const WorkflowNodeUncheckedCreateWithoutSmsActionInputSchema: z.ZodType = z.object({ +export const WorkflowNodeUncheckedCreateWithoutWhatsAppActionInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), workflowId: z.string(), nodeId: z.string(), @@ -40533,29 +46628,29 @@ export const WorkflowNodeUncheckedCreateWithoutSmsActionInputSchema: z.ZodType

WorkflowConnectionUncheckedCreateNestedManyWithoutSourceNodeInputSchema).optional(), targetConnections: z.lazy(() => WorkflowConnectionUncheckedCreateNestedManyWithoutTargetNodeInputSchema).optional(), emailAction: z.lazy(() => EmailActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), - whatsAppAction: z.lazy(() => WhatsAppActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), + smsAction: z.lazy(() => SmsActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), slackAction: z.lazy(() => SlackActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), calendarAction: z.lazy(() => CalendarActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), trigger: z.lazy(() => WorkflowTriggerUncheckedCreateNestedOneWithoutNodeInputSchema).optional() }).strict(); -export const WorkflowNodeCreateOrConnectWithoutSmsActionInputSchema: z.ZodType = z.object({ +export const WorkflowNodeCreateOrConnectWithoutWhatsAppActionInputSchema: z.ZodType = z.object({ where: z.lazy(() => WorkflowNodeWhereUniqueInputSchema), - create: z.union([ z.lazy(() => WorkflowNodeCreateWithoutSmsActionInputSchema),z.lazy(() => WorkflowNodeUncheckedCreateWithoutSmsActionInputSchema) ]), + create: z.union([ z.lazy(() => WorkflowNodeCreateWithoutWhatsAppActionInputSchema),z.lazy(() => WorkflowNodeUncheckedCreateWithoutWhatsAppActionInputSchema) ]), }).strict(); -export const WorkflowNodeUpsertWithoutSmsActionInputSchema: z.ZodType = z.object({ - update: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutSmsActionInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutSmsActionInputSchema) ]), - create: z.union([ z.lazy(() => WorkflowNodeCreateWithoutSmsActionInputSchema),z.lazy(() => WorkflowNodeUncheckedCreateWithoutSmsActionInputSchema) ]), +export const WorkflowNodeUpsertWithoutWhatsAppActionInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutWhatsAppActionInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutWhatsAppActionInputSchema) ]), + create: z.union([ z.lazy(() => WorkflowNodeCreateWithoutWhatsAppActionInputSchema),z.lazy(() => WorkflowNodeUncheckedCreateWithoutWhatsAppActionInputSchema) ]), where: z.lazy(() => WorkflowNodeWhereInputSchema).optional() }).strict(); -export const WorkflowNodeUpdateToOneWithWhereWithoutSmsActionInputSchema: z.ZodType = z.object({ +export const WorkflowNodeUpdateToOneWithWhereWithoutWhatsAppActionInputSchema: z.ZodType = z.object({ where: z.lazy(() => WorkflowNodeWhereInputSchema).optional(), - data: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutSmsActionInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutSmsActionInputSchema) ]), + data: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutWhatsAppActionInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutWhatsAppActionInputSchema) ]), }).strict(); -export const WorkflowNodeUpdateWithoutSmsActionInputSchema: z.ZodType = z.object({ +export const WorkflowNodeUpdateWithoutWhatsAppActionInputSchema: z.ZodType = z.object({ id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), nodeId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), type: z.union([ z.lazy(() => WorkflowNodeTypeSchema),z.lazy(() => EnumWorkflowNodeTypeFieldUpdateOperationsInputSchema) ]).optional(), @@ -40578,13 +46673,13 @@ export const WorkflowNodeUpdateWithoutSmsActionInputSchema: z.ZodType WorkflowConnectionUpdateManyWithoutSourceNodeNestedInputSchema).optional(), targetConnections: z.lazy(() => WorkflowConnectionUpdateManyWithoutTargetNodeNestedInputSchema).optional(), emailAction: z.lazy(() => EmailActionUpdateOneWithoutActionNestedInputSchema).optional(), - whatsAppAction: z.lazy(() => WhatsAppActionUpdateOneWithoutActionNestedInputSchema).optional(), + smsAction: z.lazy(() => SmsActionUpdateOneWithoutActionNestedInputSchema).optional(), slackAction: z.lazy(() => SlackActionUpdateOneWithoutActionNestedInputSchema).optional(), calendarAction: z.lazy(() => CalendarActionUpdateOneWithoutActionNestedInputSchema).optional(), trigger: z.lazy(() => WorkflowTriggerUpdateOneWithoutNodeNestedInputSchema).optional() }).strict(); -export const WorkflowNodeUncheckedUpdateWithoutSmsActionInputSchema: z.ZodType = z.object({ +export const WorkflowNodeUncheckedUpdateWithoutWhatsAppActionInputSchema: z.ZodType = z.object({ id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), workflowId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), nodeId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), @@ -40607,13 +46702,13 @@ export const WorkflowNodeUncheckedUpdateWithoutSmsActionInputSchema: z.ZodType

WorkflowConnectionUncheckedUpdateManyWithoutSourceNodeNestedInputSchema).optional(), targetConnections: z.lazy(() => WorkflowConnectionUncheckedUpdateManyWithoutTargetNodeNestedInputSchema).optional(), emailAction: z.lazy(() => EmailActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), - whatsAppAction: z.lazy(() => WhatsAppActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), + smsAction: z.lazy(() => SmsActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), slackAction: z.lazy(() => SlackActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), calendarAction: z.lazy(() => CalendarActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), trigger: z.lazy(() => WorkflowTriggerUncheckedUpdateOneWithoutNodeNestedInputSchema).optional() }).strict(); -export const WorkflowNodeCreateWithoutWhatsAppActionInputSchema: z.ZodType = z.object({ +export const WorkflowNodeCreateWithoutSlackActionInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), nodeId: z.string(), type: z.lazy(() => WorkflowNodeTypeSchema), @@ -40637,12 +46732,12 @@ export const WorkflowNodeCreateWithoutWhatsAppActionInputSchema: z.ZodType WorkflowConnectionCreateNestedManyWithoutTargetNodeInputSchema).optional(), emailAction: z.lazy(() => EmailActionCreateNestedOneWithoutActionInputSchema).optional(), smsAction: z.lazy(() => SmsActionCreateNestedOneWithoutActionInputSchema).optional(), - slackAction: z.lazy(() => SlackActionCreateNestedOneWithoutActionInputSchema).optional(), + whatsAppAction: z.lazy(() => WhatsAppActionCreateNestedOneWithoutActionInputSchema).optional(), calendarAction: z.lazy(() => CalendarActionCreateNestedOneWithoutActionInputSchema).optional(), trigger: z.lazy(() => WorkflowTriggerCreateNestedOneWithoutNodeInputSchema).optional() }).strict(); -export const WorkflowNodeUncheckedCreateWithoutWhatsAppActionInputSchema: z.ZodType = z.object({ +export const WorkflowNodeUncheckedCreateWithoutSlackActionInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), workflowId: z.string(), nodeId: z.string(), @@ -40666,28 +46761,28 @@ export const WorkflowNodeUncheckedCreateWithoutWhatsAppActionInputSchema: z.ZodT targetConnections: z.lazy(() => WorkflowConnectionUncheckedCreateNestedManyWithoutTargetNodeInputSchema).optional(), emailAction: z.lazy(() => EmailActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), smsAction: z.lazy(() => SmsActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), - slackAction: z.lazy(() => SlackActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), + whatsAppAction: z.lazy(() => WhatsAppActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), calendarAction: z.lazy(() => CalendarActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), trigger: z.lazy(() => WorkflowTriggerUncheckedCreateNestedOneWithoutNodeInputSchema).optional() }).strict(); -export const WorkflowNodeCreateOrConnectWithoutWhatsAppActionInputSchema: z.ZodType = z.object({ +export const WorkflowNodeCreateOrConnectWithoutSlackActionInputSchema: z.ZodType = z.object({ where: z.lazy(() => WorkflowNodeWhereUniqueInputSchema), - create: z.union([ z.lazy(() => WorkflowNodeCreateWithoutWhatsAppActionInputSchema),z.lazy(() => WorkflowNodeUncheckedCreateWithoutWhatsAppActionInputSchema) ]), + create: z.union([ z.lazy(() => WorkflowNodeCreateWithoutSlackActionInputSchema),z.lazy(() => WorkflowNodeUncheckedCreateWithoutSlackActionInputSchema) ]), }).strict(); -export const WorkflowNodeUpsertWithoutWhatsAppActionInputSchema: z.ZodType = z.object({ - update: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutWhatsAppActionInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutWhatsAppActionInputSchema) ]), - create: z.union([ z.lazy(() => WorkflowNodeCreateWithoutWhatsAppActionInputSchema),z.lazy(() => WorkflowNodeUncheckedCreateWithoutWhatsAppActionInputSchema) ]), +export const WorkflowNodeUpsertWithoutSlackActionInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutSlackActionInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutSlackActionInputSchema) ]), + create: z.union([ z.lazy(() => WorkflowNodeCreateWithoutSlackActionInputSchema),z.lazy(() => WorkflowNodeUncheckedCreateWithoutSlackActionInputSchema) ]), where: z.lazy(() => WorkflowNodeWhereInputSchema).optional() }).strict(); -export const WorkflowNodeUpdateToOneWithWhereWithoutWhatsAppActionInputSchema: z.ZodType = z.object({ +export const WorkflowNodeUpdateToOneWithWhereWithoutSlackActionInputSchema: z.ZodType = z.object({ where: z.lazy(() => WorkflowNodeWhereInputSchema).optional(), - data: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutWhatsAppActionInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutWhatsAppActionInputSchema) ]), + data: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutSlackActionInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutSlackActionInputSchema) ]), }).strict(); -export const WorkflowNodeUpdateWithoutWhatsAppActionInputSchema: z.ZodType = z.object({ +export const WorkflowNodeUpdateWithoutSlackActionInputSchema: z.ZodType = z.object({ id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), nodeId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), type: z.union([ z.lazy(() => WorkflowNodeTypeSchema),z.lazy(() => EnumWorkflowNodeTypeFieldUpdateOperationsInputSchema) ]).optional(), @@ -40711,12 +46806,12 @@ export const WorkflowNodeUpdateWithoutWhatsAppActionInputSchema: z.ZodType WorkflowConnectionUpdateManyWithoutTargetNodeNestedInputSchema).optional(), emailAction: z.lazy(() => EmailActionUpdateOneWithoutActionNestedInputSchema).optional(), smsAction: z.lazy(() => SmsActionUpdateOneWithoutActionNestedInputSchema).optional(), - slackAction: z.lazy(() => SlackActionUpdateOneWithoutActionNestedInputSchema).optional(), + whatsAppAction: z.lazy(() => WhatsAppActionUpdateOneWithoutActionNestedInputSchema).optional(), calendarAction: z.lazy(() => CalendarActionUpdateOneWithoutActionNestedInputSchema).optional(), trigger: z.lazy(() => WorkflowTriggerUpdateOneWithoutNodeNestedInputSchema).optional() }).strict(); -export const WorkflowNodeUncheckedUpdateWithoutWhatsAppActionInputSchema: z.ZodType = z.object({ +export const WorkflowNodeUncheckedUpdateWithoutSlackActionInputSchema: z.ZodType = z.object({ id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), workflowId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), nodeId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), @@ -40740,12 +46835,12 @@ export const WorkflowNodeUncheckedUpdateWithoutWhatsAppActionInputSchema: z.ZodT targetConnections: z.lazy(() => WorkflowConnectionUncheckedUpdateManyWithoutTargetNodeNestedInputSchema).optional(), emailAction: z.lazy(() => EmailActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), smsAction: z.lazy(() => SmsActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), - slackAction: z.lazy(() => SlackActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), + whatsAppAction: z.lazy(() => WhatsAppActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), calendarAction: z.lazy(() => CalendarActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), trigger: z.lazy(() => WorkflowTriggerUncheckedUpdateOneWithoutNodeNestedInputSchema).optional() }).strict(); -export const WorkflowNodeCreateWithoutSlackActionInputSchema: z.ZodType = z.object({ +export const WorkflowNodeCreateWithoutCalendarActionInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), nodeId: z.string(), type: z.lazy(() => WorkflowNodeTypeSchema), @@ -40770,11 +46865,11 @@ export const WorkflowNodeCreateWithoutSlackActionInputSchema: z.ZodType EmailActionCreateNestedOneWithoutActionInputSchema).optional(), smsAction: z.lazy(() => SmsActionCreateNestedOneWithoutActionInputSchema).optional(), whatsAppAction: z.lazy(() => WhatsAppActionCreateNestedOneWithoutActionInputSchema).optional(), - calendarAction: z.lazy(() => CalendarActionCreateNestedOneWithoutActionInputSchema).optional(), + slackAction: z.lazy(() => SlackActionCreateNestedOneWithoutActionInputSchema).optional(), trigger: z.lazy(() => WorkflowTriggerCreateNestedOneWithoutNodeInputSchema).optional() }).strict(); -export const WorkflowNodeUncheckedCreateWithoutSlackActionInputSchema: z.ZodType = z.object({ +export const WorkflowNodeUncheckedCreateWithoutCalendarActionInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), workflowId: z.string(), nodeId: z.string(), @@ -40799,27 +46894,27 @@ export const WorkflowNodeUncheckedCreateWithoutSlackActionInputSchema: z.ZodType emailAction: z.lazy(() => EmailActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), smsAction: z.lazy(() => SmsActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), whatsAppAction: z.lazy(() => WhatsAppActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), - calendarAction: z.lazy(() => CalendarActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), + slackAction: z.lazy(() => SlackActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), trigger: z.lazy(() => WorkflowTriggerUncheckedCreateNestedOneWithoutNodeInputSchema).optional() }).strict(); -export const WorkflowNodeCreateOrConnectWithoutSlackActionInputSchema: z.ZodType = z.object({ +export const WorkflowNodeCreateOrConnectWithoutCalendarActionInputSchema: z.ZodType = z.object({ where: z.lazy(() => WorkflowNodeWhereUniqueInputSchema), - create: z.union([ z.lazy(() => WorkflowNodeCreateWithoutSlackActionInputSchema),z.lazy(() => WorkflowNodeUncheckedCreateWithoutSlackActionInputSchema) ]), + create: z.union([ z.lazy(() => WorkflowNodeCreateWithoutCalendarActionInputSchema),z.lazy(() => WorkflowNodeUncheckedCreateWithoutCalendarActionInputSchema) ]), }).strict(); -export const WorkflowNodeUpsertWithoutSlackActionInputSchema: z.ZodType = z.object({ - update: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutSlackActionInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutSlackActionInputSchema) ]), - create: z.union([ z.lazy(() => WorkflowNodeCreateWithoutSlackActionInputSchema),z.lazy(() => WorkflowNodeUncheckedCreateWithoutSlackActionInputSchema) ]), +export const WorkflowNodeUpsertWithoutCalendarActionInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutCalendarActionInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutCalendarActionInputSchema) ]), + create: z.union([ z.lazy(() => WorkflowNodeCreateWithoutCalendarActionInputSchema),z.lazy(() => WorkflowNodeUncheckedCreateWithoutCalendarActionInputSchema) ]), where: z.lazy(() => WorkflowNodeWhereInputSchema).optional() }).strict(); -export const WorkflowNodeUpdateToOneWithWhereWithoutSlackActionInputSchema: z.ZodType = z.object({ +export const WorkflowNodeUpdateToOneWithWhereWithoutCalendarActionInputSchema: z.ZodType = z.object({ where: z.lazy(() => WorkflowNodeWhereInputSchema).optional(), - data: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutSlackActionInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutSlackActionInputSchema) ]), + data: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutCalendarActionInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutCalendarActionInputSchema) ]), }).strict(); -export const WorkflowNodeUpdateWithoutSlackActionInputSchema: z.ZodType = z.object({ +export const WorkflowNodeUpdateWithoutCalendarActionInputSchema: z.ZodType = z.object({ id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), nodeId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), type: z.union([ z.lazy(() => WorkflowNodeTypeSchema),z.lazy(() => EnumWorkflowNodeTypeFieldUpdateOperationsInputSchema) ]).optional(), @@ -40844,11 +46939,11 @@ export const WorkflowNodeUpdateWithoutSlackActionInputSchema: z.ZodType EmailActionUpdateOneWithoutActionNestedInputSchema).optional(), smsAction: z.lazy(() => SmsActionUpdateOneWithoutActionNestedInputSchema).optional(), whatsAppAction: z.lazy(() => WhatsAppActionUpdateOneWithoutActionNestedInputSchema).optional(), - calendarAction: z.lazy(() => CalendarActionUpdateOneWithoutActionNestedInputSchema).optional(), + slackAction: z.lazy(() => SlackActionUpdateOneWithoutActionNestedInputSchema).optional(), trigger: z.lazy(() => WorkflowTriggerUpdateOneWithoutNodeNestedInputSchema).optional() }).strict(); -export const WorkflowNodeUncheckedUpdateWithoutSlackActionInputSchema: z.ZodType = z.object({ +export const WorkflowNodeUncheckedUpdateWithoutCalendarActionInputSchema: z.ZodType = z.object({ id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), workflowId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), nodeId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), @@ -40873,272 +46968,1155 @@ export const WorkflowNodeUncheckedUpdateWithoutSlackActionInputSchema: z.ZodType emailAction: z.lazy(() => EmailActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), smsAction: z.lazy(() => SmsActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), whatsAppAction: z.lazy(() => WhatsAppActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), - calendarAction: z.lazy(() => CalendarActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), + slackAction: z.lazy(() => SlackActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), trigger: z.lazy(() => WorkflowTriggerUncheckedUpdateOneWithoutNodeNestedInputSchema).optional() }).strict(); -export const WorkflowNodeCreateWithoutCalendarActionInputSchema: z.ZodType = z.object({ +export const WorkflowCreateWithoutAnalyticsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string(), + description: z.string().optional().nullable(), + version: z.number().int().optional(), + status: z.lazy(() => WorkflowStatusSchema).optional(), + isTemplate: z.boolean().optional(), + category: z.string().optional().nullable(), + canvasData: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + retryConfig: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + timeoutConfig: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + totalExecutions: z.number().int().optional(), + successfulExecutions: z.number().int().optional(), + failedExecutions: z.number().int().optional(), + lastExecutedAt: z.coerce.date().optional().nullable(), + createdById: z.string(), + updatedById: z.string().optional().nullable(), + publishedAt: z.coerce.date().optional().nullable(), + publishedById: z.string().optional().nullable(), + archivedAt: z.coerce.date().optional().nullable(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + organization: z.lazy(() => OrganizationCreateNestedOneWithoutWorkflowsInputSchema), + triggers: z.lazy(() => WorkflowTriggerCreateNestedManyWithoutWorkflowInputSchema).optional(), + nodes: z.lazy(() => WorkflowNodeCreateNestedManyWithoutWorkflowInputSchema).optional(), + connections: z.lazy(() => WorkflowConnectionCreateNestedManyWithoutWorkflowInputSchema).optional(), + executions: z.lazy(() => WorkflowExecutionCreateNestedManyWithoutWorkflowInputSchema).optional() +}).strict(); + +export const WorkflowUncheckedCreateWithoutAnalyticsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + organizationId: z.string(), + name: z.string(), + description: z.string().optional().nullable(), + version: z.number().int().optional(), + status: z.lazy(() => WorkflowStatusSchema).optional(), + isTemplate: z.boolean().optional(), + category: z.string().optional().nullable(), + canvasData: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + retryConfig: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + timeoutConfig: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + totalExecutions: z.number().int().optional(), + successfulExecutions: z.number().int().optional(), + failedExecutions: z.number().int().optional(), + lastExecutedAt: z.coerce.date().optional().nullable(), + createdById: z.string(), + updatedById: z.string().optional().nullable(), + publishedAt: z.coerce.date().optional().nullable(), + publishedById: z.string().optional().nullable(), + archivedAt: z.coerce.date().optional().nullable(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + triggers: z.lazy(() => WorkflowTriggerUncheckedCreateNestedManyWithoutWorkflowInputSchema).optional(), + nodes: z.lazy(() => WorkflowNodeUncheckedCreateNestedManyWithoutWorkflowInputSchema).optional(), + connections: z.lazy(() => WorkflowConnectionUncheckedCreateNestedManyWithoutWorkflowInputSchema).optional(), + executions: z.lazy(() => WorkflowExecutionUncheckedCreateNestedManyWithoutWorkflowInputSchema).optional() +}).strict(); + +export const WorkflowCreateOrConnectWithoutAnalyticsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowWhereUniqueInputSchema), + create: z.union([ z.lazy(() => WorkflowCreateWithoutAnalyticsInputSchema),z.lazy(() => WorkflowUncheckedCreateWithoutAnalyticsInputSchema) ]), +}).strict(); + +export const WorkflowUpsertWithoutAnalyticsInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => WorkflowUpdateWithoutAnalyticsInputSchema),z.lazy(() => WorkflowUncheckedUpdateWithoutAnalyticsInputSchema) ]), + create: z.union([ z.lazy(() => WorkflowCreateWithoutAnalyticsInputSchema),z.lazy(() => WorkflowUncheckedCreateWithoutAnalyticsInputSchema) ]), + where: z.lazy(() => WorkflowWhereInputSchema).optional() +}).strict(); + +export const WorkflowUpdateToOneWithWhereWithoutAnalyticsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => WorkflowWhereInputSchema).optional(), + data: z.union([ z.lazy(() => WorkflowUpdateWithoutAnalyticsInputSchema),z.lazy(() => WorkflowUncheckedUpdateWithoutAnalyticsInputSchema) ]), +}).strict(); + +export const WorkflowUpdateWithoutAnalyticsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + version: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => WorkflowStatusSchema),z.lazy(() => EnumWorkflowStatusFieldUpdateOperationsInputSchema) ]).optional(), + isTemplate: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + category: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + canvasData: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + retryConfig: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + timeoutConfig: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + totalExecutions: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + successfulExecutions: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + failedExecutions: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + lastExecutedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + updatedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + publishedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + publishedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + archivedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + organization: z.lazy(() => OrganizationUpdateOneRequiredWithoutWorkflowsNestedInputSchema).optional(), + triggers: z.lazy(() => WorkflowTriggerUpdateManyWithoutWorkflowNestedInputSchema).optional(), + nodes: z.lazy(() => WorkflowNodeUpdateManyWithoutWorkflowNestedInputSchema).optional(), + connections: z.lazy(() => WorkflowConnectionUpdateManyWithoutWorkflowNestedInputSchema).optional(), + executions: z.lazy(() => WorkflowExecutionUpdateManyWithoutWorkflowNestedInputSchema).optional() +}).strict(); + +export const WorkflowUncheckedUpdateWithoutAnalyticsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + version: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => WorkflowStatusSchema),z.lazy(() => EnumWorkflowStatusFieldUpdateOperationsInputSchema) ]).optional(), + isTemplate: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + category: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + canvasData: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + retryConfig: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + timeoutConfig: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + totalExecutions: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + successfulExecutions: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + failedExecutions: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + lastExecutedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + updatedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + publishedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + publishedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + archivedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + triggers: z.lazy(() => WorkflowTriggerUncheckedUpdateManyWithoutWorkflowNestedInputSchema).optional(), + nodes: z.lazy(() => WorkflowNodeUncheckedUpdateManyWithoutWorkflowNestedInputSchema).optional(), + connections: z.lazy(() => WorkflowConnectionUncheckedUpdateManyWithoutWorkflowNestedInputSchema).optional(), + executions: z.lazy(() => WorkflowExecutionUncheckedUpdateManyWithoutWorkflowNestedInputSchema).optional() +}).strict(); + +export const TemplatePackageCreateWithoutSharesInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string(), + description: z.string().optional().nullable(), + category: z.string().optional().nullable(), + version: z.string(), + visibility: z.lazy(() => TemplateVisibilitySchema).optional(), + status: z.lazy(() => TemplateStatusSchema).optional(), + iconUrl: z.string().optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + assetsCount: z.number().int().optional(), + sizeBytes: z.number().int().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + organization: z.lazy(() => OrganizationCreateNestedOneWithoutTemplatePackagesInputSchema).optional(), + versions: z.lazy(() => TemplateVersionCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutTemplatePackageInputSchema).optional() +}).strict(); + +export const TemplatePackageUncheckedCreateWithoutSharesInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + organizationId: z.string().optional().nullable(), + name: z.string(), + description: z.string().optional().nullable(), + category: z.string().optional().nullable(), + version: z.string(), + visibility: z.lazy(() => TemplateVisibilitySchema).optional(), + status: z.lazy(() => TemplateStatusSchema).optional(), + iconUrl: z.string().optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + assetsCount: z.number().int().optional(), + sizeBytes: z.number().int().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + versions: z.lazy(() => TemplateVersionUncheckedCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutTemplatePackageInputSchema).optional() +}).strict(); + +export const TemplatePackageCreateOrConnectWithoutSharesInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplatePackageWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutSharesInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutSharesInputSchema) ]), +}).strict(); + +export const OrganizationCreateWithoutTemplateSharesInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string(), + logo: z.string().optional().nullable(), + website: z.string().optional().nullable(), + industry: z.string().optional().nullable(), + description: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + users: z.lazy(() => UserOrganizationCreateNestedManyWithoutOrganizationInputSchema).optional(), + customers: z.lazy(() => CustomerCreateNestedManyWithoutOrganizationInputSchema).optional(), + projects: z.lazy(() => ProjectCreateNestedManyWithoutOrganizationInputSchema).optional(), + tasks: z.lazy(() => TaskCreateNestedManyWithoutOrganizationInputSchema).optional(), + invoices: z.lazy(() => InvoiceCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenses: z.lazy(() => ExpenseCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenseCategories: z.lazy(() => ExpenseCategoryCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenseTags: z.lazy(() => ExpenseTagCreateNestedManyWithoutOrganizationInputSchema).optional(), + employees: z.lazy(() => EmployeeCreateNestedManyWithoutOrganizationInputSchema).optional(), + campaigns: z.lazy(() => MarketingCampaignCreateNestedManyWithoutOrganizationInputSchema).optional(), + invitations: z.lazy(() => InvitationCreateNestedManyWithoutOrganizationInputSchema).optional(), + customRoles: z.lazy(() => CustomRoleCreateNestedManyWithoutOrganizationInputSchema).optional(), + financialReports: z.lazy(() => FinancialReportCreateNestedManyWithoutOrganizationInputSchema).optional(), + workflows: z.lazy(() => WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), + actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), + variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() +}).strict(); + +export const OrganizationUncheckedCreateWithoutTemplateSharesInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string(), + logo: z.string().optional().nullable(), + website: z.string().optional().nullable(), + industry: z.string().optional().nullable(), + description: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + users: z.lazy(() => UserOrganizationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + customers: z.lazy(() => CustomerUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + projects: z.lazy(() => ProjectUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + tasks: z.lazy(() => TaskUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + invoices: z.lazy(() => InvoiceUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenses: z.lazy(() => ExpenseUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenseCategories: z.lazy(() => ExpenseCategoryUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenseTags: z.lazy(() => ExpenseTagUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + employees: z.lazy(() => EmployeeUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + campaigns: z.lazy(() => MarketingCampaignUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + invitations: z.lazy(() => InvitationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + customRoles: z.lazy(() => CustomRoleUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + financialReports: z.lazy(() => FinancialReportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + workflows: z.lazy(() => WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() +}).strict(); + +export const OrganizationCreateOrConnectWithoutTemplateSharesInputSchema: z.ZodType = z.object({ + where: z.lazy(() => OrganizationWhereUniqueInputSchema), + create: z.union([ z.lazy(() => OrganizationCreateWithoutTemplateSharesInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutTemplateSharesInputSchema) ]), +}).strict(); + +export const TemplateShareRecipientCreateWithoutShareInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + email: z.string(), + status: z.lazy(() => TemplateShareRecipientStatusSchema).optional(), + invitedAt: z.coerce.date().optional(), + viewedAt: z.coerce.date().optional().nullable(), + importedAt: z.coerce.date().optional().nullable() +}).strict(); + +export const TemplateShareRecipientUncheckedCreateWithoutShareInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + email: z.string(), + status: z.lazy(() => TemplateShareRecipientStatusSchema).optional(), + invitedAt: z.coerce.date().optional(), + viewedAt: z.coerce.date().optional().nullable(), + importedAt: z.coerce.date().optional().nullable() +}).strict(); + +export const TemplateShareRecipientCreateOrConnectWithoutShareInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplateShareRecipientCreateWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientUncheckedCreateWithoutShareInputSchema) ]), +}).strict(); + +export const TemplateShareRecipientCreateManyShareInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => TemplateShareRecipientCreateManyShareInputSchema),z.lazy(() => TemplateShareRecipientCreateManyShareInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const TemplateShareAccessLogCreateWithoutShareInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + action: z.lazy(() => TemplateShareAccessActionSchema), + status: z.lazy(() => TemplateShareAccessStatusSchema), + recipientEmail: z.string().optional().nullable(), + userAgent: z.string().optional().nullable(), + ipAddress: z.string().optional().nullable(), + errorMessage: z.string().optional().nullable(), + metadata: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.coerce.date().optional() +}).strict(); + +export const TemplateShareAccessLogUncheckedCreateWithoutShareInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + action: z.lazy(() => TemplateShareAccessActionSchema), + status: z.lazy(() => TemplateShareAccessStatusSchema), + recipientEmail: z.string().optional().nullable(), + userAgent: z.string().optional().nullable(), + ipAddress: z.string().optional().nullable(), + errorMessage: z.string().optional().nullable(), + metadata: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.coerce.date().optional() +}).strict(); + +export const TemplateShareAccessLogCreateOrConnectWithoutShareInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplateShareAccessLogCreateWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogUncheckedCreateWithoutShareInputSchema) ]), +}).strict(); + +export const TemplateShareAccessLogCreateManyShareInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => TemplateShareAccessLogCreateManyShareInputSchema),z.lazy(() => TemplateShareAccessLogCreateManyShareInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const TemplateShareImportCreateWithoutShareInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + importedById: z.string(), + importedAt: z.coerce.date().optional(), + originalPackageId: z.string(), + originalOrgId: z.string(), + snapshotVersion: z.string(), + organization: z.lazy(() => OrganizationCreateNestedOneWithoutTemplateShareImportsInputSchema), + templatePackage: z.lazy(() => TemplatePackageCreateNestedOneWithoutShareImportsInputSchema) +}).strict(); + +export const TemplateShareImportUncheckedCreateWithoutShareInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + organizationId: z.string(), + templatePackageId: z.string(), + importedById: z.string(), + importedAt: z.coerce.date().optional(), + originalPackageId: z.string(), + originalOrgId: z.string(), + snapshotVersion: z.string() +}).strict(); + +export const TemplateShareImportCreateOrConnectWithoutShareInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareImportWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplateShareImportCreateWithoutShareInputSchema),z.lazy(() => TemplateShareImportUncheckedCreateWithoutShareInputSchema) ]), +}).strict(); + +export const TemplateShareImportCreateManyShareInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => TemplateShareImportCreateManyShareInputSchema),z.lazy(() => TemplateShareImportCreateManyShareInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const TemplatePackageUpsertWithoutSharesInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => TemplatePackageUpdateWithoutSharesInputSchema),z.lazy(() => TemplatePackageUncheckedUpdateWithoutSharesInputSchema) ]), + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutSharesInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutSharesInputSchema) ]), + where: z.lazy(() => TemplatePackageWhereInputSchema).optional() +}).strict(); + +export const TemplatePackageUpdateToOneWithWhereWithoutSharesInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplatePackageWhereInputSchema).optional(), + data: z.union([ z.lazy(() => TemplatePackageUpdateWithoutSharesInputSchema),z.lazy(() => TemplatePackageUncheckedUpdateWithoutSharesInputSchema) ]), +}).strict(); + +export const TemplatePackageUpdateWithoutSharesInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + category: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + visibility: z.union([ z.lazy(() => TemplateVisibilitySchema),z.lazy(() => EnumTemplateVisibilityFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateStatusSchema),z.lazy(() => EnumTemplateStatusFieldUpdateOperationsInputSchema) ]).optional(), + iconUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + assetsCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + sizeBytes: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + organization: z.lazy(() => OrganizationUpdateOneWithoutTemplatePackagesNestedInputSchema).optional(), + versions: z.lazy(() => TemplateVersionUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutTemplatePackageNestedInputSchema).optional() +}).strict(); + +export const TemplatePackageUncheckedUpdateWithoutSharesInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + category: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + visibility: z.union([ z.lazy(() => TemplateVisibilitySchema),z.lazy(() => EnumTemplateVisibilityFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateStatusSchema),z.lazy(() => EnumTemplateStatusFieldUpdateOperationsInputSchema) ]).optional(), + iconUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + assetsCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + sizeBytes: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + versions: z.lazy(() => TemplateVersionUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema).optional() +}).strict(); + +export const OrganizationUpsertWithoutTemplateSharesInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => OrganizationUpdateWithoutTemplateSharesInputSchema),z.lazy(() => OrganizationUncheckedUpdateWithoutTemplateSharesInputSchema) ]), + create: z.union([ z.lazy(() => OrganizationCreateWithoutTemplateSharesInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutTemplateSharesInputSchema) ]), + where: z.lazy(() => OrganizationWhereInputSchema).optional() +}).strict(); + +export const OrganizationUpdateToOneWithWhereWithoutTemplateSharesInputSchema: z.ZodType = z.object({ + where: z.lazy(() => OrganizationWhereInputSchema).optional(), + data: z.union([ z.lazy(() => OrganizationUpdateWithoutTemplateSharesInputSchema),z.lazy(() => OrganizationUncheckedUpdateWithoutTemplateSharesInputSchema) ]), +}).strict(); + +export const OrganizationUpdateWithoutTemplateSharesInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + logo: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + website: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + industry: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + users: z.lazy(() => UserOrganizationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + customers: z.lazy(() => CustomerUpdateManyWithoutOrganizationNestedInputSchema).optional(), + projects: z.lazy(() => ProjectUpdateManyWithoutOrganizationNestedInputSchema).optional(), + tasks: z.lazy(() => TaskUpdateManyWithoutOrganizationNestedInputSchema).optional(), + invoices: z.lazy(() => InvoiceUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenses: z.lazy(() => ExpenseUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenseCategories: z.lazy(() => ExpenseCategoryUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenseTags: z.lazy(() => ExpenseTagUpdateManyWithoutOrganizationNestedInputSchema).optional(), + employees: z.lazy(() => EmployeeUpdateManyWithoutOrganizationNestedInputSchema).optional(), + campaigns: z.lazy(() => MarketingCampaignUpdateManyWithoutOrganizationNestedInputSchema).optional(), + invitations: z.lazy(() => InvitationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + customRoles: z.lazy(() => CustomRoleUpdateManyWithoutOrganizationNestedInputSchema).optional(), + financialReports: z.lazy(() => FinancialReportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + workflows: z.lazy(() => WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), + actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), + variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() +}).strict(); + +export const OrganizationUncheckedUpdateWithoutTemplateSharesInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + logo: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + website: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + industry: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + users: z.lazy(() => UserOrganizationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + customers: z.lazy(() => CustomerUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + projects: z.lazy(() => ProjectUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + tasks: z.lazy(() => TaskUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + invoices: z.lazy(() => InvoiceUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenses: z.lazy(() => ExpenseUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenseCategories: z.lazy(() => ExpenseCategoryUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenseTags: z.lazy(() => ExpenseTagUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + employees: z.lazy(() => EmployeeUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + campaigns: z.lazy(() => MarketingCampaignUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + invitations: z.lazy(() => InvitationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + customRoles: z.lazy(() => CustomRoleUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + financialReports: z.lazy(() => FinancialReportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + workflows: z.lazy(() => WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() +}).strict(); + +export const TemplateShareRecipientUpsertWithWhereUniqueWithoutShareInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema), + update: z.union([ z.lazy(() => TemplateShareRecipientUpdateWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientUncheckedUpdateWithoutShareInputSchema) ]), + create: z.union([ z.lazy(() => TemplateShareRecipientCreateWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientUncheckedCreateWithoutShareInputSchema) ]), +}).strict(); + +export const TemplateShareRecipientUpdateWithWhereUniqueWithoutShareInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareRecipientWhereUniqueInputSchema), + data: z.union([ z.lazy(() => TemplateShareRecipientUpdateWithoutShareInputSchema),z.lazy(() => TemplateShareRecipientUncheckedUpdateWithoutShareInputSchema) ]), +}).strict(); + +export const TemplateShareRecipientUpdateManyWithWhereWithoutShareInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareRecipientScalarWhereInputSchema), + data: z.union([ z.lazy(() => TemplateShareRecipientUpdateManyMutationInputSchema),z.lazy(() => TemplateShareRecipientUncheckedUpdateManyWithoutShareInputSchema) ]), +}).strict(); + +export const TemplateShareRecipientScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateShareRecipientScalarWhereInputSchema),z.lazy(() => TemplateShareRecipientScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateShareRecipientScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateShareRecipientScalarWhereInputSchema),z.lazy(() => TemplateShareRecipientScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + shareId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + email: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + status: z.union([ z.lazy(() => EnumTemplateShareRecipientStatusFilterSchema),z.lazy(() => TemplateShareRecipientStatusSchema) ]).optional(), + invitedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + viewedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + importedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), +}).strict(); + +export const TemplateShareAccessLogUpsertWithWhereUniqueWithoutShareInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema), + update: z.union([ z.lazy(() => TemplateShareAccessLogUpdateWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogUncheckedUpdateWithoutShareInputSchema) ]), + create: z.union([ z.lazy(() => TemplateShareAccessLogCreateWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogUncheckedCreateWithoutShareInputSchema) ]), +}).strict(); + +export const TemplateShareAccessLogUpdateWithWhereUniqueWithoutShareInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareAccessLogWhereUniqueInputSchema), + data: z.union([ z.lazy(() => TemplateShareAccessLogUpdateWithoutShareInputSchema),z.lazy(() => TemplateShareAccessLogUncheckedUpdateWithoutShareInputSchema) ]), +}).strict(); + +export const TemplateShareAccessLogUpdateManyWithWhereWithoutShareInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareAccessLogScalarWhereInputSchema), + data: z.union([ z.lazy(() => TemplateShareAccessLogUpdateManyMutationInputSchema),z.lazy(() => TemplateShareAccessLogUncheckedUpdateManyWithoutShareInputSchema) ]), +}).strict(); + +export const TemplateShareAccessLogScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TemplateShareAccessLogScalarWhereInputSchema),z.lazy(() => TemplateShareAccessLogScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TemplateShareAccessLogScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TemplateShareAccessLogScalarWhereInputSchema),z.lazy(() => TemplateShareAccessLogScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + shareId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + action: z.union([ z.lazy(() => EnumTemplateShareAccessActionFilterSchema),z.lazy(() => TemplateShareAccessActionSchema) ]).optional(), + status: z.union([ z.lazy(() => EnumTemplateShareAccessStatusFilterSchema),z.lazy(() => TemplateShareAccessStatusSchema) ]).optional(), + recipientEmail: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + userAgent: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + ipAddress: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + errorMessage: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + metadata: z.lazy(() => JsonNullableFilterSchema).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), +}).strict(); + +export const TemplateShareImportUpsertWithWhereUniqueWithoutShareInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareImportWhereUniqueInputSchema), + update: z.union([ z.lazy(() => TemplateShareImportUpdateWithoutShareInputSchema),z.lazy(() => TemplateShareImportUncheckedUpdateWithoutShareInputSchema) ]), + create: z.union([ z.lazy(() => TemplateShareImportCreateWithoutShareInputSchema),z.lazy(() => TemplateShareImportUncheckedCreateWithoutShareInputSchema) ]), +}).strict(); + +export const TemplateShareImportUpdateWithWhereUniqueWithoutShareInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareImportWhereUniqueInputSchema), + data: z.union([ z.lazy(() => TemplateShareImportUpdateWithoutShareInputSchema),z.lazy(() => TemplateShareImportUncheckedUpdateWithoutShareInputSchema) ]), +}).strict(); + +export const TemplateShareImportUpdateManyWithWhereWithoutShareInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareImportScalarWhereInputSchema), + data: z.union([ z.lazy(() => TemplateShareImportUpdateManyMutationInputSchema),z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutShareInputSchema) ]), +}).strict(); + +export const TemplateShareCreateWithoutRecipientsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + shareMode: z.lazy(() => TemplateShareModeSchema).optional(), + tokenHash: z.string().optional().nullable(), + expiresAt: z.coerce.date().optional().nullable(), + maxUses: z.number().int().optional().nullable(), + allowExternal: z.boolean().optional(), + notes: z.string().optional().nullable(), + status: z.lazy(() => TemplateShareStatusSchema).optional(), + usageCount: z.number().int().optional(), + lastAccessedAt: z.coerce.date().optional().nullable(), + revokedAt: z.coerce.date().optional().nullable(), + revokedById: z.string().optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + snapshotVersion: z.string(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + templatePackage: z.lazy(() => TemplatePackageCreateNestedOneWithoutSharesInputSchema), + organization: z.lazy(() => OrganizationCreateNestedOneWithoutTemplateSharesInputSchema), + accessLogs: z.lazy(() => TemplateShareAccessLogCreateNestedManyWithoutShareInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutShareInputSchema).optional() +}).strict(); + +export const TemplateShareUncheckedCreateWithoutRecipientsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + templatePackageId: z.string(), + organizationId: z.string(), + name: z.string().optional().nullable(), + shareMode: z.lazy(() => TemplateShareModeSchema).optional(), + tokenHash: z.string().optional().nullable(), + expiresAt: z.coerce.date().optional().nullable(), + maxUses: z.number().int().optional().nullable(), + allowExternal: z.boolean().optional(), + notes: z.string().optional().nullable(), + status: z.lazy(() => TemplateShareStatusSchema).optional(), + usageCount: z.number().int().optional(), + lastAccessedAt: z.coerce.date().optional().nullable(), + revokedAt: z.coerce.date().optional().nullable(), + revokedById: z.string().optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + snapshotVersion: z.string(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogUncheckedCreateNestedManyWithoutShareInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutShareInputSchema).optional() +}).strict(); + +export const TemplateShareCreateOrConnectWithoutRecipientsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplateShareCreateWithoutRecipientsInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutRecipientsInputSchema) ]), +}).strict(); + +export const TemplateShareUpsertWithoutRecipientsInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => TemplateShareUpdateWithoutRecipientsInputSchema),z.lazy(() => TemplateShareUncheckedUpdateWithoutRecipientsInputSchema) ]), + create: z.union([ z.lazy(() => TemplateShareCreateWithoutRecipientsInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutRecipientsInputSchema) ]), + where: z.lazy(() => TemplateShareWhereInputSchema).optional() +}).strict(); + +export const TemplateShareUpdateToOneWithWhereWithoutRecipientsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareWhereInputSchema).optional(), + data: z.union([ z.lazy(() => TemplateShareUpdateWithoutRecipientsInputSchema),z.lazy(() => TemplateShareUncheckedUpdateWithoutRecipientsInputSchema) ]), +}).strict(); + +export const TemplateShareUpdateWithoutRecipientsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + shareMode: z.union([ z.lazy(() => TemplateShareModeSchema),z.lazy(() => EnumTemplateShareModeFieldUpdateOperationsInputSchema) ]).optional(), + tokenHash: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + maxUses: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + allowExternal: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + notes: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateShareStatusSchema),z.lazy(() => EnumTemplateShareStatusFieldUpdateOperationsInputSchema) ]).optional(), + usageCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + lastAccessedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + templatePackage: z.lazy(() => TemplatePackageUpdateOneRequiredWithoutSharesNestedInputSchema).optional(), + organization: z.lazy(() => OrganizationUpdateOneRequiredWithoutTemplateSharesNestedInputSchema).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogUpdateManyWithoutShareNestedInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportUpdateManyWithoutShareNestedInputSchema).optional() +}).strict(); + +export const TemplateShareUncheckedUpdateWithoutRecipientsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + shareMode: z.union([ z.lazy(() => TemplateShareModeSchema),z.lazy(() => EnumTemplateShareModeFieldUpdateOperationsInputSchema) ]).optional(), + tokenHash: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + maxUses: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + allowExternal: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + notes: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateShareStatusSchema),z.lazy(() => EnumTemplateShareStatusFieldUpdateOperationsInputSchema) ]).optional(), + usageCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + lastAccessedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogUncheckedUpdateManyWithoutShareNestedInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutShareNestedInputSchema).optional() +}).strict(); + +export const TemplateShareCreateWithoutAccessLogsInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), - nodeId: z.string(), - type: z.lazy(() => WorkflowNodeTypeSchema), - name: z.string(), - description: z.string().optional().nullable(), - position: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), - config: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - template: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - executionOrder: z.number().int().optional().nullable(), - isOptional: z.boolean().optional(), - retryLimit: z.number().int().optional(), - timeout: z.number().int().optional().nullable(), - conditions: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + name: z.string().optional().nullable(), + shareMode: z.lazy(() => TemplateShareModeSchema).optional(), + tokenHash: z.string().optional().nullable(), + expiresAt: z.coerce.date().optional().nullable(), + maxUses: z.number().int().optional().nullable(), + allowExternal: z.boolean().optional(), + notes: z.string().optional().nullable(), + status: z.lazy(() => TemplateShareStatusSchema).optional(), + usageCount: z.number().int().optional(), + lastAccessedAt: z.coerce.date().optional().nullable(), + revokedAt: z.coerce.date().optional().nullable(), + revokedById: z.string().optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + snapshotVersion: z.string(), + createdById: z.string(), createdAt: z.coerce.date().optional(), updatedAt: z.coerce.date().optional(), - workflow: z.lazy(() => WorkflowCreateNestedOneWithoutNodesInputSchema), - executions: z.lazy(() => NodeExecutionCreateNestedManyWithoutNodeInputSchema).optional(), - dependencies: z.lazy(() => NodeDependencyCreateNestedManyWithoutDependentNodeInputSchema).optional(), - dependents: z.lazy(() => NodeDependencyCreateNestedManyWithoutPrerequisiteNodeInputSchema).optional(), - sourceConnections: z.lazy(() => WorkflowConnectionCreateNestedManyWithoutSourceNodeInputSchema).optional(), - targetConnections: z.lazy(() => WorkflowConnectionCreateNestedManyWithoutTargetNodeInputSchema).optional(), - emailAction: z.lazy(() => EmailActionCreateNestedOneWithoutActionInputSchema).optional(), - smsAction: z.lazy(() => SmsActionCreateNestedOneWithoutActionInputSchema).optional(), - whatsAppAction: z.lazy(() => WhatsAppActionCreateNestedOneWithoutActionInputSchema).optional(), - slackAction: z.lazy(() => SlackActionCreateNestedOneWithoutActionInputSchema).optional(), - trigger: z.lazy(() => WorkflowTriggerCreateNestedOneWithoutNodeInputSchema).optional() + templatePackage: z.lazy(() => TemplatePackageCreateNestedOneWithoutSharesInputSchema), + organization: z.lazy(() => OrganizationCreateNestedOneWithoutTemplateSharesInputSchema), + recipients: z.lazy(() => TemplateShareRecipientCreateNestedManyWithoutShareInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportCreateNestedManyWithoutShareInputSchema).optional() }).strict(); -export const WorkflowNodeUncheckedCreateWithoutCalendarActionInputSchema: z.ZodType = z.object({ +export const TemplateShareUncheckedCreateWithoutAccessLogsInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), - workflowId: z.string(), - nodeId: z.string(), - type: z.lazy(() => WorkflowNodeTypeSchema), - name: z.string(), - description: z.string().optional().nullable(), - position: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), - config: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - template: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - executionOrder: z.number().int().optional().nullable(), - isOptional: z.boolean().optional(), - retryLimit: z.number().int().optional(), - timeout: z.number().int().optional().nullable(), - conditions: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + templatePackageId: z.string(), + organizationId: z.string(), + name: z.string().optional().nullable(), + shareMode: z.lazy(() => TemplateShareModeSchema).optional(), + tokenHash: z.string().optional().nullable(), + expiresAt: z.coerce.date().optional().nullable(), + maxUses: z.number().int().optional().nullable(), + allowExternal: z.boolean().optional(), + notes: z.string().optional().nullable(), + status: z.lazy(() => TemplateShareStatusSchema).optional(), + usageCount: z.number().int().optional(), + lastAccessedAt: z.coerce.date().optional().nullable(), + revokedAt: z.coerce.date().optional().nullable(), + revokedById: z.string().optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + snapshotVersion: z.string(), + createdById: z.string(), createdAt: z.coerce.date().optional(), updatedAt: z.coerce.date().optional(), - executions: z.lazy(() => NodeExecutionUncheckedCreateNestedManyWithoutNodeInputSchema).optional(), - dependencies: z.lazy(() => NodeDependencyUncheckedCreateNestedManyWithoutDependentNodeInputSchema).optional(), - dependents: z.lazy(() => NodeDependencyUncheckedCreateNestedManyWithoutPrerequisiteNodeInputSchema).optional(), - sourceConnections: z.lazy(() => WorkflowConnectionUncheckedCreateNestedManyWithoutSourceNodeInputSchema).optional(), - targetConnections: z.lazy(() => WorkflowConnectionUncheckedCreateNestedManyWithoutTargetNodeInputSchema).optional(), - emailAction: z.lazy(() => EmailActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), - smsAction: z.lazy(() => SmsActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), - whatsAppAction: z.lazy(() => WhatsAppActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), - slackAction: z.lazy(() => SlackActionUncheckedCreateNestedOneWithoutActionInputSchema).optional(), - trigger: z.lazy(() => WorkflowTriggerUncheckedCreateNestedOneWithoutNodeInputSchema).optional() + recipients: z.lazy(() => TemplateShareRecipientUncheckedCreateNestedManyWithoutShareInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportUncheckedCreateNestedManyWithoutShareInputSchema).optional() }).strict(); -export const WorkflowNodeCreateOrConnectWithoutCalendarActionInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowNodeWhereUniqueInputSchema), - create: z.union([ z.lazy(() => WorkflowNodeCreateWithoutCalendarActionInputSchema),z.lazy(() => WorkflowNodeUncheckedCreateWithoutCalendarActionInputSchema) ]), +export const TemplateShareCreateOrConnectWithoutAccessLogsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplateShareCreateWithoutAccessLogsInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutAccessLogsInputSchema) ]), }).strict(); -export const WorkflowNodeUpsertWithoutCalendarActionInputSchema: z.ZodType = z.object({ - update: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutCalendarActionInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutCalendarActionInputSchema) ]), - create: z.union([ z.lazy(() => WorkflowNodeCreateWithoutCalendarActionInputSchema),z.lazy(() => WorkflowNodeUncheckedCreateWithoutCalendarActionInputSchema) ]), - where: z.lazy(() => WorkflowNodeWhereInputSchema).optional() +export const TemplateShareUpsertWithoutAccessLogsInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => TemplateShareUpdateWithoutAccessLogsInputSchema),z.lazy(() => TemplateShareUncheckedUpdateWithoutAccessLogsInputSchema) ]), + create: z.union([ z.lazy(() => TemplateShareCreateWithoutAccessLogsInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutAccessLogsInputSchema) ]), + where: z.lazy(() => TemplateShareWhereInputSchema).optional() }).strict(); -export const WorkflowNodeUpdateToOneWithWhereWithoutCalendarActionInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowNodeWhereInputSchema).optional(), - data: z.union([ z.lazy(() => WorkflowNodeUpdateWithoutCalendarActionInputSchema),z.lazy(() => WorkflowNodeUncheckedUpdateWithoutCalendarActionInputSchema) ]), +export const TemplateShareUpdateToOneWithWhereWithoutAccessLogsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareWhereInputSchema).optional(), + data: z.union([ z.lazy(() => TemplateShareUpdateWithoutAccessLogsInputSchema),z.lazy(() => TemplateShareUncheckedUpdateWithoutAccessLogsInputSchema) ]), }).strict(); -export const WorkflowNodeUpdateWithoutCalendarActionInputSchema: z.ZodType = z.object({ +export const TemplateShareUpdateWithoutAccessLogsInputSchema: z.ZodType = z.object({ id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - nodeId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - type: z.union([ z.lazy(() => WorkflowNodeTypeSchema),z.lazy(() => EnumWorkflowNodeTypeFieldUpdateOperationsInputSchema) ]).optional(), - name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - position: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - config: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - template: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - executionOrder: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), - isOptional: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), - retryLimit: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), - timeout: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), - conditions: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + shareMode: z.union([ z.lazy(() => TemplateShareModeSchema),z.lazy(() => EnumTemplateShareModeFieldUpdateOperationsInputSchema) ]).optional(), + tokenHash: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + maxUses: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + allowExternal: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + notes: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateShareStatusSchema),z.lazy(() => EnumTemplateShareStatusFieldUpdateOperationsInputSchema) ]).optional(), + usageCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + lastAccessedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), - workflow: z.lazy(() => WorkflowUpdateOneRequiredWithoutNodesNestedInputSchema).optional(), - executions: z.lazy(() => NodeExecutionUpdateManyWithoutNodeNestedInputSchema).optional(), - dependencies: z.lazy(() => NodeDependencyUpdateManyWithoutDependentNodeNestedInputSchema).optional(), - dependents: z.lazy(() => NodeDependencyUpdateManyWithoutPrerequisiteNodeNestedInputSchema).optional(), - sourceConnections: z.lazy(() => WorkflowConnectionUpdateManyWithoutSourceNodeNestedInputSchema).optional(), - targetConnections: z.lazy(() => WorkflowConnectionUpdateManyWithoutTargetNodeNestedInputSchema).optional(), - emailAction: z.lazy(() => EmailActionUpdateOneWithoutActionNestedInputSchema).optional(), - smsAction: z.lazy(() => SmsActionUpdateOneWithoutActionNestedInputSchema).optional(), - whatsAppAction: z.lazy(() => WhatsAppActionUpdateOneWithoutActionNestedInputSchema).optional(), - slackAction: z.lazy(() => SlackActionUpdateOneWithoutActionNestedInputSchema).optional(), - trigger: z.lazy(() => WorkflowTriggerUpdateOneWithoutNodeNestedInputSchema).optional() + templatePackage: z.lazy(() => TemplatePackageUpdateOneRequiredWithoutSharesNestedInputSchema).optional(), + organization: z.lazy(() => OrganizationUpdateOneRequiredWithoutTemplateSharesNestedInputSchema).optional(), + recipients: z.lazy(() => TemplateShareRecipientUpdateManyWithoutShareNestedInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportUpdateManyWithoutShareNestedInputSchema).optional() }).strict(); -export const WorkflowNodeUncheckedUpdateWithoutCalendarActionInputSchema: z.ZodType = z.object({ +export const TemplateShareUncheckedUpdateWithoutAccessLogsInputSchema: z.ZodType = z.object({ id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - workflowId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - nodeId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - type: z.union([ z.lazy(() => WorkflowNodeTypeSchema),z.lazy(() => EnumWorkflowNodeTypeFieldUpdateOperationsInputSchema) ]).optional(), - name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - position: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - config: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - template: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - executionOrder: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), - isOptional: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), - retryLimit: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), - timeout: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), - conditions: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + shareMode: z.union([ z.lazy(() => TemplateShareModeSchema),z.lazy(() => EnumTemplateShareModeFieldUpdateOperationsInputSchema) ]).optional(), + tokenHash: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + maxUses: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + allowExternal: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + notes: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateShareStatusSchema),z.lazy(() => EnumTemplateShareStatusFieldUpdateOperationsInputSchema) ]).optional(), + usageCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + lastAccessedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), - executions: z.lazy(() => NodeExecutionUncheckedUpdateManyWithoutNodeNestedInputSchema).optional(), - dependencies: z.lazy(() => NodeDependencyUncheckedUpdateManyWithoutDependentNodeNestedInputSchema).optional(), - dependents: z.lazy(() => NodeDependencyUncheckedUpdateManyWithoutPrerequisiteNodeNestedInputSchema).optional(), - sourceConnections: z.lazy(() => WorkflowConnectionUncheckedUpdateManyWithoutSourceNodeNestedInputSchema).optional(), - targetConnections: z.lazy(() => WorkflowConnectionUncheckedUpdateManyWithoutTargetNodeNestedInputSchema).optional(), - emailAction: z.lazy(() => EmailActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), - smsAction: z.lazy(() => SmsActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), - whatsAppAction: z.lazy(() => WhatsAppActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), - slackAction: z.lazy(() => SlackActionUncheckedUpdateOneWithoutActionNestedInputSchema).optional(), - trigger: z.lazy(() => WorkflowTriggerUncheckedUpdateOneWithoutNodeNestedInputSchema).optional() + recipients: z.lazy(() => TemplateShareRecipientUncheckedUpdateManyWithoutShareNestedInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutShareNestedInputSchema).optional() }).strict(); -export const WorkflowCreateWithoutAnalyticsInputSchema: z.ZodType = z.object({ +export const TemplateShareCreateWithoutImportsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + shareMode: z.lazy(() => TemplateShareModeSchema).optional(), + tokenHash: z.string().optional().nullable(), + expiresAt: z.coerce.date().optional().nullable(), + maxUses: z.number().int().optional().nullable(), + allowExternal: z.boolean().optional(), + notes: z.string().optional().nullable(), + status: z.lazy(() => TemplateShareStatusSchema).optional(), + usageCount: z.number().int().optional(), + lastAccessedAt: z.coerce.date().optional().nullable(), + revokedAt: z.coerce.date().optional().nullable(), + revokedById: z.string().optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + snapshotVersion: z.string(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + templatePackage: z.lazy(() => TemplatePackageCreateNestedOneWithoutSharesInputSchema), + organization: z.lazy(() => OrganizationCreateNestedOneWithoutTemplateSharesInputSchema), + recipients: z.lazy(() => TemplateShareRecipientCreateNestedManyWithoutShareInputSchema).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogCreateNestedManyWithoutShareInputSchema).optional() +}).strict(); + +export const TemplateShareUncheckedCreateWithoutImportsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + templatePackageId: z.string(), + organizationId: z.string(), + name: z.string().optional().nullable(), + shareMode: z.lazy(() => TemplateShareModeSchema).optional(), + tokenHash: z.string().optional().nullable(), + expiresAt: z.coerce.date().optional().nullable(), + maxUses: z.number().int().optional().nullable(), + allowExternal: z.boolean().optional(), + notes: z.string().optional().nullable(), + status: z.lazy(() => TemplateShareStatusSchema).optional(), + usageCount: z.number().int().optional(), + lastAccessedAt: z.coerce.date().optional().nullable(), + revokedAt: z.coerce.date().optional().nullable(), + revokedById: z.string().optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + snapshotVersion: z.string(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + recipients: z.lazy(() => TemplateShareRecipientUncheckedCreateNestedManyWithoutShareInputSchema).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogUncheckedCreateNestedManyWithoutShareInputSchema).optional() +}).strict(); + +export const TemplateShareCreateOrConnectWithoutImportsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplateShareCreateWithoutImportsInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutImportsInputSchema) ]), +}).strict(); + +export const OrganizationCreateWithoutTemplateShareImportsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string(), + logo: z.string().optional().nullable(), + website: z.string().optional().nullable(), + industry: z.string().optional().nullable(), + description: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + users: z.lazy(() => UserOrganizationCreateNestedManyWithoutOrganizationInputSchema).optional(), + customers: z.lazy(() => CustomerCreateNestedManyWithoutOrganizationInputSchema).optional(), + projects: z.lazy(() => ProjectCreateNestedManyWithoutOrganizationInputSchema).optional(), + tasks: z.lazy(() => TaskCreateNestedManyWithoutOrganizationInputSchema).optional(), + invoices: z.lazy(() => InvoiceCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenses: z.lazy(() => ExpenseCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenseCategories: z.lazy(() => ExpenseCategoryCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenseTags: z.lazy(() => ExpenseTagCreateNestedManyWithoutOrganizationInputSchema).optional(), + employees: z.lazy(() => EmployeeCreateNestedManyWithoutOrganizationInputSchema).optional(), + campaigns: z.lazy(() => MarketingCampaignCreateNestedManyWithoutOrganizationInputSchema).optional(), + invitations: z.lazy(() => InvitationCreateNestedManyWithoutOrganizationInputSchema).optional(), + customRoles: z.lazy(() => CustomRoleCreateNestedManyWithoutOrganizationInputSchema).optional(), + financialReports: z.lazy(() => FinancialReportCreateNestedManyWithoutOrganizationInputSchema).optional(), + workflows: z.lazy(() => WorkflowCreateNestedManyWithoutOrganizationInputSchema).optional(), + actionTemplates: z.lazy(() => ActionTemplateCreateNestedManyWithoutOrganizationInputSchema).optional(), + variableDefinitions: z.lazy(() => VariableDefinitionCreateNestedManyWithoutOrganizationInputSchema).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigCreateNestedManyWithoutOrganizationInputSchema).optional() +}).strict(); + +export const OrganizationUncheckedCreateWithoutTemplateShareImportsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string(), + logo: z.string().optional().nullable(), + website: z.string().optional().nullable(), + industry: z.string().optional().nullable(), + description: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + users: z.lazy(() => UserOrganizationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + customers: z.lazy(() => CustomerUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + projects: z.lazy(() => ProjectUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + tasks: z.lazy(() => TaskUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + invoices: z.lazy(() => InvoiceUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenses: z.lazy(() => ExpenseUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenseCategories: z.lazy(() => ExpenseCategoryUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + expenseTags: z.lazy(() => ExpenseTagUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + employees: z.lazy(() => EmployeeUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + campaigns: z.lazy(() => MarketingCampaignUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + invitations: z.lazy(() => InvitationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + customRoles: z.lazy(() => CustomRoleUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + financialReports: z.lazy(() => FinancialReportUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + workflows: z.lazy(() => WorkflowUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + actionTemplates: z.lazy(() => ActionTemplateUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + variableDefinitions: z.lazy(() => VariableDefinitionUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedCreateNestedManyWithoutOrganizationInputSchema).optional() +}).strict(); + +export const OrganizationCreateOrConnectWithoutTemplateShareImportsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => OrganizationWhereUniqueInputSchema), + create: z.union([ z.lazy(() => OrganizationCreateWithoutTemplateShareImportsInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutTemplateShareImportsInputSchema) ]), +}).strict(); + +export const TemplatePackageCreateWithoutShareImportsInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), name: z.string(), description: z.string().optional().nullable(), - version: z.number().int().optional(), - status: z.lazy(() => WorkflowStatusSchema).optional(), - isTemplate: z.boolean().optional(), category: z.string().optional().nullable(), - canvasData: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - retryConfig: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - timeoutConfig: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - totalExecutions: z.number().int().optional(), - successfulExecutions: z.number().int().optional(), - failedExecutions: z.number().int().optional(), - lastExecutedAt: z.coerce.date().optional().nullable(), + version: z.string(), + visibility: z.lazy(() => TemplateVisibilitySchema).optional(), + status: z.lazy(() => TemplateStatusSchema).optional(), + iconUrl: z.string().optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + assetsCount: z.number().int().optional(), + sizeBytes: z.number().int().optional().nullable(), createdById: z.string(), - updatedById: z.string().optional().nullable(), - publishedAt: z.coerce.date().optional().nullable(), - publishedById: z.string().optional().nullable(), - archivedAt: z.coerce.date().optional().nullable(), createdAt: z.coerce.date().optional(), updatedAt: z.coerce.date().optional(), - organization: z.lazy(() => OrganizationCreateNestedOneWithoutWorkflowsInputSchema), - triggers: z.lazy(() => WorkflowTriggerCreateNestedManyWithoutWorkflowInputSchema).optional(), - nodes: z.lazy(() => WorkflowNodeCreateNestedManyWithoutWorkflowInputSchema).optional(), - connections: z.lazy(() => WorkflowConnectionCreateNestedManyWithoutWorkflowInputSchema).optional(), - executions: z.lazy(() => WorkflowExecutionCreateNestedManyWithoutWorkflowInputSchema).optional() + organization: z.lazy(() => OrganizationCreateNestedOneWithoutTemplatePackagesInputSchema).optional(), + versions: z.lazy(() => TemplateVersionCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + shares: z.lazy(() => TemplateShareCreateNestedManyWithoutTemplatePackageInputSchema).optional() }).strict(); -export const WorkflowUncheckedCreateWithoutAnalyticsInputSchema: z.ZodType = z.object({ +export const TemplatePackageUncheckedCreateWithoutShareImportsInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), - organizationId: z.string(), + organizationId: z.string().optional().nullable(), name: z.string(), description: z.string().optional().nullable(), - version: z.number().int().optional(), - status: z.lazy(() => WorkflowStatusSchema).optional(), - isTemplate: z.boolean().optional(), category: z.string().optional().nullable(), - canvasData: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - retryConfig: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - timeoutConfig: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - totalExecutions: z.number().int().optional(), - successfulExecutions: z.number().int().optional(), - failedExecutions: z.number().int().optional(), - lastExecutedAt: z.coerce.date().optional().nullable(), + version: z.string(), + visibility: z.lazy(() => TemplateVisibilitySchema).optional(), + status: z.lazy(() => TemplateStatusSchema).optional(), + iconUrl: z.string().optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + assetsCount: z.number().int().optional(), + sizeBytes: z.number().int().optional().nullable(), createdById: z.string(), - updatedById: z.string().optional().nullable(), - publishedAt: z.coerce.date().optional().nullable(), - publishedById: z.string().optional().nullable(), - archivedAt: z.coerce.date().optional().nullable(), createdAt: z.coerce.date().optional(), updatedAt: z.coerce.date().optional(), - triggers: z.lazy(() => WorkflowTriggerUncheckedCreateNestedManyWithoutWorkflowInputSchema).optional(), - nodes: z.lazy(() => WorkflowNodeUncheckedCreateNestedManyWithoutWorkflowInputSchema).optional(), - connections: z.lazy(() => WorkflowConnectionUncheckedCreateNestedManyWithoutWorkflowInputSchema).optional(), - executions: z.lazy(() => WorkflowExecutionUncheckedCreateNestedManyWithoutWorkflowInputSchema).optional() + versions: z.lazy(() => TemplateVersionUncheckedCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationUncheckedCreateNestedManyWithoutTemplatePackageInputSchema).optional(), + shares: z.lazy(() => TemplateShareUncheckedCreateNestedManyWithoutTemplatePackageInputSchema).optional() }).strict(); -export const WorkflowCreateOrConnectWithoutAnalyticsInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowWhereUniqueInputSchema), - create: z.union([ z.lazy(() => WorkflowCreateWithoutAnalyticsInputSchema),z.lazy(() => WorkflowUncheckedCreateWithoutAnalyticsInputSchema) ]), +export const TemplatePackageCreateOrConnectWithoutShareImportsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplatePackageWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutShareImportsInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutShareImportsInputSchema) ]), }).strict(); -export const WorkflowUpsertWithoutAnalyticsInputSchema: z.ZodType = z.object({ - update: z.union([ z.lazy(() => WorkflowUpdateWithoutAnalyticsInputSchema),z.lazy(() => WorkflowUncheckedUpdateWithoutAnalyticsInputSchema) ]), - create: z.union([ z.lazy(() => WorkflowCreateWithoutAnalyticsInputSchema),z.lazy(() => WorkflowUncheckedCreateWithoutAnalyticsInputSchema) ]), - where: z.lazy(() => WorkflowWhereInputSchema).optional() +export const TemplateShareUpsertWithoutImportsInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => TemplateShareUpdateWithoutImportsInputSchema),z.lazy(() => TemplateShareUncheckedUpdateWithoutImportsInputSchema) ]), + create: z.union([ z.lazy(() => TemplateShareCreateWithoutImportsInputSchema),z.lazy(() => TemplateShareUncheckedCreateWithoutImportsInputSchema) ]), + where: z.lazy(() => TemplateShareWhereInputSchema).optional() }).strict(); -export const WorkflowUpdateToOneWithWhereWithoutAnalyticsInputSchema: z.ZodType = z.object({ - where: z.lazy(() => WorkflowWhereInputSchema).optional(), - data: z.union([ z.lazy(() => WorkflowUpdateWithoutAnalyticsInputSchema),z.lazy(() => WorkflowUncheckedUpdateWithoutAnalyticsInputSchema) ]), +export const TemplateShareUpdateToOneWithWhereWithoutImportsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplateShareWhereInputSchema).optional(), + data: z.union([ z.lazy(() => TemplateShareUpdateWithoutImportsInputSchema),z.lazy(() => TemplateShareUncheckedUpdateWithoutImportsInputSchema) ]), }).strict(); -export const WorkflowUpdateWithoutAnalyticsInputSchema: z.ZodType = z.object({ +export const TemplateShareUpdateWithoutImportsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + shareMode: z.union([ z.lazy(() => TemplateShareModeSchema),z.lazy(() => EnumTemplateShareModeFieldUpdateOperationsInputSchema) ]).optional(), + tokenHash: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + maxUses: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + allowExternal: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + notes: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateShareStatusSchema),z.lazy(() => EnumTemplateShareStatusFieldUpdateOperationsInputSchema) ]).optional(), + usageCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + lastAccessedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + templatePackage: z.lazy(() => TemplatePackageUpdateOneRequiredWithoutSharesNestedInputSchema).optional(), + organization: z.lazy(() => OrganizationUpdateOneRequiredWithoutTemplateSharesNestedInputSchema).optional(), + recipients: z.lazy(() => TemplateShareRecipientUpdateManyWithoutShareNestedInputSchema).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogUpdateManyWithoutShareNestedInputSchema).optional() +}).strict(); + +export const TemplateShareUncheckedUpdateWithoutImportsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + shareMode: z.union([ z.lazy(() => TemplateShareModeSchema),z.lazy(() => EnumTemplateShareModeFieldUpdateOperationsInputSchema) ]).optional(), + tokenHash: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + maxUses: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + allowExternal: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + notes: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateShareStatusSchema),z.lazy(() => EnumTemplateShareStatusFieldUpdateOperationsInputSchema) ]).optional(), + usageCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + lastAccessedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + recipients: z.lazy(() => TemplateShareRecipientUncheckedUpdateManyWithoutShareNestedInputSchema).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogUncheckedUpdateManyWithoutShareNestedInputSchema).optional() +}).strict(); + +export const OrganizationUpsertWithoutTemplateShareImportsInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => OrganizationUpdateWithoutTemplateShareImportsInputSchema),z.lazy(() => OrganizationUncheckedUpdateWithoutTemplateShareImportsInputSchema) ]), + create: z.union([ z.lazy(() => OrganizationCreateWithoutTemplateShareImportsInputSchema),z.lazy(() => OrganizationUncheckedCreateWithoutTemplateShareImportsInputSchema) ]), + where: z.lazy(() => OrganizationWhereInputSchema).optional() +}).strict(); + +export const OrganizationUpdateToOneWithWhereWithoutTemplateShareImportsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => OrganizationWhereInputSchema).optional(), + data: z.union([ z.lazy(() => OrganizationUpdateWithoutTemplateShareImportsInputSchema),z.lazy(() => OrganizationUncheckedUpdateWithoutTemplateShareImportsInputSchema) ]), +}).strict(); + +export const OrganizationUpdateWithoutTemplateShareImportsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + logo: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + website: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + industry: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + users: z.lazy(() => UserOrganizationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + customers: z.lazy(() => CustomerUpdateManyWithoutOrganizationNestedInputSchema).optional(), + projects: z.lazy(() => ProjectUpdateManyWithoutOrganizationNestedInputSchema).optional(), + tasks: z.lazy(() => TaskUpdateManyWithoutOrganizationNestedInputSchema).optional(), + invoices: z.lazy(() => InvoiceUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenses: z.lazy(() => ExpenseUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenseCategories: z.lazy(() => ExpenseCategoryUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenseTags: z.lazy(() => ExpenseTagUpdateManyWithoutOrganizationNestedInputSchema).optional(), + employees: z.lazy(() => EmployeeUpdateManyWithoutOrganizationNestedInputSchema).optional(), + campaigns: z.lazy(() => MarketingCampaignUpdateManyWithoutOrganizationNestedInputSchema).optional(), + invitations: z.lazy(() => InvitationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + customRoles: z.lazy(() => CustomRoleUpdateManyWithoutOrganizationNestedInputSchema).optional(), + financialReports: z.lazy(() => FinancialReportUpdateManyWithoutOrganizationNestedInputSchema).optional(), + workflows: z.lazy(() => WorkflowUpdateManyWithoutOrganizationNestedInputSchema).optional(), + actionTemplates: z.lazy(() => ActionTemplateUpdateManyWithoutOrganizationNestedInputSchema).optional(), + variableDefinitions: z.lazy(() => VariableDefinitionUpdateManyWithoutOrganizationNestedInputSchema).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUpdateManyWithoutOrganizationNestedInputSchema).optional() +}).strict(); + +export const OrganizationUncheckedUpdateWithoutTemplateShareImportsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + logo: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + website: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + industry: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + users: z.lazy(() => UserOrganizationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + customers: z.lazy(() => CustomerUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + projects: z.lazy(() => ProjectUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + tasks: z.lazy(() => TaskUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + invoices: z.lazy(() => InvoiceUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenses: z.lazy(() => ExpenseUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenseCategories: z.lazy(() => ExpenseCategoryUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + expenseTags: z.lazy(() => ExpenseTagUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + employees: z.lazy(() => EmployeeUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + campaigns: z.lazy(() => MarketingCampaignUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + invitations: z.lazy(() => InvitationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + customRoles: z.lazy(() => CustomRoleUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + financialReports: z.lazy(() => FinancialReportUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + workflows: z.lazy(() => WorkflowUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + actionTemplates: z.lazy(() => ActionTemplateUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + variableDefinitions: z.lazy(() => VariableDefinitionUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + integrationConfigs: z.lazy(() => IntegrationConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templatePackages: z.lazy(() => TemplatePackageUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateInstallations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + templateShares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional(), + uiConfigs: z.lazy(() => OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationNestedInputSchema).optional() +}).strict(); + +export const TemplatePackageUpsertWithoutShareImportsInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => TemplatePackageUpdateWithoutShareImportsInputSchema),z.lazy(() => TemplatePackageUncheckedUpdateWithoutShareImportsInputSchema) ]), + create: z.union([ z.lazy(() => TemplatePackageCreateWithoutShareImportsInputSchema),z.lazy(() => TemplatePackageUncheckedCreateWithoutShareImportsInputSchema) ]), + where: z.lazy(() => TemplatePackageWhereInputSchema).optional() +}).strict(); + +export const TemplatePackageUpdateToOneWithWhereWithoutShareImportsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TemplatePackageWhereInputSchema).optional(), + data: z.union([ z.lazy(() => TemplatePackageUpdateWithoutShareImportsInputSchema),z.lazy(() => TemplatePackageUncheckedUpdateWithoutShareImportsInputSchema) ]), +}).strict(); + +export const TemplatePackageUpdateWithoutShareImportsInputSchema: z.ZodType = z.object({ id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - version: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), - status: z.union([ z.lazy(() => WorkflowStatusSchema),z.lazy(() => EnumWorkflowStatusFieldUpdateOperationsInputSchema) ]).optional(), - isTemplate: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), category: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - canvasData: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - retryConfig: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - timeoutConfig: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - totalExecutions: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), - successfulExecutions: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), - failedExecutions: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), - lastExecutedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + visibility: z.union([ z.lazy(() => TemplateVisibilitySchema),z.lazy(() => EnumTemplateVisibilityFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateStatusSchema),z.lazy(() => EnumTemplateStatusFieldUpdateOperationsInputSchema) ]).optional(), + iconUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + assetsCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + sizeBytes: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - updatedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - publishedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - publishedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - archivedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), - organization: z.lazy(() => OrganizationUpdateOneRequiredWithoutWorkflowsNestedInputSchema).optional(), - triggers: z.lazy(() => WorkflowTriggerUpdateManyWithoutWorkflowNestedInputSchema).optional(), - nodes: z.lazy(() => WorkflowNodeUpdateManyWithoutWorkflowNestedInputSchema).optional(), - connections: z.lazy(() => WorkflowConnectionUpdateManyWithoutWorkflowNestedInputSchema).optional(), - executions: z.lazy(() => WorkflowExecutionUpdateManyWithoutWorkflowNestedInputSchema).optional() + organization: z.lazy(() => OrganizationUpdateOneWithoutTemplatePackagesNestedInputSchema).optional(), + versions: z.lazy(() => TemplateVersionUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + shares: z.lazy(() => TemplateShareUpdateManyWithoutTemplatePackageNestedInputSchema).optional() }).strict(); -export const WorkflowUncheckedUpdateWithoutAnalyticsInputSchema: z.ZodType = z.object({ +export const TemplatePackageUncheckedUpdateWithoutShareImportsInputSchema: z.ZodType = z.object({ id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - version: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), - status: z.union([ z.lazy(() => WorkflowStatusSchema),z.lazy(() => EnumWorkflowStatusFieldUpdateOperationsInputSchema) ]).optional(), - isTemplate: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), category: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - canvasData: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - retryConfig: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - timeoutConfig: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), - totalExecutions: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), - successfulExecutions: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), - failedExecutions: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), - lastExecutedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + visibility: z.union([ z.lazy(() => TemplateVisibilitySchema),z.lazy(() => EnumTemplateVisibilityFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateStatusSchema),z.lazy(() => EnumTemplateStatusFieldUpdateOperationsInputSchema) ]).optional(), + iconUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + assetsCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + sizeBytes: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - updatedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - publishedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - publishedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - archivedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), - triggers: z.lazy(() => WorkflowTriggerUncheckedUpdateManyWithoutWorkflowNestedInputSchema).optional(), - nodes: z.lazy(() => WorkflowNodeUncheckedUpdateManyWithoutWorkflowNestedInputSchema).optional(), - connections: z.lazy(() => WorkflowConnectionUncheckedUpdateManyWithoutWorkflowNestedInputSchema).optional(), - executions: z.lazy(() => WorkflowExecutionUncheckedUpdateManyWithoutWorkflowNestedInputSchema).optional() + versions: z.lazy(() => TemplateVersionUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + shares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema).optional() }).strict(); export const RolePermissionCreateManyPermissionInputSchema: z.ZodType = z.object({ @@ -41548,6 +48526,80 @@ export const IntegrationConfigCreateManyOrganizationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + name: z.string(), + description: z.string().optional().nullable(), + category: z.string().optional().nullable(), + version: z.string(), + visibility: z.lazy(() => TemplateVisibilitySchema).optional(), + status: z.lazy(() => TemplateStatusSchema).optional(), + iconUrl: z.string().optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + assetsCount: z.number().int().optional(), + sizeBytes: z.number().int().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional() +}).strict(); + +export const TemplateInstallationCreateManyOrganizationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + templatePackageId: z.string().optional().nullable(), + templateVersionId: z.string().optional().nullable(), + status: z.lazy(() => TemplateInstallStatusSchema).optional(), + strategy: z.lazy(() => TemplateInstallStrategySchema).optional(), + namePrefix: z.string().optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.string().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + completedAt: z.coerce.date().optional().nullable() +}).strict(); + +export const TemplateShareCreateManyOrganizationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + templatePackageId: z.string(), + name: z.string().optional().nullable(), + shareMode: z.lazy(() => TemplateShareModeSchema).optional(), + tokenHash: z.string().optional().nullable(), + expiresAt: z.coerce.date().optional().nullable(), + maxUses: z.number().int().optional().nullable(), + allowExternal: z.boolean().optional(), + notes: z.string().optional().nullable(), + status: z.lazy(() => TemplateShareStatusSchema).optional(), + usageCount: z.number().int().optional(), + lastAccessedAt: z.coerce.date().optional().nullable(), + revokedAt: z.coerce.date().optional().nullable(), + revokedById: z.string().optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + snapshotVersion: z.string(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional() +}).strict(); + +export const TemplateShareImportCreateManyOrganizationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + shareId: z.string(), + templatePackageId: z.string(), + importedById: z.string(), + importedAt: z.coerce.date().optional(), + originalPackageId: z.string(), + originalOrgId: z.string(), + snapshotVersion: z.string() +}).strict(); + +export const OrganizationUiConfigCreateManyOrganizationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + key: z.string(), + config: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional() +}).strict(); + export const UserOrganizationUpdateWithoutOrganizationInputSchema: z.ZodType = z.object({ userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), role: z.union([ z.lazy(() => UserRoleSchema),z.lazy(() => NullableEnumUserRoleFieldUpdateOperationsInputSchema) ]).optional().nullable(), @@ -42537,6 +49589,244 @@ export const IntegrationConfigUncheckedUpdateManyWithoutOrganizationInputSchema: updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), }).strict(); +export const TemplatePackageUpdateWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + category: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + visibility: z.union([ z.lazy(() => TemplateVisibilitySchema),z.lazy(() => EnumTemplateVisibilityFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateStatusSchema),z.lazy(() => EnumTemplateStatusFieldUpdateOperationsInputSchema) ]).optional(), + iconUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + assetsCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + sizeBytes: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + versions: z.lazy(() => TemplateVersionUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + shares: z.lazy(() => TemplateShareUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportUpdateManyWithoutTemplatePackageNestedInputSchema).optional() +}).strict(); + +export const TemplatePackageUncheckedUpdateWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + category: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + visibility: z.union([ z.lazy(() => TemplateVisibilitySchema),z.lazy(() => EnumTemplateVisibilityFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateStatusSchema),z.lazy(() => EnumTemplateStatusFieldUpdateOperationsInputSchema) ]).optional(), + iconUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + assetsCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + sizeBytes: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + versions: z.lazy(() => TemplateVersionUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + installations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + shares: z.lazy(() => TemplateShareUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema).optional(), + shareImports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutTemplatePackageNestedInputSchema).optional() +}).strict(); + +export const TemplatePackageUncheckedUpdateManyWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + category: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + visibility: z.union([ z.lazy(() => TemplateVisibilitySchema),z.lazy(() => EnumTemplateVisibilityFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateStatusSchema),z.lazy(() => EnumTemplateStatusFieldUpdateOperationsInputSchema) ]).optional(), + iconUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + tags: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + assetsCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + sizeBytes: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateInstallationUpdateWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateInstallStatusSchema),z.lazy(() => EnumTemplateInstallStatusFieldUpdateOperationsInputSchema) ]).optional(), + strategy: z.union([ z.lazy(() => TemplateInstallStrategySchema),z.lazy(() => EnumTemplateInstallStrategyFieldUpdateOperationsInputSchema) ]).optional(), + namePrefix: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + completedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + templatePackage: z.lazy(() => TemplatePackageUpdateOneWithoutInstallationsNestedInputSchema).optional(), + templateVersion: z.lazy(() => TemplateVersionUpdateOneWithoutInstallationsNestedInputSchema).optional(), + items: z.lazy(() => TemplateInstallItemUpdateManyWithoutInstallationNestedInputSchema).optional() +}).strict(); + +export const TemplateInstallationUncheckedUpdateWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + templateVersionId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateInstallStatusSchema),z.lazy(() => EnumTemplateInstallStatusFieldUpdateOperationsInputSchema) ]).optional(), + strategy: z.union([ z.lazy(() => TemplateInstallStrategySchema),z.lazy(() => EnumTemplateInstallStrategyFieldUpdateOperationsInputSchema) ]).optional(), + namePrefix: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + completedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + items: z.lazy(() => TemplateInstallItemUncheckedUpdateManyWithoutInstallationNestedInputSchema).optional() +}).strict(); + +export const TemplateInstallationUncheckedUpdateManyWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + templateVersionId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateInstallStatusSchema),z.lazy(() => EnumTemplateInstallStatusFieldUpdateOperationsInputSchema) ]).optional(), + strategy: z.union([ z.lazy(() => TemplateInstallStrategySchema),z.lazy(() => EnumTemplateInstallStrategyFieldUpdateOperationsInputSchema) ]).optional(), + namePrefix: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + completedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const TemplateShareUpdateWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + shareMode: z.union([ z.lazy(() => TemplateShareModeSchema),z.lazy(() => EnumTemplateShareModeFieldUpdateOperationsInputSchema) ]).optional(), + tokenHash: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + maxUses: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + allowExternal: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + notes: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateShareStatusSchema),z.lazy(() => EnumTemplateShareStatusFieldUpdateOperationsInputSchema) ]).optional(), + usageCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + lastAccessedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + templatePackage: z.lazy(() => TemplatePackageUpdateOneRequiredWithoutSharesNestedInputSchema).optional(), + recipients: z.lazy(() => TemplateShareRecipientUpdateManyWithoutShareNestedInputSchema).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogUpdateManyWithoutShareNestedInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportUpdateManyWithoutShareNestedInputSchema).optional() +}).strict(); + +export const TemplateShareUncheckedUpdateWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + shareMode: z.union([ z.lazy(() => TemplateShareModeSchema),z.lazy(() => EnumTemplateShareModeFieldUpdateOperationsInputSchema) ]).optional(), + tokenHash: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + maxUses: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + allowExternal: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + notes: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateShareStatusSchema),z.lazy(() => EnumTemplateShareStatusFieldUpdateOperationsInputSchema) ]).optional(), + usageCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + lastAccessedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + recipients: z.lazy(() => TemplateShareRecipientUncheckedUpdateManyWithoutShareNestedInputSchema).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogUncheckedUpdateManyWithoutShareNestedInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutShareNestedInputSchema).optional() +}).strict(); + +export const TemplateShareUncheckedUpdateManyWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + shareMode: z.union([ z.lazy(() => TemplateShareModeSchema),z.lazy(() => EnumTemplateShareModeFieldUpdateOperationsInputSchema) ]).optional(), + tokenHash: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + maxUses: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + allowExternal: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + notes: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateShareStatusSchema),z.lazy(() => EnumTemplateShareStatusFieldUpdateOperationsInputSchema) ]).optional(), + usageCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + lastAccessedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareImportUpdateWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + originalPackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + originalOrgId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + share: z.lazy(() => TemplateShareUpdateOneRequiredWithoutImportsNestedInputSchema).optional(), + templatePackage: z.lazy(() => TemplatePackageUpdateOneRequiredWithoutShareImportsNestedInputSchema).optional() +}).strict(); + +export const TemplateShareImportUncheckedUpdateWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + shareId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + originalPackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + originalOrgId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareImportUncheckedUpdateManyWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + shareId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + originalPackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + originalOrgId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const OrganizationUiConfigUpdateWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + key: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + config: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const OrganizationUiConfigUncheckedUpdateWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + key: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + config: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const OrganizationUiConfigUncheckedUpdateManyWithoutOrganizationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + key: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + config: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + export const CustomerInteractionCreateManyCustomerInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), type: z.lazy(() => InteractionTypeSchema), @@ -44271,6 +51561,354 @@ export const FinancialReportScheduleUncheckedUpdateManyWithoutReportInputSchema: updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), }).strict(); +export const TemplateVersionCreateManyTemplatePackageInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + version: z.string(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + changelog: z.string().optional().nullable(), + isActive: z.boolean().optional(), + createdById: z.string(), + createdAt: z.coerce.date().optional() +}).strict(); + +export const TemplateInstallationCreateManyTemplatePackageInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + organizationId: z.string(), + templateVersionId: z.string().optional().nullable(), + status: z.lazy(() => TemplateInstallStatusSchema).optional(), + strategy: z.lazy(() => TemplateInstallStrategySchema).optional(), + namePrefix: z.string().optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.string().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + completedAt: z.coerce.date().optional().nullable() +}).strict(); + +export const TemplateShareCreateManyTemplatePackageInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + organizationId: z.string(), + name: z.string().optional().nullable(), + shareMode: z.lazy(() => TemplateShareModeSchema).optional(), + tokenHash: z.string().optional().nullable(), + expiresAt: z.coerce.date().optional().nullable(), + maxUses: z.number().int().optional().nullable(), + allowExternal: z.boolean().optional(), + notes: z.string().optional().nullable(), + status: z.lazy(() => TemplateShareStatusSchema).optional(), + usageCount: z.number().int().optional(), + lastAccessedAt: z.coerce.date().optional().nullable(), + revokedAt: z.coerce.date().optional().nullable(), + revokedById: z.string().optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]), + snapshotVersion: z.string(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional() +}).strict(); + +export const TemplateShareImportCreateManyTemplatePackageInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + shareId: z.string(), + organizationId: z.string(), + importedById: z.string(), + importedAt: z.coerce.date().optional(), + originalPackageId: z.string(), + originalOrgId: z.string(), + snapshotVersion: z.string() +}).strict(); + +export const TemplateVersionUpdateWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + changelog: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + isActive: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + installations: z.lazy(() => TemplateInstallationUpdateManyWithoutTemplateVersionNestedInputSchema).optional() +}).strict(); + +export const TemplateVersionUncheckedUpdateWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + changelog: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + isActive: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + installations: z.lazy(() => TemplateInstallationUncheckedUpdateManyWithoutTemplateVersionNestedInputSchema).optional() +}).strict(); + +export const TemplateVersionUncheckedUpdateManyWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + version: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + manifest: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + changelog: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + isActive: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateInstallationUpdateWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateInstallStatusSchema),z.lazy(() => EnumTemplateInstallStatusFieldUpdateOperationsInputSchema) ]).optional(), + strategy: z.union([ z.lazy(() => TemplateInstallStrategySchema),z.lazy(() => EnumTemplateInstallStrategyFieldUpdateOperationsInputSchema) ]).optional(), + namePrefix: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + completedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + organization: z.lazy(() => OrganizationUpdateOneRequiredWithoutTemplateInstallationsNestedInputSchema).optional(), + templateVersion: z.lazy(() => TemplateVersionUpdateOneWithoutInstallationsNestedInputSchema).optional(), + items: z.lazy(() => TemplateInstallItemUpdateManyWithoutInstallationNestedInputSchema).optional() +}).strict(); + +export const TemplateInstallationUncheckedUpdateWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templateVersionId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateInstallStatusSchema),z.lazy(() => EnumTemplateInstallStatusFieldUpdateOperationsInputSchema) ]).optional(), + strategy: z.union([ z.lazy(() => TemplateInstallStrategySchema),z.lazy(() => EnumTemplateInstallStrategyFieldUpdateOperationsInputSchema) ]).optional(), + namePrefix: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + completedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + items: z.lazy(() => TemplateInstallItemUncheckedUpdateManyWithoutInstallationNestedInputSchema).optional() +}).strict(); + +export const TemplateInstallationUncheckedUpdateManyWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templateVersionId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateInstallStatusSchema),z.lazy(() => EnumTemplateInstallStatusFieldUpdateOperationsInputSchema) ]).optional(), + strategy: z.union([ z.lazy(() => TemplateInstallStrategySchema),z.lazy(() => EnumTemplateInstallStrategyFieldUpdateOperationsInputSchema) ]).optional(), + namePrefix: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + completedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const TemplateShareUpdateWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + shareMode: z.union([ z.lazy(() => TemplateShareModeSchema),z.lazy(() => EnumTemplateShareModeFieldUpdateOperationsInputSchema) ]).optional(), + tokenHash: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + maxUses: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + allowExternal: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + notes: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateShareStatusSchema),z.lazy(() => EnumTemplateShareStatusFieldUpdateOperationsInputSchema) ]).optional(), + usageCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + lastAccessedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + organization: z.lazy(() => OrganizationUpdateOneRequiredWithoutTemplateSharesNestedInputSchema).optional(), + recipients: z.lazy(() => TemplateShareRecipientUpdateManyWithoutShareNestedInputSchema).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogUpdateManyWithoutShareNestedInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportUpdateManyWithoutShareNestedInputSchema).optional() +}).strict(); + +export const TemplateShareUncheckedUpdateWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + shareMode: z.union([ z.lazy(() => TemplateShareModeSchema),z.lazy(() => EnumTemplateShareModeFieldUpdateOperationsInputSchema) ]).optional(), + tokenHash: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + maxUses: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + allowExternal: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + notes: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateShareStatusSchema),z.lazy(() => EnumTemplateShareStatusFieldUpdateOperationsInputSchema) ]).optional(), + usageCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + lastAccessedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + recipients: z.lazy(() => TemplateShareRecipientUncheckedUpdateManyWithoutShareNestedInputSchema).optional(), + accessLogs: z.lazy(() => TemplateShareAccessLogUncheckedUpdateManyWithoutShareNestedInputSchema).optional(), + imports: z.lazy(() => TemplateShareImportUncheckedUpdateManyWithoutShareNestedInputSchema).optional() +}).strict(); + +export const TemplateShareUncheckedUpdateManyWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + shareMode: z.union([ z.lazy(() => TemplateShareModeSchema),z.lazy(() => EnumTemplateShareModeFieldUpdateOperationsInputSchema) ]).optional(), + tokenHash: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + maxUses: z.union([ z.number().int(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), + allowExternal: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), + notes: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateShareStatusSchema),z.lazy(() => EnumTemplateShareStatusFieldUpdateOperationsInputSchema) ]).optional(), + usageCount: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), + lastAccessedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + revokedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + snapshotData: z.union([ z.lazy(() => JsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareImportUpdateWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + originalPackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + originalOrgId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + share: z.lazy(() => TemplateShareUpdateOneRequiredWithoutImportsNestedInputSchema).optional(), + organization: z.lazy(() => OrganizationUpdateOneRequiredWithoutTemplateShareImportsNestedInputSchema).optional() +}).strict(); + +export const TemplateShareImportUncheckedUpdateWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + shareId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + originalPackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + originalOrgId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareImportUncheckedUpdateManyWithoutTemplatePackageInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + shareId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + originalPackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + originalOrgId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateInstallationCreateManyTemplateVersionInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + organizationId: z.string(), + templatePackageId: z.string().optional().nullable(), + status: z.lazy(() => TemplateInstallStatusSchema).optional(), + strategy: z.lazy(() => TemplateInstallStrategySchema).optional(), + namePrefix: z.string().optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.string().optional().nullable(), + createdById: z.string(), + createdAt: z.coerce.date().optional(), + completedAt: z.coerce.date().optional().nullable() +}).strict(); + +export const TemplateInstallationUpdateWithoutTemplateVersionInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateInstallStatusSchema),z.lazy(() => EnumTemplateInstallStatusFieldUpdateOperationsInputSchema) ]).optional(), + strategy: z.union([ z.lazy(() => TemplateInstallStrategySchema),z.lazy(() => EnumTemplateInstallStrategyFieldUpdateOperationsInputSchema) ]).optional(), + namePrefix: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + completedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + organization: z.lazy(() => OrganizationUpdateOneRequiredWithoutTemplateInstallationsNestedInputSchema).optional(), + templatePackage: z.lazy(() => TemplatePackageUpdateOneWithoutInstallationsNestedInputSchema).optional(), + items: z.lazy(() => TemplateInstallItemUpdateManyWithoutInstallationNestedInputSchema).optional() +}).strict(); + +export const TemplateInstallationUncheckedUpdateWithoutTemplateVersionInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateInstallStatusSchema),z.lazy(() => EnumTemplateInstallStatusFieldUpdateOperationsInputSchema) ]).optional(), + strategy: z.union([ z.lazy(() => TemplateInstallStrategySchema),z.lazy(() => EnumTemplateInstallStrategyFieldUpdateOperationsInputSchema) ]).optional(), + namePrefix: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + completedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + items: z.lazy(() => TemplateInstallItemUncheckedUpdateManyWithoutInstallationNestedInputSchema).optional() +}).strict(); + +export const TemplateInstallationUncheckedUpdateManyWithoutTemplateVersionInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateInstallStatusSchema),z.lazy(() => EnumTemplateInstallStatusFieldUpdateOperationsInputSchema) ]).optional(), + strategy: z.union([ z.lazy(() => TemplateInstallStrategySchema),z.lazy(() => EnumTemplateInstallStrategyFieldUpdateOperationsInputSchema) ]).optional(), + namePrefix: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preflight: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + logs: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + error: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + completedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const TemplateInstallItemCreateManyInstallationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + assetType: z.lazy(() => TemplateAssetTypeSchema), + sourceKey: z.string(), + createdModel: z.string().optional().nullable(), + createdId: z.string().optional().nullable(), + status: z.lazy(() => TemplateItemStatusSchema).optional(), + details: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.coerce.date().optional() +}).strict(); + +export const TemplateInstallItemUpdateWithoutInstallationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + assetType: z.union([ z.lazy(() => TemplateAssetTypeSchema),z.lazy(() => EnumTemplateAssetTypeFieldUpdateOperationsInputSchema) ]).optional(), + sourceKey: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdModel: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateItemStatusSchema),z.lazy(() => EnumTemplateItemStatusFieldUpdateOperationsInputSchema) ]).optional(), + details: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateInstallItemUncheckedUpdateWithoutInstallationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + assetType: z.union([ z.lazy(() => TemplateAssetTypeSchema),z.lazy(() => EnumTemplateAssetTypeFieldUpdateOperationsInputSchema) ]).optional(), + sourceKey: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdModel: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateItemStatusSchema),z.lazy(() => EnumTemplateItemStatusFieldUpdateOperationsInputSchema) ]).optional(), + details: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateInstallItemUncheckedUpdateManyWithoutInstallationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + assetType: z.union([ z.lazy(() => TemplateAssetTypeSchema),z.lazy(() => EnumTemplateAssetTypeFieldUpdateOperationsInputSchema) ]).optional(), + sourceKey: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdModel: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + status: z.union([ z.lazy(() => TemplateItemStatusSchema),z.lazy(() => EnumTemplateItemStatusFieldUpdateOperationsInputSchema) ]).optional(), + details: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + export const WorkflowTriggerCreateManyWorkflowInputSchema: z.ZodType = z.object({ id: z.string().cuid().optional(), nodeId: z.string().optional().nullable(), @@ -45397,6 +53035,134 @@ export const ExecutionLogUncheckedUpdateManyWithoutWorkflowExecutionInputSchema: createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), }).strict(); +export const TemplateShareRecipientCreateManyShareInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + email: z.string(), + status: z.lazy(() => TemplateShareRecipientStatusSchema).optional(), + invitedAt: z.coerce.date().optional(), + viewedAt: z.coerce.date().optional().nullable(), + importedAt: z.coerce.date().optional().nullable() +}).strict(); + +export const TemplateShareAccessLogCreateManyShareInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + action: z.lazy(() => TemplateShareAccessActionSchema), + status: z.lazy(() => TemplateShareAccessStatusSchema), + recipientEmail: z.string().optional().nullable(), + userAgent: z.string().optional().nullable(), + ipAddress: z.string().optional().nullable(), + errorMessage: z.string().optional().nullable(), + metadata: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.coerce.date().optional() +}).strict(); + +export const TemplateShareImportCreateManyShareInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + organizationId: z.string(), + templatePackageId: z.string(), + importedById: z.string(), + importedAt: z.coerce.date().optional(), + originalPackageId: z.string(), + originalOrgId: z.string(), + snapshotVersion: z.string() +}).strict(); + +export const TemplateShareRecipientUpdateWithoutShareInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateShareRecipientStatusSchema),z.lazy(() => EnumTemplateShareRecipientStatusFieldUpdateOperationsInputSchema) ]).optional(), + invitedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + viewedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + importedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const TemplateShareRecipientUncheckedUpdateWithoutShareInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateShareRecipientStatusSchema),z.lazy(() => EnumTemplateShareRecipientStatusFieldUpdateOperationsInputSchema) ]).optional(), + invitedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + viewedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + importedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const TemplateShareRecipientUncheckedUpdateManyWithoutShareInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateShareRecipientStatusSchema),z.lazy(() => EnumTemplateShareRecipientStatusFieldUpdateOperationsInputSchema) ]).optional(), + invitedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + viewedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + importedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const TemplateShareAccessLogUpdateWithoutShareInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + action: z.union([ z.lazy(() => TemplateShareAccessActionSchema),z.lazy(() => EnumTemplateShareAccessActionFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateShareAccessStatusSchema),z.lazy(() => EnumTemplateShareAccessStatusFieldUpdateOperationsInputSchema) ]).optional(), + recipientEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + userAgent: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + ipAddress: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + errorMessage: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + metadata: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareAccessLogUncheckedUpdateWithoutShareInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + action: z.union([ z.lazy(() => TemplateShareAccessActionSchema),z.lazy(() => EnumTemplateShareAccessActionFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateShareAccessStatusSchema),z.lazy(() => EnumTemplateShareAccessStatusFieldUpdateOperationsInputSchema) ]).optional(), + recipientEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + userAgent: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + ipAddress: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + errorMessage: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + metadata: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareAccessLogUncheckedUpdateManyWithoutShareInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + action: z.union([ z.lazy(() => TemplateShareAccessActionSchema),z.lazy(() => EnumTemplateShareAccessActionFieldUpdateOperationsInputSchema) ]).optional(), + status: z.union([ z.lazy(() => TemplateShareAccessStatusSchema),z.lazy(() => EnumTemplateShareAccessStatusFieldUpdateOperationsInputSchema) ]).optional(), + recipientEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + userAgent: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + ipAddress: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + errorMessage: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + metadata: z.union([ z.lazy(() => NullableJsonNullValueInputSchema),InputJsonValueSchema ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareImportUpdateWithoutShareInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + originalPackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + originalOrgId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organization: z.lazy(() => OrganizationUpdateOneRequiredWithoutTemplateShareImportsNestedInputSchema).optional(), + templatePackage: z.lazy(() => TemplatePackageUpdateOneRequiredWithoutShareImportsNestedInputSchema).optional() +}).strict(); + +export const TemplateShareImportUncheckedUpdateWithoutShareInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + originalPackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + originalOrgId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TemplateShareImportUncheckedUpdateManyWithoutShareInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + organizationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + templatePackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedById: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + importedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + originalPackageId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + originalOrgId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + snapshotVersion: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + ///////////////////////////////////////// // ARGS ///////////////////////////////////////// @@ -47933,6 +55699,254 @@ export const FinancialReportScheduleFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: TemplatePackageSelectSchema.optional(), + include: TemplatePackageIncludeSchema.optional(), + where: TemplatePackageWhereInputSchema.optional(), + orderBy: z.union([ TemplatePackageOrderByWithRelationInputSchema.array(),TemplatePackageOrderByWithRelationInputSchema ]).optional(), + cursor: TemplatePackageWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplatePackageScalarFieldEnumSchema,TemplatePackageScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplatePackageFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: TemplatePackageSelectSchema.optional(), + include: TemplatePackageIncludeSchema.optional(), + where: TemplatePackageWhereInputSchema.optional(), + orderBy: z.union([ TemplatePackageOrderByWithRelationInputSchema.array(),TemplatePackageOrderByWithRelationInputSchema ]).optional(), + cursor: TemplatePackageWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplatePackageScalarFieldEnumSchema,TemplatePackageScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplatePackageFindManyArgsSchema: z.ZodType = z.object({ + select: TemplatePackageSelectSchema.optional(), + include: TemplatePackageIncludeSchema.optional(), + where: TemplatePackageWhereInputSchema.optional(), + orderBy: z.union([ TemplatePackageOrderByWithRelationInputSchema.array(),TemplatePackageOrderByWithRelationInputSchema ]).optional(), + cursor: TemplatePackageWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplatePackageScalarFieldEnumSchema,TemplatePackageScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplatePackageAggregateArgsSchema: z.ZodType = z.object({ + where: TemplatePackageWhereInputSchema.optional(), + orderBy: z.union([ TemplatePackageOrderByWithRelationInputSchema.array(),TemplatePackageOrderByWithRelationInputSchema ]).optional(), + cursor: TemplatePackageWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const TemplatePackageGroupByArgsSchema: z.ZodType = z.object({ + where: TemplatePackageWhereInputSchema.optional(), + orderBy: z.union([ TemplatePackageOrderByWithAggregationInputSchema.array(),TemplatePackageOrderByWithAggregationInputSchema ]).optional(), + by: TemplatePackageScalarFieldEnumSchema.array(), + having: TemplatePackageScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const TemplatePackageFindUniqueArgsSchema: z.ZodType = z.object({ + select: TemplatePackageSelectSchema.optional(), + include: TemplatePackageIncludeSchema.optional(), + where: TemplatePackageWhereUniqueInputSchema, +}).strict() ; + +export const TemplatePackageFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: TemplatePackageSelectSchema.optional(), + include: TemplatePackageIncludeSchema.optional(), + where: TemplatePackageWhereUniqueInputSchema, +}).strict() ; + +export const TemplateVersionFindFirstArgsSchema: z.ZodType = z.object({ + select: TemplateVersionSelectSchema.optional(), + include: TemplateVersionIncludeSchema.optional(), + where: TemplateVersionWhereInputSchema.optional(), + orderBy: z.union([ TemplateVersionOrderByWithRelationInputSchema.array(),TemplateVersionOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateVersionWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateVersionScalarFieldEnumSchema,TemplateVersionScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateVersionFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: TemplateVersionSelectSchema.optional(), + include: TemplateVersionIncludeSchema.optional(), + where: TemplateVersionWhereInputSchema.optional(), + orderBy: z.union([ TemplateVersionOrderByWithRelationInputSchema.array(),TemplateVersionOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateVersionWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateVersionScalarFieldEnumSchema,TemplateVersionScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateVersionFindManyArgsSchema: z.ZodType = z.object({ + select: TemplateVersionSelectSchema.optional(), + include: TemplateVersionIncludeSchema.optional(), + where: TemplateVersionWhereInputSchema.optional(), + orderBy: z.union([ TemplateVersionOrderByWithRelationInputSchema.array(),TemplateVersionOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateVersionWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateVersionScalarFieldEnumSchema,TemplateVersionScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateVersionAggregateArgsSchema: z.ZodType = z.object({ + where: TemplateVersionWhereInputSchema.optional(), + orderBy: z.union([ TemplateVersionOrderByWithRelationInputSchema.array(),TemplateVersionOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateVersionWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const TemplateVersionGroupByArgsSchema: z.ZodType = z.object({ + where: TemplateVersionWhereInputSchema.optional(), + orderBy: z.union([ TemplateVersionOrderByWithAggregationInputSchema.array(),TemplateVersionOrderByWithAggregationInputSchema ]).optional(), + by: TemplateVersionScalarFieldEnumSchema.array(), + having: TemplateVersionScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const TemplateVersionFindUniqueArgsSchema: z.ZodType = z.object({ + select: TemplateVersionSelectSchema.optional(), + include: TemplateVersionIncludeSchema.optional(), + where: TemplateVersionWhereUniqueInputSchema, +}).strict() ; + +export const TemplateVersionFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: TemplateVersionSelectSchema.optional(), + include: TemplateVersionIncludeSchema.optional(), + where: TemplateVersionWhereUniqueInputSchema, +}).strict() ; + +export const TemplateInstallationFindFirstArgsSchema: z.ZodType = z.object({ + select: TemplateInstallationSelectSchema.optional(), + include: TemplateInstallationIncludeSchema.optional(), + where: TemplateInstallationWhereInputSchema.optional(), + orderBy: z.union([ TemplateInstallationOrderByWithRelationInputSchema.array(),TemplateInstallationOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateInstallationWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateInstallationScalarFieldEnumSchema,TemplateInstallationScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateInstallationFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: TemplateInstallationSelectSchema.optional(), + include: TemplateInstallationIncludeSchema.optional(), + where: TemplateInstallationWhereInputSchema.optional(), + orderBy: z.union([ TemplateInstallationOrderByWithRelationInputSchema.array(),TemplateInstallationOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateInstallationWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateInstallationScalarFieldEnumSchema,TemplateInstallationScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateInstallationFindManyArgsSchema: z.ZodType = z.object({ + select: TemplateInstallationSelectSchema.optional(), + include: TemplateInstallationIncludeSchema.optional(), + where: TemplateInstallationWhereInputSchema.optional(), + orderBy: z.union([ TemplateInstallationOrderByWithRelationInputSchema.array(),TemplateInstallationOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateInstallationWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateInstallationScalarFieldEnumSchema,TemplateInstallationScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateInstallationAggregateArgsSchema: z.ZodType = z.object({ + where: TemplateInstallationWhereInputSchema.optional(), + orderBy: z.union([ TemplateInstallationOrderByWithRelationInputSchema.array(),TemplateInstallationOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateInstallationWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const TemplateInstallationGroupByArgsSchema: z.ZodType = z.object({ + where: TemplateInstallationWhereInputSchema.optional(), + orderBy: z.union([ TemplateInstallationOrderByWithAggregationInputSchema.array(),TemplateInstallationOrderByWithAggregationInputSchema ]).optional(), + by: TemplateInstallationScalarFieldEnumSchema.array(), + having: TemplateInstallationScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const TemplateInstallationFindUniqueArgsSchema: z.ZodType = z.object({ + select: TemplateInstallationSelectSchema.optional(), + include: TemplateInstallationIncludeSchema.optional(), + where: TemplateInstallationWhereUniqueInputSchema, +}).strict() ; + +export const TemplateInstallationFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: TemplateInstallationSelectSchema.optional(), + include: TemplateInstallationIncludeSchema.optional(), + where: TemplateInstallationWhereUniqueInputSchema, +}).strict() ; + +export const TemplateInstallItemFindFirstArgsSchema: z.ZodType = z.object({ + select: TemplateInstallItemSelectSchema.optional(), + include: TemplateInstallItemIncludeSchema.optional(), + where: TemplateInstallItemWhereInputSchema.optional(), + orderBy: z.union([ TemplateInstallItemOrderByWithRelationInputSchema.array(),TemplateInstallItemOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateInstallItemWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateInstallItemScalarFieldEnumSchema,TemplateInstallItemScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateInstallItemFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: TemplateInstallItemSelectSchema.optional(), + include: TemplateInstallItemIncludeSchema.optional(), + where: TemplateInstallItemWhereInputSchema.optional(), + orderBy: z.union([ TemplateInstallItemOrderByWithRelationInputSchema.array(),TemplateInstallItemOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateInstallItemWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateInstallItemScalarFieldEnumSchema,TemplateInstallItemScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateInstallItemFindManyArgsSchema: z.ZodType = z.object({ + select: TemplateInstallItemSelectSchema.optional(), + include: TemplateInstallItemIncludeSchema.optional(), + where: TemplateInstallItemWhereInputSchema.optional(), + orderBy: z.union([ TemplateInstallItemOrderByWithRelationInputSchema.array(),TemplateInstallItemOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateInstallItemWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateInstallItemScalarFieldEnumSchema,TemplateInstallItemScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateInstallItemAggregateArgsSchema: z.ZodType = z.object({ + where: TemplateInstallItemWhereInputSchema.optional(), + orderBy: z.union([ TemplateInstallItemOrderByWithRelationInputSchema.array(),TemplateInstallItemOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateInstallItemWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const TemplateInstallItemGroupByArgsSchema: z.ZodType = z.object({ + where: TemplateInstallItemWhereInputSchema.optional(), + orderBy: z.union([ TemplateInstallItemOrderByWithAggregationInputSchema.array(),TemplateInstallItemOrderByWithAggregationInputSchema ]).optional(), + by: TemplateInstallItemScalarFieldEnumSchema.array(), + having: TemplateInstallItemScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const TemplateInstallItemFindUniqueArgsSchema: z.ZodType = z.object({ + select: TemplateInstallItemSelectSchema.optional(), + include: TemplateInstallItemIncludeSchema.optional(), + where: TemplateInstallItemWhereUniqueInputSchema, +}).strict() ; + +export const TemplateInstallItemFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: TemplateInstallItemSelectSchema.optional(), + include: TemplateInstallItemIncludeSchema.optional(), + where: TemplateInstallItemWhereUniqueInputSchema, +}).strict() ; + export const WorkflowFindFirstArgsSchema: z.ZodType = z.object({ select: WorkflowSelectSchema.optional(), include: WorkflowIncludeSchema.optional(), @@ -47995,6 +56009,68 @@ export const WorkflowFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: OrganizationUiConfigSelectSchema.optional(), + include: OrganizationUiConfigIncludeSchema.optional(), + where: OrganizationUiConfigWhereInputSchema.optional(), + orderBy: z.union([ OrganizationUiConfigOrderByWithRelationInputSchema.array(),OrganizationUiConfigOrderByWithRelationInputSchema ]).optional(), + cursor: OrganizationUiConfigWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ OrganizationUiConfigScalarFieldEnumSchema,OrganizationUiConfigScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const OrganizationUiConfigFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: OrganizationUiConfigSelectSchema.optional(), + include: OrganizationUiConfigIncludeSchema.optional(), + where: OrganizationUiConfigWhereInputSchema.optional(), + orderBy: z.union([ OrganizationUiConfigOrderByWithRelationInputSchema.array(),OrganizationUiConfigOrderByWithRelationInputSchema ]).optional(), + cursor: OrganizationUiConfigWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ OrganizationUiConfigScalarFieldEnumSchema,OrganizationUiConfigScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const OrganizationUiConfigFindManyArgsSchema: z.ZodType = z.object({ + select: OrganizationUiConfigSelectSchema.optional(), + include: OrganizationUiConfigIncludeSchema.optional(), + where: OrganizationUiConfigWhereInputSchema.optional(), + orderBy: z.union([ OrganizationUiConfigOrderByWithRelationInputSchema.array(),OrganizationUiConfigOrderByWithRelationInputSchema ]).optional(), + cursor: OrganizationUiConfigWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ OrganizationUiConfigScalarFieldEnumSchema,OrganizationUiConfigScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const OrganizationUiConfigAggregateArgsSchema: z.ZodType = z.object({ + where: OrganizationUiConfigWhereInputSchema.optional(), + orderBy: z.union([ OrganizationUiConfigOrderByWithRelationInputSchema.array(),OrganizationUiConfigOrderByWithRelationInputSchema ]).optional(), + cursor: OrganizationUiConfigWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const OrganizationUiConfigGroupByArgsSchema: z.ZodType = z.object({ + where: OrganizationUiConfigWhereInputSchema.optional(), + orderBy: z.union([ OrganizationUiConfigOrderByWithAggregationInputSchema.array(),OrganizationUiConfigOrderByWithAggregationInputSchema ]).optional(), + by: OrganizationUiConfigScalarFieldEnumSchema.array(), + having: OrganizationUiConfigScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const OrganizationUiConfigFindUniqueArgsSchema: z.ZodType = z.object({ + select: OrganizationUiConfigSelectSchema.optional(), + include: OrganizationUiConfigIncludeSchema.optional(), + where: OrganizationUiConfigWhereUniqueInputSchema, +}).strict() ; + +export const OrganizationUiConfigFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: OrganizationUiConfigSelectSchema.optional(), + include: OrganizationUiConfigIncludeSchema.optional(), + where: OrganizationUiConfigWhereUniqueInputSchema, +}).strict() ; + export const WorkflowTriggerFindFirstArgsSchema: z.ZodType = z.object({ select: WorkflowTriggerSelectSchema.optional(), include: WorkflowTriggerIncludeSchema.optional(), @@ -49173,6 +57249,254 @@ export const WorkflowAnalyticsFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: TemplateShareSelectSchema.optional(), + include: TemplateShareIncludeSchema.optional(), + where: TemplateShareWhereInputSchema.optional(), + orderBy: z.union([ TemplateShareOrderByWithRelationInputSchema.array(),TemplateShareOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateShareWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateShareScalarFieldEnumSchema,TemplateShareScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateShareFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: TemplateShareSelectSchema.optional(), + include: TemplateShareIncludeSchema.optional(), + where: TemplateShareWhereInputSchema.optional(), + orderBy: z.union([ TemplateShareOrderByWithRelationInputSchema.array(),TemplateShareOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateShareWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateShareScalarFieldEnumSchema,TemplateShareScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateShareFindManyArgsSchema: z.ZodType = z.object({ + select: TemplateShareSelectSchema.optional(), + include: TemplateShareIncludeSchema.optional(), + where: TemplateShareWhereInputSchema.optional(), + orderBy: z.union([ TemplateShareOrderByWithRelationInputSchema.array(),TemplateShareOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateShareWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateShareScalarFieldEnumSchema,TemplateShareScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateShareAggregateArgsSchema: z.ZodType = z.object({ + where: TemplateShareWhereInputSchema.optional(), + orderBy: z.union([ TemplateShareOrderByWithRelationInputSchema.array(),TemplateShareOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateShareWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const TemplateShareGroupByArgsSchema: z.ZodType = z.object({ + where: TemplateShareWhereInputSchema.optional(), + orderBy: z.union([ TemplateShareOrderByWithAggregationInputSchema.array(),TemplateShareOrderByWithAggregationInputSchema ]).optional(), + by: TemplateShareScalarFieldEnumSchema.array(), + having: TemplateShareScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const TemplateShareFindUniqueArgsSchema: z.ZodType = z.object({ + select: TemplateShareSelectSchema.optional(), + include: TemplateShareIncludeSchema.optional(), + where: TemplateShareWhereUniqueInputSchema, +}).strict() ; + +export const TemplateShareFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: TemplateShareSelectSchema.optional(), + include: TemplateShareIncludeSchema.optional(), + where: TemplateShareWhereUniqueInputSchema, +}).strict() ; + +export const TemplateShareRecipientFindFirstArgsSchema: z.ZodType = z.object({ + select: TemplateShareRecipientSelectSchema.optional(), + include: TemplateShareRecipientIncludeSchema.optional(), + where: TemplateShareRecipientWhereInputSchema.optional(), + orderBy: z.union([ TemplateShareRecipientOrderByWithRelationInputSchema.array(),TemplateShareRecipientOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateShareRecipientWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateShareRecipientScalarFieldEnumSchema,TemplateShareRecipientScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateShareRecipientFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: TemplateShareRecipientSelectSchema.optional(), + include: TemplateShareRecipientIncludeSchema.optional(), + where: TemplateShareRecipientWhereInputSchema.optional(), + orderBy: z.union([ TemplateShareRecipientOrderByWithRelationInputSchema.array(),TemplateShareRecipientOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateShareRecipientWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateShareRecipientScalarFieldEnumSchema,TemplateShareRecipientScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateShareRecipientFindManyArgsSchema: z.ZodType = z.object({ + select: TemplateShareRecipientSelectSchema.optional(), + include: TemplateShareRecipientIncludeSchema.optional(), + where: TemplateShareRecipientWhereInputSchema.optional(), + orderBy: z.union([ TemplateShareRecipientOrderByWithRelationInputSchema.array(),TemplateShareRecipientOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateShareRecipientWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateShareRecipientScalarFieldEnumSchema,TemplateShareRecipientScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateShareRecipientAggregateArgsSchema: z.ZodType = z.object({ + where: TemplateShareRecipientWhereInputSchema.optional(), + orderBy: z.union([ TemplateShareRecipientOrderByWithRelationInputSchema.array(),TemplateShareRecipientOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateShareRecipientWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const TemplateShareRecipientGroupByArgsSchema: z.ZodType = z.object({ + where: TemplateShareRecipientWhereInputSchema.optional(), + orderBy: z.union([ TemplateShareRecipientOrderByWithAggregationInputSchema.array(),TemplateShareRecipientOrderByWithAggregationInputSchema ]).optional(), + by: TemplateShareRecipientScalarFieldEnumSchema.array(), + having: TemplateShareRecipientScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const TemplateShareRecipientFindUniqueArgsSchema: z.ZodType = z.object({ + select: TemplateShareRecipientSelectSchema.optional(), + include: TemplateShareRecipientIncludeSchema.optional(), + where: TemplateShareRecipientWhereUniqueInputSchema, +}).strict() ; + +export const TemplateShareRecipientFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: TemplateShareRecipientSelectSchema.optional(), + include: TemplateShareRecipientIncludeSchema.optional(), + where: TemplateShareRecipientWhereUniqueInputSchema, +}).strict() ; + +export const TemplateShareAccessLogFindFirstArgsSchema: z.ZodType = z.object({ + select: TemplateShareAccessLogSelectSchema.optional(), + include: TemplateShareAccessLogIncludeSchema.optional(), + where: TemplateShareAccessLogWhereInputSchema.optional(), + orderBy: z.union([ TemplateShareAccessLogOrderByWithRelationInputSchema.array(),TemplateShareAccessLogOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateShareAccessLogWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateShareAccessLogScalarFieldEnumSchema,TemplateShareAccessLogScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateShareAccessLogFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: TemplateShareAccessLogSelectSchema.optional(), + include: TemplateShareAccessLogIncludeSchema.optional(), + where: TemplateShareAccessLogWhereInputSchema.optional(), + orderBy: z.union([ TemplateShareAccessLogOrderByWithRelationInputSchema.array(),TemplateShareAccessLogOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateShareAccessLogWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateShareAccessLogScalarFieldEnumSchema,TemplateShareAccessLogScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateShareAccessLogFindManyArgsSchema: z.ZodType = z.object({ + select: TemplateShareAccessLogSelectSchema.optional(), + include: TemplateShareAccessLogIncludeSchema.optional(), + where: TemplateShareAccessLogWhereInputSchema.optional(), + orderBy: z.union([ TemplateShareAccessLogOrderByWithRelationInputSchema.array(),TemplateShareAccessLogOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateShareAccessLogWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateShareAccessLogScalarFieldEnumSchema,TemplateShareAccessLogScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateShareAccessLogAggregateArgsSchema: z.ZodType = z.object({ + where: TemplateShareAccessLogWhereInputSchema.optional(), + orderBy: z.union([ TemplateShareAccessLogOrderByWithRelationInputSchema.array(),TemplateShareAccessLogOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateShareAccessLogWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const TemplateShareAccessLogGroupByArgsSchema: z.ZodType = z.object({ + where: TemplateShareAccessLogWhereInputSchema.optional(), + orderBy: z.union([ TemplateShareAccessLogOrderByWithAggregationInputSchema.array(),TemplateShareAccessLogOrderByWithAggregationInputSchema ]).optional(), + by: TemplateShareAccessLogScalarFieldEnumSchema.array(), + having: TemplateShareAccessLogScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const TemplateShareAccessLogFindUniqueArgsSchema: z.ZodType = z.object({ + select: TemplateShareAccessLogSelectSchema.optional(), + include: TemplateShareAccessLogIncludeSchema.optional(), + where: TemplateShareAccessLogWhereUniqueInputSchema, +}).strict() ; + +export const TemplateShareAccessLogFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: TemplateShareAccessLogSelectSchema.optional(), + include: TemplateShareAccessLogIncludeSchema.optional(), + where: TemplateShareAccessLogWhereUniqueInputSchema, +}).strict() ; + +export const TemplateShareImportFindFirstArgsSchema: z.ZodType = z.object({ + select: TemplateShareImportSelectSchema.optional(), + include: TemplateShareImportIncludeSchema.optional(), + where: TemplateShareImportWhereInputSchema.optional(), + orderBy: z.union([ TemplateShareImportOrderByWithRelationInputSchema.array(),TemplateShareImportOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateShareImportWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateShareImportScalarFieldEnumSchema,TemplateShareImportScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateShareImportFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: TemplateShareImportSelectSchema.optional(), + include: TemplateShareImportIncludeSchema.optional(), + where: TemplateShareImportWhereInputSchema.optional(), + orderBy: z.union([ TemplateShareImportOrderByWithRelationInputSchema.array(),TemplateShareImportOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateShareImportWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateShareImportScalarFieldEnumSchema,TemplateShareImportScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateShareImportFindManyArgsSchema: z.ZodType = z.object({ + select: TemplateShareImportSelectSchema.optional(), + include: TemplateShareImportIncludeSchema.optional(), + where: TemplateShareImportWhereInputSchema.optional(), + orderBy: z.union([ TemplateShareImportOrderByWithRelationInputSchema.array(),TemplateShareImportOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateShareImportWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TemplateShareImportScalarFieldEnumSchema,TemplateShareImportScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const TemplateShareImportAggregateArgsSchema: z.ZodType = z.object({ + where: TemplateShareImportWhereInputSchema.optional(), + orderBy: z.union([ TemplateShareImportOrderByWithRelationInputSchema.array(),TemplateShareImportOrderByWithRelationInputSchema ]).optional(), + cursor: TemplateShareImportWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const TemplateShareImportGroupByArgsSchema: z.ZodType = z.object({ + where: TemplateShareImportWhereInputSchema.optional(), + orderBy: z.union([ TemplateShareImportOrderByWithAggregationInputSchema.array(),TemplateShareImportOrderByWithAggregationInputSchema ]).optional(), + by: TemplateShareImportScalarFieldEnumSchema.array(), + having: TemplateShareImportScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const TemplateShareImportFindUniqueArgsSchema: z.ZodType = z.object({ + select: TemplateShareImportSelectSchema.optional(), + include: TemplateShareImportIncludeSchema.optional(), + where: TemplateShareImportWhereUniqueInputSchema, +}).strict() ; + +export const TemplateShareImportFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: TemplateShareImportSelectSchema.optional(), + include: TemplateShareImportIncludeSchema.optional(), + where: TemplateShareImportWhereUniqueInputSchema, +}).strict() ; + export const PermissionCreateArgsSchema: z.ZodType = z.object({ select: PermissionSelectSchema.optional(), include: PermissionIncludeSchema.optional(), @@ -51051,6 +59375,190 @@ export const FinancialReportScheduleDeleteManyArgsSchema: z.ZodType = z.object({ + select: TemplatePackageSelectSchema.optional(), + include: TemplatePackageIncludeSchema.optional(), + data: z.union([ TemplatePackageCreateInputSchema,TemplatePackageUncheckedCreateInputSchema ]), +}).strict() ; + +export const TemplatePackageUpsertArgsSchema: z.ZodType = z.object({ + select: TemplatePackageSelectSchema.optional(), + include: TemplatePackageIncludeSchema.optional(), + where: TemplatePackageWhereUniqueInputSchema, + create: z.union([ TemplatePackageCreateInputSchema,TemplatePackageUncheckedCreateInputSchema ]), + update: z.union([ TemplatePackageUpdateInputSchema,TemplatePackageUncheckedUpdateInputSchema ]), +}).strict() ; + +export const TemplatePackageCreateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplatePackageCreateManyInputSchema,TemplatePackageCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const TemplatePackageCreateManyAndReturnArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplatePackageCreateManyInputSchema,TemplatePackageCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const TemplatePackageDeleteArgsSchema: z.ZodType = z.object({ + select: TemplatePackageSelectSchema.optional(), + include: TemplatePackageIncludeSchema.optional(), + where: TemplatePackageWhereUniqueInputSchema, +}).strict() ; + +export const TemplatePackageUpdateArgsSchema: z.ZodType = z.object({ + select: TemplatePackageSelectSchema.optional(), + include: TemplatePackageIncludeSchema.optional(), + data: z.union([ TemplatePackageUpdateInputSchema,TemplatePackageUncheckedUpdateInputSchema ]), + where: TemplatePackageWhereUniqueInputSchema, +}).strict() ; + +export const TemplatePackageUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplatePackageUpdateManyMutationInputSchema,TemplatePackageUncheckedUpdateManyInputSchema ]), + where: TemplatePackageWhereInputSchema.optional(), +}).strict() ; + +export const TemplatePackageDeleteManyArgsSchema: z.ZodType = z.object({ + where: TemplatePackageWhereInputSchema.optional(), +}).strict() ; + +export const TemplateVersionCreateArgsSchema: z.ZodType = z.object({ + select: TemplateVersionSelectSchema.optional(), + include: TemplateVersionIncludeSchema.optional(), + data: z.union([ TemplateVersionCreateInputSchema,TemplateVersionUncheckedCreateInputSchema ]), +}).strict() ; + +export const TemplateVersionUpsertArgsSchema: z.ZodType = z.object({ + select: TemplateVersionSelectSchema.optional(), + include: TemplateVersionIncludeSchema.optional(), + where: TemplateVersionWhereUniqueInputSchema, + create: z.union([ TemplateVersionCreateInputSchema,TemplateVersionUncheckedCreateInputSchema ]), + update: z.union([ TemplateVersionUpdateInputSchema,TemplateVersionUncheckedUpdateInputSchema ]), +}).strict() ; + +export const TemplateVersionCreateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateVersionCreateManyInputSchema,TemplateVersionCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const TemplateVersionCreateManyAndReturnArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateVersionCreateManyInputSchema,TemplateVersionCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const TemplateVersionDeleteArgsSchema: z.ZodType = z.object({ + select: TemplateVersionSelectSchema.optional(), + include: TemplateVersionIncludeSchema.optional(), + where: TemplateVersionWhereUniqueInputSchema, +}).strict() ; + +export const TemplateVersionUpdateArgsSchema: z.ZodType = z.object({ + select: TemplateVersionSelectSchema.optional(), + include: TemplateVersionIncludeSchema.optional(), + data: z.union([ TemplateVersionUpdateInputSchema,TemplateVersionUncheckedUpdateInputSchema ]), + where: TemplateVersionWhereUniqueInputSchema, +}).strict() ; + +export const TemplateVersionUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateVersionUpdateManyMutationInputSchema,TemplateVersionUncheckedUpdateManyInputSchema ]), + where: TemplateVersionWhereInputSchema.optional(), +}).strict() ; + +export const TemplateVersionDeleteManyArgsSchema: z.ZodType = z.object({ + where: TemplateVersionWhereInputSchema.optional(), +}).strict() ; + +export const TemplateInstallationCreateArgsSchema: z.ZodType = z.object({ + select: TemplateInstallationSelectSchema.optional(), + include: TemplateInstallationIncludeSchema.optional(), + data: z.union([ TemplateInstallationCreateInputSchema,TemplateInstallationUncheckedCreateInputSchema ]), +}).strict() ; + +export const TemplateInstallationUpsertArgsSchema: z.ZodType = z.object({ + select: TemplateInstallationSelectSchema.optional(), + include: TemplateInstallationIncludeSchema.optional(), + where: TemplateInstallationWhereUniqueInputSchema, + create: z.union([ TemplateInstallationCreateInputSchema,TemplateInstallationUncheckedCreateInputSchema ]), + update: z.union([ TemplateInstallationUpdateInputSchema,TemplateInstallationUncheckedUpdateInputSchema ]), +}).strict() ; + +export const TemplateInstallationCreateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateInstallationCreateManyInputSchema,TemplateInstallationCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const TemplateInstallationCreateManyAndReturnArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateInstallationCreateManyInputSchema,TemplateInstallationCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const TemplateInstallationDeleteArgsSchema: z.ZodType = z.object({ + select: TemplateInstallationSelectSchema.optional(), + include: TemplateInstallationIncludeSchema.optional(), + where: TemplateInstallationWhereUniqueInputSchema, +}).strict() ; + +export const TemplateInstallationUpdateArgsSchema: z.ZodType = z.object({ + select: TemplateInstallationSelectSchema.optional(), + include: TemplateInstallationIncludeSchema.optional(), + data: z.union([ TemplateInstallationUpdateInputSchema,TemplateInstallationUncheckedUpdateInputSchema ]), + where: TemplateInstallationWhereUniqueInputSchema, +}).strict() ; + +export const TemplateInstallationUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateInstallationUpdateManyMutationInputSchema,TemplateInstallationUncheckedUpdateManyInputSchema ]), + where: TemplateInstallationWhereInputSchema.optional(), +}).strict() ; + +export const TemplateInstallationDeleteManyArgsSchema: z.ZodType = z.object({ + where: TemplateInstallationWhereInputSchema.optional(), +}).strict() ; + +export const TemplateInstallItemCreateArgsSchema: z.ZodType = z.object({ + select: TemplateInstallItemSelectSchema.optional(), + include: TemplateInstallItemIncludeSchema.optional(), + data: z.union([ TemplateInstallItemCreateInputSchema,TemplateInstallItemUncheckedCreateInputSchema ]), +}).strict() ; + +export const TemplateInstallItemUpsertArgsSchema: z.ZodType = z.object({ + select: TemplateInstallItemSelectSchema.optional(), + include: TemplateInstallItemIncludeSchema.optional(), + where: TemplateInstallItemWhereUniqueInputSchema, + create: z.union([ TemplateInstallItemCreateInputSchema,TemplateInstallItemUncheckedCreateInputSchema ]), + update: z.union([ TemplateInstallItemUpdateInputSchema,TemplateInstallItemUncheckedUpdateInputSchema ]), +}).strict() ; + +export const TemplateInstallItemCreateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateInstallItemCreateManyInputSchema,TemplateInstallItemCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const TemplateInstallItemCreateManyAndReturnArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateInstallItemCreateManyInputSchema,TemplateInstallItemCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const TemplateInstallItemDeleteArgsSchema: z.ZodType = z.object({ + select: TemplateInstallItemSelectSchema.optional(), + include: TemplateInstallItemIncludeSchema.optional(), + where: TemplateInstallItemWhereUniqueInputSchema, +}).strict() ; + +export const TemplateInstallItemUpdateArgsSchema: z.ZodType = z.object({ + select: TemplateInstallItemSelectSchema.optional(), + include: TemplateInstallItemIncludeSchema.optional(), + data: z.union([ TemplateInstallItemUpdateInputSchema,TemplateInstallItemUncheckedUpdateInputSchema ]), + where: TemplateInstallItemWhereUniqueInputSchema, +}).strict() ; + +export const TemplateInstallItemUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateInstallItemUpdateManyMutationInputSchema,TemplateInstallItemUncheckedUpdateManyInputSchema ]), + where: TemplateInstallItemWhereInputSchema.optional(), +}).strict() ; + +export const TemplateInstallItemDeleteManyArgsSchema: z.ZodType = z.object({ + where: TemplateInstallItemWhereInputSchema.optional(), +}).strict() ; + export const WorkflowCreateArgsSchema: z.ZodType = z.object({ select: WorkflowSelectSchema.optional(), include: WorkflowIncludeSchema.optional(), @@ -51097,6 +59605,52 @@ export const WorkflowDeleteManyArgsSchema: z.ZodType = z.object({ + select: OrganizationUiConfigSelectSchema.optional(), + include: OrganizationUiConfigIncludeSchema.optional(), + data: z.union([ OrganizationUiConfigCreateInputSchema,OrganizationUiConfigUncheckedCreateInputSchema ]), +}).strict() ; + +export const OrganizationUiConfigUpsertArgsSchema: z.ZodType = z.object({ + select: OrganizationUiConfigSelectSchema.optional(), + include: OrganizationUiConfigIncludeSchema.optional(), + where: OrganizationUiConfigWhereUniqueInputSchema, + create: z.union([ OrganizationUiConfigCreateInputSchema,OrganizationUiConfigUncheckedCreateInputSchema ]), + update: z.union([ OrganizationUiConfigUpdateInputSchema,OrganizationUiConfigUncheckedUpdateInputSchema ]), +}).strict() ; + +export const OrganizationUiConfigCreateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ OrganizationUiConfigCreateManyInputSchema,OrganizationUiConfigCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const OrganizationUiConfigCreateManyAndReturnArgsSchema: z.ZodType = z.object({ + data: z.union([ OrganizationUiConfigCreateManyInputSchema,OrganizationUiConfigCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const OrganizationUiConfigDeleteArgsSchema: z.ZodType = z.object({ + select: OrganizationUiConfigSelectSchema.optional(), + include: OrganizationUiConfigIncludeSchema.optional(), + where: OrganizationUiConfigWhereUniqueInputSchema, +}).strict() ; + +export const OrganizationUiConfigUpdateArgsSchema: z.ZodType = z.object({ + select: OrganizationUiConfigSelectSchema.optional(), + include: OrganizationUiConfigIncludeSchema.optional(), + data: z.union([ OrganizationUiConfigUpdateInputSchema,OrganizationUiConfigUncheckedUpdateInputSchema ]), + where: OrganizationUiConfigWhereUniqueInputSchema, +}).strict() ; + +export const OrganizationUiConfigUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ OrganizationUiConfigUpdateManyMutationInputSchema,OrganizationUiConfigUncheckedUpdateManyInputSchema ]), + where: OrganizationUiConfigWhereInputSchema.optional(), +}).strict() ; + +export const OrganizationUiConfigDeleteManyArgsSchema: z.ZodType = z.object({ + where: OrganizationUiConfigWhereInputSchema.optional(), +}).strict() ; + export const WorkflowTriggerCreateArgsSchema: z.ZodType = z.object({ select: WorkflowTriggerSelectSchema.optional(), include: WorkflowTriggerIncludeSchema.optional(), @@ -51969,4 +60523,188 @@ export const WorkflowAnalyticsUpdateManyArgsSchema: z.ZodType = z.object({ where: WorkflowAnalyticsWhereInputSchema.optional(), +}).strict() ; + +export const TemplateShareCreateArgsSchema: z.ZodType = z.object({ + select: TemplateShareSelectSchema.optional(), + include: TemplateShareIncludeSchema.optional(), + data: z.union([ TemplateShareCreateInputSchema,TemplateShareUncheckedCreateInputSchema ]), +}).strict() ; + +export const TemplateShareUpsertArgsSchema: z.ZodType = z.object({ + select: TemplateShareSelectSchema.optional(), + include: TemplateShareIncludeSchema.optional(), + where: TemplateShareWhereUniqueInputSchema, + create: z.union([ TemplateShareCreateInputSchema,TemplateShareUncheckedCreateInputSchema ]), + update: z.union([ TemplateShareUpdateInputSchema,TemplateShareUncheckedUpdateInputSchema ]), +}).strict() ; + +export const TemplateShareCreateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateShareCreateManyInputSchema,TemplateShareCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const TemplateShareCreateManyAndReturnArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateShareCreateManyInputSchema,TemplateShareCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const TemplateShareDeleteArgsSchema: z.ZodType = z.object({ + select: TemplateShareSelectSchema.optional(), + include: TemplateShareIncludeSchema.optional(), + where: TemplateShareWhereUniqueInputSchema, +}).strict() ; + +export const TemplateShareUpdateArgsSchema: z.ZodType = z.object({ + select: TemplateShareSelectSchema.optional(), + include: TemplateShareIncludeSchema.optional(), + data: z.union([ TemplateShareUpdateInputSchema,TemplateShareUncheckedUpdateInputSchema ]), + where: TemplateShareWhereUniqueInputSchema, +}).strict() ; + +export const TemplateShareUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateShareUpdateManyMutationInputSchema,TemplateShareUncheckedUpdateManyInputSchema ]), + where: TemplateShareWhereInputSchema.optional(), +}).strict() ; + +export const TemplateShareDeleteManyArgsSchema: z.ZodType = z.object({ + where: TemplateShareWhereInputSchema.optional(), +}).strict() ; + +export const TemplateShareRecipientCreateArgsSchema: z.ZodType = z.object({ + select: TemplateShareRecipientSelectSchema.optional(), + include: TemplateShareRecipientIncludeSchema.optional(), + data: z.union([ TemplateShareRecipientCreateInputSchema,TemplateShareRecipientUncheckedCreateInputSchema ]), +}).strict() ; + +export const TemplateShareRecipientUpsertArgsSchema: z.ZodType = z.object({ + select: TemplateShareRecipientSelectSchema.optional(), + include: TemplateShareRecipientIncludeSchema.optional(), + where: TemplateShareRecipientWhereUniqueInputSchema, + create: z.union([ TemplateShareRecipientCreateInputSchema,TemplateShareRecipientUncheckedCreateInputSchema ]), + update: z.union([ TemplateShareRecipientUpdateInputSchema,TemplateShareRecipientUncheckedUpdateInputSchema ]), +}).strict() ; + +export const TemplateShareRecipientCreateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateShareRecipientCreateManyInputSchema,TemplateShareRecipientCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const TemplateShareRecipientCreateManyAndReturnArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateShareRecipientCreateManyInputSchema,TemplateShareRecipientCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const TemplateShareRecipientDeleteArgsSchema: z.ZodType = z.object({ + select: TemplateShareRecipientSelectSchema.optional(), + include: TemplateShareRecipientIncludeSchema.optional(), + where: TemplateShareRecipientWhereUniqueInputSchema, +}).strict() ; + +export const TemplateShareRecipientUpdateArgsSchema: z.ZodType = z.object({ + select: TemplateShareRecipientSelectSchema.optional(), + include: TemplateShareRecipientIncludeSchema.optional(), + data: z.union([ TemplateShareRecipientUpdateInputSchema,TemplateShareRecipientUncheckedUpdateInputSchema ]), + where: TemplateShareRecipientWhereUniqueInputSchema, +}).strict() ; + +export const TemplateShareRecipientUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateShareRecipientUpdateManyMutationInputSchema,TemplateShareRecipientUncheckedUpdateManyInputSchema ]), + where: TemplateShareRecipientWhereInputSchema.optional(), +}).strict() ; + +export const TemplateShareRecipientDeleteManyArgsSchema: z.ZodType = z.object({ + where: TemplateShareRecipientWhereInputSchema.optional(), +}).strict() ; + +export const TemplateShareAccessLogCreateArgsSchema: z.ZodType = z.object({ + select: TemplateShareAccessLogSelectSchema.optional(), + include: TemplateShareAccessLogIncludeSchema.optional(), + data: z.union([ TemplateShareAccessLogCreateInputSchema,TemplateShareAccessLogUncheckedCreateInputSchema ]), +}).strict() ; + +export const TemplateShareAccessLogUpsertArgsSchema: z.ZodType = z.object({ + select: TemplateShareAccessLogSelectSchema.optional(), + include: TemplateShareAccessLogIncludeSchema.optional(), + where: TemplateShareAccessLogWhereUniqueInputSchema, + create: z.union([ TemplateShareAccessLogCreateInputSchema,TemplateShareAccessLogUncheckedCreateInputSchema ]), + update: z.union([ TemplateShareAccessLogUpdateInputSchema,TemplateShareAccessLogUncheckedUpdateInputSchema ]), +}).strict() ; + +export const TemplateShareAccessLogCreateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateShareAccessLogCreateManyInputSchema,TemplateShareAccessLogCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const TemplateShareAccessLogCreateManyAndReturnArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateShareAccessLogCreateManyInputSchema,TemplateShareAccessLogCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const TemplateShareAccessLogDeleteArgsSchema: z.ZodType = z.object({ + select: TemplateShareAccessLogSelectSchema.optional(), + include: TemplateShareAccessLogIncludeSchema.optional(), + where: TemplateShareAccessLogWhereUniqueInputSchema, +}).strict() ; + +export const TemplateShareAccessLogUpdateArgsSchema: z.ZodType = z.object({ + select: TemplateShareAccessLogSelectSchema.optional(), + include: TemplateShareAccessLogIncludeSchema.optional(), + data: z.union([ TemplateShareAccessLogUpdateInputSchema,TemplateShareAccessLogUncheckedUpdateInputSchema ]), + where: TemplateShareAccessLogWhereUniqueInputSchema, +}).strict() ; + +export const TemplateShareAccessLogUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateShareAccessLogUpdateManyMutationInputSchema,TemplateShareAccessLogUncheckedUpdateManyInputSchema ]), + where: TemplateShareAccessLogWhereInputSchema.optional(), +}).strict() ; + +export const TemplateShareAccessLogDeleteManyArgsSchema: z.ZodType = z.object({ + where: TemplateShareAccessLogWhereInputSchema.optional(), +}).strict() ; + +export const TemplateShareImportCreateArgsSchema: z.ZodType = z.object({ + select: TemplateShareImportSelectSchema.optional(), + include: TemplateShareImportIncludeSchema.optional(), + data: z.union([ TemplateShareImportCreateInputSchema,TemplateShareImportUncheckedCreateInputSchema ]), +}).strict() ; + +export const TemplateShareImportUpsertArgsSchema: z.ZodType = z.object({ + select: TemplateShareImportSelectSchema.optional(), + include: TemplateShareImportIncludeSchema.optional(), + where: TemplateShareImportWhereUniqueInputSchema, + create: z.union([ TemplateShareImportCreateInputSchema,TemplateShareImportUncheckedCreateInputSchema ]), + update: z.union([ TemplateShareImportUpdateInputSchema,TemplateShareImportUncheckedUpdateInputSchema ]), +}).strict() ; + +export const TemplateShareImportCreateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateShareImportCreateManyInputSchema,TemplateShareImportCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const TemplateShareImportCreateManyAndReturnArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateShareImportCreateManyInputSchema,TemplateShareImportCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const TemplateShareImportDeleteArgsSchema: z.ZodType = z.object({ + select: TemplateShareImportSelectSchema.optional(), + include: TemplateShareImportIncludeSchema.optional(), + where: TemplateShareImportWhereUniqueInputSchema, +}).strict() ; + +export const TemplateShareImportUpdateArgsSchema: z.ZodType = z.object({ + select: TemplateShareImportSelectSchema.optional(), + include: TemplateShareImportIncludeSchema.optional(), + data: z.union([ TemplateShareImportUpdateInputSchema,TemplateShareImportUncheckedUpdateInputSchema ]), + where: TemplateShareImportWhereUniqueInputSchema, +}).strict() ; + +export const TemplateShareImportUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ TemplateShareImportUpdateManyMutationInputSchema,TemplateShareImportUncheckedUpdateManyInputSchema ]), + where: TemplateShareImportWhereInputSchema.optional(), +}).strict() ; + +export const TemplateShareImportDeleteManyArgsSchema: z.ZodType = z.object({ + where: TemplateShareImportWhereInputSchema.optional(), }).strict() ; \ No newline at end of file diff --git a/prisma/migrations/20250918100958_add_template_models/migration.sql b/prisma/migrations/20250918100958_add_template_models/migration.sql new file mode 100644 index 0000000..be1fcd9 --- /dev/null +++ b/prisma/migrations/20250918100958_add_template_models/migration.sql @@ -0,0 +1,958 @@ +-- CreateEnum +CREATE TYPE "TemplateVisibility" AS ENUM ('PRIVATE', 'UNLISTED', 'PUBLIC'); + +-- CreateEnum +CREATE TYPE "TemplateStatus" AS ENUM ('DRAFT', 'PUBLISHED', 'ARCHIVED'); + +-- CreateEnum +CREATE TYPE "TemplateInstallStatus" AS ENUM ('PENDING', 'RUNNING', 'COMPLETED', 'FAILED'); + +-- CreateEnum +CREATE TYPE "TemplateInstallStrategy" AS ENUM ('MERGE', 'OVERWRITE', 'PREFIX'); + +-- CreateEnum +CREATE TYPE "TemplateAssetType" AS ENUM ('WORKFLOW', 'REPORT', 'UILAYOUT', 'ROLE', 'VARIABLE', 'ACTION_TEMPLATE', 'DATA_SEED', 'PROJECT', 'INVOICE'); + +-- CreateEnum +CREATE TYPE "TemplateItemStatus" AS ENUM ('CREATED', 'SKIPPED', 'UPDATED', 'FAILED'); + +-- CreateEnum +CREATE TYPE "WorkflowStatus" AS ENUM ('DRAFT', 'INACTIVE', 'ACTIVE', 'PAUSED', 'ARCHIVED', 'ERROR'); + +-- CreateEnum +CREATE TYPE "WorkflowTriggerType" AS ENUM ('CONTACT_CREATED', 'CONTACT_UPDATED', 'DEAL_CREATED', 'DEAL_STATUS_CHANGED', 'EMPLOYEE_CREATED', 'EMPLOYEE_UPDATED', 'EMPLOYEE_STATUS_CHANGED', 'TIME_OFF_REQUESTED', 'INVOICE_CREATED', 'INVOICE_STATUS_CHANGED', 'EXPENSE_CREATED', 'PAYMENT_STATUS_CHANGED', 'PROJECT_CREATED', 'PROJECT_UPDATED', 'TASK_CREATED', 'TASK_STATUS_CHANGED', 'RECORD_CREATED', 'RECORD_UPDATED', 'RECORD_DELETED', 'STATUS_CHANGED', 'FORM_SUBMITTED'); + +-- CreateEnum +CREATE TYPE "WorkflowNodeType" AS ENUM ('TRIGGER', 'ACTION', 'CONDITION', 'DELAY', 'PARALLEL', 'LOOP', 'SWITCH', 'APPROVAL', 'EMAIL', 'SMS', 'WHATSAPP', 'SLACK', 'CALENDAR', 'DATA_TRANSFORM', 'NOTIFICATION', 'CUSTOM'); + +-- CreateEnum +CREATE TYPE "DependencyType" AS ENUM ('SUCCESS', 'FAILURE', 'COMPLETION'); + +-- CreateEnum +CREATE TYPE "ActionTemplateCategory" AS ENUM ('COMMUNICATION', 'NOTIFICATION', 'DATA_PROCESSING', 'INTEGRATION', 'APPROVAL', 'REPORTING', 'AUTOMATION', 'CUSTOM'); + +-- CreateEnum +CREATE TYPE "VariableDataType" AS ENUM ('STRING', 'NUMBER', 'BOOLEAN', 'DATE', 'DATETIME', 'EMAIL', 'PHONE', 'URL', 'JSON', 'ARRAY'); + +-- CreateEnum +CREATE TYPE "VariableScope" AS ENUM ('GLOBAL', 'ORGANIZATION', 'MODULE', 'WORKFLOW', 'TRIGGER'); + +-- CreateEnum +CREATE TYPE "WorkflowExecutionStatus" AS ENUM ('PENDING', 'RUNNING', 'PAUSED', 'COMPLETED', 'FAILED', 'CANCELLED', 'TIMEOUT'); + +-- CreateEnum +CREATE TYPE "ExecutionPriority" AS ENUM ('LOW', 'NORMAL', 'HIGH', 'URGENT'); + +-- CreateEnum +CREATE TYPE "NodeExecutionStatus" AS ENUM ('PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'SKIPPED', 'CANCELLED', 'TIMEOUT'); + +-- CreateEnum +CREATE TYPE "LogLevel" AS ENUM ('DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL'); + +-- CreateEnum +CREATE TYPE "WhatsAppMessageType" AS ENUM ('TEXT', 'TEMPLATE', 'IMAGE', 'VIDEO', 'AUDIO', 'DOCUMENT', 'LOCATION', 'CONTACT'); + +-- CreateEnum +CREATE TYPE "IntegrationType" AS ENUM ('EMAIL_SMTP', 'EMAIL_SENDGRID', 'EMAIL_MAILGUN', 'EMAIL_RESEND', 'EMAIL_POSTMARK', 'SMS_TWILIO', 'SMS_AWS_SNS', 'SMS_NEXMO', 'SMS_MESSAGEBIRD', 'WHATSAPP_BUSINESS', 'WHATSAPP_TWILIO', 'SLACK', 'GOOGLE_CALENDAR', 'OUTLOOK_CALENDAR', 'APPLE_CALENDAR'); + +-- CreateTable +CREATE TABLE "TemplatePackage" ( + "id" TEXT NOT NULL, + "organizationId" TEXT, + "name" TEXT NOT NULL, + "description" TEXT, + "category" TEXT, + "version" TEXT NOT NULL, + "visibility" "TemplateVisibility" NOT NULL DEFAULT 'PRIVATE', + "status" "TemplateStatus" NOT NULL DEFAULT 'DRAFT', + "iconUrl" TEXT, + "tags" JSONB, + "manifest" JSONB NOT NULL, + "assetsCount" INTEGER NOT NULL DEFAULT 0, + "sizeBytes" INTEGER, + "createdById" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "TemplatePackage_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "TemplateVersion" ( + "id" TEXT NOT NULL, + "templatePackageId" TEXT NOT NULL, + "version" TEXT NOT NULL, + "manifest" JSONB NOT NULL, + "changelog" TEXT, + "isActive" BOOLEAN NOT NULL DEFAULT false, + "createdById" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "TemplateVersion_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "TemplateInstallation" ( + "id" TEXT NOT NULL, + "organizationId" TEXT NOT NULL, + "templatePackageId" TEXT NOT NULL, + "templateVersionId" TEXT, + "status" "TemplateInstallStatus" NOT NULL DEFAULT 'PENDING', + "strategy" "TemplateInstallStrategy" NOT NULL DEFAULT 'MERGE', + "namePrefix" TEXT, + "preflight" JSONB, + "logs" JSONB, + "error" TEXT, + "createdById" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "completedAt" TIMESTAMP(3), + + CONSTRAINT "TemplateInstallation_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "TemplateInstallItem" ( + "id" TEXT NOT NULL, + "installationId" TEXT NOT NULL, + "assetType" "TemplateAssetType" NOT NULL, + "sourceKey" TEXT NOT NULL, + "createdModel" TEXT, + "createdId" TEXT, + "status" "TemplateItemStatus" NOT NULL DEFAULT 'CREATED', + "details" JSONB, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "TemplateInstallItem_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Workflow" ( + "id" TEXT NOT NULL, + "organizationId" TEXT NOT NULL, + "name" TEXT NOT NULL, + "description" TEXT, + "version" INTEGER NOT NULL DEFAULT 1, + "status" "WorkflowStatus" NOT NULL DEFAULT 'INACTIVE', + "isTemplate" BOOLEAN NOT NULL DEFAULT false, + "category" TEXT, + "canvasData" JSONB, + "retryConfig" JSONB, + "timeoutConfig" JSONB, + "totalExecutions" INTEGER NOT NULL DEFAULT 0, + "successfulExecutions" INTEGER NOT NULL DEFAULT 0, + "failedExecutions" INTEGER NOT NULL DEFAULT 0, + "lastExecutedAt" TIMESTAMP(3), + "createdById" TEXT NOT NULL, + "updatedById" TEXT, + "publishedAt" TIMESTAMP(3), + "publishedById" TEXT, + "archivedAt" TIMESTAMP(3), + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "Workflow_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "OrganizationUiConfig" ( + "id" TEXT NOT NULL, + "organizationId" TEXT NOT NULL, + "key" TEXT NOT NULL, + "config" JSONB NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "OrganizationUiConfig_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "WorkflowTrigger" ( + "id" TEXT NOT NULL, + "workflowId" TEXT NOT NULL, + "nodeId" TEXT, + "name" TEXT NOT NULL, + "description" TEXT, + "type" "WorkflowTriggerType" NOT NULL, + "module" TEXT NOT NULL, + "entityType" TEXT, + "eventType" TEXT NOT NULL, + "conditions" JSONB, + "delay" INTEGER, + "isActive" BOOLEAN NOT NULL DEFAULT true, + "lastTriggered" TIMESTAMP(3), + "triggerCount" INTEGER NOT NULL DEFAULT 0, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "WorkflowTrigger_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "WorkflowNode" ( + "id" TEXT NOT NULL, + "workflowId" TEXT NOT NULL, + "nodeId" TEXT NOT NULL, + "type" "WorkflowNodeType" NOT NULL, + "name" TEXT NOT NULL, + "description" TEXT, + "position" JSONB NOT NULL, + "config" JSONB, + "template" JSONB, + "executionOrder" INTEGER, + "isOptional" BOOLEAN NOT NULL DEFAULT false, + "retryLimit" INTEGER NOT NULL DEFAULT 3, + "timeout" INTEGER, + "conditions" JSONB, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "WorkflowNode_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "WorkflowConnection" ( + "id" TEXT NOT NULL, + "workflowId" TEXT NOT NULL, + "sourceNodeId" TEXT NOT NULL, + "targetNodeId" TEXT NOT NULL, + "executionOrder" INTEGER NOT NULL DEFAULT 1, + "label" TEXT, + "conditions" JSONB, + "edgeId" TEXT, + "sourceHandle" TEXT, + "targetHandle" TEXT, + "style" JSONB, + "animated" BOOLEAN NOT NULL DEFAULT false, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "WorkflowConnection_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "NodeDependency" ( + "id" TEXT NOT NULL, + "dependentNodeId" TEXT NOT NULL, + "prerequisiteNodeId" TEXT NOT NULL, + "dependencyType" "DependencyType" NOT NULL DEFAULT 'SUCCESS', + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "NodeDependency_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "ActionTemplate" ( + "id" TEXT NOT NULL, + "organizationId" TEXT, + "name" TEXT NOT NULL, + "description" TEXT, + "category" "ActionTemplateCategory" NOT NULL, + "type" "WorkflowNodeType" NOT NULL, + "template" JSONB NOT NULL, + "defaultConfig" JSONB, + "schema" JSONB, + "version" TEXT NOT NULL DEFAULT '1.0.0', + "isPublic" BOOLEAN NOT NULL DEFAULT false, + "isActive" BOOLEAN NOT NULL DEFAULT true, + "usageCount" INTEGER NOT NULL DEFAULT 0, + "isLocked" BOOLEAN NOT NULL DEFAULT false, + "requiredVariables" JSONB, + "optionalVariables" JSONB, + "createdById" TEXT, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "ActionTemplate_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "ActionTemplateVersion" ( + "id" TEXT NOT NULL, + "templateId" TEXT NOT NULL, + "version" TEXT NOT NULL, + "template" JSONB NOT NULL, + "changes" TEXT, + "isActive" BOOLEAN NOT NULL DEFAULT false, + "createdById" TEXT, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "ActionTemplateVersion_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "VariableDefinition" ( + "id" TEXT NOT NULL, + "organizationId" TEXT, + "name" TEXT NOT NULL, + "displayName" TEXT NOT NULL, + "description" TEXT, + "category" TEXT NOT NULL, + "dataType" "VariableDataType" NOT NULL, + "defaultValue" TEXT, + "validation" JSONB, + "formatting" JSONB, + "isRequired" BOOLEAN NOT NULL DEFAULT false, + "isCustom" BOOLEAN NOT NULL DEFAULT false, + "scope" "VariableScope" NOT NULL DEFAULT 'ORGANIZATION', + "moduleScope" TEXT, + "createdById" TEXT, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "VariableDefinition_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "TriggerVariable" ( + "id" TEXT NOT NULL, + "triggerId" TEXT NOT NULL, + "variableId" TEXT NOT NULL, + "mapping" JSONB, + "isRequired" BOOLEAN NOT NULL DEFAULT false, + "defaultValue" TEXT, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "TriggerVariable_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "WorkflowExecution" ( + "id" TEXT NOT NULL, + "workflowId" TEXT NOT NULL, + "triggerId" TEXT, + "executionId" TEXT NOT NULL, + "status" "WorkflowExecutionStatus" NOT NULL DEFAULT 'PENDING', + "priority" "ExecutionPriority" NOT NULL DEFAULT 'NORMAL', + "triggerData" JSONB, + "triggerContext" JSONB, + "currentNodeId" TEXT, + "progress" DOUBLE PRECISION NOT NULL DEFAULT 0, + "startedAt" TIMESTAMP(3), + "completedAt" TIMESTAMP(3), + "failedAt" TIMESTAMP(3), + "duration" INTEGER, + "result" JSONB, + "error" TEXT, + "errorDetails" JSONB, + "retryCount" INTEGER NOT NULL DEFAULT 0, + "maxRetries" INTEGER NOT NULL DEFAULT 3, + "retryDelay" INTEGER NOT NULL DEFAULT 60, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "WorkflowExecution_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "NodeExecution" ( + "id" TEXT NOT NULL, + "workflowExecutionId" TEXT NOT NULL, + "nodeId" TEXT NOT NULL, + "executionOrder" INTEGER NOT NULL, + "status" "NodeExecutionStatus" NOT NULL DEFAULT 'PENDING', + "startedAt" TIMESTAMP(3), + "completedAt" TIMESTAMP(3), + "duration" INTEGER, + "input" JSONB, + "output" JSONB, + "transformedData" JSONB, + "error" TEXT, + "errorDetails" JSONB, + "retryCount" INTEGER NOT NULL DEFAULT 0, + "maxRetries" INTEGER NOT NULL DEFAULT 3, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "NodeExecution_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "ExecutionVariable" ( + "id" TEXT NOT NULL, + "workflowExecutionId" TEXT NOT NULL, + "variableDefinitionId" TEXT, + "name" TEXT NOT NULL, + "value" TEXT, + "resolvedValue" TEXT, + "dataType" "VariableDataType" NOT NULL, + "source" TEXT, + "nodeId" TEXT, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "ExecutionVariable_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "ExecutionLog" ( + "id" TEXT NOT NULL, + "workflowExecutionId" TEXT NOT NULL, + "nodeId" TEXT, + "level" "LogLevel" NOT NULL, + "message" TEXT NOT NULL, + "details" JSONB, + "timestamp" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "source" TEXT, + "category" TEXT, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "ExecutionLog_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "IntegrationConfig" ( + "id" TEXT NOT NULL, + "organizationId" TEXT NOT NULL, + "name" TEXT NOT NULL, + "type" "IntegrationType" NOT NULL, + "config" JSONB NOT NULL, + "credentials" JSONB, + "endpoints" JSONB, + "isActive" BOOLEAN NOT NULL DEFAULT true, + "isHealthy" BOOLEAN NOT NULL DEFAULT true, + "lastHealthCheck" TIMESTAMP(3), + "healthDetails" JSONB, + "requestCount" INTEGER NOT NULL DEFAULT 0, + "errorCount" INTEGER NOT NULL DEFAULT 0, + "lastUsedAt" TIMESTAMP(3), + "createdById" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "IntegrationConfig_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "EmailAction" ( + "id" TEXT NOT NULL, + "actionId" TEXT NOT NULL, + "integrationId" TEXT, + "fromName" TEXT, + "fromEmail" TEXT, + "replyTo" TEXT, + "ccEmails" JSONB, + "bccEmails" JSONB, + "subject" TEXT NOT NULL, + "htmlBody" TEXT, + "textBody" TEXT, + "templateId" TEXT, + "attachments" JSONB, + "trackOpens" BOOLEAN NOT NULL DEFAULT false, + "trackClicks" BOOLEAN NOT NULL DEFAULT false, + "variables" JSONB, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "EmailAction_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "SmsAction" ( + "id" TEXT NOT NULL, + "actionId" TEXT NOT NULL, + "integrationId" TEXT, + "fromNumber" TEXT, + "message" TEXT NOT NULL, + "templateId" TEXT, + "maxLength" INTEGER DEFAULT 160, + "unicode" BOOLEAN NOT NULL DEFAULT false, + "variables" JSONB, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "SmsAction_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "WhatsAppAction" ( + "id" TEXT NOT NULL, + "actionId" TEXT NOT NULL, + "integrationId" TEXT, + "businessAccountId" TEXT, + "toNumbers" JSONB NOT NULL, + "messageType" "WhatsAppMessageType" NOT NULL DEFAULT 'TEXT', + "textMessage" TEXT, + "templateName" TEXT, + "templateLanguage" TEXT, + "mediaUrl" TEXT, + "mediaType" TEXT, + "caption" TEXT, + "templateParams" JSONB, + "variables" JSONB, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "WhatsAppAction_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "SlackAction" ( + "id" TEXT NOT NULL, + "actionId" TEXT NOT NULL, + "integrationId" TEXT, + "workspaceId" TEXT, + "channel" TEXT, + "userId" TEXT, + "message" TEXT NOT NULL, + "blocks" JSONB, + "attachments" JSONB, + "asUser" BOOLEAN NOT NULL DEFAULT false, + "username" TEXT, + "iconEmoji" TEXT, + "iconUrl" TEXT, + "threadTs" TEXT, + "replyBroadcast" BOOLEAN NOT NULL DEFAULT false, + "variables" JSONB, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "SlackAction_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "CalendarAction" ( + "id" TEXT NOT NULL, + "actionId" TEXT NOT NULL, + "integrationId" TEXT, + "calendarId" TEXT, + "title" TEXT NOT NULL, + "description" TEXT, + "location" TEXT, + "startTime" TEXT NOT NULL, + "endTime" TEXT NOT NULL, + "isAllDay" BOOLEAN NOT NULL DEFAULT false, + "timezone" TEXT NOT NULL DEFAULT 'UTC', + "attendees" JSONB, + "organizer" TEXT, + "reminders" JSONB, + "recurrence" JSONB, + "variables" JSONB, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "CalendarAction_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "WorkflowAnalytics" ( + "id" TEXT NOT NULL, + "workflowId" TEXT NOT NULL, + "periodStart" TIMESTAMP(3) NOT NULL, + "periodEnd" TIMESTAMP(3) NOT NULL, + "granularity" TEXT NOT NULL DEFAULT 'daily', + "totalExecutions" INTEGER NOT NULL DEFAULT 0, + "successfulExecutions" INTEGER NOT NULL DEFAULT 0, + "failedExecutions" INTEGER NOT NULL DEFAULT 0, + "averageDuration" DOUBLE PRECISION, + "minDuration" INTEGER, + "maxDuration" INTEGER, + "p95Duration" INTEGER, + "commonErrors" JSONB, + "errorRate" DOUBLE PRECISION, + "avgCpuUsage" DOUBLE PRECISION, + "avgMemoryUsage" DOUBLE PRECISION, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "WorkflowAnalytics_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE INDEX "TemplatePackage_organizationId_idx" ON "TemplatePackage"("organizationId"); + +-- CreateIndex +CREATE INDEX "TemplatePackage_visibility_idx" ON "TemplatePackage"("visibility"); + +-- CreateIndex +CREATE INDEX "TemplatePackage_status_idx" ON "TemplatePackage"("status"); + +-- CreateIndex +CREATE INDEX "TemplatePackage_category_idx" ON "TemplatePackage"("category"); + +-- CreateIndex +CREATE INDEX "TemplatePackage_createdById_idx" ON "TemplatePackage"("createdById"); + +-- CreateIndex +CREATE INDEX "TemplateVersion_templatePackageId_idx" ON "TemplateVersion"("templatePackageId"); + +-- CreateIndex +CREATE INDEX "TemplateVersion_isActive_idx" ON "TemplateVersion"("isActive"); + +-- CreateIndex +CREATE INDEX "TemplateVersion_createdById_idx" ON "TemplateVersion"("createdById"); + +-- CreateIndex +CREATE UNIQUE INDEX "TemplateVersion_templatePackageId_version_key" ON "TemplateVersion"("templatePackageId", "version"); + +-- CreateIndex +CREATE INDEX "TemplateInstallation_organizationId_idx" ON "TemplateInstallation"("organizationId"); + +-- CreateIndex +CREATE INDEX "TemplateInstallation_templatePackageId_idx" ON "TemplateInstallation"("templatePackageId"); + +-- CreateIndex +CREATE INDEX "TemplateInstallation_templateVersionId_idx" ON "TemplateInstallation"("templateVersionId"); + +-- CreateIndex +CREATE INDEX "TemplateInstallation_status_idx" ON "TemplateInstallation"("status"); + +-- CreateIndex +CREATE INDEX "TemplateInstallation_createdById_idx" ON "TemplateInstallation"("createdById"); + +-- CreateIndex +CREATE INDEX "TemplateInstallItem_installationId_idx" ON "TemplateInstallItem"("installationId"); + +-- CreateIndex +CREATE INDEX "TemplateInstallItem_assetType_idx" ON "TemplateInstallItem"("assetType"); + +-- CreateIndex +CREATE INDEX "TemplateInstallItem_status_idx" ON "TemplateInstallItem"("status"); + +-- CreateIndex +CREATE INDEX "Workflow_organizationId_idx" ON "Workflow"("organizationId"); + +-- CreateIndex +CREATE INDEX "Workflow_status_idx" ON "Workflow"("status"); + +-- CreateIndex +CREATE INDEX "Workflow_category_idx" ON "Workflow"("category"); + +-- CreateIndex +CREATE INDEX "Workflow_createdById_idx" ON "Workflow"("createdById"); + +-- CreateIndex +CREATE UNIQUE INDEX "Workflow_organizationId_name_version_key" ON "Workflow"("organizationId", "name", "version"); + +-- CreateIndex +CREATE INDEX "OrganizationUiConfig_organizationId_idx" ON "OrganizationUiConfig"("organizationId"); + +-- CreateIndex +CREATE UNIQUE INDEX "OrganizationUiConfig_organizationId_key_key" ON "OrganizationUiConfig"("organizationId", "key"); + +-- CreateIndex +CREATE INDEX "WorkflowTrigger_workflowId_idx" ON "WorkflowTrigger"("workflowId"); + +-- CreateIndex +CREATE INDEX "WorkflowTrigger_type_idx" ON "WorkflowTrigger"("type"); + +-- CreateIndex +CREATE INDEX "WorkflowTrigger_module_idx" ON "WorkflowTrigger"("module"); + +-- CreateIndex +CREATE INDEX "WorkflowTrigger_entityType_idx" ON "WorkflowTrigger"("entityType"); + +-- CreateIndex +CREATE INDEX "WorkflowTrigger_nodeId_idx" ON "WorkflowTrigger"("nodeId"); + +-- CreateIndex +CREATE UNIQUE INDEX "WorkflowTrigger_nodeId_workflowId_key" ON "WorkflowTrigger"("nodeId", "workflowId"); + +-- CreateIndex +CREATE INDEX "WorkflowNode_workflowId_idx" ON "WorkflowNode"("workflowId"); + +-- CreateIndex +CREATE INDEX "WorkflowNode_type_idx" ON "WorkflowNode"("type"); + +-- CreateIndex +CREATE INDEX "WorkflowNode_nodeId_idx" ON "WorkflowNode"("nodeId"); + +-- CreateIndex +CREATE UNIQUE INDEX "WorkflowNode_workflowId_nodeId_key" ON "WorkflowNode"("workflowId", "nodeId"); + +-- CreateIndex +CREATE INDEX "WorkflowConnection_workflowId_idx" ON "WorkflowConnection"("workflowId"); + +-- CreateIndex +CREATE INDEX "WorkflowConnection_sourceNodeId_idx" ON "WorkflowConnection"("sourceNodeId"); + +-- CreateIndex +CREATE INDEX "WorkflowConnection_targetNodeId_idx" ON "WorkflowConnection"("targetNodeId"); + +-- CreateIndex +CREATE INDEX "WorkflowConnection_sourceNodeId_executionOrder_idx" ON "WorkflowConnection"("sourceNodeId", "executionOrder"); + +-- CreateIndex +CREATE UNIQUE INDEX "WorkflowConnection_sourceNodeId_targetNodeId_key" ON "WorkflowConnection"("sourceNodeId", "targetNodeId"); + +-- CreateIndex +CREATE UNIQUE INDEX "WorkflowConnection_workflowId_edgeId_key" ON "WorkflowConnection"("workflowId", "edgeId"); + +-- CreateIndex +CREATE INDEX "NodeDependency_dependentNodeId_idx" ON "NodeDependency"("dependentNodeId"); + +-- CreateIndex +CREATE INDEX "NodeDependency_prerequisiteNodeId_idx" ON "NodeDependency"("prerequisiteNodeId"); + +-- CreateIndex +CREATE UNIQUE INDEX "NodeDependency_dependentNodeId_prerequisiteNodeId_key" ON "NodeDependency"("dependentNodeId", "prerequisiteNodeId"); + +-- CreateIndex +CREATE INDEX "ActionTemplate_organizationId_idx" ON "ActionTemplate"("organizationId"); + +-- CreateIndex +CREATE INDEX "ActionTemplate_category_idx" ON "ActionTemplate"("category"); + +-- CreateIndex +CREATE INDEX "ActionTemplate_type_idx" ON "ActionTemplate"("type"); + +-- CreateIndex +CREATE INDEX "ActionTemplate_isActive_idx" ON "ActionTemplate"("isActive"); + +-- CreateIndex +CREATE INDEX "ActionTemplateVersion_templateId_idx" ON "ActionTemplateVersion"("templateId"); + +-- CreateIndex +CREATE INDEX "ActionTemplateVersion_version_idx" ON "ActionTemplateVersion"("version"); + +-- CreateIndex +CREATE UNIQUE INDEX "ActionTemplateVersion_templateId_version_key" ON "ActionTemplateVersion"("templateId", "version"); + +-- CreateIndex +CREATE INDEX "VariableDefinition_organizationId_idx" ON "VariableDefinition"("organizationId"); + +-- CreateIndex +CREATE INDEX "VariableDefinition_category_idx" ON "VariableDefinition"("category"); + +-- CreateIndex +CREATE INDEX "VariableDefinition_scope_idx" ON "VariableDefinition"("scope"); + +-- CreateIndex +CREATE INDEX "VariableDefinition_moduleScope_idx" ON "VariableDefinition"("moduleScope"); + +-- CreateIndex +CREATE UNIQUE INDEX "VariableDefinition_organizationId_name_key" ON "VariableDefinition"("organizationId", "name"); + +-- CreateIndex +CREATE INDEX "TriggerVariable_triggerId_idx" ON "TriggerVariable"("triggerId"); + +-- CreateIndex +CREATE INDEX "TriggerVariable_variableId_idx" ON "TriggerVariable"("variableId"); + +-- CreateIndex +CREATE UNIQUE INDEX "TriggerVariable_triggerId_variableId_key" ON "TriggerVariable"("triggerId", "variableId"); + +-- CreateIndex +CREATE UNIQUE INDEX "WorkflowExecution_executionId_key" ON "WorkflowExecution"("executionId"); + +-- CreateIndex +CREATE INDEX "WorkflowExecution_workflowId_idx" ON "WorkflowExecution"("workflowId"); + +-- CreateIndex +CREATE INDEX "WorkflowExecution_triggerId_idx" ON "WorkflowExecution"("triggerId"); + +-- CreateIndex +CREATE INDEX "WorkflowExecution_status_idx" ON "WorkflowExecution"("status"); + +-- CreateIndex +CREATE INDEX "WorkflowExecution_startedAt_idx" ON "WorkflowExecution"("startedAt"); + +-- CreateIndex +CREATE INDEX "WorkflowExecution_executionId_idx" ON "WorkflowExecution"("executionId"); + +-- CreateIndex +CREATE INDEX "NodeExecution_workflowExecutionId_idx" ON "NodeExecution"("workflowExecutionId"); + +-- CreateIndex +CREATE INDEX "NodeExecution_nodeId_idx" ON "NodeExecution"("nodeId"); + +-- CreateIndex +CREATE INDEX "NodeExecution_status_idx" ON "NodeExecution"("status"); + +-- CreateIndex +CREATE INDEX "NodeExecution_executionOrder_idx" ON "NodeExecution"("executionOrder"); + +-- CreateIndex +CREATE INDEX "ExecutionVariable_workflowExecutionId_idx" ON "ExecutionVariable"("workflowExecutionId"); + +-- CreateIndex +CREATE INDEX "ExecutionVariable_variableDefinitionId_idx" ON "ExecutionVariable"("variableDefinitionId"); + +-- CreateIndex +CREATE INDEX "ExecutionVariable_name_idx" ON "ExecutionVariable"("name"); + +-- CreateIndex +CREATE INDEX "ExecutionLog_workflowExecutionId_idx" ON "ExecutionLog"("workflowExecutionId"); + +-- CreateIndex +CREATE INDEX "ExecutionLog_nodeId_idx" ON "ExecutionLog"("nodeId"); + +-- CreateIndex +CREATE INDEX "ExecutionLog_level_idx" ON "ExecutionLog"("level"); + +-- CreateIndex +CREATE INDEX "ExecutionLog_timestamp_idx" ON "ExecutionLog"("timestamp"); + +-- CreateIndex +CREATE INDEX "IntegrationConfig_organizationId_idx" ON "IntegrationConfig"("organizationId"); + +-- CreateIndex +CREATE INDEX "IntegrationConfig_type_idx" ON "IntegrationConfig"("type"); + +-- CreateIndex +CREATE INDEX "IntegrationConfig_isActive_idx" ON "IntegrationConfig"("isActive"); + +-- CreateIndex +CREATE UNIQUE INDEX "IntegrationConfig_organizationId_name_key" ON "IntegrationConfig"("organizationId", "name"); + +-- CreateIndex +CREATE UNIQUE INDEX "EmailAction_actionId_key" ON "EmailAction"("actionId"); + +-- CreateIndex +CREATE INDEX "EmailAction_actionId_idx" ON "EmailAction"("actionId"); + +-- CreateIndex +CREATE INDEX "EmailAction_integrationId_idx" ON "EmailAction"("integrationId"); + +-- CreateIndex +CREATE UNIQUE INDEX "SmsAction_actionId_key" ON "SmsAction"("actionId"); + +-- CreateIndex +CREATE INDEX "SmsAction_actionId_idx" ON "SmsAction"("actionId"); + +-- CreateIndex +CREATE INDEX "SmsAction_integrationId_idx" ON "SmsAction"("integrationId"); + +-- CreateIndex +CREATE UNIQUE INDEX "WhatsAppAction_actionId_key" ON "WhatsAppAction"("actionId"); + +-- CreateIndex +CREATE INDEX "WhatsAppAction_actionId_idx" ON "WhatsAppAction"("actionId"); + +-- CreateIndex +CREATE INDEX "WhatsAppAction_integrationId_idx" ON "WhatsAppAction"("integrationId"); + +-- CreateIndex +CREATE UNIQUE INDEX "SlackAction_actionId_key" ON "SlackAction"("actionId"); + +-- CreateIndex +CREATE INDEX "SlackAction_actionId_idx" ON "SlackAction"("actionId"); + +-- CreateIndex +CREATE INDEX "SlackAction_integrationId_idx" ON "SlackAction"("integrationId"); + +-- CreateIndex +CREATE UNIQUE INDEX "CalendarAction_actionId_key" ON "CalendarAction"("actionId"); + +-- CreateIndex +CREATE INDEX "CalendarAction_actionId_idx" ON "CalendarAction"("actionId"); + +-- CreateIndex +CREATE INDEX "CalendarAction_integrationId_idx" ON "CalendarAction"("integrationId"); + +-- CreateIndex +CREATE INDEX "WorkflowAnalytics_workflowId_idx" ON "WorkflowAnalytics"("workflowId"); + +-- CreateIndex +CREATE INDEX "WorkflowAnalytics_periodStart_idx" ON "WorkflowAnalytics"("periodStart"); + +-- CreateIndex +CREATE INDEX "WorkflowAnalytics_granularity_idx" ON "WorkflowAnalytics"("granularity"); + +-- CreateIndex +CREATE UNIQUE INDEX "WorkflowAnalytics_workflowId_periodStart_granularity_key" ON "WorkflowAnalytics"("workflowId", "periodStart", "granularity"); + +-- AddForeignKey +ALTER TABLE "TemplatePackage" ADD CONSTRAINT "TemplatePackage_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "Organization"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "TemplateVersion" ADD CONSTRAINT "TemplateVersion_templatePackageId_fkey" FOREIGN KEY ("templatePackageId") REFERENCES "TemplatePackage"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "TemplateInstallation" ADD CONSTRAINT "TemplateInstallation_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "Organization"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "TemplateInstallation" ADD CONSTRAINT "TemplateInstallation_templatePackageId_fkey" FOREIGN KEY ("templatePackageId") REFERENCES "TemplatePackage"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "TemplateInstallation" ADD CONSTRAINT "TemplateInstallation_templateVersionId_fkey" FOREIGN KEY ("templateVersionId") REFERENCES "TemplateVersion"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "TemplateInstallItem" ADD CONSTRAINT "TemplateInstallItem_installationId_fkey" FOREIGN KEY ("installationId") REFERENCES "TemplateInstallation"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Workflow" ADD CONSTRAINT "Workflow_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "Organization"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "OrganizationUiConfig" ADD CONSTRAINT "OrganizationUiConfig_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "Organization"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "WorkflowTrigger" ADD CONSTRAINT "WorkflowTrigger_workflowId_fkey" FOREIGN KEY ("workflowId") REFERENCES "Workflow"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "WorkflowTrigger" ADD CONSTRAINT "WorkflowTrigger_nodeId_workflowId_fkey" FOREIGN KEY ("nodeId", "workflowId") REFERENCES "WorkflowNode"("nodeId", "workflowId") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "WorkflowNode" ADD CONSTRAINT "WorkflowNode_workflowId_fkey" FOREIGN KEY ("workflowId") REFERENCES "Workflow"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "WorkflowConnection" ADD CONSTRAINT "WorkflowConnection_workflowId_fkey" FOREIGN KEY ("workflowId") REFERENCES "Workflow"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "WorkflowConnection" ADD CONSTRAINT "WorkflowConnection_sourceNodeId_fkey" FOREIGN KEY ("sourceNodeId") REFERENCES "WorkflowNode"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "WorkflowConnection" ADD CONSTRAINT "WorkflowConnection_targetNodeId_fkey" FOREIGN KEY ("targetNodeId") REFERENCES "WorkflowNode"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "NodeDependency" ADD CONSTRAINT "NodeDependency_dependentNodeId_fkey" FOREIGN KEY ("dependentNodeId") REFERENCES "WorkflowNode"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "NodeDependency" ADD CONSTRAINT "NodeDependency_prerequisiteNodeId_fkey" FOREIGN KEY ("prerequisiteNodeId") REFERENCES "WorkflowNode"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "ActionTemplate" ADD CONSTRAINT "ActionTemplate_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "Organization"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "ActionTemplateVersion" ADD CONSTRAINT "ActionTemplateVersion_templateId_fkey" FOREIGN KEY ("templateId") REFERENCES "ActionTemplate"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "VariableDefinition" ADD CONSTRAINT "VariableDefinition_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "Organization"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "TriggerVariable" ADD CONSTRAINT "TriggerVariable_triggerId_fkey" FOREIGN KEY ("triggerId") REFERENCES "WorkflowTrigger"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "TriggerVariable" ADD CONSTRAINT "TriggerVariable_variableId_fkey" FOREIGN KEY ("variableId") REFERENCES "VariableDefinition"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "WorkflowExecution" ADD CONSTRAINT "WorkflowExecution_workflowId_fkey" FOREIGN KEY ("workflowId") REFERENCES "Workflow"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "WorkflowExecution" ADD CONSTRAINT "WorkflowExecution_triggerId_fkey" FOREIGN KEY ("triggerId") REFERENCES "WorkflowTrigger"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "NodeExecution" ADD CONSTRAINT "NodeExecution_workflowExecutionId_fkey" FOREIGN KEY ("workflowExecutionId") REFERENCES "WorkflowExecution"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "NodeExecution" ADD CONSTRAINT "NodeExecution_nodeId_fkey" FOREIGN KEY ("nodeId") REFERENCES "WorkflowNode"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "ExecutionVariable" ADD CONSTRAINT "ExecutionVariable_workflowExecutionId_fkey" FOREIGN KEY ("workflowExecutionId") REFERENCES "WorkflowExecution"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "ExecutionVariable" ADD CONSTRAINT "ExecutionVariable_variableDefinitionId_fkey" FOREIGN KEY ("variableDefinitionId") REFERENCES "VariableDefinition"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "ExecutionLog" ADD CONSTRAINT "ExecutionLog_workflowExecutionId_fkey" FOREIGN KEY ("workflowExecutionId") REFERENCES "WorkflowExecution"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "IntegrationConfig" ADD CONSTRAINT "IntegrationConfig_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "Organization"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "EmailAction" ADD CONSTRAINT "EmailAction_actionId_fkey" FOREIGN KEY ("actionId") REFERENCES "WorkflowNode"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "SmsAction" ADD CONSTRAINT "SmsAction_actionId_fkey" FOREIGN KEY ("actionId") REFERENCES "WorkflowNode"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "WhatsAppAction" ADD CONSTRAINT "WhatsAppAction_actionId_fkey" FOREIGN KEY ("actionId") REFERENCES "WorkflowNode"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "SlackAction" ADD CONSTRAINT "SlackAction_actionId_fkey" FOREIGN KEY ("actionId") REFERENCES "WorkflowNode"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "CalendarAction" ADD CONSTRAINT "CalendarAction_actionId_fkey" FOREIGN KEY ("actionId") REFERENCES "WorkflowNode"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "WorkflowAnalytics" ADD CONSTRAINT "WorkflowAnalytics_workflowId_fkey" FOREIGN KEY ("workflowId") REFERENCES "Workflow"("id") ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/prisma/migrations/20250919124442_/migration.sql b/prisma/migrations/20250919124442_/migration.sql new file mode 100644 index 0000000..fa5f0fb --- /dev/null +++ b/prisma/migrations/20250919124442_/migration.sql @@ -0,0 +1,171 @@ +-- CreateEnum +CREATE TYPE "TemplateShareMode" AS ENUM ('LINK', 'EMAIL', 'MIXED'); + +-- CreateEnum +CREATE TYPE "TemplateShareStatus" AS ENUM ('ACTIVE', 'EXPIRED', 'REVOKED', 'EXHAUSTED'); + +-- CreateEnum +CREATE TYPE "TemplateShareRecipientStatus" AS ENUM ('PENDING', 'VIEWED', 'IMPORTED', 'DECLINED'); + +-- CreateEnum +CREATE TYPE "TemplateShareAccessAction" AS ENUM ('PREVIEW', 'IMPORT', 'DOWNLOAD'); + +-- CreateEnum +CREATE TYPE "TemplateShareAccessStatus" AS ENUM ('SUCCESS', 'BLOCKED', 'EXPIRED', 'REVOKED', 'EXHAUSTED', 'INVALID', 'ERROR'); + +-- CreateTable +CREATE TABLE "TemplateShare" ( + "id" TEXT NOT NULL, + "templatePackageId" TEXT NOT NULL, + "organizationId" TEXT NOT NULL, + "name" TEXT, + "shareMode" "TemplateShareMode" NOT NULL DEFAULT 'LINK', + "tokenHash" TEXT, + "expiresAt" TIMESTAMP(3), + "maxUses" INTEGER, + "allowExternal" BOOLEAN NOT NULL DEFAULT false, + "notes" TEXT, + "status" "TemplateShareStatus" NOT NULL DEFAULT 'ACTIVE', + "usageCount" INTEGER NOT NULL DEFAULT 0, + "lastAccessedAt" TIMESTAMP(3), + "revokedAt" TIMESTAMP(3), + "revokedById" TEXT, + "snapshotData" JSONB NOT NULL, + "snapshotVersion" TEXT NOT NULL, + "createdById" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "TemplateShare_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "TemplateShareRecipient" ( + "id" TEXT NOT NULL, + "shareId" TEXT NOT NULL, + "email" TEXT NOT NULL, + "status" "TemplateShareRecipientStatus" NOT NULL DEFAULT 'PENDING', + "invitedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "viewedAt" TIMESTAMP(3), + "importedAt" TIMESTAMP(3), + + CONSTRAINT "TemplateShareRecipient_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "TemplateShareAccessLog" ( + "id" TEXT NOT NULL, + "shareId" TEXT NOT NULL, + "action" "TemplateShareAccessAction" NOT NULL, + "status" "TemplateShareAccessStatus" NOT NULL, + "recipientEmail" TEXT, + "userAgent" TEXT, + "ipAddress" TEXT, + "errorMessage" TEXT, + "metadata" JSONB, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "TemplateShareAccessLog_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "TemplateShareImport" ( + "id" TEXT NOT NULL, + "shareId" TEXT NOT NULL, + "organizationId" TEXT NOT NULL, + "templatePackageId" TEXT NOT NULL, + "importedById" TEXT NOT NULL, + "importedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "originalPackageId" TEXT NOT NULL, + "originalOrgId" TEXT NOT NULL, + "snapshotVersion" TEXT NOT NULL, + + CONSTRAINT "TemplateShareImport_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE UNIQUE INDEX "TemplateShare_tokenHash_key" ON "TemplateShare"("tokenHash"); + +-- CreateIndex +CREATE INDEX "TemplateShare_templatePackageId_idx" ON "TemplateShare"("templatePackageId"); + +-- CreateIndex +CREATE INDEX "TemplateShare_organizationId_idx" ON "TemplateShare"("organizationId"); + +-- CreateIndex +CREATE INDEX "TemplateShare_shareMode_idx" ON "TemplateShare"("shareMode"); + +-- CreateIndex +CREATE INDEX "TemplateShare_status_idx" ON "TemplateShare"("status"); + +-- CreateIndex +CREATE INDEX "TemplateShare_expiresAt_idx" ON "TemplateShare"("expiresAt"); + +-- CreateIndex +CREATE INDEX "TemplateShare_createdById_idx" ON "TemplateShare"("createdById"); + +-- CreateIndex +CREATE INDEX "TemplateShare_tokenHash_idx" ON "TemplateShare"("tokenHash"); + +-- CreateIndex +CREATE INDEX "TemplateShareRecipient_shareId_idx" ON "TemplateShareRecipient"("shareId"); + +-- CreateIndex +CREATE INDEX "TemplateShareRecipient_email_idx" ON "TemplateShareRecipient"("email"); + +-- CreateIndex +CREATE INDEX "TemplateShareRecipient_status_idx" ON "TemplateShareRecipient"("status"); + +-- CreateIndex +CREATE UNIQUE INDEX "TemplateShareRecipient_shareId_email_key" ON "TemplateShareRecipient"("shareId", "email"); + +-- CreateIndex +CREATE INDEX "TemplateShareAccessLog_shareId_idx" ON "TemplateShareAccessLog"("shareId"); + +-- CreateIndex +CREATE INDEX "TemplateShareAccessLog_action_idx" ON "TemplateShareAccessLog"("action"); + +-- CreateIndex +CREATE INDEX "TemplateShareAccessLog_status_idx" ON "TemplateShareAccessLog"("status"); + +-- CreateIndex +CREATE INDEX "TemplateShareAccessLog_createdAt_idx" ON "TemplateShareAccessLog"("createdAt"); + +-- CreateIndex +CREATE INDEX "TemplateShareAccessLog_recipientEmail_idx" ON "TemplateShareAccessLog"("recipientEmail"); + +-- CreateIndex +CREATE INDEX "TemplateShareImport_shareId_idx" ON "TemplateShareImport"("shareId"); + +-- CreateIndex +CREATE INDEX "TemplateShareImport_organizationId_idx" ON "TemplateShareImport"("organizationId"); + +-- CreateIndex +CREATE INDEX "TemplateShareImport_templatePackageId_idx" ON "TemplateShareImport"("templatePackageId"); + +-- CreateIndex +CREATE INDEX "TemplateShareImport_importedById_idx" ON "TemplateShareImport"("importedById"); + +-- CreateIndex +CREATE INDEX "TemplateShareImport_originalPackageId_idx" ON "TemplateShareImport"("originalPackageId"); + +-- AddForeignKey +ALTER TABLE "TemplateShare" ADD CONSTRAINT "TemplateShare_templatePackageId_fkey" FOREIGN KEY ("templatePackageId") REFERENCES "TemplatePackage"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "TemplateShare" ADD CONSTRAINT "TemplateShare_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "Organization"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "TemplateShareRecipient" ADD CONSTRAINT "TemplateShareRecipient_shareId_fkey" FOREIGN KEY ("shareId") REFERENCES "TemplateShare"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "TemplateShareAccessLog" ADD CONSTRAINT "TemplateShareAccessLog_shareId_fkey" FOREIGN KEY ("shareId") REFERENCES "TemplateShare"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "TemplateShareImport" ADD CONSTRAINT "TemplateShareImport_shareId_fkey" FOREIGN KEY ("shareId") REFERENCES "TemplateShare"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "TemplateShareImport" ADD CONSTRAINT "TemplateShareImport_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "Organization"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "TemplateShareImport" ADD CONSTRAINT "TemplateShareImport_templatePackageId_fkey" FOREIGN KEY ("templatePackageId") REFERENCES "TemplatePackage"("id") ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 6fb074a..cd640a1 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -117,6 +117,11 @@ model Organization { actionTemplates ActionTemplate[] variableDefinitions VariableDefinition[] integrationConfigs IntegrationConfig[] + templatePackages TemplatePackage[] + templateInstallations TemplateInstallation[] + templateShares TemplateShare[] + templateShareImports TemplateShareImport[] + uiConfigs OrganizationUiConfig[] } model UserOrganization { @@ -1211,6 +1216,153 @@ enum FinancialReportScheduleFrequency { YEARLY } +// ============================== +// ERP Template Pack Models +// ============================== + +model TemplatePackage { + id String @id @default(cuid()) + organizationId String? // Null for public templates + name String + description String? + category String? // e.g., "CRM", "HR", "Finance", "Complete Setup" + version String // Semver string (e.g., "1.0.0") + visibility TemplateVisibility @default(PRIVATE) + status TemplateStatus @default(DRAFT) + iconUrl String? + tags Json? // Array of tag strings for categorization + manifest Json // Complete ERP configuration data + assetsCount Int @default(0) // Number of assets in template + sizeBytes Int? // Template size in bytes + createdById String + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + // Relations + organization Organization? @relation(fields: [organizationId], references: [id], onDelete: Cascade) + versions TemplateVersion[] + installations TemplateInstallation[] + shares TemplateShare[] + shareImports TemplateShareImport[] + + @@index([organizationId]) + @@index([visibility]) + @@index([status]) + @@index([category]) + @@index([createdById]) +} + +model TemplateVersion { + id String @id @default(cuid()) + templatePackageId String + version String // Semver string + manifest Json // Version-specific configuration + changelog String? // Changes from previous version + isActive Boolean @default(false) // Is this the active version + createdById String + createdAt DateTime @default(now()) + + // Relations + templatePackage TemplatePackage @relation(fields: [templatePackageId], references: [id], onDelete: Cascade) + installations TemplateInstallation[] + + @@unique([templatePackageId, version]) + @@index([templatePackageId]) + @@index([isActive]) + @@index([createdById]) +} + +model TemplateInstallation { + id String @id @default(cuid()) + organizationId String + templatePackageId String? // Optional for direct manifest installations + templateVersionId String? + status TemplateInstallStatus @default(PENDING) + strategy TemplateInstallStrategy @default(MERGE) + namePrefix String? // Prefix for created resources (e.g., "Demo_") + preflight Json? // Pre-installation checks and results + logs Json? // Installation process logs + error String? // Error message if failed + createdById String + createdAt DateTime @default(now()) + completedAt DateTime? + + // Relations + organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade) + templatePackage TemplatePackage? @relation(fields: [templatePackageId], references: [id], onDelete: Cascade) + templateVersion TemplateVersion? @relation(fields: [templateVersionId], references: [id], onDelete: SetNull) + items TemplateInstallItem[] + + @@index([organizationId]) + @@index([templatePackageId]) + @@index([templateVersionId]) + @@index([status]) + @@index([createdById]) +} + +model TemplateInstallItem { + id String @id @default(cuid()) + installationId String + assetType TemplateAssetType // Type of asset being installed + sourceKey String // Key from template manifest + createdModel String? // Model name that was created (e.g., "Workflow") + createdId String? // ID of created resource + status TemplateItemStatus @default(CREATED) // Installation result + details Json? // Additional details about the installation + createdAt DateTime @default(now()) + + // Relations + installation TemplateInstallation @relation(fields: [installationId], references: [id], onDelete: Cascade) + + @@index([installationId]) + @@index([assetType]) + @@index([status]) +} + +enum TemplateVisibility { + PRIVATE // Only visible to creating organization + UNLISTED // Accessible via direct link but not in public listings + PUBLIC // Publicly discoverable and installable +} + +enum TemplateStatus { + DRAFT // Under development + PUBLISHED // Available for installation + ARCHIVED // No longer active but preserved +} + +enum TemplateInstallStatus { + PENDING // Installation queued + RUNNING // Currently installing + COMPLETED // Successfully installed + FAILED // Installation failed +} + +enum TemplateInstallStrategy { + MERGE // Merge with existing data where possible + OVERWRITE // Replace existing data + PREFIX // Add prefix to avoid conflicts +} + +enum TemplateAssetType { + WORKFLOW // Workflow configurations + REPORT // Financial/custom reports + UILAYOUT // UI layout configurations + ROLE // Custom roles and permissions + VARIABLE // Variable definitions + ACTION_TEMPLATE // Action template definitions + DATA_SEED // Sample/seed data + PROJECT // Project templates with tasks + INVOICE // Invoice templates and configurations +} + +enum TemplateItemStatus { + CREATED // Successfully created + SKIPPED // Skipped (already exists or not applicable) + UPDATED // Updated existing resource + FAILED // Failed to create/update +} + // ============================== // Workflow Management Models // ============================== @@ -1262,6 +1414,24 @@ model Workflow { @@index([createdById]) } +// ============================== +// UI Configuration Store +// ============================== + +model OrganizationUiConfig { + id String @id @default(cuid()) + organizationId String + key String + config Json + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade) + + @@unique([organizationId, key]) + @@index([organizationId]) +} + enum WorkflowStatus { DRAFT INACTIVE @@ -2121,3 +2291,156 @@ model WorkflowAnalytics { @@index([periodStart]) @@index([granularity]) } + +// ============================== +// Template Package Sharing System +// ============================== + +model TemplateShare { + id String @id @default(cuid()) + templatePackageId String + organizationId String + + // Share configuration + name String? // Optional descriptive name for the share + shareMode TemplateShareMode @default(LINK) + tokenHash String? @unique // Hashed token for link shares (null for email-only shares) + expiresAt DateTime? // Optional expiration date + maxUses Int? // Optional usage limit + allowExternal Boolean @default(false) // Allow non-organization recipients + notes String? // Internal notes about the share + + // Status tracking + status TemplateShareStatus @default(ACTIVE) + usageCount Int @default(0) + lastAccessedAt DateTime? + revokedAt DateTime? + revokedById String? + + // Snapshot data - immutable capture at share creation + snapshotData Json // Frozen template package data + snapshotVersion String // Snapshot format version for future compatibility + + // Metadata + createdById String + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + // Relations + templatePackage TemplatePackage @relation(fields: [templatePackageId], references: [id], onDelete: Cascade) + organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade) + recipients TemplateShareRecipient[] + accessLogs TemplateShareAccessLog[] + imports TemplateShareImport[] + + @@index([templatePackageId]) + @@index([organizationId]) + @@index([shareMode]) + @@index([status]) + @@index([expiresAt]) + @@index([createdById]) + @@index([tokenHash]) +} + +model TemplateShareRecipient { + id String @id @default(cuid()) + shareId String + email String + status TemplateShareRecipientStatus @default(PENDING) + invitedAt DateTime @default(now()) + viewedAt DateTime? + importedAt DateTime? + + // Relations + share TemplateShare @relation(fields: [shareId], references: [id], onDelete: Cascade) + + @@unique([shareId, email]) + @@index([shareId]) + @@index([email]) + @@index([status]) +} + +model TemplateShareAccessLog { + id String @id @default(cuid()) + shareId String + action TemplateShareAccessAction + status TemplateShareAccessStatus + recipientEmail String? // For email shares + userAgent String? + ipAddress String? + errorMessage String? // For failed attempts + metadata Json? // Additional context data + createdAt DateTime @default(now()) + + // Relations + share TemplateShare @relation(fields: [shareId], references: [id], onDelete: Cascade) + + @@index([shareId]) + @@index([action]) + @@index([status]) + @@index([createdAt]) + @@index([recipientEmail]) +} + +model TemplateShareImport { + id String @id @default(cuid()) + shareId String + organizationId String + templatePackageId String // The newly created template package from import + importedById String + importedAt DateTime @default(now()) + + // Provenance tracking + originalPackageId String // Reference to the original shared package + originalOrgId String // Organization that created the original + snapshotVersion String // Version of snapshot that was imported + + // Relations + share TemplateShare @relation(fields: [shareId], references: [id], onDelete: Cascade) + organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade) + templatePackage TemplatePackage @relation(fields: [templatePackageId], references: [id], onDelete: Cascade) + + @@index([shareId]) + @@index([organizationId]) + @@index([templatePackageId]) + @@index([importedById]) + @@index([originalPackageId]) +} + +// Enums for Template Sharing + +enum TemplateShareMode { + LINK // Token-based sharing via public link + EMAIL // Email invitation only + MIXED // Both link and email (link + specific recipients) +} + +enum TemplateShareStatus { + ACTIVE // Share is currently active and accessible + EXPIRED // Share has passed its expiration date + REVOKED // Share has been manually revoked + EXHAUSTED // Share has reached its usage limit +} + +enum TemplateShareRecipientStatus { + PENDING // Invitation sent, not yet viewed + VIEWED // Recipient has viewed the shared template + IMPORTED // Recipient has successfully imported the template + DECLINED // Recipient has explicitly declined (future feature) +} + +enum TemplateShareAccessAction { + PREVIEW // Viewed the shared template preview + IMPORT // Attempted to import the template + DOWNLOAD // Downloaded template data (future feature) +} + +enum TemplateShareAccessStatus { + SUCCESS // Action completed successfully + BLOCKED // Action blocked due to permissions/restrictions + EXPIRED // Action blocked due to expiration + REVOKED // Action blocked due to revocation + EXHAUSTED // Action blocked due to usage limit + INVALID // Invalid token or share not found + ERROR // Internal error during processing +} diff --git a/src/app/(dashboard)/[orgId]/settings/general/page.tsx b/src/app/(dashboard)/[orgId]/settings/general/page.tsx index adb4da5..a890eda 100644 --- a/src/app/(dashboard)/[orgId]/settings/general/page.tsx +++ b/src/app/(dashboard)/[orgId]/settings/general/page.tsx @@ -1,5 +1,38 @@ import { GeneralSettingsClient } from "~/components/settings/general-settings-client"; +import { SettingsPermissionWrapper } from "~/components/shared/wrappers/settings-permission-wrapper"; +import { Suspense } from "react"; +import { Settings, Building2 } from "lucide-react"; -export default function GeneralSettingsPage() { - return ; +export default async function GeneralSettingsPage() { + return ( + +

+ {/* Page Header */} +
+
+
+ +
+
+

Settings

+

+ Manage your organization configuration and preferences +

+
+
+
+ + {/* Organization Settings Section */} +
+
+ +

Organization

+
+ + + +
+
+ + ); } diff --git a/src/app/(dashboard)/[orgId]/templates/[templateId]/edit/page.tsx b/src/app/(dashboard)/[orgId]/templates/[templateId]/edit/page.tsx new file mode 100644 index 0000000..5829da9 --- /dev/null +++ b/src/app/(dashboard)/[orgId]/templates/[templateId]/edit/page.tsx @@ -0,0 +1,36 @@ +import { notFound } from "next/navigation"; +import { api } from "~/trpc/server"; +import { TemplateEditClient } from "~/components/templates/template-edit-client"; + +type TemplateEditPageProps = { + params: Promise<{ + orgId: string; + templateId: string; + }>; +}; + +export default async function TemplateEditPage({ + params, +}: TemplateEditPageProps) { + try { + const { orgId, templateId } = await params; + // Verify the template exists and user has access + const template = await api.templates.getDetails({ + templatePackageId: templateId, + }); + + if (!template) { + notFound(); + } + + return ( + + ); + } catch { + notFound(); + } +} diff --git a/src/app/(dashboard)/[orgId]/templates/[templateId]/page.tsx b/src/app/(dashboard)/[orgId]/templates/[templateId]/page.tsx new file mode 100644 index 0000000..1cd217e --- /dev/null +++ b/src/app/(dashboard)/[orgId]/templates/[templateId]/page.tsx @@ -0,0 +1,32 @@ +import { notFound } from "next/navigation"; +import { api } from "~/trpc/server"; +import { TemplateViewClient } from "~/components/templates/template-view-client"; + +type TemplateViewPageProps = { + params: Promise<{ + orgId: string; + templateId: string; + }>; +}; + +export default async function TemplateViewPage({ + params, +}: TemplateViewPageProps) { + try { + const { orgId, templateId } = await params; + // Verify the template exists + const template = await api.templates.getDetails({ + templatePackageId: templateId, + }); + + if (!template) { + notFound(); + } + + return ( + + ); + } catch { + notFound(); + } +} diff --git a/src/app/(dashboard)/[orgId]/templates/page.tsx b/src/app/(dashboard)/[orgId]/templates/page.tsx new file mode 100644 index 0000000..a3394d2 --- /dev/null +++ b/src/app/(dashboard)/[orgId]/templates/page.tsx @@ -0,0 +1,104 @@ +import { redirect } from "next/navigation"; +import { headers } from "next/headers"; +import { auth } from "~/lib/auth"; +import { TemplatesGalleryClient } from "~/components/templates/templates-gallery-client"; +import { TemplateBuilder } from "~/components/templates/template-builder"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "~/components/ui/tabs"; +import { Package, Sparkles, Download, Settings } from "lucide-react"; + +export default async function TemplatesPage({ + params, +}: { + params: Promise<{ orgId: string }>; +}) { + const { orgId } = await params; + + const session = await auth.api.getSession({ headers: await headers() }); + if (!session?.user?.id) { + redirect("/sign-in"); + } + + return ( +
+ {/* Hero Header */} +
+
+
+
+
+ +
+
+

+ Templates +

+

+ Discover, create, and manage template packages for your + organization +

+
+
+
+
+ 💡 Boost productivity with templates +
+
+
+
+
+ + {/* Main Content */} +
+ + {/* Enhanced Tab Navigation */} +
+ + + + Template Gallery + + + + Template Builder + + +
+ + {/* Gallery Tab */} + + + + + {/* Builder Tab */} + +
+
+
+ +

Template Builder

+
+ + ✨ Advanced + +
+
+

+ Create custom template packages from your organization's + assets to share with other teams or organizations. Build once, + deploy everywhere. +

+
+ +
+
+
+
+
+ ); +} diff --git a/src/app/(dashboard)/[orgId]/workflows/message-templates/[templateId]/edit/page.tsx b/src/app/(dashboard)/[orgId]/workflows/message-templates/[templateId]/edit/page.tsx new file mode 100644 index 0000000..dee441a --- /dev/null +++ b/src/app/(dashboard)/[orgId]/workflows/message-templates/[templateId]/edit/page.tsx @@ -0,0 +1,67 @@ +import { redirect } from "next/navigation"; +import { auth } from "~/lib/auth"; +import { headers } from "next/headers"; +import { db } from "~/server/db"; +import { MessageTemplateForm } from "~/components/workflows/message-templates/message-template-form"; +import { ClientPermissionGuard } from "~/components/shared/client-permission-guard"; +import { PERMISSIONS } from "~/lib/rbac"; + +export default async function EditMessageTemplatePage({ + params, +}: { + params: Promise<{ orgId: string; templateId: string }>; +}) { + const { orgId, templateId } = await params; + + // Get user session + const session = await auth.api.getSession({ + headers: await headers(), + }); + + if (!session?.user?.id) { + redirect("/sign-in"); + } + + // Check if organization exists and user has access + const organization = await db.organization.findFirst({ + where: { + id: orgId, + users: { + some: { + userId: session.user.id, + }, + }, + }, + }); + + if (!organization) { + redirect("/"); + } + + return ( +
+ +
+
+

+ Edit Message Template +

+

+ Update your email or SMS template +

+
+ +
+
+
+ ); +} diff --git a/src/app/(dashboard)/[orgId]/workflows/message-templates/[templateId]/page.tsx b/src/app/(dashboard)/[orgId]/workflows/message-templates/[templateId]/page.tsx new file mode 100644 index 0000000..3337e2f --- /dev/null +++ b/src/app/(dashboard)/[orgId]/workflows/message-templates/[templateId]/page.tsx @@ -0,0 +1,53 @@ +import { redirect } from "next/navigation"; +import { auth } from "~/lib/auth"; +import { headers } from "next/headers"; +import { db } from "~/server/db"; +import { MessageTemplateView } from "~/components/workflows/message-templates/message-template-view"; +import { ClientPermissionGuard } from "~/components/shared/client-permission-guard"; +import { PERMISSIONS } from "~/lib/rbac"; + +export default async function ViewMessageTemplatePage({ + params, +}: { + params: Promise<{ orgId: string; templateId: string }>; +}) { + const { orgId, templateId } = await params; + + // Get user session + const session = await auth.api.getSession({ + headers: await headers(), + }); + + if (!session?.user?.id) { + redirect("/sign-in"); + } + + // Check if organization exists and user has access + const organization = await db.organization.findFirst({ + where: { + id: orgId, + users: { + some: { + userId: session.user.id, + }, + }, + }, + }); + + if (!organization) { + redirect("/"); + } + + return ( +
+ + + +
+ ); +} diff --git a/src/app/(dashboard)/[orgId]/workflows/message-templates/create/page.tsx b/src/app/(dashboard)/[orgId]/workflows/message-templates/create/page.tsx new file mode 100644 index 0000000..65767c1 --- /dev/null +++ b/src/app/(dashboard)/[orgId]/workflows/message-templates/create/page.tsx @@ -0,0 +1,63 @@ +import { redirect } from "next/navigation"; +import { auth } from "~/lib/auth"; +import { headers } from "next/headers"; +import { db } from "~/server/db"; +import { MessageTemplateForm } from "~/components/workflows/message-templates/message-template-form"; +import { ClientPermissionGuard } from "~/components/shared/client-permission-guard"; +import { PERMISSIONS } from "~/lib/rbac"; + +export default async function CreateMessageTemplatePage({ + params, +}: { + params: Promise<{ orgId: string }>; +}) { + const { orgId } = await params; + + // Get user session + const session = await auth.api.getSession({ + headers: await headers(), + }); + + if (!session?.user?.id) { + redirect("/sign-in"); + } + + // Check if organization exists and user has access + const organization = await db.organization.findFirst({ + where: { + id: orgId, + users: { + some: { + userId: session.user.id, + }, + }, + }, + }); + + if (!organization) { + redirect("/"); + } + + return ( +
+ +
+
+

+ Create Message Template +

+

+ Create a new email or SMS template for your workflows +

+
+ +
+
+
+ ); +} diff --git a/src/app/(dashboard)/[orgId]/workflows/message-templates/page.tsx b/src/app/(dashboard)/[orgId]/workflows/message-templates/page.tsx new file mode 100644 index 0000000..b5c58be --- /dev/null +++ b/src/app/(dashboard)/[orgId]/workflows/message-templates/page.tsx @@ -0,0 +1,53 @@ +import { redirect } from "next/navigation"; +import { auth } from "~/lib/auth"; +import { headers } from "next/headers"; +import { db } from "~/server/db"; +import { MessageTemplateListPage } from "~/components/workflows/message-templates/message-template-list-page"; +import { ClientPermissionGuard } from "~/components/shared/client-permission-guard"; +import { PERMISSIONS } from "~/lib/rbac"; + +export default async function MessageTemplatesPage({ + params, +}: { + params: Promise<{ orgId: string }>; +}) { + const { orgId } = await params; + + // Get user session + const session = await auth.api.getSession({ + headers: await headers(), + }); + + if (!session?.user?.id) { + redirect("/sign-in"); + } + + // Check if organization exists and user has access + const organization = await db.organization.findFirst({ + where: { + id: orgId, + users: { + some: { + userId: session.user.id, + }, + }, + }, + }); + + if (!organization) { + redirect("/"); + } + + return ( +
+ + + +
+ ); +} diff --git a/src/app/(dashboard)/shared/templates/[token]/page.tsx b/src/app/(dashboard)/shared/templates/[token]/page.tsx new file mode 100644 index 0000000..aa89897 --- /dev/null +++ b/src/app/(dashboard)/shared/templates/[token]/page.tsx @@ -0,0 +1,34 @@ +import { Suspense } from "react"; +import { notFound } from "next/navigation"; +import { SharedTemplateView } from "~/components/templates/shared-template-view"; + +interface SharedTemplatePageProps { + params: Promise<{ token: string }>; +} + +export default async function SharedTemplatePage({ + params, +}: SharedTemplatePageProps) { + const { token } = await params; + + if (!token) { + notFound(); + } + + return ( + +
+
+

+ Loading shared template... +

+
+
+ } + > + +
+ ); +} diff --git a/src/components/app-sidebar.tsx b/src/components/app-sidebar.tsx index 62f0385..c057937 100644 --- a/src/components/app-sidebar.tsx +++ b/src/components/app-sidebar.tsx @@ -255,6 +255,15 @@ export function AppSidebar({ ...props }: React.ComponentProps) { }); } + // Templates entry under Settings (links to Templates gallery page) + // Templates link visible when user can view templates + if (userPermissions?.permissions?.canViewTemplates) { + settingsItems.push({ + title: "Templates", + url: "/[orgId]/templates", + }); + } + navItems.push({ title: "Settings", url: "/[orgId]/settings", diff --git a/src/components/settings/general-settings-client.tsx b/src/components/settings/general-settings-client.tsx index fe7d3e9..df78918 100644 --- a/src/components/settings/general-settings-client.tsx +++ b/src/components/settings/general-settings-client.tsx @@ -23,7 +23,6 @@ import { Trash2, Shield, AlertTriangle, - Settings, Copy, Check, } from "lucide-react"; @@ -102,220 +101,198 @@ export function GeneralSettingsClient() { PERMISSIONS.SETTINGS_ADMIN, ]} > -
-
- {/* Header */} -
-
-
- -
-
-

General Settings

+
+ {orgLoading ? ( +
+ + + + + + + + + + + +
+ ) : !organization ? ( + + +
+ +

+ Organization Not Found +

- Manage your organization information and preferences + The organization could not be found or you don't have + access to it.

-
-
{" "} - {orgLoading ? ( -
- - - - - - - - - - - -
- ) : !organization ? ( + + + ) : ( + <> + {/* Organization Information Form */} - -
- -

- Organization Not Found -

-

- The organization could not be found or you don't have - access to it. -

+ +
+
+ +
+
+ Organization Information + + Update your organization details and settings + +
+
+ + - ) : ( - <> - {/* Organization Information Form */} - + + {/* Organization Metadata */} + + + Organization Details + + Read-only information about your organization + + + +
+ {/* Organization ID */} +
+ +
+ + {organization.id} + + +
+
+ + {/* Member Count */} +
+ +
+ + {organization.membersCount}{" "} + {organization.membersCount === 1 ? "member" : "members"} + +
+
+ + {/* Creation Date */} +
+ +

+ {formatDate(organization.createdAt)} +

+
+ + {/* Last Updated */} +
+ +

+ {formatDate(organization.updatedAt)} +

+
+
+
+
+ + {/* Danger Zone - Only show to Organization Owners */} + {organization.userRole === "ORGANIZATION_OWNER" && ( +
-
- +
+
- Organization Information - - Update your organization details and settings + + Danger Zone + + + Irreversible and destructive actions
- - - - - - {/* Organization Metadata */} - - - Organization Details - - Read-only information about your organization - - -
- {/* Organization ID */} -
- -
- - {organization.id} - - -
-
- - {/* Member Count */} -
- -
- - {organization.membersCount}{" "} - {organization.membersCount === 1 - ? "member" - : "members"} - -
-
+ - {/* Creation Date */} +
- -

- {formatDate(organization.createdAt)} +

+ Delete Organization +

+

+ Permanently delete this organization and all associated + data. This action cannot be undone and will immediately + remove access for all team members.

+
+

+ • All projects, tasks, and customer data will be + deleted +

+

+ • All invoices and financial records will be removed +

+

• Team members will lose access immediately

+

• This action cannot be reversed

+
- {/* Last Updated */} -
- -

- {formatDate(organization.updatedAt)} -

-
+
+ )} + + )} - {/* Danger Zone - Only show to Organization Owners */} - {organization.userRole === "ORGANIZATION_OWNER" && ( - - -
-
- -
-
- - Danger Zone - - - Irreversible and destructive actions - -
-
-
- - - -
-
-

- Delete Organization -

-

- Permanently delete this organization and all - associated data. This action cannot be undone and will - immediately remove access for all team members. -

-
-

- • All projects, tasks, and customer data will be - deleted -

-

- • All invoices and financial records will be removed -

-

• Team members will lose access immediately

-

• This action cannot be reversed

-
-
- - -
-
-
- )} - - )} -
+ {/* Delete Organization Dialog */} + { + toast.success("Organization deleted successfully"); + router.push("/"); + }} + />
- - {/* Delete Organization Dialog */} - { - toast.success("Organization deleted successfully"); - router.push("/"); - }} - /> ); } diff --git a/src/components/templates/shared-template-view.tsx b/src/components/templates/shared-template-view.tsx new file mode 100644 index 0000000..2a602c8 --- /dev/null +++ b/src/components/templates/shared-template-view.tsx @@ -0,0 +1,722 @@ +"use client"; + +import { useState } from "react"; +import { useRouter } from "next/navigation"; +import { api } from "~/trpc/react"; +import { authClient } from "~/lib/auth-client"; +import { Button } from "~/components/ui/button"; +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "~/components/ui/card"; +import { Badge } from "~/components/ui/badge"; +import Image from "next/image"; +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from "~/components/ui/dialog"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "~/components/ui/select"; +import { Label } from "~/components/ui/label"; +import { + Package, + Download, + Shield, + Clock, + Users, + Building, + Workflow, + BarChart3, + FileText, + Settings, + AlertCircle, + CheckCircle, + XCircle, + Globe, + Calendar, + Hash, + Star, + TrendingUp, +} from "lucide-react"; +import { format } from "date-fns"; +import { toast } from "sonner"; + +interface SharedTemplateViewProps { + token: string; +} + +export function SharedTemplateView({ token }: SharedTemplateViewProps) { + const router = useRouter(); + const [showImportDialog, setShowImportDialog] = useState(false); + const [selectedOrganization, setSelectedOrganization] = useState(""); + + // Get current session + const { data: session } = authClient.useSession(); + + // Get user's organizations for import selection + const { data: userOrganizations, isLoading: isLoadingOrgs } = + api.organization.getAll.useQuery( + { userId: session?.user?.id ?? "" }, + { + enabled: !!session?.user?.id && showImportDialog, + } + ); + + const { + data: shareData, + isLoading, + error, + } = api.templateSharing.getShareByToken.useQuery( + { token }, + { + retry: false, + } + ); + + const importMutation = api.templateSharing.importShare.useMutation({ + onSuccess: data => { + toast.success(`Template "${data.name}" imported successfully!`); + setShowImportDialog(false); + // Redirect to the imported template + router.push( + `/${selectedOrganization}/templates/${data.templatePackageId}` + ); + }, + onError: error => { + toast.error(error.message); + }, + }); + + const handleImport = () => { + if (!session?.user?.id) { + toast.error("Please sign in to import templates"); + return; + } + + if (!selectedOrganization) { + toast.error("Please select an organization first"); + return; + } + + importMutation.mutate({ + token, + targetOrganizationId: selectedOrganization, + }); + }; + + if (isLoading) { + return ( +
+
+
+

+ Loading shared template... +

+
+
+ ); + } + + if (error || !shareData) { + return ( +
+ + +
+ +
+ Template Not Found + + This shared template link is invalid, expired, or has been + revoked. + +
+ + + +
+
+ ); + } + + const { share, status, preview } = shareData; + const canImport = status.canImport; + + const getStatusIcon = () => { + switch (status.status) { + case "ACTIVE": + return ; + case "EXPIRED": + return ; + case "REVOKED": + return ; + case "EXHAUSTED": + return ; + default: + return ; + } + }; + + const getStatusColor = () => { + switch (status.status) { + case "ACTIVE": + return "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300"; + case "EXPIRED": + return "bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-300"; + case "REVOKED": + return "bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-300"; + case "EXHAUSTED": + return "bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-300"; + default: + return "bg-gray-100 text-gray-800 dark:bg-gray-900 dark:text-gray-300"; + } + }; + + return ( + <> +
+ {/* Header */} +
+
+ +
+

+ {share.templatePackage.name} +

+ {share.templatePackage.description && ( +
+ )} +
+
+ + + Shared by {share.organization.name} + +
+
+ + + {format(new Date(share.createdAt), "PPP")} + +
+
+
+ + {/* Status Banner */} + + +
+
+ {getStatusIcon()} +
+

Share Status

+

+ {status.message} +

+
+
+
+ {status.status} + {canImport && session?.user?.id && ( + + )} +
+
+ + {status.details && ( +
+ {status.details.usageRemaining !== undefined && ( +
+ + + {status.details.usageRemaining} imports remaining + +
+ )} + {status.details.expiresAt && ( +
+ + + Expires{" "} + {format(new Date(status.details.expiresAt), "PPP")} + +
+ )} +
+ )} +
+
+ + {preview && ( +
+ {/* Template Overview */} +
+ + + + + Template Overview + + + +
+
+ +
+ {preview.packageInfo.version} +
+
+
+ +
+ {preview.packageInfo.category ?? "General"} +
+
+
+ + {preview.packageInfo.tags && + preview.packageInfo.tags.length > 0 && ( +
+ +
+ {preview.packageInfo.tags.map((tag, index) => ( + + {tag} + + ))} +
+
+ )} +
+
+ + {/* Assets Breakdown */} + + + + + What's Included + + + This template package contains{" "} + {preview.metadata.totalAssets} assets + + + +
+ {preview.metadata.assetCounts.workflows > 0 && ( +
+
+ +
+
+
+ {preview.metadata.assetCounts.workflows} +
+
+ Workflows +
+
+
+ )} + + {preview.metadata.assetCounts.reports > 0 && ( +
+
+ +
+
+
+ {preview.metadata.assetCounts.reports} +
+
+ Reports +
+
+
+ )} + + {preview.metadata.assetCounts.actionTemplates > 0 && ( +
+
+ +
+
+
+ {preview.metadata.assetCounts.actionTemplates} +
+
+ Action Templates +
+
+
+ )} + + {preview.metadata.assetCounts.roles > 0 && ( +
+
+ +
+
+
+ {preview.metadata.assetCounts.roles} +
+
+ Custom Roles +
+
+
+ )} +
+
+
+ + {/* Compatible Modules */} + {preview.metadata.compatibleModules.length > 0 && ( + + + + + Compatible Modules + + + This template works with the following system modules + + + +
+ {preview.metadata.compatibleModules.map(module => ( + + {module} + + ))} +
+
+
+ )} +
+ + {/* Sidebar */} +
+ {/* Quick Stats */} + + + + + Quick Stats + + + +
+ + Total Assets + + + {preview.metadata.totalAssets} + +
+
+ + Compatible Modules + + + {preview.metadata.compatibleModules.length} + +
+
+ + Created + + + {format(new Date(preview.capturedAt), "MMM yyyy")} + +
+
+
+ + {/* Organization Info */} + + + + + Shared By + + + +
+ {preview.organizationInfo.logo ? ( + {preview.organizationInfo.name} + ) : ( +
+ +
+ )} +
+
+ {preview.organizationInfo.name} +
+
+ Organization +
+
+
+
+
+ + {/* Security Info */} + + + + + Security + + + +
+ + Verified template package +
+
+ + Secure sharing protocol +
+
+ + Immutable snapshot +
+
+
+ + {/* Import CTA */} + {canImport && session?.user?.id && ( + + + +

+ Ready to Import +

+

+ Add this template to your organization and start using it + immediately. +

+ +
+
+ )} + + {/* Sign In CTA - Show when user is not authenticated but template is importable */} + {canImport && !session?.user?.id && ( + + + +

+ Sign In Required +

+

+ Sign in to save this template to your organization and + start using it. +

+ +
+
+ )} +
+
+ )} +
+ + {/* Import Dialog */} + { + setShowImportDialog(open); + if (!open) { + setSelectedOrganization(""); // Reset selection when dialog closes + } + }} + > + + + Import Template Package + + Choose the organization where you want to import " + {share.templatePackage.name}" + + + +
+

+ This template will be added to your selected organization. + You'll be able to customize and use it immediately. +

+ +
+ + {session?.user?.id ? ( + isLoadingOrgs ? ( +
+
+ + Loading organizations... + +
+ ) : userOrganizations && userOrganizations.length > 0 ? ( + + ) : ( +
+ +

+ You don't belong to any organizations yet. +

+ +
+ ) + ) : ( +
+ +

+ Please sign in to import this template. +

+ +
+ )} +
+
+ + + + + + +
+ + ); +} diff --git a/src/components/templates/template-builder.tsx b/src/components/templates/template-builder.tsx new file mode 100644 index 0000000..a943fda --- /dev/null +++ b/src/components/templates/template-builder.tsx @@ -0,0 +1,1491 @@ +"use client"; + +import { useMemo, useState } from "react"; +import { api } from "~/trpc/react"; +import { authClient } from "~/lib/auth-client"; +import { ClientPermissionGuard } from "~/components/shared/client-permission-guard"; +import { PERMISSIONS } from "~/lib/rbac"; +import { Button } from "~/components/ui/button"; +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "~/components/ui/card"; +import { Input } from "~/components/ui/input"; +import { Label } from "~/components/ui/label"; +import { Checkbox } from "~/components/ui/checkbox"; +import { Badge } from "~/components/ui/badge"; +import { Separator } from "~/components/ui/separator"; +import { Progress } from "~/components/ui/progress"; +import { RichTextEditor } from "~/components/ui/rich-text-editor"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "~/components/ui/select"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "~/components/ui/tabs"; +import { toast } from "sonner"; +import { + Check, + ChevronRight, + Package, + FileText, + Settings, + Download, + Workflow, + BarChart3, + Users, + Shield, + Info, + Sparkles, + List, + Edit, + Eye, +} from "lucide-react"; +import Link from "next/link"; +import { TemplateShareDialog } from "./template-share-dialog"; + +type TemplateBuilderProps = { + organizationId: string; +}; + +type AssetSelection = { + workflowIds: string[]; + reportIds: string[]; + actionTemplateIds: string[]; + roleNames: string[]; + projectIds: string[]; + invoiceTemplateIds: string[]; + uiLayoutKeys: string[]; + includeSeeds: boolean; +}; + +export function TemplateBuilder({ organizationId }: TemplateBuilderProps) { + const { data: session } = authClient.useSession(); + const [activeTab, setActiveTab] = useState<"create" | "my-templates">( + "create" + ); + const [step, setStep] = useState<0 | 1 | 2 | 3>(0); + const [selection, setSelection] = useState({ + workflowIds: [], + reportIds: [], + actionTemplateIds: [], + roleNames: [], + projectIds: [], + invoiceTemplateIds: [], + uiLayoutKeys: [], + includeSeeds: false, + }); + const [name, setName] = useState(""); + const [description, setDescription] = useState(""); + const [category, setCategory] = useState(""); + const [version, setVersion] = useState("1.0.0"); + const [appVersion, setAppVersion] = useState("1.0.0"); + const [status, setStatus] = useState<"DRAFT" | "PUBLISHED">("DRAFT"); + const [compatibleModules] = useState< + Array<"crm" | "projects" | "finance" | "hr"> + >(["crm"]); + + // Data sources + const workflows = api.workflows.workflow.getWorkflows.useQuery({ + organizationId, + limit: 100, + }); + const reports = api.financialReports.list.useQuery({ organizationId }); + const actionTemplates = api.workflows.actions.getActionTemplates.useQuery({ + organizationId, + }); + const roles = api.customRoles.getOrganizationCustomRoles.useQuery( + { + userId: session?.user?.id ?? "", + organizationId, + }, + { + enabled: !!session?.user?.id, + } + ); + const projects = api.project.getAll.useQuery({ organizationId }); + const invoices = api.invoice.listInvoices.useQuery({ organizationId }); + const myTemplates = api.templates.listOrg.useQuery({ organizationId }); + + const exportMutation = api.templates.exportSelection.useMutation(); + const createPackageMutation = api.templates.createPackage.useMutation(); + const validateMutation = api.templates.validateManifest.useMutation(); + const utils = api.useUtils(); + + const canContinueAssets = useMemo(() => { + return ( + selection.workflowIds.length + + selection.reportIds.length + + selection.actionTemplateIds.length + + selection.roleNames.length + + selection.projectIds.length + + selection.invoiceTemplateIds.length + + selection.uiLayoutKeys.length > + 0 + ); + }, [selection]); + + const canSave = useMemo(() => { + return name.trim().length > 0 && /^\d+\.\d+\.\d+$/.test(version); + }, [name, version]); + + const toggle = (arr: string[], id: string) => + arr.includes(id) ? arr.filter(x => x !== id) : [...arr, id]; + + const handleExportAndSave = async () => { + try { + const manifest = await exportMutation.mutateAsync({ + organizationId, + selection: { + workflowIds: selection.workflowIds, + reportIds: selection.reportIds, + actionTemplateIds: selection.actionTemplateIds, + roleNames: selection.roleNames, + projectIds: selection.projectIds, + invoiceTemplateIds: selection.invoiceTemplateIds, + uiLayoutKeys: selection.uiLayoutKeys, + includeSeeds: selection.includeSeeds, + }, + meta: { + name, + description: description || undefined, + category: category || undefined, + version, + appVersion, + compatibleModules: + compatibleModules.length > 0 + ? (compatibleModules as [ + "crm" | "projects" | "finance" | "hr", + ...Array<"crm" | "projects" | "finance" | "hr">, + ]) + : ["crm"], + }, + }); + + const valid = await validateMutation.mutateAsync({ manifest }); + if (!valid.valid) { + toast.error("Manifest validation failed"); + return; + } + + await createPackageMutation.mutateAsync({ + organizationId, + name, + description: description || undefined, + category: category || undefined, + version, + status, + tags: [], + manifest, + }); + + toast.success("Template package created"); + setStep(3); + await utils.templates.listOrg.invalidate(); + } catch (e: unknown) { + const message = + e instanceof Error ? e.message : "Failed to create template package"; + toast.error(message); + } + }; + + const steps = [ + { + id: 0, + title: "Select Assets", + description: "Choose components to include", + icon: Package, + }, + { + id: 1, + title: "Configure Details", + description: "Set metadata and information", + icon: Settings, + }, + { + id: 2, + title: "Review & Validate", + description: "Preview your template package", + icon: FileText, + }, + { + id: 3, + title: "Complete", + description: "Template package created", + icon: Check, + }, + ]; + + const getStepStatus = (stepId: number) => { + if (stepId < step) return "completed"; + if (stepId === step) return "current"; + return "pending"; + }; + + return ( + +
+ {/* Header */} +
+
+
+ +
+
+

+ Template Builder +

+

+ Create reusable template packages from your organization's + assets +

+
+
+
+ + {/* Tabs */} + + setActiveTab(value as "create" | "my-templates") + } + > + + + + Create Template + + + + My Templates + + + + + {/* Progress Steps */} + + +
+
+

Progress

+ + Step {step + 1} of {steps.length} + +
+ + + +
+ {steps.map((stepItem, _index) => { + const status = getStepStatus(stepItem.id); + const Icon = stepItem.icon; + + return ( +
+
+ {status === "completed" ? ( + + ) : ( + + )} +
+
+

+ {stepItem.title} +

+

+ {stepItem.description} +

+
+
+ ); + })} +
+
+
+
+ + {/* Main Content */} + + +
+ {step === 0 && ( +
+
+

+ + Select Assets +

+

+ Choose the components you want to include in your + template package. +

+
+ +
+ {/* Workflows */} + + +
+
+ +
+
+ + Workflows + + + Automation processes + +
+ + {selection.workflowIds.length} + +
+
+ +
+ {(workflows.data?.workflows ?? []).length === + 0 ? ( +

+ No workflows available +

+ ) : ( +
+ {(workflows.data?.workflows ?? []).map(w => ( + + ))} +
+ )} +
+
+
+ + {/* Reports */} + + +
+
+ +
+
+ + Reports + + + Financial reports + +
+ + {selection.reportIds.length} + +
+
+ +
+ {(reports.data ?? []).length === 0 ? ( +

+ No reports available +

+ ) : ( +
+ {(reports.data ?? []).map(r => ( + + ))} +
+ )} +
+
+
+ + {/* Action Templates */} + + +
+
+ +
+
+ + Action Templates + + + Workflow actions + +
+ + {selection.actionTemplateIds.length} + +
+
+ +
+ {(actionTemplates.data ?? []).length === 0 ? ( +

+ No action templates available +

+ ) : ( +
+ {(actionTemplates.data ?? []).map(a => ( + + ))} +
+ )} +
+
+
+ + {/* Roles */} + + +
+
+ +
+
+ + Custom Roles + + + Permission roles + +
+ + {selection.roleNames.length} + +
+
+ +
+ {(roles.data ?? []).length === 0 ? ( +

+ No custom roles available +

+ ) : ( +
+ {(roles.data ?? []).map(r => ( + + ))} +
+ )} +
+
+
+ + {/* Projects */} + + +
+
+ +
+
+ + Projects + + + Project templates with tasks + +
+
+
+ +
+ {(projects.data ?? []).length === 0 ? ( +

+ No projects available +

+ ) : ( +
+ {(projects.data ?? []).map(project => ( + + ))} +
+ )} +
+
+
+ + {/* Invoices */} + + +
+
+ +
+
+ + Invoice Templates + + + Invoice configurations and templates + +
+
+
+ +
+ {(invoices.data ?? []).length === 0 ? ( +

+ No invoices available +

+ ) : ( +
+ {(invoices.data ?? []).map(invoice => ( + + ))} +
+ )} +
+
+
+ + {/* UI Layout Configurations */} + + +
+
+ +
+
+ + UI Layout Configurations + + + Custom UI layouts and configurations + +
+
+
+ +
+
+
+ +
+

+ Coming Soon +

+

+ UI layout configurations will be available in + a future update +

+
+
+
+
+ + {/* Sample Data Option */} + + +
+
+ +
+
+ + Sample Data + + + Include demo data for testing + +
+
+
+ + + +
+
+ + + +
+
+

+ Ready to continue? +

+

+ {canContinueAssets + ? "You've selected assets to include in your template." + : "Select at least one asset to continue."} +

+
+ +
+
+ )} + + {step === 1 && ( +
+
+

+ + Configure Details +

+

+ Set up the metadata and information for your template + package. +

+
+ +
+ {/* Basic Information */} + + + + + Basic Information + + + Essential details about your template + + + +
+ + setName(e.target.value)} + placeholder="Enter template name" + className="w-full" + /> +

+ Choose a descriptive name for your template +

+
+ +
+ + +

+ Help others understand when to use this template +

+
+ +
+ + +

+ Categorize your template for easier discovery +

+
+
+
+ + {/* Version & Compatibility */} + + + + + Version & Compatibility + + + Version information and compatibility settings + + + +
+ + setVersion(e.target.value)} + placeholder="1.0.0" + className="w-full" + /> +

+ Use semantic versioning (e.g., 1.0.0) +

+
+ +
+ + setAppVersion(e.target.value)} + placeholder="1.0.0" + className="w-full" + /> +

+ Minimum OpenSyte version required +

+
+ +
+ + +

+ Draft templates are private, published are + visible to others +

+
+ +
+ +
+ {compatibleModules.map(module => ( + + {module.charAt(0).toUpperCase() + + module.slice(1)} + + ))} +
+

+ Modules this template is compatible with +

+
+
+
+
+ + + +
+
+

+ Configuration complete? +

+

+ {canSave + ? "Ready to review your template configuration." + : "Please fill in the required fields to continue."} +

+
+
+ + +
+
+
+ )} + + {step === 2 && ( +
+
+

+ + Review & Validate +

+

+ Review your template configuration before creating the + package. +

+
+ +
+ {/* Template Information */} + + + + + Template Information + + + +
+
+ + Name: + + + {name || "Untitled"} + +
+
+ + Version: + + {version} +
+
+ + Category: + + + {category || "Uncategorized"} + +
+
+ + Status: + + + {status} + +
+
+ + App Version: + + {appVersion} +
+ {description && ( +
+ + Description: + +
+
+ )} +
+ + + + {/* Assets Summary */} + + + + + Assets Summary + + + +
+
+
+ +
+
+

+ Workflows +

+

+ {selection.workflowIds.length} +

+
+
+
+
+ +
+
+

+ Reports +

+

+ {selection.reportIds.length} +

+
+
+
+
+ +
+
+

+ Actions +

+

+ {selection.actionTemplateIds.length} +

+
+
+
+
+ +
+
+

+ Roles +

+

+ {selection.roleNames.length} +

+
+
+
+
+ +
+
+

+ Sample Data +

+

+ {selection.includeSeeds ? "Yes" : "No"} +

+
+
+
+ +
+
+ + Total Assets: + + + {selection.workflowIds.length + + selection.reportIds.length + + selection.actionTemplateIds.length + + selection.roleNames.length + + selection.projectIds.length + + selection.invoiceTemplateIds.length} + +
+
+
+
+
+ + + +
+
+

+ Ready to create template? +

+

+ This will package your selected assets into a + reusable template. +

+
+
+ + +
+
+
+ )} + + {step === 3 && ( +
+
+
+
+ +
+
+
+

+ Template Created Successfully! +

+

+ Your template package "{name}" has been + created and is ready to use. +

+
+
+ + + + + What's Next? + + + +
    +
  • + • Your template is now available in the template + gallery +
  • +
  • + • Share it with other organizations or keep it + private +
  • +
  • + • Install it in other organizations to replicate + your setup +
  • +
  • + • Update it anytime by creating a new version +
  • +
+
+
+ +
+ +
+
+ )} +
+ + + + + + + + + + My Templates + + + View and edit your existing template packages + + + + {myTemplates.isLoading ? ( +
+
+
+ ) : myTemplates.error ? ( +
+

+ Failed to load templates. Please try again. +

+
+ ) : (myTemplates.data ?? []).length === 0 ? ( +
+
+ +
+

+ No templates yet +

+

+ You haven't created any template packages yet. +

+ +
+ ) : ( +
+ {(myTemplates.data ?? []).map(template => ( +
+
+
+ +
+
+

{template.name}

+
+ + v{template.version} + + + {template.status} + + {template.category && ( + + {template.category} + + )} +
+
+
+
+ + + + + + + +
+
+ ))} +
+ )} + + + + +
+ + ); +} diff --git a/src/components/templates/template-edit-client.tsx b/src/components/templates/template-edit-client.tsx new file mode 100644 index 0000000..ba6f883 --- /dev/null +++ b/src/components/templates/template-edit-client.tsx @@ -0,0 +1,1425 @@ +"use client"; + +import { useMemo, useState, useEffect } from "react"; +import { useRouter } from "next/navigation"; +import { api } from "~/trpc/react"; +import { authClient } from "~/lib/auth-client"; +import { ClientPermissionGuard } from "~/components/shared/client-permission-guard"; +import { PERMISSIONS } from "~/lib/rbac"; +import { Button } from "~/components/ui/button"; +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "~/components/ui/card"; +import { Input } from "~/components/ui/input"; +import { Label } from "~/components/ui/label"; +import { Checkbox } from "~/components/ui/checkbox"; +import { Badge } from "~/components/ui/badge"; +import { Separator } from "~/components/ui/separator"; +import { Progress } from "~/components/ui/progress"; +import { RichTextEditor } from "~/components/ui/rich-text-editor"; +import type { TemplateStatus } from "@prisma/client"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "~/components/ui/select"; +import { toast } from "sonner"; +import { TemplateManifestSchema } from "~/types/templates"; +import { + Check, + ChevronRight, + Package, + FileText, + Settings, + Workflow, + BarChart3, + Users, + Shield, + Info, + Sparkles, + ArrowLeft, + Save, + Eye, +} from "lucide-react"; + +type TemplateEditClientProps = { + organizationId: string; + templateId: string; + template: { + name?: string; + description?: string | null; + category?: string | null; + version?: string | null; + status?: TemplateStatus | null; + manifest?: unknown; + }; +}; + +type PublishableStatus = "DRAFT" | "PUBLISHED"; + +type AssetSelection = { + workflowIds: string[]; + reportIds: string[]; + actionTemplateIds: string[]; + roleNames: string[]; + projectIds: string[]; + invoiceTemplateIds: string[]; + uiLayoutKeys: string[]; + includeSeeds: boolean; +}; + +export function TemplateEditClient({ + organizationId, + templateId, + template, +}: TemplateEditClientProps) { + const router = useRouter(); + const { data: session } = authClient.useSession(); + const [step, setStep] = useState<0 | 1 | 2 | 3>(0); + + // Parse existing manifest to get current selection + const existingManifest = useMemo(() => { + if (!template.manifest) return null; + const parsed = TemplateManifestSchema.safeParse(template.manifest); + return parsed.success ? parsed.data : null; + }, [template.manifest]); + + const [selection, setSelection] = useState({ + workflowIds: [], + reportIds: [], + actionTemplateIds: [], + roleNames: [], + projectIds: [], + invoiceTemplateIds: [], + uiLayoutKeys: [], + includeSeeds: false, + }); + + const [name, setName] = useState(""); + const [description, setDescription] = useState(""); + const [category, setCategory] = useState(""); + const [version, setVersion] = useState("1.0.0"); + const [appVersion, setAppVersion] = useState("1.0.0"); + const [status, setStatus] = useState("DRAFT"); + const [compatibleModules] = useState< + Array<"crm" | "projects" | "finance" | "hr"> + >(["crm"]); + + // Data sources + const workflows = api.workflows.workflow.getWorkflows.useQuery({ + organizationId, + limit: 100, + }); + const reports = api.financialReports.list.useQuery({ organizationId }); + const actionTemplates = api.workflows.actions.getActionTemplates.useQuery({ + organizationId, + }); + const roles = api.customRoles.getOrganizationCustomRoles.useQuery( + { + userId: session?.user?.id ?? "", + organizationId, + }, + { + enabled: !!session?.user?.id, + } + ); + const projects = api.project.getAll.useQuery({ organizationId }); + const invoices = api.invoice.listInvoices.useQuery({ organizationId }); + + // Initialize form data with existing template data + useEffect(() => { + if (template && existingManifest) { + setName(template.name ?? ""); + setDescription(template.description ?? ""); + setCategory(template.category ?? ""); + setVersion(template.version ?? "1.0.0"); + setAppVersion(existingManifest.header.compatibleAppVersion ?? "1.0.0"); + setStatus(template.status === "PUBLISHED" ? "PUBLISHED" : "DRAFT"); + } + }, [template, existingManifest]); + + // Map manifest assets to current org DB ids so checkboxes prefill + useEffect(() => { + if (!existingManifest) return; + + const wfByName = new Map( + (workflows.data?.workflows ?? []).map(w => [w.name, w.id]) + ); + const reportByName = new Map((reports.data ?? []).map(r => [r.name, r.id])); + const actionByName = new Map( + (actionTemplates.data ?? []).map(a => [a.name, String(a.id ?? a.name)]) + ); + const projectByName = new Map( + (projects.data ?? []).map(p => [p.name, p.id]) + ); + const invoiceByNumber = new Map( + (invoices.data ?? []).map(inv => [inv.invoiceNumber, inv.id]) + ); + + const selectedWorkflowIds = existingManifest.assets.workflows + .map(w => w.workflow.name) + .map(name => wfByName.get(name)) + .filter((v): v is string => Boolean(v)); + + const selectedReportIds = existingManifest.assets.reports + .map(r => r.name ?? "") + .map(name => reportByName.get(name)) + .filter((v): v is string => Boolean(v)); + + const selectedActionTemplateIds = [ + // System templates referenced by templateId + ...existingManifest.assets.actionTemplates + .map(a => a.templateId) + .filter((id): id is string => Boolean(id)), + // Org action templates by name + ...existingManifest.assets.actionTemplates + .map(a => a.name ?? "") + .map(name => actionByName.get(name)) + .filter((v): v is string => Boolean(v)), + ]; + + const selectedRoleNames = existingManifest.assets.rbac.roles.map( + r => r.name + ); + + const selectedProjectIds = (existingManifest.assets.projects ?? []) + .map(p => p.name) + .map(name => projectByName.get(name)) + .filter((v): v is string => Boolean(v)); + + const selectedInvoiceIds = (existingManifest.assets.invoices ?? []) + .map(i => i.invoiceNumber ?? "") + .map(num => invoiceByNumber.get(num)) + .filter((v): v is string => Boolean(v)); + + setSelection(s => ({ + ...s, + workflowIds: selectedWorkflowIds, + reportIds: selectedReportIds, + actionTemplateIds: selectedActionTemplateIds, + roleNames: selectedRoleNames, + projectIds: selectedProjectIds, + invoiceTemplateIds: selectedInvoiceIds, + })); + }, [ + existingManifest, + workflows.data, + reports.data, + actionTemplates.data, + projects.data, + invoices.data, + ]); + + // roles query already above + + const exportMutation = api.templates.exportSelection.useMutation(); + const updateMutation = api.templates.updatePackage.useMutation(); + const validateMutation = api.templates.validateManifest.useMutation(); + const utils = api.useUtils(); + + const toggle = (arr: string[], id: string) => + arr.includes(id) ? arr.filter(x => x !== id) : [...arr, id]; + + const canContinueAssets = useMemo(() => { + return ( + selection.workflowIds.length + + selection.reportIds.length + + selection.actionTemplateIds.length + + selection.roleNames.length + + selection.projectIds.length + + selection.invoiceTemplateIds.length + + selection.uiLayoutKeys.length + ); + }, [selection]); + + const canSave = useMemo(() => { + return name.trim().length > 0 && /^\d+\.\d+\.\d+$/.test(version); + }, [name, version]); + + const handleUpdateTemplate = async () => { + try { + const manifest = await exportMutation.mutateAsync({ + organizationId, + selection: { + workflowIds: selection.workflowIds, + reportIds: selection.reportIds, + actionTemplateIds: selection.actionTemplateIds, + roleNames: selection.roleNames, + projectIds: selection.projectIds, + invoiceTemplateIds: selection.invoiceTemplateIds, + uiLayoutKeys: selection.uiLayoutKeys, + includeSeeds: selection.includeSeeds, + }, + meta: { + name, + description: description || undefined, + category: category || undefined, + version, + appVersion, + compatibleModules: + compatibleModules.length > 0 + ? (compatibleModules as [ + "crm" | "projects" | "finance" | "hr", + ...Array<"crm" | "projects" | "finance" | "hr">, + ]) + : ["crm"], + }, + }); + + const valid = await validateMutation.mutateAsync({ manifest }); + if (!valid.valid) { + toast.error("Manifest validation failed"); + return; + } + + await updateMutation.mutateAsync({ + templatePackageId: templateId, + name, + description: description || undefined, + category: category || undefined, + version, + status, + manifest, + }); + + toast.success("Template updated successfully"); + setStep(3); + await utils.templates.listOrg.invalidate(); + await utils.templates.getDetails.invalidate(); + } catch (e: unknown) { + const message = + e instanceof Error ? e.message : "Failed to update template"; + toast.error(message); + } + }; + + const steps = [ + { + id: 0, + title: "Select Assets", + description: "Choose components to include", + icon: Package, + }, + { + id: 1, + title: "Configure Details", + description: "Set metadata and information", + icon: Settings, + }, + { + id: 2, + title: "Review & Validate", + description: "Preview your template package", + icon: FileText, + }, + { + id: 3, + title: "Complete", + description: "Template updated successfully", + icon: Check, + }, + ]; + + const getStepStatus = (stepId: number) => { + if (stepId < step) return "completed"; + if (stepId === step) return "current"; + return "pending"; + }; + + return ( + +
+ {/* Header */} +
+
+ +
+
+
+ +
+
+

+ Edit Template: {template.name} +

+

+ Update your template package configuration and assets +

+
+
+
+ + {/* Progress Steps */} + + +
+
+

Progress

+ + Step {step + 1} of {steps.length} + +
+ + + +
+ {steps.map((stepItem, _index) => { + const status = getStepStatus(stepItem.id); + const Icon = stepItem.icon; + + return ( +
+
+ {status === "completed" ? ( + + ) : ( + + )} +
+
+

+ {stepItem.title} +

+

+ {stepItem.description} +

+
+
+ ); + })} +
+
+
+
+ + {/* Main Content */} + + +
+ {step === 0 && ( +
+
+

+ + Select Assets +

+

+ Choose the components you want to include in your template + package. +

+
+ +
+ {/* Workflows */} + + +
+
+ +
+
+ + Workflows + + + Automation processes + +
+ + {selection.workflowIds.length} + +
+
+ +
+ {(workflows.data?.workflows ?? []).length === 0 ? ( +

+ No workflows available +

+ ) : ( +
+ {(workflows.data?.workflows ?? []).map(w => ( + + ))} +
+ )} +
+
+
+ + {/* Reports */} + + +
+
+ +
+
+ Reports + + Financial reports + +
+ + {selection.reportIds.length} + +
+
+ +
+ {(reports.data ?? []).length === 0 ? ( +

+ No reports available +

+ ) : ( +
+ {(reports.data ?? []).map(r => ( + + ))} +
+ )} +
+
+
+ + {/* Action Templates */} + + +
+
+ +
+
+ + Action Templates + + + Workflow actions + +
+ + {selection.actionTemplateIds.length} + +
+
+ +
+ {(actionTemplates.data ?? []).length === 0 ? ( +

+ No action templates available +

+ ) : ( +
+ {(actionTemplates.data ?? []).map(a => ( + + ))} +
+ )} +
+
+
+ + {/* Roles */} + + +
+
+ +
+
+ + Custom Roles + + + Permission roles + +
+ + {selection.roleNames.length} + +
+
+ +
+ {(roles.data ?? []).length === 0 ? ( +

+ No custom roles available +

+ ) : ( +
+ {(roles.data ?? []).map(r => ( + + ))} +
+ )} +
+
+
+ + {/* Projects */} + + +
+
+ +
+
+ + Projects + + + Project templates with tasks + +
+ + {selection.projectIds.length} + +
+
+ +
+ {(projects.data ?? []).length === 0 ? ( +

+ No projects available +

+ ) : ( +
+ {(projects.data ?? []).map(project => ( + + ))} +
+ )} +
+
+
+ + {/* Invoices */} + + +
+
+ +
+
+ + Invoice Templates + + + Invoice configurations and templates + +
+ + {selection.invoiceTemplateIds.length} + +
+
+ +
+ {(invoices.data ?? []).length === 0 ? ( +

+ No invoices available +

+ ) : ( +
+ {(invoices.data ?? []).map(invoice => ( + + ))} +
+ )} +
+
+
+ + {/* UI Layout Configurations */} + + +
+
+ +
+
+ + UI Layout Configurations + + + Custom UI layouts and configurations + +
+
+
+ +
+
+
+ +
+

+ Coming Soon +

+

+ UI layout configurations will be available in a + future update +

+
+
+
+
+ + {/* Sample Data Option */} + + +
+
+ +
+
+ + Sample Data + + + Include demo data for testing + +
+
+
+ + + +
+
+ + + +
+
+

Ready to continue?

+

+ {canContinueAssets + ? "You've selected assets to include in your template." + : "Select at least one asset to continue."} +

+
+ +
+
+ )} + + {step === 1 && ( +
+
+

+ + Configure Details +

+

+ Update the metadata and information for your template + package. +

+
+ +
+ {/* Basic Information */} + + + + + Basic Information + + + Essential details about your template + + + +
+ + setName(e.target.value)} + placeholder="Enter template name" + className="w-full" + /> +

+ Choose a descriptive name for your template +

+
+ +
+ + +

+ Help others understand when to use this template +

+
+ +
+ + +

+ Categorize your template for easier discovery +

+
+
+
+ + {/* Version & Status */} + + + + + Version & Status + + + Version information and publication status + + + +
+ + setVersion(e.target.value)} + placeholder="1.0.0" + className="w-full" + /> +

+ Use semantic versioning (e.g., 1.0.0) +

+
+ +
+ + setAppVersion(e.target.value)} + placeholder="1.0.0" + className="w-full" + /> +

+ Minimum OpenSyte version required +

+
+ +
+ + +

+ Draft templates are private, published are visible + to others +

+
+ +
+ +
+ {compatibleModules.map(module => ( + + {module.charAt(0).toUpperCase() + + module.slice(1)} + + ))} +
+

+ Modules this template is compatible with +

+
+
+
+
+ + + +
+
+

+ Configuration complete? +

+

+ {canSave + ? "Ready to review your template configuration." + : "Please fill in the required fields to continue."} +

+
+
+ + +
+
+
+ )} + + {step === 2 && ( +
+
+

+ + Review & Validate +

+

+ Review your template configuration before updating the + package. +

+
+ +
+ {/* Template Information */} + + + + + Template Information + + + +
+
+ + Name: + + + {name || "Untitled"} + +
+
+ + Version: + + {version} +
+
+ + Status: + + + {status} + +
+
+ + Category: + + + {category || "Uncategorized"} + +
+
+ + App Version: + + {appVersion} +
+ {description && ( +
+ + Description: + +
+
+ )} +
+ + + + {/* Assets Summary */} + + + + + Assets Summary + + + +
+
+
+ +
+
+

+ Workflows +

+

+ {selection.workflowIds.length} +

+
+
+
+
+ +
+
+

+ Reports +

+

+ {selection.reportIds.length} +

+
+
+
+
+ +
+
+

+ Actions +

+

+ {selection.actionTemplateIds.length} +

+
+
+
+
+ +
+
+

+ Roles +

+

+ {selection.roleNames.length} +

+
+
+
+ +
+
+ + Total Assets: + + + {selection.workflowIds.length + + selection.reportIds.length + + selection.actionTemplateIds.length + + selection.roleNames.length + + selection.projectIds.length + + selection.invoiceTemplateIds.length} + +
+
+
+
+
+ + + +
+
+

+ Ready to update template? +

+

+ This will update your template package with the new + configuration. +

+
+
+ + +
+
+
+ )} + + {step === 3 && ( +
+
+
+
+ +
+
+
+

+ Template Updated Successfully! +

+

+ Your template package "{name}" has been + updated with the new configuration. +

+
+
+ + + + + What's Next? + + + +
    +
  • + • Your updated template is now available in the + template gallery +
  • +
  • + • Changes will be reflected in future installations +
  • +
  • • You can continue editing or view the template
  • +
+
+
+ +
+ + +
+
+ )} +
+ + +
+ + ); +} diff --git a/src/components/templates/template-install-dialog.tsx b/src/components/templates/template-install-dialog.tsx new file mode 100644 index 0000000..e399b0a --- /dev/null +++ b/src/components/templates/template-install-dialog.tsx @@ -0,0 +1,499 @@ +"use client"; + +import { useEffect, useMemo, useState } from "react"; +import { api } from "~/trpc/react"; +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, + DialogDescription, +} from "~/components/ui/dialog"; +import { Button } from "~/components/ui/button"; +import { Input } from "~/components/ui/input"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "~/components/ui/select"; +import { Progress } from "~/components/ui/progress"; +import { toast } from "sonner"; +import type { RouterOutputs } from "~/trpc/react"; +import { + TemplateManifestSchema, + type TemplateManifest, +} from "~/types/templates"; +import { + Package, + Settings, + CheckCircle, + AlertCircle, + MapPin, + Workflow, + Zap, + RefreshCw, +} from "lucide-react"; + +type TemplateInstallDialogProps = { + open: boolean; + onOpenChange: (open: boolean) => void; + organizationId: string; + templatePackageId?: string; + manifestOverride?: unknown; // Optional direct manifest for local testing +}; + +export function TemplateInstallDialog({ + open, + onOpenChange, + organizationId, + templatePackageId, + manifestOverride, +}: TemplateInstallDialogProps) { + const [strategy, setStrategy] = useState<"MERGE" | "OVERWRITE" | "PREFIX">( + "MERGE" + ); + const [namePrefix, setNamePrefix] = useState(""); + const [integrationMap, setIntegrationMap] = useState>( + {} + ); + + // Fetch template details (for preflight/manfiest extraction) if we have package id + const detailsQuery = api.templates.getDetails.useQuery( + { templatePackageId: templatePackageId ?? "" }, + { enabled: !!templatePackageId } + ); + + const manifest: TemplateManifest | null = useMemo(() => { + if (manifestOverride) { + const parsed = TemplateManifestSchema.safeParse(manifestOverride); + if (parsed.success) return parsed.data; + } + const maybe = detailsQuery.data?.manifest as unknown; + if (!maybe) return null; + const parsed = TemplateManifestSchema.safeParse(maybe); + return parsed.success ? parsed.data : null; + }, [detailsQuery.data, manifestOverride]); + + // const preflightMutation = api.templates.validateManifest.useMutation(); + + // Workflows integrations to map + const requiredIntegrations: Array<{ type: string; key: string }> = + useMemo(() => { + return ( + manifest?.requires?.integrations?.map(i => ({ + type: String(i.type), + key: i.key, + })) ?? [] + ); + }, [manifest]); + + // Integration options + const integrationsQuery = api.workflows.integrations.getIntegrations.useQuery( + { organizationId }, + { enabled: open } + ); + + const startInstallMutation = api.templates.startInstall.useMutation(); + const utils = api.useUtils(); + + const [installationId, setInstallationId] = useState(null); + + useEffect(() => { + if (!open) { + setIntegrationMap({}); + setInstallationId(null); + setNamePrefix(""); + setStrategy("MERGE"); + } + }, [open]); + + const canStart = useMemo(() => { + if (!manifest) return false; + // Ensure all required integrations are mapped + const integrationsOk = requiredIntegrations.every( + req => !!integrationMap[`${req.type}:${req.key}`] + ); + return integrationsOk; + }, [manifest, requiredIntegrations, integrationMap]); + + const beginInstall = async () => { + if (!manifest) return; + try { + const res = await startInstallMutation.mutateAsync({ + organizationId, + manifest, + strategy, + namePrefix: namePrefix || undefined, + templatePackageId: templatePackageId ?? undefined, + }); + setInstallationId(res.installationId); + toast.success("Installation started"); + // Poll status a few times (mocked streaming) + void pollStatus(res.installationId); + } catch (e: unknown) { + const message = + e instanceof Error ? e.message : "Failed to start installation"; + toast.error(message); + } + }; + + type Installation = RouterOutputs["templates"]["getInstallationStatus"]; + const pollStatus = async (id: string) => { + try { + let done = false; + while (!done) { + const s = (await utils.templates.getInstallationStatus.fetch({ + organizationId, + installationId: id, + })) as Installation | undefined; + if (!s) break; + if (s.status === "COMPLETED" || s.status === "FAILED") { + done = true; + if (s.status === "COMPLETED") { + toast.success("Template installed successfully!"); + // Auto-close dialog on successful completion + setTimeout(() => onOpenChange(false), 1000); + } else { + toast.error("Installation failed"); + } + break; + } + await new Promise(r => setTimeout(r, 1500)); + } + } catch { + // ignore + } + }; + + return ( + + + +
+
+ +
+
+ + Install Template + + + Configure and deploy this template to your organization + +
+
+
+ +
+ {!manifest ? ( +
+
+
+ + Loading template details... + +
+
+ ) : ( + <> + {/* Template Overview */} +
+
+

+ Template Overview +

+ + {/* Compatible Modules */} +
+ +
+ {(manifest.header.compatibleModules ?? []).length > 0 ? ( + manifest.header.compatibleModules.map(module => ( + + + {module.charAt(0).toUpperCase() + module.slice(1)} + + )) + ) : ( + + + No modules specified + + )} +
+
+ + {/* Requirements Summary */} +
+
+
+ +
+
+
+ {requiredIntegrations.length} +
+
+ Integrations +
+
+
+
+
+ +
+
+
+ {(manifest.assets.workflows?.length ?? 0) + + (manifest.assets.reports?.length ?? 0) + + (manifest.assets.actionTemplates?.length ?? 0)} +
+
+ Assets +
+
+
+
+
+
+ + {/* Integration Mapping Section */} +
+
+ +

+ Integration Mapping +

+
+
+ {requiredIntegrations.length === 0 ? ( +
+ + No integrations required for this template. +
+ ) : ( +
+

+ Map the required integrations to your existing + configurations. +

+ {requiredIntegrations.map(req => { + const key = `${req.type}:${req.key}`; + const isSelected = !!integrationMap[key]; + return ( +
+
+
+ +
+ +
+ ); + })} +
+ )} +
+
+ + {/* Installation Strategy */} +
+
+ +

+ Installation Strategy +

+
+

+ Choose how to handle conflicts with existing data. +

+
+
+ + +
+ + {strategy === "PREFIX" && ( +
+ + setNamePrefix(e.target.value)} + /> +

+ All imported assets will be prefixed with this text. +

+
+ )} +
+
+ + {/* Installation Actions */} +
+
+
+
+

+ {canStart ? "Ready to Install" : "Configuration Required"} +

+

+ {canStart + ? "All requirements are satisfied. Click below to start the installation." + : "Please complete all required configurations above before proceeding."} +

+
+
+ +
+ + +
+
+ + {/* Installation Progress */} + {installationId && ( +
+
+
+ +
+
+

+ Installing Template +

+

+ Please wait while we deploy your template +

+
+
+ + + +
+ + Installation ID: + + + {installationId} + +
+
+ )} + + )} +
+ +
+ ); +} diff --git a/src/components/templates/template-share-dialog.tsx b/src/components/templates/template-share-dialog.tsx new file mode 100644 index 0000000..97bc29b --- /dev/null +++ b/src/components/templates/template-share-dialog.tsx @@ -0,0 +1,620 @@ +"use client"; + +import { useState } from "react"; +import { Button } from "~/components/ui/button"; +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, + DialogTrigger, +} from "~/components/ui/dialog"; +import { + Form, + FormControl, + FormDescription, + FormField, + FormItem, + FormLabel, + FormMessage, +} from "~/components/ui/form"; +import { Input } from "~/components/ui/input"; +import { Textarea } from "~/components/ui/textarea"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "~/components/ui/select"; +import { Calendar } from "~/components/ui/calendar"; +import { + Popover, + PopoverContent, + PopoverTrigger, +} from "~/components/ui/popover"; +import { cn } from "~/lib/utils"; +import { format } from "date-fns"; +import { + Share, + Copy, + Mail, + Link, + Calendar as CalendarIcon, + Users, + Clock, + Shield, + ExternalLink, + CheckCircle, + Key, + Settings, +} from "lucide-react"; +import { useForm } from "react-hook-form"; +import { zodResolver } from "@hookform/resolvers/zod"; +import { z } from "zod"; +import { toast } from "sonner"; +import { api } from "~/trpc/react"; + +const shareFormSchema = z.object({ + name: z.string().optional(), + shareMode: z.enum(["LINK", "EMAIL", "MIXED"]).default("LINK"), + expiresAt: z.date().optional(), + maxUses: z.coerce.number().min(1).max(1000).optional(), + notes: z.string().max(1000).optional(), + recipientEmails: z.string().optional(), +}); + +type ShareFormValues = z.infer; + +interface TemplateShareDialogProps { + templatePackageId: string; + organizationId: string; + templateName: string; + templateDescriptionHtml?: string | null; // raw HTML (sanitized upstream) + variant?: "default" | "icon-only"; +} + +export function TemplateShareDialog({ + templatePackageId, + organizationId, + templateName, + templateDescriptionHtml, + variant = "default", +}: TemplateShareDialogProps) { + const [isOpen, setIsOpen] = useState(false); + const [shareUrl, setShareUrl] = useState(null); + + const form = useForm({ + resolver: zodResolver(shareFormSchema), + defaultValues: { + shareMode: "LINK", + }, + }); + + const createShareMutation = api.templateSharing.createShare.useMutation({ + onSuccess: data => { + // For EMAIL-only shares, shareUrl will be null, but we still want to show success + if (data.shareUrl) { + setShareUrl(data.shareUrl); + } else { + // For email-only shares, set a placeholder to trigger success state + setShareUrl("email-only"); + } + toast.success("Share created successfully!"); + }, + onError: error => { + toast.error(error.message); + }, + }); + + const onSubmit = (values: ShareFormValues) => { + const recipientEmails = values.recipientEmails + ? values.recipientEmails + .split(",") + .map(email => email.trim()) + .filter(email => email.length > 0) + : undefined; + + createShareMutation.mutate({ + templatePackageId, + organizationId, + name: values.name, + shareMode: values.shareMode, + expiresAt: values.expiresAt, + maxUses: values.maxUses, + notes: values.notes, + recipientEmails, + }); + }; + + const copyToClipboard = () => { + if (shareUrl && shareUrl !== "email-only") { + const fullUrl = getFullShareUrl(); + void navigator.clipboard.writeText(fullUrl); + toast.success("Share URL copied to clipboard!"); + } + }; + + const getFullShareUrl = () => { + if (!shareUrl || shareUrl === "email-only") return ""; + if (typeof window !== "undefined") { + const { protocol, host } = window.location; + const token = shareUrl.split("/").pop(); + return `${protocol}//${host}/shared/templates/${token}`; + } + return shareUrl; + }; + + const isEmailOnlyShare = shareUrl === "email-only"; + + const handleClose = () => { + setIsOpen(false); + setShareUrl(null); + form.reset(); + }; + + // Success state UI + if (shareUrl) { + return ( + + + {variant === "icon-only" ? ( + + ) : ( + + )} + + + +
+ +
+ + Share Created Successfully! + + + Your template "{templateName}" is now ready to share + with others. + +
+ +
+ {!isEmailOnlyShare && ( +
+
+
+
+ +
+
+

+ Share URL +

+

+ Copy and share this link +

+
+
+ +
+
+
+ {getFullShareUrl()} +
+
+
+ )} + + {isEmailOnlyShare && ( +
+
+
+ +
+
+

+ Email Invitations Sent +

+

+ Your invitations have been sent to the specified + recipients +

+
+
+
+ )} + +
+
+ +
+
Secure
+
+ Encrypted link +
+
+
+
+ +
+
Trackable
+
+ Usage analytics +
+
+
+
+ +
+
Ready
+
+ Share instantly +
+
+
+
+ +
+

What happens next?

+
    +
  • • Recipients can preview the template package details
  • +
  • • They can import it into their organization
  • +
  • + • You'll be able to track usage and manage the share +
  • +
+
+
+ + + + {!isEmailOnlyShare && ( + + )} + +
+
+ ); + } + + // Form state UI + return ( + + + {variant === "icon-only" ? ( + + ) : ( + + )} + + + +
+
+ +
+
+ + Share Template Package + + + Share "{templateName}" with other organizations + +
+
+
+ + {templateDescriptionHtml && ( +
+ )} + +
+ + {/* Share Method Section */} +
+
+ +

Share Settings

+
+ +
+ ( + + + Share Method + + + + + )} + /> + + ( + + + Share Name (Optional) + + + + + + A descriptive name for this share + + + + )} + /> +
+
+ + {/* Access Control Section */} +
+
+ +

Access Control

+
+ +
+ ( + + + Expiration Date (Optional) + + + + + + + + + + date < new Date() || date < new Date("1900-01-01") + } + initialFocus + /> + + + + When this share should expire + + + + )} + /> + + ( + + + Usage Limit (Optional) + + + + + + Maximum number of imports allowed + + + + )} + /> +
+
+ + {/* Email Recipients Section */} + {(form.watch("shareMode") === "EMAIL" || + form.watch("shareMode") === "MIXED") && ( +
+
+ +

Email Recipients

+
+ + ( + + + Email Addresses + + +