@synap-core/api-types 1.0.45 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4453 @@
1
+ // Generated by dts-bundle-generator v9.5.1
2
+
3
+ /**
4
+ * Context Types
5
+ *
6
+ * Proper type definitions for tRPC context to avoid `any` types.
7
+ */
8
+ /**
9
+ * Database client type
10
+ *
11
+ * Note: Using `any` here to preserve Drizzle's schema inference.
12
+ * Attempting to use PostgresJsDatabase<any> loses the schema generic
13
+ * and breaks db.query.tableName access patterns.
14
+ */
15
+ export type DatabaseClient = any;
16
+ /**
17
+ * Ory Kratos identity
18
+ */
19
+ export interface KratosIdentity {
20
+ id: string;
21
+ traits: {
22
+ email: string;
23
+ name?: string;
24
+ [key: string]: unknown;
25
+ };
26
+ }
27
+ /**
28
+ * Ory Kratos session
29
+ */
30
+ export interface KratosSession {
31
+ identity: KratosIdentity;
32
+ active: boolean;
33
+ expires_at?: string;
34
+ authenticated_at?: string;
35
+ }
36
+ /**
37
+ * User object (simplified from Kratos identity)
38
+ */
39
+ export interface User {
40
+ id: string;
41
+ email: string;
42
+ name?: string;
43
+ }
44
+ /**
45
+ * Full tRPC context
46
+ */
47
+ export interface Context {
48
+ db: DatabaseClient;
49
+ authenticated: boolean;
50
+ userId?: string | null;
51
+ user?: User | null;
52
+ session?: KratosSession | null;
53
+ req?: Request;
54
+ socketIO?: any;
55
+ }
56
+ /**
57
+ * Workspaces Schema - Multi-user workspace support
58
+ *
59
+ * A workspace can be:
60
+ * - Personal (single user)
61
+ * - Team (multiple users with roles)
62
+ * - Enterprise (advanced features)
63
+ */
64
+ export interface WorkspaceSettings {
65
+ defaultEntityTypes?: string[];
66
+ theme?: string;
67
+ aiEnabled?: boolean;
68
+ allowExternalSharing?: boolean;
69
+ intelligenceServiceId?: string;
70
+ intelligenceServiceOverrides?: {
71
+ chat?: string;
72
+ analysis?: string;
73
+ };
74
+ validationRules?: {
75
+ [tableName: string]: {
76
+ create?: boolean;
77
+ update?: boolean;
78
+ delete?: boolean;
79
+ };
80
+ };
81
+ rolePermissions?: {
82
+ [role: string]: {
83
+ [tableName: string]: {
84
+ create?: boolean;
85
+ read?: boolean;
86
+ update?: boolean;
87
+ delete?: boolean;
88
+ };
89
+ };
90
+ };
91
+ aiGovernance?: {
92
+ autoApprove?: boolean;
93
+ requireReviewFor?: string[];
94
+ maxAgentsPerUser?: number;
95
+ allowAgentCreation?: boolean;
96
+ };
97
+ }
98
+ /**
99
+ * EventRecord - Database representation of an event
100
+ *
101
+ * This is the format returned from the database.
102
+ * It maps directly to the events table structure.
103
+ */
104
+ export interface EventRecord {
105
+ id: string;
106
+ timestamp: Date;
107
+ subjectId: string;
108
+ subjectType: string;
109
+ eventType: string;
110
+ userId: string;
111
+ data: Record<string, unknown>;
112
+ metadata?: Record<string, unknown>;
113
+ version: number;
114
+ causationId?: string;
115
+ correlationId?: string;
116
+ source: string;
117
+ }
118
+ /**
119
+ * @synap/events - Schema-Driven Event Generator
120
+ *
121
+ * This module generates event types and payload schemas from Drizzle database tables.
122
+ *
123
+ * V2.0 CONSOLIDATED PATTERN: {table}.{action}.{modifier}
124
+ *
125
+ * Actions: create | update | delete
126
+ * Modifiers: requested | validated
127
+ *
128
+ * Examples:
129
+ * entities.create.requested ← Intent submitted (by user or AI)
130
+ * entities.create.validated ← Change confirmed and applied
131
+ * entities.update.requested ← Update intent
132
+ * entities.update.validated ← Update confirmed
133
+ *
134
+ * No direct actions (e.g., entities.create) - all changes go through requested→validated flow.
135
+ */
136
+ /**
137
+ * Standard CRUD actions with modifiers for table events
138
+ *
139
+ * V2.1: Added 'approved' modifier for 3-phase flow
140
+ *
141
+ * Flow:
142
+ * 1. requested: Intent (user/AI wants to do something)
143
+ * 2. approved: Validated (permissions checked, user approved if needed)
144
+ * 3. validated: Completed (DB operation done, entity exists)
145
+ */
146
+ export type TableAction = "create.requested" | "create.approved" | "create.validated" | "update.requested" | "update.approved" | "update.validated" | "delete.requested" | "delete.approved" | "delete.validated";
147
+ declare const CORE_TABLES: readonly [
148
+ "entities",
149
+ "documents",
150
+ "documentVersions",
151
+ "chatThreads",
152
+ "conversationMessages",
153
+ "webhookSubscriptions",
154
+ "apiKeys",
155
+ "tags",
156
+ "agents",
157
+ "workspaces",
158
+ "workspaceMembers",
159
+ "views",
160
+ "userPreferences"
161
+ ];
162
+ export type CoreTable = (typeof CORE_TABLES)[number];
163
+ /**
164
+ * Flat list of all generated event types (for type checking)
165
+ *
166
+ * V2.1: Added .approved phase for 3-phase flow
167
+ */
168
+ export type GeneratedEventType = `${CoreTable}.create.requested` | `${CoreTable}.create.approved` | `${CoreTable}.create.validated` | `${CoreTable}.update.requested` | `${CoreTable}.update.approved` | `${CoreTable}.update.validated` | `${CoreTable}.delete.requested` | `${CoreTable}.delete.approved` | `${CoreTable}.delete.validated`;
169
+ /**
170
+ * Worker Registry - Static worker metadata for Admin UI
171
+ *
172
+ * V2.0: Simplified registry with only active workers
173
+ *
174
+ * Pattern: Table workers handle {table}.{crud}.requested events
175
+ * and emit {table}.{crud}.completed events.
176
+ */
177
+ export interface WorkerMetadata {
178
+ id: string;
179
+ name: string;
180
+ description: string;
181
+ triggers: string[];
182
+ outputs?: string[];
183
+ category: "table" | "shared" | "ai";
184
+ }
185
+ /**
186
+ * View Query Types
187
+ *
188
+ * Single source of truth for all view query and filter types.
189
+ */
190
+ /**
191
+ * Filter operator types
192
+ */
193
+ export type FilterOperator = "equals" | "not_equals" | "contains" | "not_contains" | "in" | "not_in" | "is_empty" | "is_not_empty" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal";
194
+ /**
195
+ * Filter definition for entity queries
196
+ */
197
+ export interface EntityFilter {
198
+ field: string;
199
+ operator: FilterOperator;
200
+ value?: unknown;
201
+ }
202
+ /**
203
+ * Sort rule for entity queries
204
+ */
205
+ export interface SortRule {
206
+ field: string;
207
+ direction: "asc" | "desc";
208
+ }
209
+ /**
210
+ * Query definition for structured views
211
+ * Defines which entities to show and how to filter them
212
+ */
213
+ export interface EntityQuery {
214
+ /** Entity types to include */
215
+ entityTypes?: string[];
216
+ /** Specific entity IDs (for fixed sets) */
217
+ entityIds?: string[];
218
+ /** Filter conditions */
219
+ filters?: EntityFilter[];
220
+ /** Sort rules (multiple sorts supported) */
221
+ sorts?: SortRule[];
222
+ /** Full-text search query */
223
+ search?: string;
224
+ /** Maximum number of entities to return */
225
+ limit?: number;
226
+ /** Offset for pagination */
227
+ offset?: number;
228
+ /** Group by field (for kanban, timeline) */
229
+ groupBy?: string;
230
+ }
231
+ /**
232
+ * View Content Types
233
+ *
234
+ * Defines the discriminated union for view content based on category.
235
+ * Categories determine the structure and purpose of view content.
236
+ */
237
+ /**
238
+ * View category determines content structure and rendering approach
239
+ * - structured: Query-based views with interchangeable layouts (table, kanban, graph, etc.)
240
+ * - canvas: Freeform drawing views (whiteboard, mindmap)
241
+ */
242
+ export type ViewCategory = "structured" | "canvas";
243
+ /**
244
+ * View Configuration Types
245
+ *
246
+ * Discriminated union for view configurations.
247
+ */
248
+ export interface ColumnDisplayConfig {
249
+ type: "text" | "badge" | "date" | "user" | "url" | "boolean" | "progress" | "rating" | "image" | "file";
250
+ params?: {
251
+ colors?: Record<string, string>;
252
+ format?: string;
253
+ relative?: boolean;
254
+ wrap?: boolean;
255
+ lines?: number;
256
+ precision?: number;
257
+ currency?: string;
258
+ align?: "left" | "center" | "right";
259
+ icon?: string;
260
+ };
261
+ }
262
+ export interface ColumnConfig {
263
+ id: string;
264
+ field: string;
265
+ width?: number;
266
+ visible?: boolean;
267
+ title?: string;
268
+ display?: ColumnDisplayConfig;
269
+ }
270
+ export interface FormattingRule {
271
+ id: string;
272
+ name?: string;
273
+ target: "row" | "cell" | "card";
274
+ filter: EntityFilter;
275
+ style: {
276
+ color?: string;
277
+ backgroundColor?: string;
278
+ fontWeight?: "bold" | "normal";
279
+ fontStyle?: "italic" | "normal";
280
+ strikeThrough?: boolean;
281
+ icon?: string;
282
+ };
283
+ }
284
+ export interface RenderSettings {
285
+ rowHeight?: "compact" | "default" | "tall";
286
+ formatting?: FormattingRule[];
287
+ columns?: ColumnConfig[];
288
+ groupByField?: string;
289
+ cardFields?: string[];
290
+ cardSettings?: {
291
+ coverField?: string;
292
+ showAvatars?: boolean;
293
+ visibleFields?: string[];
294
+ colorField?: string;
295
+ };
296
+ dateField?: string;
297
+ endDateField?: string;
298
+ colorField?: string;
299
+ layout?: "force" | "hierarchical" | "circular";
300
+ nodeColorField?: string;
301
+ edgeLabelField?: string;
302
+ }
303
+ export interface StructuredViewConfig {
304
+ category: "structured";
305
+ query: EntityQuery;
306
+ render?: RenderSettings;
307
+ }
308
+ /**
309
+ * Core API Router
310
+ */
311
+ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
312
+ ctx: Context;
313
+ meta: object;
314
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
315
+ transformer: true;
316
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
317
+ setup: import("@trpc/server").TRPCBuiltRouter<{
318
+ ctx: Context;
319
+ meta: object;
320
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
321
+ transformer: true;
322
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
323
+ status: import("@trpc/server").TRPCQueryProcedure<{
324
+ input: void;
325
+ output: {
326
+ initialized: boolean;
327
+ version: string;
328
+ };
329
+ meta: object;
330
+ }>;
331
+ }>>;
332
+ events: import("@trpc/server").TRPCBuiltRouter<{
333
+ ctx: Context;
334
+ meta: object;
335
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
336
+ transformer: true;
337
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
338
+ log: import("@trpc/server").TRPCMutationProcedure<{
339
+ input: {
340
+ subjectId: string;
341
+ subjectType: "user" | "entity" | "relation" | "system";
342
+ eventType: string;
343
+ data: Record<string, unknown>;
344
+ version: number;
345
+ metadata?: Record<string, unknown> | undefined;
346
+ source?: "system" | "api" | "automation" | "sync" | "migration" | undefined;
347
+ causationId?: string | undefined;
348
+ correlationId?: string | undefined;
349
+ };
350
+ output: EventRecord;
351
+ meta: object;
352
+ }>;
353
+ list: import("@trpc/server").TRPCQueryProcedure<{
354
+ input: {
355
+ limit?: number | undefined;
356
+ type?: string | undefined;
357
+ };
358
+ output: EventRecord[];
359
+ meta: object;
360
+ }>;
361
+ }>>;
362
+ capture: import("@trpc/server").TRPCBuiltRouter<{
363
+ ctx: Context;
364
+ meta: object;
365
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
366
+ transformer: true;
367
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
368
+ thought: import("@trpc/server").TRPCMutationProcedure<{
369
+ input: {
370
+ content: string;
371
+ context?: Record<string, any> | undefined;
372
+ };
373
+ output: {
374
+ success: boolean;
375
+ message: string;
376
+ requestId: string;
377
+ mode: string;
378
+ } | {
379
+ success: boolean;
380
+ message: string;
381
+ mode: string;
382
+ requestId?: undefined;
383
+ };
384
+ meta: object;
385
+ }>;
386
+ }>>;
387
+ entities: import("@trpc/server").TRPCBuiltRouter<{
388
+ ctx: Context;
389
+ meta: object;
390
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
391
+ transformer: true;
392
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
393
+ create: import("@trpc/server").TRPCMutationProcedure<{
394
+ input: {
395
+ type: "project" | "task" | "contact" | "meeting" | "idea" | "note";
396
+ title?: string | undefined;
397
+ description?: string | undefined;
398
+ workspaceId?: string | undefined;
399
+ documentId?: string | undefined;
400
+ };
401
+ output: {
402
+ status: string;
403
+ message: string;
404
+ id: string;
405
+ entity: {
406
+ id: string;
407
+ userId: string;
408
+ workspaceId: string | null;
409
+ title: string | null;
410
+ preview: string | null;
411
+ documentId: string | null;
412
+ fileUrl: string | null;
413
+ filePath: string | null;
414
+ fileSize: number | null;
415
+ fileType: string | null;
416
+ checksum: string | null;
417
+ projectIds: string[] | null;
418
+ version: number;
419
+ createdAt: Date;
420
+ updatedAt: Date;
421
+ deletedAt: Date | null;
422
+ type: "task";
423
+ metadata: {
424
+ status: "todo" | "in_progress" | "done" | "archived";
425
+ priority?: "low" | "medium" | "high" | "urgent" | undefined;
426
+ dueDate?: string | undefined;
427
+ completedAt?: string | undefined;
428
+ assignee?: string | undefined;
429
+ estimatedMinutes?: number | undefined;
430
+ actualMinutes?: number | undefined;
431
+ };
432
+ } | {
433
+ id: string;
434
+ userId: string;
435
+ workspaceId: string | null;
436
+ title: string | null;
437
+ preview: string | null;
438
+ documentId: string | null;
439
+ fileUrl: string | null;
440
+ filePath: string | null;
441
+ fileSize: number | null;
442
+ fileType: string | null;
443
+ checksum: string | null;
444
+ projectIds: string[] | null;
445
+ version: number;
446
+ createdAt: Date;
447
+ updatedAt: Date;
448
+ deletedAt: Date | null;
449
+ type: "note";
450
+ metadata: {
451
+ tags: string[];
452
+ format: "markdown" | "plain" | "rich";
453
+ isFavorite: boolean;
454
+ linkedEntities?: string[] | undefined;
455
+ };
456
+ } | {
457
+ id: string;
458
+ userId: string;
459
+ workspaceId: string | null;
460
+ title: string | null;
461
+ preview: string | null;
462
+ documentId: string | null;
463
+ fileUrl: string | null;
464
+ filePath: string | null;
465
+ fileSize: number | null;
466
+ fileType: string | null;
467
+ checksum: string | null;
468
+ projectIds: string[] | null;
469
+ version: number;
470
+ createdAt: Date;
471
+ updatedAt: Date;
472
+ deletedAt: Date | null;
473
+ type: "person";
474
+ metadata: {
475
+ email?: string | undefined;
476
+ phone?: string | undefined;
477
+ company?: string | undefined;
478
+ role?: string | undefined;
479
+ linkedInUrl?: string | undefined;
480
+ twitterHandle?: string | undefined;
481
+ notes?: string | undefined;
482
+ };
483
+ } | {
484
+ id: string;
485
+ userId: string;
486
+ workspaceId: string | null;
487
+ title: string | null;
488
+ preview: string | null;
489
+ documentId: string | null;
490
+ fileUrl: string | null;
491
+ filePath: string | null;
492
+ fileSize: number | null;
493
+ fileType: string | null;
494
+ checksum: string | null;
495
+ projectIds: string[] | null;
496
+ version: number;
497
+ createdAt: Date;
498
+ updatedAt: Date;
499
+ deletedAt: Date | null;
500
+ type: "event";
501
+ metadata: {
502
+ startTime: string;
503
+ endTime: string;
504
+ recurring: boolean;
505
+ isAllDay: boolean;
506
+ location?: string | undefined;
507
+ attendees?: string[] | undefined;
508
+ recurrenceRule?: string | undefined;
509
+ reminderMinutes?: number | undefined;
510
+ };
511
+ } | {
512
+ id: string;
513
+ userId: string;
514
+ workspaceId: string | null;
515
+ title: string | null;
516
+ preview: string | null;
517
+ documentId: string | null;
518
+ fileUrl: string | null;
519
+ filePath: string | null;
520
+ fileSize: number | null;
521
+ fileType: string | null;
522
+ checksum: string | null;
523
+ projectIds: string[] | null;
524
+ version: number;
525
+ createdAt: Date;
526
+ updatedAt: Date;
527
+ deletedAt: Date | null;
528
+ type: "file";
529
+ metadata: {
530
+ mimeType: string;
531
+ sizeBytes: number;
532
+ extension: string;
533
+ thumbnailUrl?: string | undefined;
534
+ downloadUrl?: string | undefined;
535
+ };
536
+ } | {
537
+ id: string;
538
+ userId: string;
539
+ workspaceId: string | null;
540
+ title: string | null;
541
+ preview: string | null;
542
+ documentId: string | null;
543
+ fileUrl: string | null;
544
+ filePath: string | null;
545
+ fileSize: number | null;
546
+ fileType: string | null;
547
+ checksum: string | null;
548
+ projectIds: string[] | null;
549
+ version: number;
550
+ createdAt: Date;
551
+ updatedAt: Date;
552
+ deletedAt: Date | null;
553
+ type: "code";
554
+ metadata: {
555
+ language: string;
556
+ snippet?: string | undefined;
557
+ };
558
+ } | {
559
+ id: string;
560
+ userId: string;
561
+ workspaceId: string | null;
562
+ title: string | null;
563
+ preview: string | null;
564
+ documentId: string | null;
565
+ fileUrl: string | null;
566
+ filePath: string | null;
567
+ fileSize: number | null;
568
+ fileType: string | null;
569
+ checksum: string | null;
570
+ projectIds: string[] | null;
571
+ version: number;
572
+ createdAt: Date;
573
+ updatedAt: Date;
574
+ deletedAt: Date | null;
575
+ type: "bookmark";
576
+ metadata: {
577
+ url: string;
578
+ favicon?: string | undefined;
579
+ };
580
+ } | {
581
+ id: string;
582
+ userId: string;
583
+ workspaceId: string | null;
584
+ title: string | null;
585
+ preview: string | null;
586
+ documentId: string | null;
587
+ fileUrl: string | null;
588
+ filePath: string | null;
589
+ fileSize: number | null;
590
+ fileType: string | null;
591
+ checksum: string | null;
592
+ projectIds: string[] | null;
593
+ version: number;
594
+ createdAt: Date;
595
+ updatedAt: Date;
596
+ deletedAt: Date | null;
597
+ type: "company";
598
+ metadata: {
599
+ website?: string | undefined;
600
+ industry?: string | undefined;
601
+ foundedYear?: number | undefined;
602
+ };
603
+ } | {
604
+ id: string;
605
+ userId: string;
606
+ workspaceId: string | null;
607
+ title: string | null;
608
+ preview: string | null;
609
+ documentId: string | null;
610
+ fileUrl: string | null;
611
+ filePath: string | null;
612
+ fileSize: number | null;
613
+ fileType: string | null;
614
+ checksum: string | null;
615
+ projectIds: string[] | null;
616
+ version: number;
617
+ createdAt: Date;
618
+ updatedAt: Date;
619
+ deletedAt: Date | null;
620
+ type: "contact";
621
+ metadata: {
622
+ email?: string | undefined;
623
+ phone?: string | undefined;
624
+ company?: string | undefined;
625
+ role?: string | undefined;
626
+ linkedInUrl?: string | undefined;
627
+ twitterHandle?: string | undefined;
628
+ notes?: string | undefined;
629
+ };
630
+ } | {
631
+ id: string;
632
+ userId: string;
633
+ workspaceId: string | null;
634
+ title: string | null;
635
+ preview: string | null;
636
+ documentId: string | null;
637
+ fileUrl: string | null;
638
+ filePath: string | null;
639
+ fileSize: number | null;
640
+ fileType: string | null;
641
+ checksum: string | null;
642
+ projectIds: string[] | null;
643
+ version: number;
644
+ createdAt: Date;
645
+ updatedAt: Date;
646
+ deletedAt: Date | null;
647
+ type: "meeting";
648
+ metadata: {
649
+ startTime: string;
650
+ endTime: string;
651
+ recurring: boolean;
652
+ isAllDay: boolean;
653
+ location?: string | undefined;
654
+ attendees?: string[] | undefined;
655
+ recurrenceRule?: string | undefined;
656
+ reminderMinutes?: number | undefined;
657
+ };
658
+ } | {
659
+ id: string;
660
+ userId: string;
661
+ workspaceId: string | null;
662
+ title: string | null;
663
+ preview: string | null;
664
+ documentId: string | null;
665
+ fileUrl: string | null;
666
+ filePath: string | null;
667
+ fileSize: number | null;
668
+ fileType: string | null;
669
+ checksum: string | null;
670
+ projectIds: string[] | null;
671
+ version: number;
672
+ createdAt: Date;
673
+ updatedAt: Date;
674
+ deletedAt: Date | null;
675
+ type: "idea";
676
+ metadata: {
677
+ tags: string[];
678
+ impact?: "low" | "medium" | "high" | undefined;
679
+ effort?: "low" | "medium" | "high" | undefined;
680
+ };
681
+ } | {
682
+ id: string;
683
+ userId: string;
684
+ workspaceId: string | null;
685
+ title: string | null;
686
+ preview: string | null;
687
+ documentId: string | null;
688
+ fileUrl: string | null;
689
+ filePath: string | null;
690
+ fileSize: number | null;
691
+ fileType: string | null;
692
+ checksum: string | null;
693
+ projectIds: string[] | null;
694
+ version: number;
695
+ createdAt: Date;
696
+ updatedAt: Date;
697
+ deletedAt: Date | null;
698
+ type: "project";
699
+ metadata: {
700
+ status: "archived" | "active" | "on_hold" | "completed";
701
+ priority?: "low" | "medium" | "high" | "urgent" | undefined;
702
+ dueDate?: string | undefined;
703
+ completedAt?: string | undefined;
704
+ owner?: string | undefined;
705
+ };
706
+ };
707
+ };
708
+ meta: object;
709
+ }>;
710
+ list: import("@trpc/server").TRPCQueryProcedure<{
711
+ input: {
712
+ type?: "project" | "task" | "contact" | "meeting" | "idea" | "note" | undefined;
713
+ workspaceId?: string | undefined;
714
+ limit?: number | undefined;
715
+ };
716
+ output: {
717
+ entities: ({
718
+ id: string;
719
+ userId: string;
720
+ workspaceId: string | null;
721
+ title: string | null;
722
+ preview: string | null;
723
+ documentId: string | null;
724
+ fileUrl: string | null;
725
+ filePath: string | null;
726
+ fileSize: number | null;
727
+ fileType: string | null;
728
+ checksum: string | null;
729
+ projectIds: string[] | null;
730
+ version: number;
731
+ createdAt: Date;
732
+ updatedAt: Date;
733
+ deletedAt: Date | null;
734
+ type: "task";
735
+ metadata: {
736
+ status: "todo" | "in_progress" | "done" | "archived";
737
+ priority?: "low" | "medium" | "high" | "urgent" | undefined;
738
+ dueDate?: string | undefined;
739
+ completedAt?: string | undefined;
740
+ assignee?: string | undefined;
741
+ estimatedMinutes?: number | undefined;
742
+ actualMinutes?: number | undefined;
743
+ };
744
+ } | {
745
+ id: string;
746
+ userId: string;
747
+ workspaceId: string | null;
748
+ title: string | null;
749
+ preview: string | null;
750
+ documentId: string | null;
751
+ fileUrl: string | null;
752
+ filePath: string | null;
753
+ fileSize: number | null;
754
+ fileType: string | null;
755
+ checksum: string | null;
756
+ projectIds: string[] | null;
757
+ version: number;
758
+ createdAt: Date;
759
+ updatedAt: Date;
760
+ deletedAt: Date | null;
761
+ type: "note";
762
+ metadata: {
763
+ tags: string[];
764
+ format: "markdown" | "plain" | "rich";
765
+ isFavorite: boolean;
766
+ linkedEntities?: string[] | undefined;
767
+ };
768
+ } | {
769
+ id: string;
770
+ userId: string;
771
+ workspaceId: string | null;
772
+ title: string | null;
773
+ preview: string | null;
774
+ documentId: string | null;
775
+ fileUrl: string | null;
776
+ filePath: string | null;
777
+ fileSize: number | null;
778
+ fileType: string | null;
779
+ checksum: string | null;
780
+ projectIds: string[] | null;
781
+ version: number;
782
+ createdAt: Date;
783
+ updatedAt: Date;
784
+ deletedAt: Date | null;
785
+ type: "person";
786
+ metadata: {
787
+ email?: string | undefined;
788
+ phone?: string | undefined;
789
+ company?: string | undefined;
790
+ role?: string | undefined;
791
+ linkedInUrl?: string | undefined;
792
+ twitterHandle?: string | undefined;
793
+ notes?: string | undefined;
794
+ };
795
+ } | {
796
+ id: string;
797
+ userId: string;
798
+ workspaceId: string | null;
799
+ title: string | null;
800
+ preview: string | null;
801
+ documentId: string | null;
802
+ fileUrl: string | null;
803
+ filePath: string | null;
804
+ fileSize: number | null;
805
+ fileType: string | null;
806
+ checksum: string | null;
807
+ projectIds: string[] | null;
808
+ version: number;
809
+ createdAt: Date;
810
+ updatedAt: Date;
811
+ deletedAt: Date | null;
812
+ type: "event";
813
+ metadata: {
814
+ startTime: string;
815
+ endTime: string;
816
+ recurring: boolean;
817
+ isAllDay: boolean;
818
+ location?: string | undefined;
819
+ attendees?: string[] | undefined;
820
+ recurrenceRule?: string | undefined;
821
+ reminderMinutes?: number | undefined;
822
+ };
823
+ } | {
824
+ id: string;
825
+ userId: string;
826
+ workspaceId: string | null;
827
+ title: string | null;
828
+ preview: string | null;
829
+ documentId: string | null;
830
+ fileUrl: string | null;
831
+ filePath: string | null;
832
+ fileSize: number | null;
833
+ fileType: string | null;
834
+ checksum: string | null;
835
+ projectIds: string[] | null;
836
+ version: number;
837
+ createdAt: Date;
838
+ updatedAt: Date;
839
+ deletedAt: Date | null;
840
+ type: "file";
841
+ metadata: {
842
+ mimeType: string;
843
+ sizeBytes: number;
844
+ extension: string;
845
+ thumbnailUrl?: string | undefined;
846
+ downloadUrl?: string | undefined;
847
+ };
848
+ } | {
849
+ id: string;
850
+ userId: string;
851
+ workspaceId: string | null;
852
+ title: string | null;
853
+ preview: string | null;
854
+ documentId: string | null;
855
+ fileUrl: string | null;
856
+ filePath: string | null;
857
+ fileSize: number | null;
858
+ fileType: string | null;
859
+ checksum: string | null;
860
+ projectIds: string[] | null;
861
+ version: number;
862
+ createdAt: Date;
863
+ updatedAt: Date;
864
+ deletedAt: Date | null;
865
+ type: "code";
866
+ metadata: {
867
+ language: string;
868
+ snippet?: string | undefined;
869
+ };
870
+ } | {
871
+ id: string;
872
+ userId: string;
873
+ workspaceId: string | null;
874
+ title: string | null;
875
+ preview: string | null;
876
+ documentId: string | null;
877
+ fileUrl: string | null;
878
+ filePath: string | null;
879
+ fileSize: number | null;
880
+ fileType: string | null;
881
+ checksum: string | null;
882
+ projectIds: string[] | null;
883
+ version: number;
884
+ createdAt: Date;
885
+ updatedAt: Date;
886
+ deletedAt: Date | null;
887
+ type: "bookmark";
888
+ metadata: {
889
+ url: string;
890
+ favicon?: string | undefined;
891
+ };
892
+ } | {
893
+ id: string;
894
+ userId: string;
895
+ workspaceId: string | null;
896
+ title: string | null;
897
+ preview: string | null;
898
+ documentId: string | null;
899
+ fileUrl: string | null;
900
+ filePath: string | null;
901
+ fileSize: number | null;
902
+ fileType: string | null;
903
+ checksum: string | null;
904
+ projectIds: string[] | null;
905
+ version: number;
906
+ createdAt: Date;
907
+ updatedAt: Date;
908
+ deletedAt: Date | null;
909
+ type: "company";
910
+ metadata: {
911
+ website?: string | undefined;
912
+ industry?: string | undefined;
913
+ foundedYear?: number | undefined;
914
+ };
915
+ } | {
916
+ id: string;
917
+ userId: string;
918
+ workspaceId: string | null;
919
+ title: string | null;
920
+ preview: string | null;
921
+ documentId: string | null;
922
+ fileUrl: string | null;
923
+ filePath: string | null;
924
+ fileSize: number | null;
925
+ fileType: string | null;
926
+ checksum: string | null;
927
+ projectIds: string[] | null;
928
+ version: number;
929
+ createdAt: Date;
930
+ updatedAt: Date;
931
+ deletedAt: Date | null;
932
+ type: "contact";
933
+ metadata: {
934
+ email?: string | undefined;
935
+ phone?: string | undefined;
936
+ company?: string | undefined;
937
+ role?: string | undefined;
938
+ linkedInUrl?: string | undefined;
939
+ twitterHandle?: string | undefined;
940
+ notes?: string | undefined;
941
+ };
942
+ } | {
943
+ id: string;
944
+ userId: string;
945
+ workspaceId: string | null;
946
+ title: string | null;
947
+ preview: string | null;
948
+ documentId: string | null;
949
+ fileUrl: string | null;
950
+ filePath: string | null;
951
+ fileSize: number | null;
952
+ fileType: string | null;
953
+ checksum: string | null;
954
+ projectIds: string[] | null;
955
+ version: number;
956
+ createdAt: Date;
957
+ updatedAt: Date;
958
+ deletedAt: Date | null;
959
+ type: "meeting";
960
+ metadata: {
961
+ startTime: string;
962
+ endTime: string;
963
+ recurring: boolean;
964
+ isAllDay: boolean;
965
+ location?: string | undefined;
966
+ attendees?: string[] | undefined;
967
+ recurrenceRule?: string | undefined;
968
+ reminderMinutes?: number | undefined;
969
+ };
970
+ } | {
971
+ id: string;
972
+ userId: string;
973
+ workspaceId: string | null;
974
+ title: string | null;
975
+ preview: string | null;
976
+ documentId: string | null;
977
+ fileUrl: string | null;
978
+ filePath: string | null;
979
+ fileSize: number | null;
980
+ fileType: string | null;
981
+ checksum: string | null;
982
+ projectIds: string[] | null;
983
+ version: number;
984
+ createdAt: Date;
985
+ updatedAt: Date;
986
+ deletedAt: Date | null;
987
+ type: "idea";
988
+ metadata: {
989
+ tags: string[];
990
+ impact?: "low" | "medium" | "high" | undefined;
991
+ effort?: "low" | "medium" | "high" | undefined;
992
+ };
993
+ } | {
994
+ id: string;
995
+ userId: string;
996
+ workspaceId: string | null;
997
+ title: string | null;
998
+ preview: string | null;
999
+ documentId: string | null;
1000
+ fileUrl: string | null;
1001
+ filePath: string | null;
1002
+ fileSize: number | null;
1003
+ fileType: string | null;
1004
+ checksum: string | null;
1005
+ projectIds: string[] | null;
1006
+ version: number;
1007
+ createdAt: Date;
1008
+ updatedAt: Date;
1009
+ deletedAt: Date | null;
1010
+ type: "project";
1011
+ metadata: {
1012
+ status: "archived" | "active" | "on_hold" | "completed";
1013
+ priority?: "low" | "medium" | "high" | "urgent" | undefined;
1014
+ dueDate?: string | undefined;
1015
+ completedAt?: string | undefined;
1016
+ owner?: string | undefined;
1017
+ };
1018
+ })[];
1019
+ };
1020
+ meta: object;
1021
+ }>;
1022
+ search: import("@trpc/server").TRPCQueryProcedure<{
1023
+ input: {
1024
+ query: string;
1025
+ type?: "project" | "task" | "contact" | "meeting" | "idea" | "note" | undefined;
1026
+ limit?: number | undefined;
1027
+ };
1028
+ output: {
1029
+ entities: ({
1030
+ id: string;
1031
+ userId: string;
1032
+ workspaceId: string | null;
1033
+ title: string | null;
1034
+ preview: string | null;
1035
+ documentId: string | null;
1036
+ fileUrl: string | null;
1037
+ filePath: string | null;
1038
+ fileSize: number | null;
1039
+ fileType: string | null;
1040
+ checksum: string | null;
1041
+ projectIds: string[] | null;
1042
+ version: number;
1043
+ createdAt: Date;
1044
+ updatedAt: Date;
1045
+ deletedAt: Date | null;
1046
+ type: "task";
1047
+ metadata: {
1048
+ status: "todo" | "in_progress" | "done" | "archived";
1049
+ priority?: "low" | "medium" | "high" | "urgent" | undefined;
1050
+ dueDate?: string | undefined;
1051
+ completedAt?: string | undefined;
1052
+ assignee?: string | undefined;
1053
+ estimatedMinutes?: number | undefined;
1054
+ actualMinutes?: number | undefined;
1055
+ };
1056
+ } | {
1057
+ id: string;
1058
+ userId: string;
1059
+ workspaceId: string | null;
1060
+ title: string | null;
1061
+ preview: string | null;
1062
+ documentId: string | null;
1063
+ fileUrl: string | null;
1064
+ filePath: string | null;
1065
+ fileSize: number | null;
1066
+ fileType: string | null;
1067
+ checksum: string | null;
1068
+ projectIds: string[] | null;
1069
+ version: number;
1070
+ createdAt: Date;
1071
+ updatedAt: Date;
1072
+ deletedAt: Date | null;
1073
+ type: "note";
1074
+ metadata: {
1075
+ tags: string[];
1076
+ format: "markdown" | "plain" | "rich";
1077
+ isFavorite: boolean;
1078
+ linkedEntities?: string[] | undefined;
1079
+ };
1080
+ } | {
1081
+ id: string;
1082
+ userId: string;
1083
+ workspaceId: string | null;
1084
+ title: string | null;
1085
+ preview: string | null;
1086
+ documentId: string | null;
1087
+ fileUrl: string | null;
1088
+ filePath: string | null;
1089
+ fileSize: number | null;
1090
+ fileType: string | null;
1091
+ checksum: string | null;
1092
+ projectIds: string[] | null;
1093
+ version: number;
1094
+ createdAt: Date;
1095
+ updatedAt: Date;
1096
+ deletedAt: Date | null;
1097
+ type: "person";
1098
+ metadata: {
1099
+ email?: string | undefined;
1100
+ phone?: string | undefined;
1101
+ company?: string | undefined;
1102
+ role?: string | undefined;
1103
+ linkedInUrl?: string | undefined;
1104
+ twitterHandle?: string | undefined;
1105
+ notes?: string | undefined;
1106
+ };
1107
+ } | {
1108
+ id: string;
1109
+ userId: string;
1110
+ workspaceId: string | null;
1111
+ title: string | null;
1112
+ preview: string | null;
1113
+ documentId: string | null;
1114
+ fileUrl: string | null;
1115
+ filePath: string | null;
1116
+ fileSize: number | null;
1117
+ fileType: string | null;
1118
+ checksum: string | null;
1119
+ projectIds: string[] | null;
1120
+ version: number;
1121
+ createdAt: Date;
1122
+ updatedAt: Date;
1123
+ deletedAt: Date | null;
1124
+ type: "event";
1125
+ metadata: {
1126
+ startTime: string;
1127
+ endTime: string;
1128
+ recurring: boolean;
1129
+ isAllDay: boolean;
1130
+ location?: string | undefined;
1131
+ attendees?: string[] | undefined;
1132
+ recurrenceRule?: string | undefined;
1133
+ reminderMinutes?: number | undefined;
1134
+ };
1135
+ } | {
1136
+ id: string;
1137
+ userId: string;
1138
+ workspaceId: string | null;
1139
+ title: string | null;
1140
+ preview: string | null;
1141
+ documentId: string | null;
1142
+ fileUrl: string | null;
1143
+ filePath: string | null;
1144
+ fileSize: number | null;
1145
+ fileType: string | null;
1146
+ checksum: string | null;
1147
+ projectIds: string[] | null;
1148
+ version: number;
1149
+ createdAt: Date;
1150
+ updatedAt: Date;
1151
+ deletedAt: Date | null;
1152
+ type: "file";
1153
+ metadata: {
1154
+ mimeType: string;
1155
+ sizeBytes: number;
1156
+ extension: string;
1157
+ thumbnailUrl?: string | undefined;
1158
+ downloadUrl?: string | undefined;
1159
+ };
1160
+ } | {
1161
+ id: string;
1162
+ userId: string;
1163
+ workspaceId: string | null;
1164
+ title: string | null;
1165
+ preview: string | null;
1166
+ documentId: string | null;
1167
+ fileUrl: string | null;
1168
+ filePath: string | null;
1169
+ fileSize: number | null;
1170
+ fileType: string | null;
1171
+ checksum: string | null;
1172
+ projectIds: string[] | null;
1173
+ version: number;
1174
+ createdAt: Date;
1175
+ updatedAt: Date;
1176
+ deletedAt: Date | null;
1177
+ type: "code";
1178
+ metadata: {
1179
+ language: string;
1180
+ snippet?: string | undefined;
1181
+ };
1182
+ } | {
1183
+ id: string;
1184
+ userId: string;
1185
+ workspaceId: string | null;
1186
+ title: string | null;
1187
+ preview: string | null;
1188
+ documentId: string | null;
1189
+ fileUrl: string | null;
1190
+ filePath: string | null;
1191
+ fileSize: number | null;
1192
+ fileType: string | null;
1193
+ checksum: string | null;
1194
+ projectIds: string[] | null;
1195
+ version: number;
1196
+ createdAt: Date;
1197
+ updatedAt: Date;
1198
+ deletedAt: Date | null;
1199
+ type: "bookmark";
1200
+ metadata: {
1201
+ url: string;
1202
+ favicon?: string | undefined;
1203
+ };
1204
+ } | {
1205
+ id: string;
1206
+ userId: string;
1207
+ workspaceId: string | null;
1208
+ title: string | null;
1209
+ preview: string | null;
1210
+ documentId: string | null;
1211
+ fileUrl: string | null;
1212
+ filePath: string | null;
1213
+ fileSize: number | null;
1214
+ fileType: string | null;
1215
+ checksum: string | null;
1216
+ projectIds: string[] | null;
1217
+ version: number;
1218
+ createdAt: Date;
1219
+ updatedAt: Date;
1220
+ deletedAt: Date | null;
1221
+ type: "company";
1222
+ metadata: {
1223
+ website?: string | undefined;
1224
+ industry?: string | undefined;
1225
+ foundedYear?: number | undefined;
1226
+ };
1227
+ } | {
1228
+ id: string;
1229
+ userId: string;
1230
+ workspaceId: string | null;
1231
+ title: string | null;
1232
+ preview: string | null;
1233
+ documentId: string | null;
1234
+ fileUrl: string | null;
1235
+ filePath: string | null;
1236
+ fileSize: number | null;
1237
+ fileType: string | null;
1238
+ checksum: string | null;
1239
+ projectIds: string[] | null;
1240
+ version: number;
1241
+ createdAt: Date;
1242
+ updatedAt: Date;
1243
+ deletedAt: Date | null;
1244
+ type: "contact";
1245
+ metadata: {
1246
+ email?: string | undefined;
1247
+ phone?: string | undefined;
1248
+ company?: string | undefined;
1249
+ role?: string | undefined;
1250
+ linkedInUrl?: string | undefined;
1251
+ twitterHandle?: string | undefined;
1252
+ notes?: string | undefined;
1253
+ };
1254
+ } | {
1255
+ id: string;
1256
+ userId: string;
1257
+ workspaceId: string | null;
1258
+ title: string | null;
1259
+ preview: string | null;
1260
+ documentId: string | null;
1261
+ fileUrl: string | null;
1262
+ filePath: string | null;
1263
+ fileSize: number | null;
1264
+ fileType: string | null;
1265
+ checksum: string | null;
1266
+ projectIds: string[] | null;
1267
+ version: number;
1268
+ createdAt: Date;
1269
+ updatedAt: Date;
1270
+ deletedAt: Date | null;
1271
+ type: "meeting";
1272
+ metadata: {
1273
+ startTime: string;
1274
+ endTime: string;
1275
+ recurring: boolean;
1276
+ isAllDay: boolean;
1277
+ location?: string | undefined;
1278
+ attendees?: string[] | undefined;
1279
+ recurrenceRule?: string | undefined;
1280
+ reminderMinutes?: number | undefined;
1281
+ };
1282
+ } | {
1283
+ id: string;
1284
+ userId: string;
1285
+ workspaceId: string | null;
1286
+ title: string | null;
1287
+ preview: string | null;
1288
+ documentId: string | null;
1289
+ fileUrl: string | null;
1290
+ filePath: string | null;
1291
+ fileSize: number | null;
1292
+ fileType: string | null;
1293
+ checksum: string | null;
1294
+ projectIds: string[] | null;
1295
+ version: number;
1296
+ createdAt: Date;
1297
+ updatedAt: Date;
1298
+ deletedAt: Date | null;
1299
+ type: "idea";
1300
+ metadata: {
1301
+ tags: string[];
1302
+ impact?: "low" | "medium" | "high" | undefined;
1303
+ effort?: "low" | "medium" | "high" | undefined;
1304
+ };
1305
+ } | {
1306
+ id: string;
1307
+ userId: string;
1308
+ workspaceId: string | null;
1309
+ title: string | null;
1310
+ preview: string | null;
1311
+ documentId: string | null;
1312
+ fileUrl: string | null;
1313
+ filePath: string | null;
1314
+ fileSize: number | null;
1315
+ fileType: string | null;
1316
+ checksum: string | null;
1317
+ projectIds: string[] | null;
1318
+ version: number;
1319
+ createdAt: Date;
1320
+ updatedAt: Date;
1321
+ deletedAt: Date | null;
1322
+ type: "project";
1323
+ metadata: {
1324
+ status: "archived" | "active" | "on_hold" | "completed";
1325
+ priority?: "low" | "medium" | "high" | "urgent" | undefined;
1326
+ dueDate?: string | undefined;
1327
+ completedAt?: string | undefined;
1328
+ owner?: string | undefined;
1329
+ };
1330
+ })[];
1331
+ };
1332
+ meta: object;
1333
+ }>;
1334
+ get: import("@trpc/server").TRPCQueryProcedure<{
1335
+ input: {
1336
+ id: string;
1337
+ };
1338
+ output: {
1339
+ entity: {
1340
+ id: string;
1341
+ userId: string;
1342
+ workspaceId: string | null;
1343
+ title: string | null;
1344
+ preview: string | null;
1345
+ documentId: string | null;
1346
+ fileUrl: string | null;
1347
+ filePath: string | null;
1348
+ fileSize: number | null;
1349
+ fileType: string | null;
1350
+ checksum: string | null;
1351
+ projectIds: string[] | null;
1352
+ version: number;
1353
+ createdAt: Date;
1354
+ updatedAt: Date;
1355
+ deletedAt: Date | null;
1356
+ type: "task";
1357
+ metadata: {
1358
+ status: "todo" | "in_progress" | "done" | "archived";
1359
+ priority?: "low" | "medium" | "high" | "urgent" | undefined;
1360
+ dueDate?: string | undefined;
1361
+ completedAt?: string | undefined;
1362
+ assignee?: string | undefined;
1363
+ estimatedMinutes?: number | undefined;
1364
+ actualMinutes?: number | undefined;
1365
+ };
1366
+ } | {
1367
+ id: string;
1368
+ userId: string;
1369
+ workspaceId: string | null;
1370
+ title: string | null;
1371
+ preview: string | null;
1372
+ documentId: string | null;
1373
+ fileUrl: string | null;
1374
+ filePath: string | null;
1375
+ fileSize: number | null;
1376
+ fileType: string | null;
1377
+ checksum: string | null;
1378
+ projectIds: string[] | null;
1379
+ version: number;
1380
+ createdAt: Date;
1381
+ updatedAt: Date;
1382
+ deletedAt: Date | null;
1383
+ type: "note";
1384
+ metadata: {
1385
+ tags: string[];
1386
+ format: "markdown" | "plain" | "rich";
1387
+ isFavorite: boolean;
1388
+ linkedEntities?: string[] | undefined;
1389
+ };
1390
+ } | {
1391
+ id: string;
1392
+ userId: string;
1393
+ workspaceId: string | null;
1394
+ title: string | null;
1395
+ preview: string | null;
1396
+ documentId: string | null;
1397
+ fileUrl: string | null;
1398
+ filePath: string | null;
1399
+ fileSize: number | null;
1400
+ fileType: string | null;
1401
+ checksum: string | null;
1402
+ projectIds: string[] | null;
1403
+ version: number;
1404
+ createdAt: Date;
1405
+ updatedAt: Date;
1406
+ deletedAt: Date | null;
1407
+ type: "person";
1408
+ metadata: {
1409
+ email?: string | undefined;
1410
+ phone?: string | undefined;
1411
+ company?: string | undefined;
1412
+ role?: string | undefined;
1413
+ linkedInUrl?: string | undefined;
1414
+ twitterHandle?: string | undefined;
1415
+ notes?: string | undefined;
1416
+ };
1417
+ } | {
1418
+ id: string;
1419
+ userId: string;
1420
+ workspaceId: string | null;
1421
+ title: string | null;
1422
+ preview: string | null;
1423
+ documentId: string | null;
1424
+ fileUrl: string | null;
1425
+ filePath: string | null;
1426
+ fileSize: number | null;
1427
+ fileType: string | null;
1428
+ checksum: string | null;
1429
+ projectIds: string[] | null;
1430
+ version: number;
1431
+ createdAt: Date;
1432
+ updatedAt: Date;
1433
+ deletedAt: Date | null;
1434
+ type: "event";
1435
+ metadata: {
1436
+ startTime: string;
1437
+ endTime: string;
1438
+ recurring: boolean;
1439
+ isAllDay: boolean;
1440
+ location?: string | undefined;
1441
+ attendees?: string[] | undefined;
1442
+ recurrenceRule?: string | undefined;
1443
+ reminderMinutes?: number | undefined;
1444
+ };
1445
+ } | {
1446
+ id: string;
1447
+ userId: string;
1448
+ workspaceId: string | null;
1449
+ title: string | null;
1450
+ preview: string | null;
1451
+ documentId: string | null;
1452
+ fileUrl: string | null;
1453
+ filePath: string | null;
1454
+ fileSize: number | null;
1455
+ fileType: string | null;
1456
+ checksum: string | null;
1457
+ projectIds: string[] | null;
1458
+ version: number;
1459
+ createdAt: Date;
1460
+ updatedAt: Date;
1461
+ deletedAt: Date | null;
1462
+ type: "file";
1463
+ metadata: {
1464
+ mimeType: string;
1465
+ sizeBytes: number;
1466
+ extension: string;
1467
+ thumbnailUrl?: string | undefined;
1468
+ downloadUrl?: string | undefined;
1469
+ };
1470
+ } | {
1471
+ id: string;
1472
+ userId: string;
1473
+ workspaceId: string | null;
1474
+ title: string | null;
1475
+ preview: string | null;
1476
+ documentId: string | null;
1477
+ fileUrl: string | null;
1478
+ filePath: string | null;
1479
+ fileSize: number | null;
1480
+ fileType: string | null;
1481
+ checksum: string | null;
1482
+ projectIds: string[] | null;
1483
+ version: number;
1484
+ createdAt: Date;
1485
+ updatedAt: Date;
1486
+ deletedAt: Date | null;
1487
+ type: "code";
1488
+ metadata: {
1489
+ language: string;
1490
+ snippet?: string | undefined;
1491
+ };
1492
+ } | {
1493
+ id: string;
1494
+ userId: string;
1495
+ workspaceId: string | null;
1496
+ title: string | null;
1497
+ preview: string | null;
1498
+ documentId: string | null;
1499
+ fileUrl: string | null;
1500
+ filePath: string | null;
1501
+ fileSize: number | null;
1502
+ fileType: string | null;
1503
+ checksum: string | null;
1504
+ projectIds: string[] | null;
1505
+ version: number;
1506
+ createdAt: Date;
1507
+ updatedAt: Date;
1508
+ deletedAt: Date | null;
1509
+ type: "bookmark";
1510
+ metadata: {
1511
+ url: string;
1512
+ favicon?: string | undefined;
1513
+ };
1514
+ } | {
1515
+ id: string;
1516
+ userId: string;
1517
+ workspaceId: string | null;
1518
+ title: string | null;
1519
+ preview: string | null;
1520
+ documentId: string | null;
1521
+ fileUrl: string | null;
1522
+ filePath: string | null;
1523
+ fileSize: number | null;
1524
+ fileType: string | null;
1525
+ checksum: string | null;
1526
+ projectIds: string[] | null;
1527
+ version: number;
1528
+ createdAt: Date;
1529
+ updatedAt: Date;
1530
+ deletedAt: Date | null;
1531
+ type: "company";
1532
+ metadata: {
1533
+ website?: string | undefined;
1534
+ industry?: string | undefined;
1535
+ foundedYear?: number | undefined;
1536
+ };
1537
+ } | {
1538
+ id: string;
1539
+ userId: string;
1540
+ workspaceId: string | null;
1541
+ title: string | null;
1542
+ preview: string | null;
1543
+ documentId: string | null;
1544
+ fileUrl: string | null;
1545
+ filePath: string | null;
1546
+ fileSize: number | null;
1547
+ fileType: string | null;
1548
+ checksum: string | null;
1549
+ projectIds: string[] | null;
1550
+ version: number;
1551
+ createdAt: Date;
1552
+ updatedAt: Date;
1553
+ deletedAt: Date | null;
1554
+ type: "contact";
1555
+ metadata: {
1556
+ email?: string | undefined;
1557
+ phone?: string | undefined;
1558
+ company?: string | undefined;
1559
+ role?: string | undefined;
1560
+ linkedInUrl?: string | undefined;
1561
+ twitterHandle?: string | undefined;
1562
+ notes?: string | undefined;
1563
+ };
1564
+ } | {
1565
+ id: string;
1566
+ userId: string;
1567
+ workspaceId: string | null;
1568
+ title: string | null;
1569
+ preview: string | null;
1570
+ documentId: string | null;
1571
+ fileUrl: string | null;
1572
+ filePath: string | null;
1573
+ fileSize: number | null;
1574
+ fileType: string | null;
1575
+ checksum: string | null;
1576
+ projectIds: string[] | null;
1577
+ version: number;
1578
+ createdAt: Date;
1579
+ updatedAt: Date;
1580
+ deletedAt: Date | null;
1581
+ type: "meeting";
1582
+ metadata: {
1583
+ startTime: string;
1584
+ endTime: string;
1585
+ recurring: boolean;
1586
+ isAllDay: boolean;
1587
+ location?: string | undefined;
1588
+ attendees?: string[] | undefined;
1589
+ recurrenceRule?: string | undefined;
1590
+ reminderMinutes?: number | undefined;
1591
+ };
1592
+ } | {
1593
+ id: string;
1594
+ userId: string;
1595
+ workspaceId: string | null;
1596
+ title: string | null;
1597
+ preview: string | null;
1598
+ documentId: string | null;
1599
+ fileUrl: string | null;
1600
+ filePath: string | null;
1601
+ fileSize: number | null;
1602
+ fileType: string | null;
1603
+ checksum: string | null;
1604
+ projectIds: string[] | null;
1605
+ version: number;
1606
+ createdAt: Date;
1607
+ updatedAt: Date;
1608
+ deletedAt: Date | null;
1609
+ type: "idea";
1610
+ metadata: {
1611
+ tags: string[];
1612
+ impact?: "low" | "medium" | "high" | undefined;
1613
+ effort?: "low" | "medium" | "high" | undefined;
1614
+ };
1615
+ } | {
1616
+ id: string;
1617
+ userId: string;
1618
+ workspaceId: string | null;
1619
+ title: string | null;
1620
+ preview: string | null;
1621
+ documentId: string | null;
1622
+ fileUrl: string | null;
1623
+ filePath: string | null;
1624
+ fileSize: number | null;
1625
+ fileType: string | null;
1626
+ checksum: string | null;
1627
+ projectIds: string[] | null;
1628
+ version: number;
1629
+ createdAt: Date;
1630
+ updatedAt: Date;
1631
+ deletedAt: Date | null;
1632
+ type: "project";
1633
+ metadata: {
1634
+ status: "archived" | "active" | "on_hold" | "completed";
1635
+ priority?: "low" | "medium" | "high" | "urgent" | undefined;
1636
+ dueDate?: string | undefined;
1637
+ completedAt?: string | undefined;
1638
+ owner?: string | undefined;
1639
+ };
1640
+ };
1641
+ };
1642
+ meta: object;
1643
+ }>;
1644
+ update: import("@trpc/server").TRPCMutationProcedure<{
1645
+ input: {
1646
+ id: string;
1647
+ type?: "project" | "task" | "contact" | "meeting" | "idea" | "note" | undefined;
1648
+ title?: string | undefined;
1649
+ preview?: string | undefined;
1650
+ workspaceId?: string | undefined;
1651
+ documentId?: string | undefined;
1652
+ };
1653
+ output: {
1654
+ status: string;
1655
+ message: string;
1656
+ };
1657
+ meta: object;
1658
+ }>;
1659
+ delete: import("@trpc/server").TRPCMutationProcedure<{
1660
+ input: {
1661
+ id: string;
1662
+ };
1663
+ output: {
1664
+ status: string;
1665
+ message: string;
1666
+ };
1667
+ meta: object;
1668
+ }>;
1669
+ }>>;
1670
+ chat: import("@trpc/server").TRPCBuiltRouter<{
1671
+ ctx: Context;
1672
+ meta: object;
1673
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
1674
+ transformer: true;
1675
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<import("@trpc/server").TRPCCreateRouterOptions>>;
1676
+ proposals: import("@trpc/server").TRPCBuiltRouter<{
1677
+ ctx: Context;
1678
+ meta: object;
1679
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
1680
+ transformer: true;
1681
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1682
+ list: import("@trpc/server").TRPCQueryProcedure<{
1683
+ input: {
1684
+ workspaceId?: string | undefined;
1685
+ targetType?: "entity" | "document" | "view" | "whiteboard" | undefined;
1686
+ targetId?: string | undefined;
1687
+ status?: "pending" | "validated" | "rejected" | "all" | undefined;
1688
+ limit?: number | undefined;
1689
+ };
1690
+ output: {
1691
+ proposals: {
1692
+ id: string;
1693
+ status: string;
1694
+ createdAt: Date;
1695
+ updatedAt: Date;
1696
+ workspaceId: string;
1697
+ targetType: string;
1698
+ targetId: string;
1699
+ request: unknown;
1700
+ reviewedBy: string | null;
1701
+ reviewedAt: Date | null;
1702
+ rejectionReason: string | null;
1703
+ }[];
1704
+ };
1705
+ meta: object;
1706
+ }>;
1707
+ approve: import("@trpc/server").TRPCMutationProcedure<{
1708
+ input: {
1709
+ proposalId: string;
1710
+ comment?: string | undefined;
1711
+ };
1712
+ output: {
1713
+ success: boolean;
1714
+ };
1715
+ meta: object;
1716
+ }>;
1717
+ reject: import("@trpc/server").TRPCMutationProcedure<{
1718
+ input: {
1719
+ proposalId: string;
1720
+ reason?: string | undefined;
1721
+ };
1722
+ output: {
1723
+ success: boolean;
1724
+ };
1725
+ meta: object;
1726
+ }>;
1727
+ submit: import("@trpc/server").TRPCMutationProcedure<{
1728
+ input: {
1729
+ targetType: "entity" | "relation" | "document" | "workspace" | "view";
1730
+ changeType: "create" | "update" | "delete";
1731
+ data: Record<string, any>;
1732
+ targetId?: string | undefined;
1733
+ reasoning?: string | undefined;
1734
+ };
1735
+ output: {
1736
+ success: boolean;
1737
+ requestId: `${string}-${string}-${string}-${string}-${string}`;
1738
+ status: string;
1739
+ message: string;
1740
+ };
1741
+ meta: object;
1742
+ }>;
1743
+ }>>;
1744
+ suggestions: import("@trpc/server").TRPCBuiltRouter<{
1745
+ ctx: Context;
1746
+ meta: object;
1747
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
1748
+ transformer: true;
1749
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{}>>;
1750
+ system: import("@trpc/server").TRPCBuiltRouter<{
1751
+ ctx: Context;
1752
+ meta: object;
1753
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
1754
+ transformer: true;
1755
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1756
+ getCapabilities: import("@trpc/server").TRPCQueryProcedure<{
1757
+ input: void;
1758
+ output: {
1759
+ eventTypes: ({
1760
+ type: GeneratedEventType;
1761
+ hasSchema: boolean;
1762
+ category: "generated";
1763
+ table: string | undefined;
1764
+ action: TableAction | undefined;
1765
+ } | {
1766
+ type: "webhooks.deliver.requested";
1767
+ hasSchema: boolean;
1768
+ category: "custom";
1769
+ })[];
1770
+ workers: WorkerMetadata[];
1771
+ tools: {
1772
+ name: string;
1773
+ description: string | undefined;
1774
+ version: string;
1775
+ source: string;
1776
+ }[];
1777
+ routers: {
1778
+ name: string;
1779
+ version: string;
1780
+ source: string;
1781
+ description: string | undefined;
1782
+ }[];
1783
+ stats: {
1784
+ totalEventTypes: number;
1785
+ totalHandlers: number;
1786
+ totalTools: number;
1787
+ totalRouters: number;
1788
+ connectedSSEClients: number;
1789
+ toolsBySource: Record<string, number>;
1790
+ routersBySource: Record<string, number>;
1791
+ };
1792
+ };
1793
+ meta: object;
1794
+ }>;
1795
+ getEventTypeSchema: import("@trpc/server").TRPCQueryProcedure<{
1796
+ input: {
1797
+ eventType: string;
1798
+ };
1799
+ output: {
1800
+ hasSchema: boolean;
1801
+ fields: null;
1802
+ } | {
1803
+ hasSchema: boolean;
1804
+ fields: {
1805
+ name: string;
1806
+ type: string;
1807
+ required: boolean;
1808
+ description?: string;
1809
+ options?: string[];
1810
+ defaultValue?: unknown;
1811
+ }[];
1812
+ };
1813
+ meta: object;
1814
+ }>;
1815
+ publishEvent: import("@trpc/server").TRPCMutationProcedure<{
1816
+ input: {
1817
+ type: string;
1818
+ data: Record<string, unknown>;
1819
+ userId: string;
1820
+ subjectId?: string | undefined;
1821
+ source?: "system" | "api" | "automation" | "sync" | "migration" | undefined;
1822
+ correlationId?: string | undefined;
1823
+ causationId?: string | undefined;
1824
+ };
1825
+ output: {
1826
+ success: boolean;
1827
+ eventId: string;
1828
+ timestamp: string;
1829
+ message: string;
1830
+ };
1831
+ meta: object;
1832
+ }>;
1833
+ getRecentEvents: import("@trpc/server").TRPCQueryProcedure<{
1834
+ input: {
1835
+ limit?: number | undefined;
1836
+ eventType?: string | undefined;
1837
+ userId?: string | undefined;
1838
+ since?: string | undefined;
1839
+ };
1840
+ output: {
1841
+ events: {
1842
+ id: string;
1843
+ type: string;
1844
+ userId: string;
1845
+ timestamp: string;
1846
+ correlationId: string | undefined;
1847
+ isError: boolean;
1848
+ }[];
1849
+ total: number;
1850
+ timestamp: string;
1851
+ };
1852
+ meta: object;
1853
+ }>;
1854
+ getTrace: import("@trpc/server").TRPCQueryProcedure<{
1855
+ input: {
1856
+ correlationId: string;
1857
+ };
1858
+ output: {
1859
+ correlationId: string;
1860
+ events: {
1861
+ id: string;
1862
+ type: string;
1863
+ timestamp: string;
1864
+ userId: string;
1865
+ subjectId: string;
1866
+ data: Record<string, unknown>;
1867
+ metadata: Record<string, unknown> | undefined;
1868
+ causationId: string | undefined;
1869
+ }[];
1870
+ totalEvents: number;
1871
+ };
1872
+ meta: object;
1873
+ }>;
1874
+ getEventTrace: import("@trpc/server").TRPCQueryProcedure<{
1875
+ input: {
1876
+ eventId: string;
1877
+ };
1878
+ output: {
1879
+ event: {
1880
+ eventId: string;
1881
+ eventType: string;
1882
+ timestamp: string;
1883
+ userId: string;
1884
+ data: Record<string, unknown>;
1885
+ metadata: Record<string, unknown> | undefined;
1886
+ correlationId: string | undefined;
1887
+ };
1888
+ relatedEvents: {
1889
+ eventId: string;
1890
+ eventType: string;
1891
+ timestamp: string;
1892
+ userId: string;
1893
+ data: Record<string, unknown>;
1894
+ correlationId: string | undefined;
1895
+ }[];
1896
+ };
1897
+ meta: object;
1898
+ }>;
1899
+ searchEvents: import("@trpc/server").TRPCQueryProcedure<{
1900
+ input: {
1901
+ userId?: string | undefined;
1902
+ eventType?: string | undefined;
1903
+ subjectType?: string | undefined;
1904
+ subjectId?: string | undefined;
1905
+ correlationId?: string | undefined;
1906
+ fromDate?: string | undefined;
1907
+ toDate?: string | undefined;
1908
+ limit?: number | undefined;
1909
+ offset?: number | undefined;
1910
+ };
1911
+ output: {
1912
+ events: {
1913
+ id: string;
1914
+ type: string;
1915
+ timestamp: string;
1916
+ userId: string;
1917
+ subjectId: string;
1918
+ subjectType: string;
1919
+ data: Record<string, unknown>;
1920
+ metadata: Record<string, unknown> | undefined;
1921
+ causationId: string | undefined;
1922
+ correlationId: string | undefined;
1923
+ source: string;
1924
+ }[];
1925
+ pagination: {
1926
+ total: number;
1927
+ limit: number;
1928
+ offset: number;
1929
+ hasMore: boolean;
1930
+ };
1931
+ };
1932
+ meta: object;
1933
+ }>;
1934
+ getToolSchema: import("@trpc/server").TRPCQueryProcedure<{
1935
+ input: {
1936
+ toolName: string;
1937
+ };
1938
+ output: {
1939
+ name: string;
1940
+ description: string;
1941
+ schema: {
1942
+ type: string;
1943
+ properties: any;
1944
+ required: string[];
1945
+ };
1946
+ metadata: {
1947
+ version: string;
1948
+ source: string;
1949
+ registeredAt: string | undefined;
1950
+ };
1951
+ };
1952
+ meta: object;
1953
+ }>;
1954
+ executeTool: import("@trpc/server").TRPCMutationProcedure<{
1955
+ input: {
1956
+ toolName: string;
1957
+ parameters: Record<string, any>;
1958
+ userId: string;
1959
+ threadId?: string | undefined;
1960
+ };
1961
+ output: {
1962
+ success: boolean;
1963
+ result: {
1964
+ result: any;
1965
+ };
1966
+ toolName: string;
1967
+ executedAt: string;
1968
+ };
1969
+ meta: object;
1970
+ }>;
1971
+ getDashboardMetrics: import("@trpc/server").TRPCQueryProcedure<{
1972
+ input: void;
1973
+ output: {
1974
+ timestamp: string;
1975
+ health: {
1976
+ status: "healthy" | "degraded" | "critical";
1977
+ errorRate: number;
1978
+ };
1979
+ throughput: {
1980
+ eventsPerSecond: number;
1981
+ totalEventsLast5Min: number;
1982
+ };
1983
+ connections: {
1984
+ activeSSEClients: number;
1985
+ activeHandlers: number;
1986
+ };
1987
+ tools: {
1988
+ totalTools: number;
1989
+ totalExecutions: number;
1990
+ };
1991
+ latestEvents: {
1992
+ id: string;
1993
+ type: string;
1994
+ userId: string;
1995
+ timestamp: string;
1996
+ isError: boolean;
1997
+ }[];
1998
+ };
1999
+ meta: object;
2000
+ }>;
2001
+ getDatabaseTables: import("@trpc/server").TRPCQueryProcedure<{
2002
+ input: void;
2003
+ output: any[];
2004
+ meta: object;
2005
+ }>;
2006
+ getDatabaseTableRows: import("@trpc/server").TRPCQueryProcedure<{
2007
+ input: {
2008
+ tableName: string;
2009
+ limit?: number | undefined;
2010
+ offset?: number | undefined;
2011
+ };
2012
+ output: any[];
2013
+ meta: object;
2014
+ }>;
2015
+ }>>;
2016
+ hub: import("@trpc/server").TRPCBuiltRouter<{
2017
+ ctx: Context;
2018
+ meta: object;
2019
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
2020
+ transformer: true;
2021
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2022
+ generateAccessToken: import("@trpc/server").TRPCMutationProcedure<{
2023
+ input: {
2024
+ requestId: string;
2025
+ scope: ("notes" | "entities" | "relations" | "projects" | "preferences" | "calendar" | "tasks" | "conversations" | "knowledge_facts")[];
2026
+ expiresIn?: number | undefined;
2027
+ };
2028
+ output: {
2029
+ token: string;
2030
+ expiresAt: number;
2031
+ requestId: string;
2032
+ };
2033
+ meta: object;
2034
+ }>;
2035
+ requestData: import("@trpc/server").TRPCQueryProcedure<{
2036
+ input: {
2037
+ [x: string]: unknown;
2038
+ token: string;
2039
+ scope: ("notes" | "entities" | "relations" | "projects" | "preferences" | "calendar" | "tasks" | "conversations" | "knowledge_facts")[];
2040
+ filters?: {
2041
+ dateRange?: {
2042
+ start: string;
2043
+ end: string;
2044
+ } | undefined;
2045
+ entityTypes?: string[] | undefined;
2046
+ limit?: number | undefined;
2047
+ offset?: number | undefined;
2048
+ } | undefined;
2049
+ };
2050
+ output: {
2051
+ userId: string;
2052
+ requestId: string;
2053
+ data: Record<string, unknown>;
2054
+ metadata: {
2055
+ retrievedAt: string;
2056
+ scope: ("notes" | "entities" | "relations" | "projects" | "preferences" | "calendar" | "tasks" | "conversations" | "knowledge_facts")[];
2057
+ recordCount: number;
2058
+ };
2059
+ };
2060
+ meta: object;
2061
+ }>;
2062
+ submitInsight: import("@trpc/server").TRPCMutationProcedure<{
2063
+ input: {
2064
+ [x: string]: unknown;
2065
+ token: string;
2066
+ insight: any;
2067
+ };
2068
+ output: {
2069
+ success: boolean;
2070
+ requestId: string;
2071
+ eventIds: string[];
2072
+ eventsCreated: number;
2073
+ errors: {
2074
+ actionIndex: number;
2075
+ error: string;
2076
+ }[] | undefined;
2077
+ };
2078
+ meta: object;
2079
+ }>;
2080
+ }>>;
2081
+ apiKeys: import("@trpc/server").TRPCBuiltRouter<{
2082
+ ctx: Context;
2083
+ meta: object;
2084
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
2085
+ transformer: true;
2086
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2087
+ list: import("@trpc/server").TRPCQueryProcedure<{
2088
+ input: void;
2089
+ output: {
2090
+ id: string;
2091
+ keyName: string;
2092
+ keyPrefix: string;
2093
+ hubId: string | null;
2094
+ scope: string[];
2095
+ isActive: boolean;
2096
+ expiresAt: Date | null;
2097
+ lastUsedAt: Date | null;
2098
+ usageCount: number;
2099
+ createdAt: Date;
2100
+ revokedAt: Date | null;
2101
+ revokedReason: string | null;
2102
+ }[];
2103
+ meta: object;
2104
+ }>;
2105
+ create: import("@trpc/server").TRPCMutationProcedure<{
2106
+ input: {
2107
+ keyName: string;
2108
+ scope: string[];
2109
+ hubId?: string | undefined;
2110
+ expiresInDays?: number | undefined;
2111
+ };
2112
+ output: {
2113
+ id: `${string}-${string}-${string}-${string}-${string}`;
2114
+ key: string;
2115
+ keyPrefix: string;
2116
+ status: string;
2117
+ message: string;
2118
+ };
2119
+ meta: object;
2120
+ }>;
2121
+ revoke: import("@trpc/server").TRPCMutationProcedure<{
2122
+ input: {
2123
+ keyId: string;
2124
+ reason?: string | undefined;
2125
+ };
2126
+ output: {
2127
+ status: string;
2128
+ message: string;
2129
+ };
2130
+ meta: object;
2131
+ }>;
2132
+ rotate: import("@trpc/server").TRPCMutationProcedure<{
2133
+ input: {
2134
+ keyId: string;
2135
+ };
2136
+ output: {
2137
+ status: string;
2138
+ message: string;
2139
+ };
2140
+ meta: object;
2141
+ }>;
2142
+ }>>;
2143
+ health: import("@trpc/server").TRPCBuiltRouter<{
2144
+ ctx: Context;
2145
+ meta: object;
2146
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
2147
+ transformer: true;
2148
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2149
+ alive: import("@trpc/server").TRPCQueryProcedure<{
2150
+ input: void;
2151
+ output: {
2152
+ status: string;
2153
+ timestamp: string;
2154
+ };
2155
+ meta: object;
2156
+ }>;
2157
+ ready: import("@trpc/server").TRPCQueryProcedure<{
2158
+ input: void;
2159
+ output: {
2160
+ status: string;
2161
+ timestamp: string;
2162
+ checks: {
2163
+ database: string;
2164
+ inngest: string;
2165
+ };
2166
+ details: {
2167
+ database: any;
2168
+ inngest: any;
2169
+ };
2170
+ };
2171
+ meta: object;
2172
+ }>;
2173
+ migrations: import("@trpc/server").TRPCQueryProcedure<{
2174
+ input: void;
2175
+ output: {
2176
+ total: number;
2177
+ migrations: {
2178
+ version: string;
2179
+ appliedAt: string;
2180
+ description: string;
2181
+ }[];
2182
+ note: string;
2183
+ };
2184
+ meta: object;
2185
+ }>;
2186
+ metrics: import("@trpc/server").TRPCQueryProcedure<{
2187
+ input: void;
2188
+ output: {
2189
+ timestamp: string;
2190
+ uptime: number;
2191
+ memory: {
2192
+ used: number;
2193
+ total: number;
2194
+ rss: number;
2195
+ };
2196
+ events24h: number;
2197
+ totalEntities: number;
2198
+ };
2199
+ meta: object;
2200
+ }>;
2201
+ }>>;
2202
+ integrations: import("@trpc/server").TRPCBuiltRouter<{
2203
+ ctx: Context;
2204
+ meta: object;
2205
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
2206
+ transformer: true;
2207
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2208
+ create: import("@trpc/server").TRPCMutationProcedure<{
2209
+ input: {
2210
+ name: string;
2211
+ url: string;
2212
+ eventTypes: string[];
2213
+ secret?: string | undefined;
2214
+ };
2215
+ output: {
2216
+ subscription: {
2217
+ name: string;
2218
+ userId: string;
2219
+ id: string;
2220
+ createdAt: Date;
2221
+ url: string;
2222
+ active: boolean;
2223
+ eventTypes: string[];
2224
+ secret: string;
2225
+ retryConfig: unknown;
2226
+ lastTriggeredAt: Date | null;
2227
+ };
2228
+ secret: string;
2229
+ };
2230
+ meta: object;
2231
+ }>;
2232
+ list: import("@trpc/server").TRPCQueryProcedure<{
2233
+ input: void;
2234
+ output: {
2235
+ name: string;
2236
+ userId: string;
2237
+ id: string;
2238
+ createdAt: Date;
2239
+ url: string;
2240
+ active: boolean;
2241
+ eventTypes: string[];
2242
+ retryConfig: unknown;
2243
+ lastTriggeredAt: Date | null;
2244
+ }[];
2245
+ meta: object;
2246
+ }>;
2247
+ update: import("@trpc/server").TRPCMutationProcedure<{
2248
+ input: {
2249
+ id: string;
2250
+ name?: string | undefined;
2251
+ url?: string | undefined;
2252
+ eventTypes?: string[] | undefined;
2253
+ active?: boolean | undefined;
2254
+ };
2255
+ output: {
2256
+ id: string;
2257
+ userId: string;
2258
+ name: string;
2259
+ url: string;
2260
+ eventTypes: string[];
2261
+ active: boolean;
2262
+ retryConfig: unknown;
2263
+ createdAt: Date;
2264
+ lastTriggeredAt: Date | null;
2265
+ };
2266
+ meta: object;
2267
+ }>;
2268
+ delete: import("@trpc/server").TRPCMutationProcedure<{
2269
+ input: {
2270
+ id: string;
2271
+ };
2272
+ output: {
2273
+ success: boolean;
2274
+ };
2275
+ meta: object;
2276
+ }>;
2277
+ }>>;
2278
+ documents: import("@trpc/server").TRPCBuiltRouter<{
2279
+ ctx: Context;
2280
+ meta: object;
2281
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
2282
+ transformer: true;
2283
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2284
+ upload: import("@trpc/server").TRPCMutationProcedure<{
2285
+ input: {
2286
+ type: "text" | "code" | "markdown" | "pdf" | "docx";
2287
+ content: string;
2288
+ title?: string | undefined;
2289
+ language?: string | undefined;
2290
+ mimeType?: string | undefined;
2291
+ projectId?: string | undefined;
2292
+ };
2293
+ output: {
2294
+ status: string;
2295
+ message: string;
2296
+ documentId: `${string}-${string}-${string}-${string}-${string}`;
2297
+ };
2298
+ meta: object;
2299
+ }>;
2300
+ get: import("@trpc/server").TRPCQueryProcedure<{
2301
+ input: {
2302
+ documentId: string;
2303
+ };
2304
+ output: {
2305
+ document: {
2306
+ id: string;
2307
+ userId: string;
2308
+ workspaceId: string;
2309
+ projectIds: string[] | null;
2310
+ title: string;
2311
+ type: string;
2312
+ language: string | null;
2313
+ storageUrl: string;
2314
+ storageKey: string;
2315
+ size: number;
2316
+ mimeType: string | null;
2317
+ currentVersion: number;
2318
+ lastSavedVersion: number;
2319
+ workingState: string | null;
2320
+ workingStateUpdatedAt: Date | null;
2321
+ projectId: string | null;
2322
+ metadata: unknown;
2323
+ createdAt: Date;
2324
+ updatedAt: Date;
2325
+ deletedAt: Date | null;
2326
+ };
2327
+ content: string;
2328
+ };
2329
+ meta: object;
2330
+ }>;
2331
+ update: import("@trpc/server").TRPCMutationProcedure<{
2332
+ input: {
2333
+ documentId: string;
2334
+ version: number;
2335
+ delta?: {
2336
+ content: string;
2337
+ }[] | undefined;
2338
+ message?: string | undefined;
2339
+ };
2340
+ output: {
2341
+ version: number;
2342
+ success: boolean;
2343
+ };
2344
+ meta: object;
2345
+ }>;
2346
+ delete: import("@trpc/server").TRPCMutationProcedure<{
2347
+ input: {
2348
+ documentId: string;
2349
+ };
2350
+ output: {
2351
+ success: boolean;
2352
+ };
2353
+ meta: object;
2354
+ }>;
2355
+ saveVersion: import("@trpc/server").TRPCMutationProcedure<{
2356
+ input: {
2357
+ documentId: string;
2358
+ message?: string | undefined;
2359
+ };
2360
+ output: {
2361
+ status: string;
2362
+ message: string;
2363
+ };
2364
+ meta: object;
2365
+ }>;
2366
+ listVersions: import("@trpc/server").TRPCQueryProcedure<{
2367
+ input: {
2368
+ documentId: string;
2369
+ limit?: number | undefined;
2370
+ };
2371
+ output: {
2372
+ versions: {
2373
+ id: string;
2374
+ version: number;
2375
+ message: string | null;
2376
+ createdBy: string;
2377
+ createdAt: Date;
2378
+ }[];
2379
+ latest: {
2380
+ currentVersion: number;
2381
+ lastSavedVersion: number;
2382
+ };
2383
+ };
2384
+ meta: object;
2385
+ }>;
2386
+ restoreVersion: import("@trpc/server").TRPCMutationProcedure<{
2387
+ input: {
2388
+ documentId: string;
2389
+ versionId: string;
2390
+ };
2391
+ output: {
2392
+ status: string;
2393
+ message: string;
2394
+ };
2395
+ meta: object;
2396
+ }>;
2397
+ getVersionPreview: import("@trpc/server").TRPCQueryProcedure<{
2398
+ input: {
2399
+ versionId: string;
2400
+ };
2401
+ output: {
2402
+ id: string;
2403
+ version: number;
2404
+ createdAt: Date;
2405
+ type: string;
2406
+ message: string | null;
2407
+ content: string;
2408
+ documentId: string;
2409
+ delta: unknown;
2410
+ author: string;
2411
+ authorId: string;
2412
+ };
2413
+ meta: object;
2414
+ }>;
2415
+ startSession: import("@trpc/server").TRPCMutationProcedure<{
2416
+ input: {
2417
+ documentId: string;
2418
+ };
2419
+ output: {
2420
+ sessionId: string;
2421
+ chatThreadId: `${string}-${string}-${string}-${string}-${string}`;
2422
+ };
2423
+ meta: object;
2424
+ }>;
2425
+ list: import("@trpc/server").TRPCQueryProcedure<{
2426
+ input: {
2427
+ projectId?: string | undefined;
2428
+ type?: "text" | "code" | "markdown" | "pdf" | "docx" | undefined;
2429
+ limit?: number | undefined;
2430
+ };
2431
+ output: {
2432
+ documents: {
2433
+ id: string;
2434
+ userId: string;
2435
+ workspaceId: string;
2436
+ projectIds: string[] | null;
2437
+ title: string;
2438
+ type: string;
2439
+ language: string | null;
2440
+ storageUrl: string;
2441
+ storageKey: string;
2442
+ size: number;
2443
+ mimeType: string | null;
2444
+ currentVersion: number;
2445
+ lastSavedVersion: number;
2446
+ workingState: string | null;
2447
+ workingStateUpdatedAt: Date | null;
2448
+ projectId: string | null;
2449
+ metadata: unknown;
2450
+ createdAt: Date;
2451
+ updatedAt: Date;
2452
+ deletedAt: Date | null;
2453
+ }[];
2454
+ total: number;
2455
+ };
2456
+ meta: object;
2457
+ }>;
2458
+ }>>;
2459
+ content: import("@trpc/server").TRPCBuiltRouter<{
2460
+ ctx: Context;
2461
+ meta: object;
2462
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
2463
+ transformer: true;
2464
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2465
+ createFromText: import("@trpc/server").TRPCMutationProcedure<{
2466
+ input: {
2467
+ content: string;
2468
+ targetType: "task" | "note";
2469
+ metadata?: {
2470
+ title?: string | undefined;
2471
+ tags?: string[] | undefined;
2472
+ } | undefined;
2473
+ };
2474
+ output: {
2475
+ success: boolean;
2476
+ status: "pending";
2477
+ requestId: `${string}-${string}-${string}-${string}-${string}`;
2478
+ entityId: `${string}-${string}-${string}-${string}-${string}`;
2479
+ };
2480
+ meta: object;
2481
+ }>;
2482
+ createFromFile: import("@trpc/server").TRPCMutationProcedure<{
2483
+ input: {
2484
+ file: string;
2485
+ filename: string;
2486
+ contentType: string;
2487
+ targetType: "document" | "note";
2488
+ metadata?: {
2489
+ title?: string | undefined;
2490
+ description?: string | undefined;
2491
+ tags?: string[] | undefined;
2492
+ } | undefined;
2493
+ };
2494
+ output: any;
2495
+ meta: object;
2496
+ }>;
2497
+ }>>;
2498
+ storage: import("@trpc/server").TRPCBuiltRouter<{
2499
+ ctx: Context;
2500
+ meta: object;
2501
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
2502
+ transformer: true;
2503
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2504
+ listBuckets: import("@trpc/server").TRPCQueryProcedure<{
2505
+ input: void;
2506
+ output: {
2507
+ buckets: {
2508
+ name: string;
2509
+ createdAt: string | null;
2510
+ }[];
2511
+ };
2512
+ meta: object;
2513
+ }>;
2514
+ listFiles: import("@trpc/server").TRPCQueryProcedure<{
2515
+ input: {
2516
+ bucket?: string | undefined;
2517
+ prefix?: string | undefined;
2518
+ maxKeys?: number | undefined;
2519
+ };
2520
+ output: {
2521
+ items: ({
2522
+ type: "folder";
2523
+ name: string;
2524
+ path: string;
2525
+ } | {
2526
+ type: "file";
2527
+ name: string;
2528
+ path: string;
2529
+ size: number;
2530
+ lastModified: string | null;
2531
+ })[];
2532
+ totalItems: number;
2533
+ prefix: string;
2534
+ bucket: string;
2535
+ isTruncated: boolean;
2536
+ error?: undefined;
2537
+ } | {
2538
+ items: never[];
2539
+ totalItems: number;
2540
+ prefix: string;
2541
+ bucket: string;
2542
+ isTruncated: boolean;
2543
+ error: string;
2544
+ };
2545
+ meta: object;
2546
+ }>;
2547
+ getFileMetadata: import("@trpc/server").TRPCQueryProcedure<{
2548
+ input: {
2549
+ path: string;
2550
+ };
2551
+ output: {
2552
+ success: boolean;
2553
+ path: string;
2554
+ size: number;
2555
+ lastModified: string;
2556
+ contentType: string;
2557
+ error?: undefined;
2558
+ } | {
2559
+ success: boolean;
2560
+ path: string;
2561
+ error: string;
2562
+ size?: undefined;
2563
+ lastModified?: undefined;
2564
+ contentType?: undefined;
2565
+ };
2566
+ meta: object;
2567
+ }>;
2568
+ getDownloadUrl: import("@trpc/server").TRPCQueryProcedure<{
2569
+ input: {
2570
+ path: string;
2571
+ expiresIn?: number | undefined;
2572
+ };
2573
+ output: {
2574
+ success: boolean;
2575
+ url: string;
2576
+ expiresIn: number;
2577
+ error?: undefined;
2578
+ } | {
2579
+ success: boolean;
2580
+ error: string;
2581
+ url?: undefined;
2582
+ expiresIn?: undefined;
2583
+ };
2584
+ meta: object;
2585
+ }>;
2586
+ exists: import("@trpc/server").TRPCQueryProcedure<{
2587
+ input: {
2588
+ path: string;
2589
+ };
2590
+ output: {
2591
+ exists: boolean;
2592
+ path: string;
2593
+ };
2594
+ meta: object;
2595
+ }>;
2596
+ deleteFile: import("@trpc/server").TRPCMutationProcedure<{
2597
+ input: {
2598
+ path: string;
2599
+ };
2600
+ output: {
2601
+ success: boolean;
2602
+ path: string;
2603
+ error?: undefined;
2604
+ } | {
2605
+ success: boolean;
2606
+ path: string;
2607
+ error: string;
2608
+ };
2609
+ meta: object;
2610
+ }>;
2611
+ }>>;
2612
+ notifications: import("@trpc/server").TRPCBuiltRouter<{
2613
+ ctx: Context;
2614
+ meta: object;
2615
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
2616
+ transformer: true;
2617
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2618
+ ingest: import("@trpc/server").TRPCMutationProcedure<{
2619
+ input: {
2620
+ items: {
2621
+ provider: string;
2622
+ account: string;
2623
+ externalId: string;
2624
+ type: string;
2625
+ title: string;
2626
+ timestamp: Date;
2627
+ workspaceId: string;
2628
+ deepLink?: string | undefined;
2629
+ preview?: string | undefined;
2630
+ data?: Record<string, any> | undefined;
2631
+ }[];
2632
+ };
2633
+ output: {
2634
+ success: boolean;
2635
+ created: number;
2636
+ skipped: number;
2637
+ total: number;
2638
+ };
2639
+ meta: object;
2640
+ }>;
2641
+ list: import("@trpc/server").TRPCQueryProcedure<{
2642
+ input: {
2643
+ status?: "archived" | "unread" | "snoozed" | undefined;
2644
+ types?: string[] | undefined;
2645
+ limit?: number | undefined;
2646
+ offset?: number | undefined;
2647
+ };
2648
+ output: {
2649
+ userId: string;
2650
+ id: string;
2651
+ data: unknown;
2652
+ status: string | null;
2653
+ createdAt: Date;
2654
+ updatedAt: Date;
2655
+ priority: string | null;
2656
+ type: string;
2657
+ timestamp: Date;
2658
+ title: string;
2659
+ workspaceId: string;
2660
+ preview: string | null;
2661
+ projectIds: string[] | null;
2662
+ tags: string[] | null;
2663
+ provider: string;
2664
+ account: string;
2665
+ externalId: string;
2666
+ deepLink: string | null;
2667
+ snoozedUntil: Date | null;
2668
+ processedAt: Date | null;
2669
+ }[];
2670
+ meta: object;
2671
+ }>;
2672
+ updateStatus: import("@trpc/server").TRPCMutationProcedure<{
2673
+ input: {
2674
+ id: string;
2675
+ status: "archived" | "snoozed" | "read";
2676
+ snoozedUntil?: unknown;
2677
+ };
2678
+ output: {
2679
+ success: boolean;
2680
+ id: string;
2681
+ };
2682
+ meta: object;
2683
+ }>;
2684
+ batchUpdate: import("@trpc/server").TRPCMutationProcedure<{
2685
+ input: {
2686
+ ids: string[];
2687
+ action: "archive" | "snooze" | "markRead";
2688
+ snoozedUntil?: unknown;
2689
+ };
2690
+ output: {
2691
+ success: boolean;
2692
+ updated: number;
2693
+ };
2694
+ meta: object;
2695
+ }>;
2696
+ stats: import("@trpc/server").TRPCQueryProcedure<{
2697
+ input: void;
2698
+ output: {
2699
+ unread: number;
2700
+ snoozed: number;
2701
+ };
2702
+ meta: object;
2703
+ }>;
2704
+ }>>;
2705
+ intelligenceRegistry: import("@trpc/server").TRPCBuiltRouter<{
2706
+ ctx: Context;
2707
+ meta: object;
2708
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
2709
+ transformer: true;
2710
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2711
+ register: import("@trpc/server").TRPCMutationProcedure<{
2712
+ input: {
2713
+ serviceId: string;
2714
+ name: string;
2715
+ webhookUrl: string;
2716
+ apiKey: string;
2717
+ capabilities: string[];
2718
+ description?: string | undefined;
2719
+ version?: string | undefined;
2720
+ pricing?: "custom" | "free" | "premium" | "enterprise" | undefined;
2721
+ metadata?: Record<string, unknown> | undefined;
2722
+ };
2723
+ output: {
2724
+ name: string;
2725
+ id: string;
2726
+ status: string;
2727
+ version: string | null;
2728
+ createdAt: Date;
2729
+ updatedAt: Date;
2730
+ description: string | null;
2731
+ metadata: Record<string, unknown> | null;
2732
+ capabilities: string[];
2733
+ serviceId: string;
2734
+ webhookUrl: string;
2735
+ apiKey: string;
2736
+ pricing: string | null;
2737
+ enabled: boolean;
2738
+ lastHealthCheck: Date | null;
2739
+ };
2740
+ meta: object;
2741
+ }>;
2742
+ list: import("@trpc/server").TRPCQueryProcedure<{
2743
+ input: {
2744
+ status?: "active" | "inactive" | "suspended" | undefined;
2745
+ enabled?: boolean | undefined;
2746
+ } | undefined;
2747
+ output: {
2748
+ id: string;
2749
+ serviceId: string;
2750
+ name: string;
2751
+ description: string | null;
2752
+ version: string | null;
2753
+ capabilities: string[];
2754
+ pricing: string | null;
2755
+ status: string;
2756
+ enabled: boolean;
2757
+ createdAt: Date;
2758
+ updatedAt: Date;
2759
+ }[];
2760
+ meta: object;
2761
+ }>;
2762
+ get: import("@trpc/server").TRPCQueryProcedure<{
2763
+ input: {
2764
+ id: string;
2765
+ };
2766
+ output: {
2767
+ name: string;
2768
+ id: string;
2769
+ status: string;
2770
+ version: string | null;
2771
+ createdAt: Date;
2772
+ updatedAt: Date;
2773
+ description: string | null;
2774
+ metadata: Record<string, unknown> | null;
2775
+ capabilities: string[];
2776
+ serviceId: string;
2777
+ webhookUrl: string;
2778
+ pricing: string | null;
2779
+ enabled: boolean;
2780
+ lastHealthCheck: Date | null;
2781
+ };
2782
+ meta: object;
2783
+ }>;
2784
+ update: import("@trpc/server").TRPCMutationProcedure<{
2785
+ input: {
2786
+ id: string;
2787
+ name?: string | undefined;
2788
+ description?: string | undefined;
2789
+ version?: string | undefined;
2790
+ webhookUrl?: string | undefined;
2791
+ capabilities?: string[] | undefined;
2792
+ status?: "active" | "inactive" | "suspended" | undefined;
2793
+ enabled?: boolean | undefined;
2794
+ metadata?: Record<string, unknown> | undefined;
2795
+ };
2796
+ output: {
2797
+ id: string;
2798
+ serviceId: string;
2799
+ name: string;
2800
+ description: string | null;
2801
+ version: string | null;
2802
+ webhookUrl: string;
2803
+ apiKey: string;
2804
+ capabilities: string[];
2805
+ pricing: string | null;
2806
+ status: string;
2807
+ enabled: boolean;
2808
+ metadata: Record<string, unknown> | null;
2809
+ createdAt: Date;
2810
+ updatedAt: Date;
2811
+ lastHealthCheck: Date | null;
2812
+ };
2813
+ meta: object;
2814
+ }>;
2815
+ unregister: import("@trpc/server").TRPCMutationProcedure<{
2816
+ input: {
2817
+ id: string;
2818
+ };
2819
+ output: {
2820
+ success: boolean;
2821
+ };
2822
+ meta: object;
2823
+ }>;
2824
+ findByCapability: import("@trpc/server").TRPCQueryProcedure<{
2825
+ input: {
2826
+ capability: string;
2827
+ };
2828
+ output: {
2829
+ id: string;
2830
+ serviceId: string;
2831
+ name: string;
2832
+ capabilities: string[];
2833
+ webhookUrl: string;
2834
+ }[];
2835
+ meta: object;
2836
+ }>;
2837
+ }>>;
2838
+ capabilities: import("@trpc/server").TRPCBuiltRouter<{
2839
+ ctx: Context;
2840
+ meta: object;
2841
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
2842
+ transformer: true;
2843
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2844
+ list: import("@trpc/server").TRPCQueryProcedure<{
2845
+ input: void;
2846
+ output: {
2847
+ core: {
2848
+ version: string;
2849
+ features: string[];
2850
+ };
2851
+ plugins: {
2852
+ name: string;
2853
+ version: string;
2854
+ enabled: boolean;
2855
+ }[];
2856
+ intelligenceServices: {
2857
+ id: string;
2858
+ serviceId: string;
2859
+ name: string;
2860
+ capabilities: string[];
2861
+ pricing: string;
2862
+ version: string | null;
2863
+ }[];
2864
+ };
2865
+ meta: object;
2866
+ }>;
2867
+ hasCapability: import("@trpc/server").TRPCQueryProcedure<{
2868
+ input: {
2869
+ capability: string;
2870
+ };
2871
+ output: {
2872
+ available: boolean;
2873
+ };
2874
+ meta: object;
2875
+ }>;
2876
+ }>>;
2877
+ tags: import("@trpc/server").TRPCBuiltRouter<{
2878
+ ctx: Context;
2879
+ meta: object;
2880
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
2881
+ transformer: true;
2882
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2883
+ list: import("@trpc/server").TRPCQueryProcedure<{
2884
+ input: void;
2885
+ output: {
2886
+ tags: {
2887
+ name: string;
2888
+ userId: string;
2889
+ id: string;
2890
+ createdAt: Date;
2891
+ workspaceId: string;
2892
+ projectIds: string[] | null;
2893
+ color: string | null;
2894
+ }[];
2895
+ };
2896
+ meta: object;
2897
+ }>;
2898
+ create: import("@trpc/server").TRPCMutationProcedure<{
2899
+ input: {
2900
+ name: string;
2901
+ color?: string | undefined;
2902
+ };
2903
+ output: {
2904
+ tag: {
2905
+ id: `${string}-${string}-${string}-${string}-${string}`;
2906
+ userId: string;
2907
+ name: string;
2908
+ color: string;
2909
+ createdAt: Date;
2910
+ updatedAt: Date;
2911
+ };
2912
+ };
2913
+ meta: object;
2914
+ }>;
2915
+ update: import("@trpc/server").TRPCMutationProcedure<{
2916
+ input: {
2917
+ id: string;
2918
+ name?: string | undefined;
2919
+ color?: string | undefined;
2920
+ };
2921
+ output: {
2922
+ tag: {
2923
+ name: string;
2924
+ color: string | null;
2925
+ updatedAt: Date;
2926
+ userId: string;
2927
+ id: string;
2928
+ createdAt: Date;
2929
+ workspaceId: string;
2930
+ projectIds: string[] | null;
2931
+ };
2932
+ };
2933
+ meta: object;
2934
+ }>;
2935
+ delete: import("@trpc/server").TRPCMutationProcedure<{
2936
+ input: {
2937
+ id: string;
2938
+ };
2939
+ output: {
2940
+ success: boolean;
2941
+ };
2942
+ meta: object;
2943
+ }>;
2944
+ attach: import("@trpc/server").TRPCMutationProcedure<{
2945
+ input: {
2946
+ tagId: string;
2947
+ entityId: string;
2948
+ };
2949
+ output: {
2950
+ status: string;
2951
+ };
2952
+ meta: object;
2953
+ }>;
2954
+ detach: import("@trpc/server").TRPCMutationProcedure<{
2955
+ input: {
2956
+ tagId: string;
2957
+ entityId: string;
2958
+ };
2959
+ output: {
2960
+ status: string;
2961
+ };
2962
+ meta: object;
2963
+ }>;
2964
+ getForEntity: import("@trpc/server").TRPCQueryProcedure<{
2965
+ input: {
2966
+ entityId: string;
2967
+ };
2968
+ output: {
2969
+ tags: any[];
2970
+ };
2971
+ meta: object;
2972
+ }>;
2973
+ getEntitiesWithTag: import("@trpc/server").TRPCQueryProcedure<{
2974
+ input: {
2975
+ tagId: string;
2976
+ limit?: number | undefined;
2977
+ };
2978
+ output: {
2979
+ entities: any[];
2980
+ };
2981
+ meta: object;
2982
+ }>;
2983
+ }>>;
2984
+ search: import("@trpc/server").TRPCBuiltRouter<{
2985
+ ctx: Context;
2986
+ meta: object;
2987
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
2988
+ transformer: true;
2989
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2990
+ entities: import("@trpc/server").TRPCQueryProcedure<{
2991
+ input: {
2992
+ query: string;
2993
+ type?: "document" | "project" | "task" | "note" | undefined;
2994
+ limit?: number | undefined;
2995
+ };
2996
+ output: {
2997
+ entities: {
2998
+ userId: string;
2999
+ id: string;
3000
+ version: number;
3001
+ createdAt: Date;
3002
+ updatedAt: Date;
3003
+ type: string;
3004
+ metadata: unknown;
3005
+ title: string | null;
3006
+ workspaceId: string;
3007
+ documentId: string | null;
3008
+ preview: string | null;
3009
+ projectIds: string[] | null;
3010
+ deletedAt: Date | null;
3011
+ }[];
3012
+ };
3013
+ meta: object;
3014
+ }>;
3015
+ semantic: import("@trpc/server").TRPCQueryProcedure<{
3016
+ input: {
3017
+ query: string;
3018
+ type?: "document" | "project" | "task" | "note" | undefined;
3019
+ limit?: number | undefined;
3020
+ threshold?: number | undefined;
3021
+ };
3022
+ output: {
3023
+ entities: never[];
3024
+ message: string;
3025
+ };
3026
+ meta: object;
3027
+ }>;
3028
+ related: import("@trpc/server").TRPCQueryProcedure<{
3029
+ input: {
3030
+ entityId: string;
3031
+ limit?: number | undefined;
3032
+ };
3033
+ output: {
3034
+ entities: {
3035
+ userId: string;
3036
+ id: string;
3037
+ version: number;
3038
+ createdAt: Date;
3039
+ updatedAt: Date;
3040
+ type: string;
3041
+ metadata: unknown;
3042
+ title: string | null;
3043
+ workspaceId: string;
3044
+ documentId: string | null;
3045
+ preview: string | null;
3046
+ projectIds: string[] | null;
3047
+ deletedAt: Date | null;
3048
+ }[];
3049
+ };
3050
+ meta: object;
3051
+ }>;
3052
+ byTags: import("@trpc/server").TRPCQueryProcedure<{
3053
+ input: {
3054
+ tagIds: string[];
3055
+ limit?: number | undefined;
3056
+ };
3057
+ output: {
3058
+ entities: any[];
3059
+ };
3060
+ meta: object;
3061
+ }>;
3062
+ }>>;
3063
+ relations: import("@trpc/server").TRPCBuiltRouter<{
3064
+ ctx: Context;
3065
+ meta: object;
3066
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
3067
+ transformer: true;
3068
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
3069
+ get: import("@trpc/server").TRPCQueryProcedure<{
3070
+ input: {
3071
+ entityId: string;
3072
+ type?: "created_by" | "depends_on" | "assigned_to" | "mentions" | "links_to" | "parent_of" | "relates_to" | "tagged_with" | "attended_by" | "blocks" | undefined;
3073
+ direction?: "source" | "target" | "both" | undefined;
3074
+ limit?: number | undefined;
3075
+ };
3076
+ output: {
3077
+ relations: {
3078
+ userId: string;
3079
+ id: string;
3080
+ createdAt: Date;
3081
+ type: string;
3082
+ workspaceId: string;
3083
+ projectIds: string[] | null;
3084
+ sourceEntityId: string;
3085
+ targetEntityId: string;
3086
+ }[];
3087
+ };
3088
+ meta: object;
3089
+ }>;
3090
+ getRelated: import("@trpc/server").TRPCQueryProcedure<{
3091
+ input: {
3092
+ entityId: string;
3093
+ type?: "created_by" | "depends_on" | "assigned_to" | "mentions" | "links_to" | "parent_of" | "relates_to" | "tagged_with" | "attended_by" | "blocks" | undefined;
3094
+ direction?: "source" | "target" | "both" | undefined;
3095
+ limit?: number | undefined;
3096
+ };
3097
+ output: {
3098
+ entities: {
3099
+ userId: string;
3100
+ id: string;
3101
+ version: number;
3102
+ createdAt: Date;
3103
+ updatedAt: Date;
3104
+ type: string;
3105
+ metadata: unknown;
3106
+ title: string | null;
3107
+ workspaceId: string;
3108
+ documentId: string | null;
3109
+ preview: string | null;
3110
+ projectIds: string[] | null;
3111
+ deletedAt: Date | null;
3112
+ }[];
3113
+ };
3114
+ meta: object;
3115
+ }>;
3116
+ getStats: import("@trpc/server").TRPCQueryProcedure<{
3117
+ input: {
3118
+ entityId: string;
3119
+ };
3120
+ output: {
3121
+ total: number;
3122
+ outgoing: number;
3123
+ incoming: number;
3124
+ byType: Record<string, number>;
3125
+ };
3126
+ meta: object;
3127
+ }>;
3128
+ create: import("@trpc/server").TRPCMutationProcedure<{
3129
+ input: {
3130
+ sourceEntityId: string;
3131
+ targetEntityId: string;
3132
+ type: "created_by" | "depends_on" | "assigned_to" | "mentions" | "links_to" | "parent_of" | "relates_to" | "tagged_with" | "attended_by" | "blocks";
3133
+ metadata?: Record<string, any> | undefined;
3134
+ };
3135
+ output: {
3136
+ id: `${string}-${string}-${string}-${string}-${string}`;
3137
+ status: string;
3138
+ message: string;
3139
+ };
3140
+ meta: object;
3141
+ }>;
3142
+ delete: import("@trpc/server").TRPCMutationProcedure<{
3143
+ input: {
3144
+ id: string;
3145
+ };
3146
+ output: {
3147
+ status: string;
3148
+ message: string;
3149
+ };
3150
+ meta: object;
3151
+ }>;
3152
+ }>>;
3153
+ graph: import("@trpc/server").TRPCBuiltRouter<{
3154
+ ctx: Context;
3155
+ meta: object;
3156
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
3157
+ transformer: true;
3158
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
3159
+ getNode: import("@trpc/server").TRPCQueryProcedure<{
3160
+ input: {
3161
+ entityId: string;
3162
+ includeRelations?: boolean | undefined;
3163
+ includeRelatedPreviews?: boolean | undefined;
3164
+ relationTypes?: string[] | undefined;
3165
+ };
3166
+ output: {
3167
+ entity: {
3168
+ userId: string;
3169
+ id: string;
3170
+ version: number;
3171
+ createdAt: Date;
3172
+ updatedAt: Date;
3173
+ type: string;
3174
+ metadata: unknown;
3175
+ title: string | null;
3176
+ workspaceId: string;
3177
+ documentId: string | null;
3178
+ preview: string | null;
3179
+ projectIds: string[] | null;
3180
+ deletedAt: Date | null;
3181
+ };
3182
+ relations: never[];
3183
+ relatedEntities: never[];
3184
+ stats: null;
3185
+ } | {
3186
+ entity: {
3187
+ userId: string;
3188
+ id: string;
3189
+ version: number;
3190
+ createdAt: Date;
3191
+ updatedAt: Date;
3192
+ type: string;
3193
+ metadata: unknown;
3194
+ title: string | null;
3195
+ workspaceId: string;
3196
+ documentId: string | null;
3197
+ preview: string | null;
3198
+ projectIds: string[] | null;
3199
+ deletedAt: Date | null;
3200
+ };
3201
+ relations: {
3202
+ userId: string;
3203
+ id: string;
3204
+ createdAt: Date;
3205
+ type: string;
3206
+ workspaceId: string;
3207
+ projectIds: string[] | null;
3208
+ sourceEntityId: string;
3209
+ targetEntityId: string;
3210
+ }[];
3211
+ relatedEntities: any[];
3212
+ stats: {
3213
+ total: number;
3214
+ outgoing: number;
3215
+ incoming: number;
3216
+ byType: Record<string, number>;
3217
+ };
3218
+ };
3219
+ meta: object;
3220
+ }>;
3221
+ getSubgraph: import("@trpc/server").TRPCQueryProcedure<{
3222
+ input: {
3223
+ entityIds: string[];
3224
+ includeInternalRelations?: boolean | undefined;
3225
+ includeExternalRelations?: boolean | undefined;
3226
+ };
3227
+ output: {
3228
+ entities: {
3229
+ userId: string;
3230
+ id: string;
3231
+ version: number;
3232
+ createdAt: Date;
3233
+ updatedAt: Date;
3234
+ type: string;
3235
+ metadata: unknown;
3236
+ title: string | null;
3237
+ workspaceId: string;
3238
+ documentId: string | null;
3239
+ preview: string | null;
3240
+ projectIds: string[] | null;
3241
+ deletedAt: Date | null;
3242
+ }[];
3243
+ relations: {
3244
+ userId: string;
3245
+ id: string;
3246
+ createdAt: Date;
3247
+ type: string;
3248
+ workspaceId: string;
3249
+ projectIds: string[] | null;
3250
+ sourceEntityId: string;
3251
+ targetEntityId: string;
3252
+ }[];
3253
+ };
3254
+ meta: object;
3255
+ }>;
3256
+ getStats: import("@trpc/server").TRPCQueryProcedure<{
3257
+ input: {
3258
+ entityId?: string | undefined;
3259
+ entityType?: string | undefined;
3260
+ };
3261
+ output: {
3262
+ entityId: string;
3263
+ relationCount: number;
3264
+ outgoing: number;
3265
+ incoming: number;
3266
+ totalEntities?: undefined;
3267
+ totalRelations?: undefined;
3268
+ entityTypeDistribution?: undefined;
3269
+ relationTypeDistribution?: undefined;
3270
+ averageRelationsPerEntity?: undefined;
3271
+ } | {
3272
+ totalEntities: number;
3273
+ totalRelations: number;
3274
+ entityTypeDistribution: Record<string, number>;
3275
+ relationTypeDistribution: Record<string, number>;
3276
+ averageRelationsPerEntity: number;
3277
+ entityId?: undefined;
3278
+ relationCount?: undefined;
3279
+ outgoing?: undefined;
3280
+ incoming?: undefined;
3281
+ };
3282
+ meta: object;
3283
+ }>;
3284
+ }>>;
3285
+ workspaces: import("@trpc/server").TRPCBuiltRouter<{
3286
+ ctx: Context;
3287
+ meta: object;
3288
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
3289
+ transformer: true;
3290
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
3291
+ create: import("@trpc/server").TRPCMutationProcedure<{
3292
+ input: {
3293
+ name: string;
3294
+ description?: string | undefined;
3295
+ settings?: Record<string, unknown> | undefined;
3296
+ type?: "enterprise" | "personal" | "team" | undefined;
3297
+ };
3298
+ output: {
3299
+ status: string;
3300
+ message: string;
3301
+ workspaceId: `${string}-${string}-${string}-${string}-${string}`;
3302
+ };
3303
+ meta: object;
3304
+ }>;
3305
+ list: import("@trpc/server").TRPCQueryProcedure<{
3306
+ input: void;
3307
+ output: {
3308
+ role: string;
3309
+ joinedAt: Date;
3310
+ name: string;
3311
+ id: string;
3312
+ createdAt: Date;
3313
+ updatedAt: Date;
3314
+ description: string | null;
3315
+ type: string;
3316
+ ownerId: string;
3317
+ settings: WorkspaceSettings;
3318
+ subscriptionTier: string | null;
3319
+ subscriptionStatus: string | null;
3320
+ stripeCustomerId: string | null;
3321
+ }[];
3322
+ meta: object;
3323
+ }>;
3324
+ get: import("@trpc/server").TRPCQueryProcedure<{
3325
+ input: {
3326
+ id: string;
3327
+ };
3328
+ output: {
3329
+ role: string;
3330
+ name: string;
3331
+ id: string;
3332
+ createdAt: Date;
3333
+ updatedAt: Date;
3334
+ description: string | null;
3335
+ type: string;
3336
+ ownerId: string;
3337
+ settings: WorkspaceSettings;
3338
+ subscriptionTier: string | null;
3339
+ subscriptionStatus: string | null;
3340
+ stripeCustomerId: string | null;
3341
+ };
3342
+ meta: object;
3343
+ }>;
3344
+ update: import("@trpc/server").TRPCMutationProcedure<{
3345
+ input: {
3346
+ id: string;
3347
+ name?: string | undefined;
3348
+ description?: string | undefined;
3349
+ settings?: Record<string, unknown> | undefined;
3350
+ };
3351
+ output: {
3352
+ status: string;
3353
+ message: string;
3354
+ };
3355
+ meta: object;
3356
+ }>;
3357
+ delete: import("@trpc/server").TRPCMutationProcedure<{
3358
+ input: {
3359
+ id: string;
3360
+ };
3361
+ output: {
3362
+ status: string;
3363
+ message: string;
3364
+ };
3365
+ meta: object;
3366
+ }>;
3367
+ addMember: import("@trpc/server").TRPCMutationProcedure<{
3368
+ input: {
3369
+ workspaceId: string;
3370
+ userId: string;
3371
+ role: "owner" | "editor" | "viewer";
3372
+ };
3373
+ output: {
3374
+ status: string;
3375
+ message: string;
3376
+ };
3377
+ meta: object;
3378
+ }>;
3379
+ listMembers: import("@trpc/server").TRPCQueryProcedure<{
3380
+ input: {
3381
+ workspaceId: string;
3382
+ };
3383
+ output: {
3384
+ userId: string;
3385
+ id: string;
3386
+ role: string;
3387
+ workspaceId: string;
3388
+ joinedAt: Date;
3389
+ invitedBy: string | null;
3390
+ }[];
3391
+ meta: object;
3392
+ }>;
3393
+ removeMember: import("@trpc/server").TRPCMutationProcedure<{
3394
+ input: {
3395
+ workspaceId: string;
3396
+ userId: string;
3397
+ };
3398
+ output: {
3399
+ status: string;
3400
+ message: string;
3401
+ };
3402
+ meta: object;
3403
+ }>;
3404
+ updateMemberRole: import("@trpc/server").TRPCMutationProcedure<{
3405
+ input: {
3406
+ workspaceId: string;
3407
+ userId: string;
3408
+ role: "editor" | "viewer" | "admin";
3409
+ };
3410
+ output: {
3411
+ status: string;
3412
+ message: string;
3413
+ };
3414
+ meta: object;
3415
+ }>;
3416
+ createInvite: import("@trpc/server").TRPCMutationProcedure<{
3417
+ input: {
3418
+ workspaceId: string;
3419
+ email: string;
3420
+ role: "editor" | "viewer" | "admin";
3421
+ };
3422
+ output: {
3423
+ email: string;
3424
+ id: string;
3425
+ createdAt: Date;
3426
+ role: string;
3427
+ workspaceId: string;
3428
+ expiresAt: Date;
3429
+ invitedBy: string;
3430
+ token: string;
3431
+ };
3432
+ meta: object;
3433
+ }>;
3434
+ listInvites: import("@trpc/server").TRPCQueryProcedure<{
3435
+ input: {
3436
+ workspaceId: string;
3437
+ };
3438
+ output: {
3439
+ email: string;
3440
+ id: string;
3441
+ createdAt: Date;
3442
+ role: string;
3443
+ workspaceId: string;
3444
+ expiresAt: Date;
3445
+ invitedBy: string;
3446
+ token: string;
3447
+ }[];
3448
+ meta: object;
3449
+ }>;
3450
+ acceptInvite: import("@trpc/server").TRPCMutationProcedure<{
3451
+ input: {
3452
+ token: string;
3453
+ };
3454
+ output: {
3455
+ status: string;
3456
+ workspaceId: string;
3457
+ message: string;
3458
+ };
3459
+ meta: object;
3460
+ }>;
3461
+ revokeInvite: import("@trpc/server").TRPCMutationProcedure<{
3462
+ input: {
3463
+ id: string;
3464
+ };
3465
+ output: {
3466
+ success: boolean;
3467
+ };
3468
+ meta: object;
3469
+ }>;
3470
+ }>>;
3471
+ views: import("@trpc/server").TRPCBuiltRouter<{
3472
+ ctx: Context;
3473
+ meta: object;
3474
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
3475
+ transformer: true;
3476
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
3477
+ create: import("@trpc/server").TRPCMutationProcedure<{
3478
+ input: {
3479
+ name: string;
3480
+ type: "list" | "calendar" | "table" | "whiteboard" | "timeline" | "kanban" | "grid" | "gallery" | "gantt" | "mindmap" | "graph";
3481
+ workspaceId?: string | undefined;
3482
+ description?: string | undefined;
3483
+ initialContent?: any;
3484
+ };
3485
+ output: {
3486
+ view: {
3487
+ id: `${string}-${string}-${string}-${string}-${string}`;
3488
+ workspaceId: string | undefined;
3489
+ userId: string;
3490
+ type: "list" | "calendar" | "table" | "whiteboard" | "timeline" | "kanban" | "grid" | "gallery" | "gantt" | "mindmap" | "graph";
3491
+ category: ViewCategory;
3492
+ name: string;
3493
+ description: string | undefined;
3494
+ documentId: string;
3495
+ metadata: {
3496
+ entityCount: number;
3497
+ createdBy: string;
3498
+ };
3499
+ createdAt: Date;
3500
+ updatedAt: Date;
3501
+ };
3502
+ documentId: string;
3503
+ status: string;
3504
+ };
3505
+ meta: object;
3506
+ }>;
3507
+ list: import("@trpc/server").TRPCQueryProcedure<{
3508
+ input: {
3509
+ workspaceId?: string | undefined;
3510
+ type?: "list" | "calendar" | "table" | "whiteboard" | "all" | "timeline" | "kanban" | "grid" | "gallery" | "gantt" | "mindmap" | "graph" | undefined;
3511
+ };
3512
+ output: {
3513
+ name: string;
3514
+ userId: string;
3515
+ id: string;
3516
+ createdAt: Date;
3517
+ updatedAt: Date;
3518
+ description: string | null;
3519
+ type: string;
3520
+ metadata: unknown;
3521
+ workspaceId: string | null;
3522
+ documentId: string | null;
3523
+ projectIds: string[] | null;
3524
+ thumbnailUrl: string | null;
3525
+ category: string;
3526
+ yjsRoomId: string | null;
3527
+ }[];
3528
+ meta: object;
3529
+ }>;
3530
+ get: import("@trpc/server").TRPCQueryProcedure<{
3531
+ input: {
3532
+ id: string;
3533
+ };
3534
+ output: {
3535
+ view: {
3536
+ name: string;
3537
+ userId: string;
3538
+ id: string;
3539
+ createdAt: Date;
3540
+ updatedAt: Date;
3541
+ description: string | null;
3542
+ type: string;
3543
+ metadata: unknown;
3544
+ workspaceId: string | null;
3545
+ documentId: string | null;
3546
+ projectIds: string[] | null;
3547
+ thumbnailUrl: string | null;
3548
+ category: string;
3549
+ yjsRoomId: string | null;
3550
+ };
3551
+ content: {};
3552
+ };
3553
+ meta: object;
3554
+ }>;
3555
+ execute: import("@trpc/server").TRPCQueryProcedure<{
3556
+ input: {
3557
+ id: string;
3558
+ };
3559
+ output: {
3560
+ view: {
3561
+ name: string;
3562
+ userId: string;
3563
+ id: string;
3564
+ createdAt: Date;
3565
+ updatedAt: Date;
3566
+ description: string | null;
3567
+ type: string;
3568
+ metadata: unknown;
3569
+ workspaceId: string | null;
3570
+ documentId: string | null;
3571
+ projectIds: string[] | null;
3572
+ thumbnailUrl: string | null;
3573
+ category: string;
3574
+ yjsRoomId: string | null;
3575
+ };
3576
+ content: {};
3577
+ entities: never[];
3578
+ relations: never[];
3579
+ config?: undefined;
3580
+ } | {
3581
+ view: {
3582
+ name: string;
3583
+ userId: string;
3584
+ id: string;
3585
+ createdAt: Date;
3586
+ updatedAt: Date;
3587
+ description: string | null;
3588
+ type: string;
3589
+ metadata: unknown;
3590
+ workspaceId: string | null;
3591
+ documentId: string | null;
3592
+ projectIds: string[] | null;
3593
+ thumbnailUrl: string | null;
3594
+ category: string;
3595
+ yjsRoomId: string | null;
3596
+ };
3597
+ config: StructuredViewConfig | undefined;
3598
+ entities: never[];
3599
+ relations: never[];
3600
+ content?: undefined;
3601
+ } | {
3602
+ view: {
3603
+ name: string;
3604
+ userId: string;
3605
+ id: string;
3606
+ createdAt: Date;
3607
+ updatedAt: Date;
3608
+ description: string | null;
3609
+ type: string;
3610
+ metadata: unknown;
3611
+ workspaceId: string | null;
3612
+ documentId: string | null;
3613
+ projectIds: string[] | null;
3614
+ thumbnailUrl: string | null;
3615
+ category: string;
3616
+ yjsRoomId: string | null;
3617
+ };
3618
+ config: StructuredViewConfig;
3619
+ entities: {
3620
+ id: string;
3621
+ userId: string;
3622
+ workspaceId: string;
3623
+ projectIds: string[] | null;
3624
+ type: string;
3625
+ title: string | null;
3626
+ preview: string | null;
3627
+ documentId: string | null;
3628
+ metadata: unknown;
3629
+ version: number;
3630
+ createdAt: Date;
3631
+ updatedAt: Date;
3632
+ deletedAt: Date | null;
3633
+ }[];
3634
+ relations: {
3635
+ id: string;
3636
+ userId: string;
3637
+ workspaceId: string;
3638
+ projectIds: string[] | null;
3639
+ sourceEntityId: string;
3640
+ targetEntityId: string;
3641
+ type: string;
3642
+ createdAt: Date;
3643
+ }[];
3644
+ content?: undefined;
3645
+ };
3646
+ meta: object;
3647
+ }>;
3648
+ save: import("@trpc/server").TRPCMutationProcedure<{
3649
+ input: {
3650
+ id: string;
3651
+ content: any;
3652
+ metadata?: Record<string, any> | undefined;
3653
+ };
3654
+ output: {
3655
+ success: boolean;
3656
+ };
3657
+ meta: object;
3658
+ }>;
3659
+ update: import("@trpc/server").TRPCMutationProcedure<{
3660
+ input: {
3661
+ id: string;
3662
+ name?: string | undefined;
3663
+ description?: string | undefined;
3664
+ };
3665
+ output: {
3666
+ status: string;
3667
+ message: string;
3668
+ };
3669
+ meta: object;
3670
+ }>;
3671
+ delete: import("@trpc/server").TRPCMutationProcedure<{
3672
+ input: {
3673
+ id: string;
3674
+ };
3675
+ output: {
3676
+ success: boolean;
3677
+ status: string;
3678
+ };
3679
+ meta: object;
3680
+ }>;
3681
+ reorderEntity: import("@trpc/server").TRPCMutationProcedure<{
3682
+ input: {
3683
+ viewId: string;
3684
+ entityId: string;
3685
+ beforeEntityId?: string | undefined;
3686
+ afterEntityId?: string | undefined;
3687
+ };
3688
+ output: {
3689
+ success: boolean;
3690
+ newOrder: number;
3691
+ };
3692
+ meta: object;
3693
+ }>;
3694
+ }>>;
3695
+ preferences: import("@trpc/server").TRPCBuiltRouter<{
3696
+ ctx: Context;
3697
+ meta: object;
3698
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
3699
+ transformer: true;
3700
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
3701
+ get: import("@trpc/server").TRPCQueryProcedure<{
3702
+ input: void;
3703
+ output: any;
3704
+ meta: object;
3705
+ }>;
3706
+ update: import("@trpc/server").TRPCMutationProcedure<{
3707
+ input: {
3708
+ theme?: "system" | "light" | "dark" | undefined;
3709
+ customTheme?: {
3710
+ colors?: {
3711
+ primary?: string | undefined;
3712
+ accent?: string | undefined;
3713
+ background?: string | undefined;
3714
+ border?: string | undefined;
3715
+ text?: string | undefined;
3716
+ } | undefined;
3717
+ spacing?: {
3718
+ small?: string | undefined;
3719
+ medium?: string | undefined;
3720
+ large?: string | undefined;
3721
+ } | undefined;
3722
+ radii?: {
3723
+ small?: string | undefined;
3724
+ medium?: string | undefined;
3725
+ large?: string | undefined;
3726
+ } | undefined;
3727
+ animations?: {
3728
+ enabled?: boolean | undefined;
3729
+ speed?: "normal" | "slow" | "fast" | undefined;
3730
+ } | undefined;
3731
+ } | undefined;
3732
+ defaultTemplates?: Record<string, string> | undefined;
3733
+ customEntityTypes?: any[] | undefined;
3734
+ entityMetadataSchemas?: Record<string, Record<string, any>> | undefined;
3735
+ uiPreferences?: {
3736
+ sidebarCollapsed?: boolean | undefined;
3737
+ panelPositions?: Record<string, {
3738
+ x: number;
3739
+ y: number;
3740
+ }> | undefined;
3741
+ lastActiveView?: string | undefined;
3742
+ compactMode?: boolean | undefined;
3743
+ fontSize?: string | undefined;
3744
+ animations?: boolean | undefined;
3745
+ defaultView?: "list" | "timeline" | "grid" | undefined;
3746
+ } | undefined;
3747
+ graphPreferences?: {
3748
+ forceSettings?: {
3749
+ linkDistance?: number | undefined;
3750
+ chargeStrength?: number | undefined;
3751
+ alphaDecay?: number | undefined;
3752
+ velocityDecay?: number | undefined;
3753
+ } | undefined;
3754
+ defaultFilters?: {
3755
+ entityTypes?: string[] | undefined;
3756
+ relationTypes?: string[] | undefined;
3757
+ } | undefined;
3758
+ zoom?: number | undefined;
3759
+ pan?: {
3760
+ x: number;
3761
+ y: number;
3762
+ } | undefined;
3763
+ showMinimap?: boolean | undefined;
3764
+ } | undefined;
3765
+ onboardingCompleted?: boolean | undefined;
3766
+ onboardingStep?: string | undefined;
3767
+ };
3768
+ output: any;
3769
+ meta: object;
3770
+ }>;
3771
+ updateTheme: import("@trpc/server").TRPCMutationProcedure<{
3772
+ input: {
3773
+ theme?: "system" | "light" | "dark" | undefined;
3774
+ customTheme?: {
3775
+ colors?: {
3776
+ primary?: string | undefined;
3777
+ accent?: string | undefined;
3778
+ background?: string | undefined;
3779
+ border?: string | undefined;
3780
+ text?: string | undefined;
3781
+ } | undefined;
3782
+ spacing?: {
3783
+ small?: string | undefined;
3784
+ medium?: string | undefined;
3785
+ large?: string | undefined;
3786
+ } | undefined;
3787
+ radii?: {
3788
+ small?: string | undefined;
3789
+ medium?: string | undefined;
3790
+ large?: string | undefined;
3791
+ } | undefined;
3792
+ animations?: {
3793
+ enabled?: boolean | undefined;
3794
+ speed?: "normal" | "slow" | "fast" | undefined;
3795
+ } | undefined;
3796
+ } | undefined;
3797
+ };
3798
+ output: {
3799
+ success: boolean;
3800
+ };
3801
+ meta: object;
3802
+ }>;
3803
+ updateDefaultTemplates: import("@trpc/server").TRPCMutationProcedure<{
3804
+ input: {
3805
+ entityType: string;
3806
+ templateId: string;
3807
+ };
3808
+ output: {
3809
+ success: boolean;
3810
+ defaultTemplates: {
3811
+ [x: string]: string;
3812
+ };
3813
+ };
3814
+ meta: object;
3815
+ }>;
3816
+ updateCustomEntityTypes: import("@trpc/server").TRPCMutationProcedure<{
3817
+ input: {
3818
+ customEntityTypes: any[];
3819
+ };
3820
+ output: {
3821
+ success: boolean;
3822
+ };
3823
+ meta: object;
3824
+ }>;
3825
+ getViewModes: import("@trpc/server").TRPCQueryProcedure<{
3826
+ input: void;
3827
+ output: any;
3828
+ meta: object;
3829
+ }>;
3830
+ updateViewMode: import("@trpc/server").TRPCMutationProcedure<{
3831
+ input: {
3832
+ context: "entities" | "documents" | "views";
3833
+ mode: "list" | "table" | "grid";
3834
+ };
3835
+ output: {
3836
+ success: boolean;
3837
+ viewModes: any;
3838
+ };
3839
+ meta: object;
3840
+ }>;
3841
+ getIntelligenceServices: import("@trpc/server").TRPCQueryProcedure<{
3842
+ input: void;
3843
+ output: {
3844
+ preferences: any;
3845
+ available: any;
3846
+ };
3847
+ meta: object;
3848
+ }>;
3849
+ setIntelligenceService: import("@trpc/server").TRPCMutationProcedure<{
3850
+ input: {
3851
+ serviceId: string;
3852
+ capability?: "default" | "chat" | "analysis" | undefined;
3853
+ };
3854
+ output: {
3855
+ success: boolean;
3856
+ preferences: any;
3857
+ };
3858
+ meta: object;
3859
+ }>;
3860
+ }>>;
3861
+ roles: import("@trpc/server").TRPCBuiltRouter<{
3862
+ ctx: Context;
3863
+ meta: object;
3864
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
3865
+ transformer: true;
3866
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
3867
+ list: import("@trpc/server").TRPCQueryProcedure<{
3868
+ input: {
3869
+ workspaceId?: string | undefined;
3870
+ } | undefined;
3871
+ output: {
3872
+ name: string;
3873
+ id: string;
3874
+ createdAt: Date;
3875
+ updatedAt: Date;
3876
+ description: string | null;
3877
+ workspaceId: string | null;
3878
+ createdBy: string;
3879
+ permissions: unknown;
3880
+ filters: unknown;
3881
+ }[];
3882
+ meta: object;
3883
+ }>;
3884
+ get: import("@trpc/server").TRPCQueryProcedure<{
3885
+ input: {
3886
+ id: string;
3887
+ };
3888
+ output: {
3889
+ name: string;
3890
+ id: string;
3891
+ createdAt: Date;
3892
+ updatedAt: Date;
3893
+ description: string | null;
3894
+ workspaceId: string | null;
3895
+ createdBy: string;
3896
+ permissions: unknown;
3897
+ filters: unknown;
3898
+ };
3899
+ meta: object;
3900
+ }>;
3901
+ create: import("@trpc/server").TRPCMutationProcedure<{
3902
+ input: {
3903
+ name: string;
3904
+ permissions: Record<string, any>;
3905
+ description?: string | undefined;
3906
+ workspaceId?: string | undefined;
3907
+ filters?: Record<string, any> | undefined;
3908
+ };
3909
+ output: {
3910
+ id: `${string}-${string}-${string}-${string}-${string}`;
3911
+ status: string;
3912
+ message: string;
3913
+ };
3914
+ meta: object;
3915
+ }>;
3916
+ update: import("@trpc/server").TRPCMutationProcedure<{
3917
+ input: {
3918
+ id: string;
3919
+ name?: string | undefined;
3920
+ description?: string | undefined;
3921
+ permissions?: Record<string, any> | undefined;
3922
+ filters?: Record<string, any> | undefined;
3923
+ };
3924
+ output: {
3925
+ status: string;
3926
+ message: string;
3927
+ };
3928
+ meta: object;
3929
+ }>;
3930
+ delete: import("@trpc/server").TRPCMutationProcedure<{
3931
+ input: {
3932
+ id: string;
3933
+ };
3934
+ output: {
3935
+ status: string;
3936
+ message: string;
3937
+ };
3938
+ meta: object;
3939
+ }>;
3940
+ }>>;
3941
+ sharing: import("@trpc/server").TRPCBuiltRouter<{
3942
+ ctx: Context;
3943
+ meta: object;
3944
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
3945
+ transformer: true;
3946
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
3947
+ createPublicLink: import("@trpc/server").TRPCMutationProcedure<{
3948
+ input: {
3949
+ resourceType: "entity" | "document" | "view";
3950
+ resourceId: string;
3951
+ expiresInDays?: number | undefined;
3952
+ };
3953
+ output: {
3954
+ status: string;
3955
+ shareId: `${string}-${string}-${string}-${string}-${string}`;
3956
+ url: string;
3957
+ };
3958
+ meta: object;
3959
+ }>;
3960
+ invite: import("@trpc/server").TRPCMutationProcedure<{
3961
+ input: {
3962
+ resourceType: "entity" | "document" | "view";
3963
+ resourceId: string;
3964
+ userEmail: string;
3965
+ };
3966
+ output: {
3967
+ status: string;
3968
+ inviteId: `${string}-${string}-${string}-${string}-${string}`;
3969
+ };
3970
+ meta: object;
3971
+ }>;
3972
+ incrementView: import("@trpc/server").TRPCMutationProcedure<{
3973
+ input: {
3974
+ shareId: string;
3975
+ };
3976
+ output: {
3977
+ success: boolean;
3978
+ };
3979
+ meta: object;
3980
+ }>;
3981
+ getPublic: import("@trpc/server").TRPCQueryProcedure<{
3982
+ input: {
3983
+ token: string;
3984
+ };
3985
+ output: {
3986
+ resource: {
3987
+ userId: string;
3988
+ id: string;
3989
+ version: number;
3990
+ createdAt: Date;
3991
+ updatedAt: Date;
3992
+ type: string;
3993
+ metadata: unknown;
3994
+ title: string | null;
3995
+ workspaceId: string;
3996
+ documentId: string | null;
3997
+ preview: string | null;
3998
+ projectIds: string[] | null;
3999
+ deletedAt: Date | null;
4000
+ } | {
4001
+ name: string;
4002
+ userId: string;
4003
+ id: string;
4004
+ createdAt: Date;
4005
+ updatedAt: Date;
4006
+ description: string | null;
4007
+ type: string;
4008
+ metadata: unknown;
4009
+ workspaceId: string | null;
4010
+ documentId: string | null;
4011
+ projectIds: string[] | null;
4012
+ thumbnailUrl: string | null;
4013
+ category: string;
4014
+ yjsRoomId: string | null;
4015
+ document: never;
4016
+ };
4017
+ permissions: unknown;
4018
+ };
4019
+ meta: object;
4020
+ }>;
4021
+ list: import("@trpc/server").TRPCQueryProcedure<{
4022
+ input: {
4023
+ resourceType: "entity" | "document" | "view";
4024
+ resourceId: string;
4025
+ visibility?: "public" | "private" | undefined;
4026
+ expiresAt?: Date | undefined;
4027
+ };
4028
+ output: {
4029
+ id: string;
4030
+ createdAt: Date;
4031
+ updatedAt: Date;
4032
+ expiresAt: Date | null;
4033
+ createdBy: string;
4034
+ permissions: unknown;
4035
+ resourceType: string;
4036
+ resourceId: string;
4037
+ visibility: string;
4038
+ publicToken: string | null;
4039
+ invitedUsers: string[] | null;
4040
+ viewCount: number | null;
4041
+ lastAccessedAt: Date | null;
4042
+ }[];
4043
+ meta: object;
4044
+ }>;
4045
+ revoke: import("@trpc/server").TRPCMutationProcedure<{
4046
+ input: {
4047
+ shareId: string;
4048
+ };
4049
+ output: {
4050
+ status: string;
4051
+ };
4052
+ meta: object;
4053
+ }>;
4054
+ }>>;
4055
+ templates: import("@trpc/server").TRPCBuiltRouter<{
4056
+ ctx: Context;
4057
+ meta: object;
4058
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
4059
+ transformer: true;
4060
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
4061
+ list: import("@trpc/server").TRPCQueryProcedure<{
4062
+ input: {
4063
+ targetType?: "entity" | "document" | "project" | "inbox_item" | undefined;
4064
+ entityType?: string | undefined;
4065
+ inboxItemType?: string | undefined;
4066
+ workspaceId?: string | undefined;
4067
+ includePublic?: boolean | undefined;
4068
+ };
4069
+ output: {
4070
+ id: string;
4071
+ name: string;
4072
+ description: string | null;
4073
+ userId: string | null;
4074
+ workspaceId: string | null;
4075
+ projectIds: string[] | null;
4076
+ targetType: string;
4077
+ entityType: string | null;
4078
+ inboxItemType: string | null;
4079
+ config: unknown;
4080
+ schema: unknown;
4081
+ isDefault: boolean;
4082
+ isPublic: boolean;
4083
+ version: number;
4084
+ createdAt: Date;
4085
+ updatedAt: Date;
4086
+ }[];
4087
+ meta: object;
4088
+ }>;
4089
+ getDefault: import("@trpc/server").TRPCQueryProcedure<{
4090
+ input: {
4091
+ targetType: "entity" | "document" | "project" | "inbox_item";
4092
+ entityType?: string | undefined;
4093
+ inboxItemType?: string | undefined;
4094
+ workspaceId?: string | undefined;
4095
+ };
4096
+ output: unknown;
4097
+ meta: object;
4098
+ }>;
4099
+ create: import("@trpc/server").TRPCMutationProcedure<{
4100
+ input: {
4101
+ name: string;
4102
+ targetType: "entity" | "document" | "project" | "inbox_item";
4103
+ config: {
4104
+ layout?: {
4105
+ structure: {
4106
+ banner?: {
4107
+ enabled: boolean;
4108
+ slots?: string[] | undefined;
4109
+ position?: "left" | "right" | undefined;
4110
+ width?: string | undefined;
4111
+ layout?: "horizontal" | "vertical" | undefined;
4112
+ align?: "left" | "right" | "center" | undefined;
4113
+ } | undefined;
4114
+ header?: {
4115
+ enabled: boolean;
4116
+ slots?: string[] | undefined;
4117
+ position?: "left" | "right" | undefined;
4118
+ width?: string | undefined;
4119
+ layout?: "horizontal" | "vertical" | undefined;
4120
+ align?: "left" | "right" | "center" | undefined;
4121
+ } | undefined;
4122
+ sidebar?: {
4123
+ enabled: boolean;
4124
+ slots?: string[] | undefined;
4125
+ position?: "left" | "right" | undefined;
4126
+ width?: string | undefined;
4127
+ layout?: "horizontal" | "vertical" | undefined;
4128
+ align?: "left" | "right" | "center" | undefined;
4129
+ } | undefined;
4130
+ contentBefore?: {
4131
+ enabled: boolean;
4132
+ slots?: string[] | undefined;
4133
+ position?: "left" | "right" | undefined;
4134
+ width?: string | undefined;
4135
+ layout?: "horizontal" | "vertical" | undefined;
4136
+ align?: "left" | "right" | "center" | undefined;
4137
+ } | undefined;
4138
+ content?: {
4139
+ enabled: boolean;
4140
+ slots?: string[] | undefined;
4141
+ position?: "left" | "right" | undefined;
4142
+ width?: string | undefined;
4143
+ layout?: "horizontal" | "vertical" | undefined;
4144
+ align?: "left" | "right" | "center" | undefined;
4145
+ } | undefined;
4146
+ contentAfter?: {
4147
+ enabled: boolean;
4148
+ slots?: string[] | undefined;
4149
+ position?: "left" | "right" | undefined;
4150
+ width?: string | undefined;
4151
+ layout?: "horizontal" | "vertical" | undefined;
4152
+ align?: "left" | "right" | "center" | undefined;
4153
+ } | undefined;
4154
+ footer?: {
4155
+ enabled: boolean;
4156
+ slots?: string[] | undefined;
4157
+ position?: "left" | "right" | undefined;
4158
+ width?: string | undefined;
4159
+ layout?: "horizontal" | "vertical" | undefined;
4160
+ align?: "left" | "right" | "center" | undefined;
4161
+ } | undefined;
4162
+ };
4163
+ fieldMapping: Record<string, {
4164
+ slot: string;
4165
+ renderer?: {
4166
+ type: "number" | "date" | "link" | "text" | "relations" | "badge" | "avatar" | "progress" | "checkbox" | "currency";
4167
+ variant?: string | undefined;
4168
+ size?: string | undefined;
4169
+ format?: string | undefined;
4170
+ appearance?: "compact" | "detailed" | "cards" | undefined;
4171
+ } | undefined;
4172
+ label?: string | undefined;
4173
+ showLabel?: boolean | undefined;
4174
+ order?: number | undefined;
4175
+ }>;
4176
+ } | undefined;
4177
+ colors?: {
4178
+ primary?: string | undefined;
4179
+ accent?: string | undefined;
4180
+ background?: string | undefined;
4181
+ border?: string | undefined;
4182
+ text?: string | undefined;
4183
+ muted?: string | undefined;
4184
+ success?: string | undefined;
4185
+ warning?: string | undefined;
4186
+ error?: string | undefined;
4187
+ } | undefined;
4188
+ styling?: {
4189
+ borderRadius?: string | undefined;
4190
+ padding?: string | undefined;
4191
+ gap?: string | undefined;
4192
+ fontSize?: string | undefined;
4193
+ fontWeight?: string | undefined;
4194
+ shadow?: string | undefined;
4195
+ fontFamily?: string | undefined;
4196
+ } | undefined;
4197
+ };
4198
+ description?: string | undefined;
4199
+ workspaceId?: string | undefined;
4200
+ entityType?: string | undefined;
4201
+ inboxItemType?: string | undefined;
4202
+ isDefault?: boolean | undefined;
4203
+ isPublic?: boolean | undefined;
4204
+ schema?: Record<string, any> | undefined;
4205
+ };
4206
+ output: {
4207
+ status: string;
4208
+ templateId: `${string}-${string}-${string}-${string}-${string}`;
4209
+ };
4210
+ meta: object;
4211
+ }>;
4212
+ update: import("@trpc/server").TRPCMutationProcedure<{
4213
+ input: {
4214
+ id: string;
4215
+ name?: string | undefined;
4216
+ description?: string | undefined;
4217
+ config?: {
4218
+ layout?: {
4219
+ structure: {
4220
+ banner?: {
4221
+ enabled: boolean;
4222
+ slots?: string[] | undefined;
4223
+ position?: "left" | "right" | undefined;
4224
+ width?: string | undefined;
4225
+ layout?: "horizontal" | "vertical" | undefined;
4226
+ align?: "left" | "right" | "center" | undefined;
4227
+ } | undefined;
4228
+ header?: {
4229
+ enabled: boolean;
4230
+ slots?: string[] | undefined;
4231
+ position?: "left" | "right" | undefined;
4232
+ width?: string | undefined;
4233
+ layout?: "horizontal" | "vertical" | undefined;
4234
+ align?: "left" | "right" | "center" | undefined;
4235
+ } | undefined;
4236
+ sidebar?: {
4237
+ enabled: boolean;
4238
+ slots?: string[] | undefined;
4239
+ position?: "left" | "right" | undefined;
4240
+ width?: string | undefined;
4241
+ layout?: "horizontal" | "vertical" | undefined;
4242
+ align?: "left" | "right" | "center" | undefined;
4243
+ } | undefined;
4244
+ contentBefore?: {
4245
+ enabled: boolean;
4246
+ slots?: string[] | undefined;
4247
+ position?: "left" | "right" | undefined;
4248
+ width?: string | undefined;
4249
+ layout?: "horizontal" | "vertical" | undefined;
4250
+ align?: "left" | "right" | "center" | undefined;
4251
+ } | undefined;
4252
+ content?: {
4253
+ enabled: boolean;
4254
+ slots?: string[] | undefined;
4255
+ position?: "left" | "right" | undefined;
4256
+ width?: string | undefined;
4257
+ layout?: "horizontal" | "vertical" | undefined;
4258
+ align?: "left" | "right" | "center" | undefined;
4259
+ } | undefined;
4260
+ contentAfter?: {
4261
+ enabled: boolean;
4262
+ slots?: string[] | undefined;
4263
+ position?: "left" | "right" | undefined;
4264
+ width?: string | undefined;
4265
+ layout?: "horizontal" | "vertical" | undefined;
4266
+ align?: "left" | "right" | "center" | undefined;
4267
+ } | undefined;
4268
+ footer?: {
4269
+ enabled: boolean;
4270
+ slots?: string[] | undefined;
4271
+ position?: "left" | "right" | undefined;
4272
+ width?: string | undefined;
4273
+ layout?: "horizontal" | "vertical" | undefined;
4274
+ align?: "left" | "right" | "center" | undefined;
4275
+ } | undefined;
4276
+ };
4277
+ fieldMapping: Record<string, {
4278
+ slot: string;
4279
+ renderer?: {
4280
+ type: "number" | "date" | "link" | "text" | "relations" | "badge" | "avatar" | "progress" | "checkbox" | "currency";
4281
+ variant?: string | undefined;
4282
+ size?: string | undefined;
4283
+ format?: string | undefined;
4284
+ appearance?: "compact" | "detailed" | "cards" | undefined;
4285
+ } | undefined;
4286
+ label?: string | undefined;
4287
+ showLabel?: boolean | undefined;
4288
+ order?: number | undefined;
4289
+ }>;
4290
+ } | undefined;
4291
+ colors?: {
4292
+ primary?: string | undefined;
4293
+ accent?: string | undefined;
4294
+ background?: string | undefined;
4295
+ border?: string | undefined;
4296
+ text?: string | undefined;
4297
+ muted?: string | undefined;
4298
+ success?: string | undefined;
4299
+ warning?: string | undefined;
4300
+ error?: string | undefined;
4301
+ } | undefined;
4302
+ styling?: {
4303
+ borderRadius?: string | undefined;
4304
+ padding?: string | undefined;
4305
+ gap?: string | undefined;
4306
+ fontSize?: string | undefined;
4307
+ fontWeight?: string | undefined;
4308
+ shadow?: string | undefined;
4309
+ fontFamily?: string | undefined;
4310
+ } | undefined;
4311
+ } | undefined;
4312
+ schema?: Record<string, any> | undefined;
4313
+ isDefault?: boolean | undefined;
4314
+ isPublic?: boolean | undefined;
4315
+ };
4316
+ output: {
4317
+ status: string;
4318
+ };
4319
+ meta: object;
4320
+ }>;
4321
+ delete: import("@trpc/server").TRPCMutationProcedure<{
4322
+ input: {
4323
+ id: string;
4324
+ };
4325
+ output: {
4326
+ status: string;
4327
+ };
4328
+ meta: object;
4329
+ }>;
4330
+ duplicate: import("@trpc/server").TRPCMutationProcedure<{
4331
+ input: {
4332
+ id: string;
4333
+ };
4334
+ output: {
4335
+ name: string;
4336
+ userId: string | null;
4337
+ id: string;
4338
+ version: number;
4339
+ createdAt: Date;
4340
+ updatedAt: Date;
4341
+ schema: unknown;
4342
+ description: string | null;
4343
+ workspaceId: string | null;
4344
+ projectIds: string[] | null;
4345
+ entityType: string | null;
4346
+ targetType: string;
4347
+ inboxItemType: string | null;
4348
+ config: unknown;
4349
+ isDefault: boolean;
4350
+ isPublic: boolean;
4351
+ };
4352
+ meta: object;
4353
+ }>;
4354
+ setDefault: import("@trpc/server").TRPCMutationProcedure<{
4355
+ input: {
4356
+ id: string;
4357
+ };
4358
+ output: {
4359
+ success: boolean;
4360
+ };
4361
+ meta: object;
4362
+ }>;
4363
+ }>>;
4364
+ whiteboards: import("@trpc/server").TRPCBuiltRouter<{
4365
+ ctx: Context;
4366
+ meta: object;
4367
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
4368
+ transformer: true;
4369
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
4370
+ saveVersion: import("@trpc/server").TRPCMutationProcedure<{
4371
+ input: {
4372
+ viewId: string;
4373
+ message?: string | undefined;
4374
+ };
4375
+ output: {
4376
+ status: string;
4377
+ message: string;
4378
+ };
4379
+ meta: object;
4380
+ }>;
4381
+ listVersions: import("@trpc/server").TRPCQueryProcedure<{
4382
+ input: {
4383
+ viewId: string;
4384
+ limit?: number | undefined;
4385
+ };
4386
+ output: {
4387
+ versions: {
4388
+ id: string;
4389
+ version: number;
4390
+ createdAt: Date;
4391
+ type: string;
4392
+ message: string | null;
4393
+ content: string;
4394
+ documentId: string;
4395
+ delta: unknown;
4396
+ author: string;
4397
+ authorId: string;
4398
+ }[];
4399
+ };
4400
+ meta: object;
4401
+ }>;
4402
+ restoreVersion: import("@trpc/server").TRPCMutationProcedure<{
4403
+ input: {
4404
+ viewId: string;
4405
+ versionId: string;
4406
+ };
4407
+ output: {
4408
+ status: string;
4409
+ message: string;
4410
+ };
4411
+ meta: object;
4412
+ }>;
4413
+ getVersionPreview: import("@trpc/server").TRPCQueryProcedure<{
4414
+ input: {
4415
+ versionId: string;
4416
+ };
4417
+ output: {
4418
+ version: {
4419
+ id: string;
4420
+ version: number;
4421
+ createdAt: Date;
4422
+ type: string;
4423
+ message: string | null;
4424
+ content: string;
4425
+ documentId: string;
4426
+ delta: unknown;
4427
+ author: string;
4428
+ authorId: string;
4429
+ };
4430
+ metadata: {
4431
+ size: number;
4432
+ message: string | null;
4433
+ author: string;
4434
+ createdAt: Date;
4435
+ };
4436
+ };
4437
+ meta: object;
4438
+ }>;
4439
+ deleteVersion: import("@trpc/server").TRPCMutationProcedure<{
4440
+ input: {
4441
+ viewId: string;
4442
+ versionId: string;
4443
+ };
4444
+ output: {
4445
+ success: boolean;
4446
+ };
4447
+ meta: object;
4448
+ }>;
4449
+ }>>;
4450
+ }>>;
4451
+ export type AppRouter = typeof coreRouter;
4452
+
4453
+ export {};