@synap-core/api-types 1.0.25 → 1.0.30

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.
@@ -1,3584 +1,38 @@
1
- import { EventRecord } from '@synap/database';
2
- import { GeneratedEventType } from '@synap/events';
3
- import { StructuredViewConfig } from '@synap-core/types';
4
- import { TableAction } from '@synap/events';
5
- import { TRPCBuiltRouter } from '@trpc/server';
6
- import { TRPCCreateRouterOptions } from '@trpc/server';
7
- import { TRPCDecorateCreateRouterOptions } from '@trpc/server';
8
- import { TRPCDefaultErrorShape } from '@trpc/server';
9
- import { TRPCMutationProcedure } from '@trpc/server';
10
- import { TRPCQueryProcedure } from '@trpc/server';
11
- import { ViewCategory } from '@synap-core/types';
12
- import { WorkerMetadata } from '@synap/jobs';
13
- import { WorkspaceSettings } from '@synap/database';
14
-
15
1
  export declare type AppRouter = typeof coreRouter;
16
2
 
17
- /**
18
- * Full tRPC context
19
- */
20
- declare interface Context {
21
- db: DatabaseClient;
22
- authenticated: boolean;
23
- userId?: string | null;
24
- user?: User | null;
25
- session?: KratosSession | null;
26
- req?: Request;
27
- socketIO?: any;
28
- }
29
-
30
3
  /**
31
4
  * Core API Router
32
5
  */
33
- declare const coreRouter: TRPCBuiltRouter< {
34
- ctx: Context;
35
- meta: object;
36
- errorShape: TRPCDefaultErrorShape;
37
- transformer: true;
38
- }, TRPCDecorateCreateRouterOptions< {
39
- setup: TRPCBuiltRouter< {
40
- ctx: Context;
41
- meta: object;
42
- errorShape: TRPCDefaultErrorShape;
43
- transformer: true;
44
- }, TRPCDecorateCreateRouterOptions< {
45
- status: TRPCQueryProcedure< {
46
- input: void;
47
- output: {
48
- initialized: boolean;
49
- version: string;
50
- };
51
- meta: object;
52
- }>;
53
- }>>;
54
- events: TRPCBuiltRouter< {
55
- ctx: Context;
56
- meta: object;
57
- errorShape: TRPCDefaultErrorShape;
58
- transformer: true;
59
- }, TRPCDecorateCreateRouterOptions< {
60
- log: TRPCMutationProcedure< {
61
- input: {
62
- version: number;
63
- data: Record<string, unknown>;
64
- subjectId: string;
65
- subjectType: "user" | "entity" | "system" | "relation";
66
- eventType: string;
67
- metadata?: Record<string, unknown> | undefined;
68
- source?: "system" | "api" | "automation" | "sync" | "migration" | undefined;
69
- correlationId?: string | undefined;
70
- causationId?: string | undefined;
71
- };
72
- output: EventRecord;
73
- meta: object;
74
- }>;
75
- list: TRPCQueryProcedure< {
76
- input: {
77
- type?: string | undefined;
78
- limit?: number | undefined;
79
- };
80
- output: EventRecord[];
81
- meta: object;
82
- }>;
83
- }>>;
84
- capture: TRPCBuiltRouter< {
85
- ctx: Context;
86
- meta: object;
87
- errorShape: TRPCDefaultErrorShape;
88
- transformer: true;
89
- }, TRPCDecorateCreateRouterOptions< {
90
- thought: TRPCMutationProcedure< {
91
- input: {
92
- content: string;
93
- context?: Record<string, any> | undefined;
94
- };
95
- output: {
96
- success: boolean;
97
- message: string;
98
- requestId: string;
99
- mode: string;
100
- } | {
101
- success: boolean;
102
- message: string;
103
- mode: string;
104
- requestId?: undefined;
105
- };
106
- meta: object;
107
- }>;
108
- }>>;
109
- entities: TRPCBuiltRouter< {
110
- ctx: Context;
111
- meta: object;
112
- errorShape: TRPCDefaultErrorShape;
113
- transformer: true;
114
- }, TRPCDecorateCreateRouterOptions< {
115
- create: TRPCMutationProcedure< {
116
- input: {
117
- type: "task" | "contact" | "meeting" | "idea" | "note" | "project";
118
- workspaceId: string;
119
- title?: string | null | undefined;
120
- documentId?: string | null | undefined;
121
- description?: string | undefined;
122
- };
123
- output: {
124
- status: string;
125
- message: string;
126
- id: `${string}-${string}-${string}-${string}-${string}`;
127
- entity: {
128
- id: `${string}-${string}-${string}-${string}-${string}`;
129
- type: "task" | "contact" | "meeting" | "idea" | "note" | "project";
130
- title: string | null | undefined;
131
- preview: string | undefined;
132
- userId: string;
133
- workspaceId: string;
134
- documentId: string | null | undefined;
135
- createdAt: Date;
136
- updatedAt: Date;
137
- };
138
- };
139
- meta: object;
140
- }>;
141
- list: TRPCQueryProcedure< {
142
- input: {
143
- type?: "task" | "contact" | "meeting" | "idea" | "note" | "project" | undefined;
144
- workspaceId?: string | undefined;
145
- limit?: number | undefined;
146
- };
147
- output: {
148
- entities: ({
149
- type: "task";
150
- id: string;
151
- userId: string;
152
- workspaceId: string | null;
153
- title: string | null;
154
- preview: string | null;
155
- documentId: string | null;
156
- metadata: {
157
- status: "todo" | "in_progress" | "done" | "archived";
158
- priority?: "low" | "medium" | "high" | "urgent" | undefined;
159
- dueDate?: string | undefined;
160
- completedAt?: string | undefined;
161
- assignee?: string | undefined;
162
- estimatedMinutes?: number | undefined;
163
- actualMinutes?: number | undefined;
164
- };
165
- fileUrl: string | null;
166
- filePath: string | null;
167
- fileSize: number | null;
168
- fileType: string | null;
169
- checksum: string | null;
170
- version: number;
171
- createdAt: Date;
172
- updatedAt: Date;
173
- deletedAt: Date | null;
174
- } | {
175
- type: "note";
176
- id: string;
177
- userId: string;
178
- workspaceId: string | null;
179
- title: string | null;
180
- preview: string | null;
181
- documentId: string | null;
182
- metadata: {
183
- tags: string[];
184
- format: "markdown" | "plain" | "rich";
185
- isFavorite: boolean;
186
- linkedEntities?: string[] | undefined;
187
- };
188
- fileUrl: string | null;
189
- filePath: string | null;
190
- fileSize: number | null;
191
- fileType: string | null;
192
- checksum: string | null;
193
- version: number;
194
- createdAt: Date;
195
- updatedAt: Date;
196
- deletedAt: Date | null;
197
- } | {
198
- type: "person";
199
- id: string;
200
- userId: string;
201
- workspaceId: string | null;
202
- title: string | null;
203
- preview: string | null;
204
- documentId: string | null;
205
- metadata: {
206
- email?: string | undefined;
207
- phone?: string | undefined;
208
- company?: string | undefined;
209
- role?: string | undefined;
210
- linkedInUrl?: string | undefined;
211
- twitterHandle?: string | undefined;
212
- notes?: string | undefined;
213
- };
214
- fileUrl: string | null;
215
- filePath: string | null;
216
- fileSize: number | null;
217
- fileType: string | null;
218
- checksum: string | null;
219
- version: number;
220
- createdAt: Date;
221
- updatedAt: Date;
222
- deletedAt: Date | null;
223
- } | {
224
- type: "event";
225
- id: string;
226
- userId: string;
227
- workspaceId: string | null;
228
- title: string | null;
229
- preview: string | null;
230
- documentId: string | null;
231
- metadata: {
232
- startTime: string;
233
- endTime: string;
234
- recurring: boolean;
235
- isAllDay: boolean;
236
- location?: string | undefined;
237
- attendees?: string[] | undefined;
238
- recurrenceRule?: string | undefined;
239
- reminderMinutes?: number | undefined;
240
- };
241
- fileUrl: string | null;
242
- filePath: string | null;
243
- fileSize: number | null;
244
- fileType: string | null;
245
- checksum: string | null;
246
- version: number;
247
- createdAt: Date;
248
- updatedAt: Date;
249
- deletedAt: Date | null;
250
- } | {
251
- type: "file";
252
- id: string;
253
- userId: string;
254
- workspaceId: string | null;
255
- title: string | null;
256
- preview: string | null;
257
- documentId: string | null;
258
- metadata: {
259
- mimeType: string;
260
- sizeBytes: number;
261
- extension: string;
262
- thumbnailUrl?: string | undefined;
263
- downloadUrl?: string | undefined;
264
- };
265
- fileUrl: string | null;
266
- filePath: string | null;
267
- fileSize: number | null;
268
- fileType: string | null;
269
- checksum: string | null;
270
- version: number;
271
- createdAt: Date;
272
- updatedAt: Date;
273
- deletedAt: Date | null;
274
- } | {
275
- type: "code";
276
- id: string;
277
- userId: string;
278
- workspaceId: string | null;
279
- title: string | null;
280
- preview: string | null;
281
- documentId: string | null;
282
- metadata: {
283
- language: string;
284
- snippet?: string | undefined;
285
- };
286
- fileUrl: string | null;
287
- filePath: string | null;
288
- fileSize: number | null;
289
- fileType: string | null;
290
- checksum: string | null;
291
- version: number;
292
- createdAt: Date;
293
- updatedAt: Date;
294
- deletedAt: Date | null;
295
- } | {
296
- type: "bookmark";
297
- id: string;
298
- userId: string;
299
- workspaceId: string | null;
300
- title: string | null;
301
- preview: string | null;
302
- documentId: string | null;
303
- metadata: {
304
- url: string;
305
- favicon?: string | undefined;
306
- };
307
- fileUrl: string | null;
308
- filePath: string | null;
309
- fileSize: number | null;
310
- fileType: string | null;
311
- checksum: string | null;
312
- version: number;
313
- createdAt: Date;
314
- updatedAt: Date;
315
- deletedAt: Date | null;
316
- } | {
317
- type: "company";
318
- id: string;
319
- userId: string;
320
- workspaceId: string | null;
321
- title: string | null;
322
- preview: string | null;
323
- documentId: string | null;
324
- metadata: {
325
- website?: string | undefined;
326
- industry?: string | undefined;
327
- foundedYear?: number | undefined;
328
- };
329
- fileUrl: string | null;
330
- filePath: string | null;
331
- fileSize: number | null;
332
- fileType: string | null;
333
- checksum: string | null;
334
- version: number;
335
- createdAt: Date;
336
- updatedAt: Date;
337
- deletedAt: Date | null;
338
- })[];
339
- };
340
- meta: object;
341
- }>;
342
- search: TRPCQueryProcedure< {
343
- input: {
344
- query: string;
345
- type?: "task" | "contact" | "meeting" | "idea" | "note" | "project" | undefined;
346
- limit?: number | undefined;
347
- };
348
- output: {
349
- entities: ({
350
- type: "task";
351
- id: string;
352
- userId: string;
353
- workspaceId: string | null;
354
- title: string | null;
355
- preview: string | null;
356
- documentId: string | null;
357
- metadata: {
358
- status: "todo" | "in_progress" | "done" | "archived";
359
- priority?: "low" | "medium" | "high" | "urgent" | undefined;
360
- dueDate?: string | undefined;
361
- completedAt?: string | undefined;
362
- assignee?: string | undefined;
363
- estimatedMinutes?: number | undefined;
364
- actualMinutes?: number | undefined;
365
- };
366
- fileUrl: string | null;
367
- filePath: string | null;
368
- fileSize: number | null;
369
- fileType: string | null;
370
- checksum: string | null;
371
- version: number;
372
- createdAt: Date;
373
- updatedAt: Date;
374
- deletedAt: Date | null;
375
- } | {
376
- type: "note";
377
- id: string;
378
- userId: string;
379
- workspaceId: string | null;
380
- title: string | null;
381
- preview: string | null;
382
- documentId: string | null;
383
- metadata: {
384
- tags: string[];
385
- format: "markdown" | "plain" | "rich";
386
- isFavorite: boolean;
387
- linkedEntities?: string[] | undefined;
388
- };
389
- fileUrl: string | null;
390
- filePath: string | null;
391
- fileSize: number | null;
392
- fileType: string | null;
393
- checksum: string | null;
394
- version: number;
395
- createdAt: Date;
396
- updatedAt: Date;
397
- deletedAt: Date | null;
398
- } | {
399
- type: "person";
400
- id: string;
401
- userId: string;
402
- workspaceId: string | null;
403
- title: string | null;
404
- preview: string | null;
405
- documentId: string | null;
406
- metadata: {
407
- email?: string | undefined;
408
- phone?: string | undefined;
409
- company?: string | undefined;
410
- role?: string | undefined;
411
- linkedInUrl?: string | undefined;
412
- twitterHandle?: string | undefined;
413
- notes?: string | undefined;
414
- };
415
- fileUrl: string | null;
416
- filePath: string | null;
417
- fileSize: number | null;
418
- fileType: string | null;
419
- checksum: string | null;
420
- version: number;
421
- createdAt: Date;
422
- updatedAt: Date;
423
- deletedAt: Date | null;
424
- } | {
425
- type: "event";
426
- id: string;
427
- userId: string;
428
- workspaceId: string | null;
429
- title: string | null;
430
- preview: string | null;
431
- documentId: string | null;
432
- metadata: {
433
- startTime: string;
434
- endTime: string;
435
- recurring: boolean;
436
- isAllDay: boolean;
437
- location?: string | undefined;
438
- attendees?: string[] | undefined;
439
- recurrenceRule?: string | undefined;
440
- reminderMinutes?: number | undefined;
441
- };
442
- fileUrl: string | null;
443
- filePath: string | null;
444
- fileSize: number | null;
445
- fileType: string | null;
446
- checksum: string | null;
447
- version: number;
448
- createdAt: Date;
449
- updatedAt: Date;
450
- deletedAt: Date | null;
451
- } | {
452
- type: "file";
453
- id: string;
454
- userId: string;
455
- workspaceId: string | null;
456
- title: string | null;
457
- preview: string | null;
458
- documentId: string | null;
459
- metadata: {
460
- mimeType: string;
461
- sizeBytes: number;
462
- extension: string;
463
- thumbnailUrl?: string | undefined;
464
- downloadUrl?: string | undefined;
465
- };
466
- fileUrl: string | null;
467
- filePath: string | null;
468
- fileSize: number | null;
469
- fileType: string | null;
470
- checksum: string | null;
471
- version: number;
472
- createdAt: Date;
473
- updatedAt: Date;
474
- deletedAt: Date | null;
475
- } | {
476
- type: "code";
477
- id: string;
478
- userId: string;
479
- workspaceId: string | null;
480
- title: string | null;
481
- preview: string | null;
482
- documentId: string | null;
483
- metadata: {
484
- language: string;
485
- snippet?: string | undefined;
486
- };
487
- fileUrl: string | null;
488
- filePath: string | null;
489
- fileSize: number | null;
490
- fileType: string | null;
491
- checksum: string | null;
492
- version: number;
493
- createdAt: Date;
494
- updatedAt: Date;
495
- deletedAt: Date | null;
496
- } | {
497
- type: "bookmark";
498
- id: string;
499
- userId: string;
500
- workspaceId: string | null;
501
- title: string | null;
502
- preview: string | null;
503
- documentId: string | null;
504
- metadata: {
505
- url: string;
506
- favicon?: string | undefined;
507
- };
508
- fileUrl: string | null;
509
- filePath: string | null;
510
- fileSize: number | null;
511
- fileType: string | null;
512
- checksum: string | null;
513
- version: number;
514
- createdAt: Date;
515
- updatedAt: Date;
516
- deletedAt: Date | null;
517
- } | {
518
- type: "company";
519
- id: string;
520
- userId: string;
521
- workspaceId: string | null;
522
- title: string | null;
523
- preview: string | null;
524
- documentId: string | null;
525
- metadata: {
526
- website?: string | undefined;
527
- industry?: string | undefined;
528
- foundedYear?: number | undefined;
529
- };
530
- fileUrl: string | null;
531
- filePath: string | null;
532
- fileSize: number | null;
533
- fileType: string | null;
534
- checksum: string | null;
535
- version: number;
536
- createdAt: Date;
537
- updatedAt: Date;
538
- deletedAt: Date | null;
539
- })[];
540
- };
541
- meta: object;
542
- }>;
543
- get: TRPCQueryProcedure< {
544
- input: {
545
- id: string;
546
- };
547
- output: {
548
- entity: {
549
- type: "task";
550
- id: string;
551
- userId: string;
552
- workspaceId: string | null;
553
- title: string | null;
554
- preview: string | null;
555
- documentId: string | null;
556
- metadata: {
557
- status: "todo" | "in_progress" | "done" | "archived";
558
- priority?: "low" | "medium" | "high" | "urgent" | undefined;
559
- dueDate?: string | undefined;
560
- completedAt?: string | undefined;
561
- assignee?: string | undefined;
562
- estimatedMinutes?: number | undefined;
563
- actualMinutes?: number | undefined;
564
- };
565
- fileUrl: string | null;
566
- filePath: string | null;
567
- fileSize: number | null;
568
- fileType: string | null;
569
- checksum: string | null;
570
- version: number;
571
- createdAt: Date;
572
- updatedAt: Date;
573
- deletedAt: Date | null;
574
- } | {
575
- type: "note";
576
- id: string;
577
- userId: string;
578
- workspaceId: string | null;
579
- title: string | null;
580
- preview: string | null;
581
- documentId: string | null;
582
- metadata: {
583
- tags: string[];
584
- format: "markdown" | "plain" | "rich";
585
- isFavorite: boolean;
586
- linkedEntities?: string[] | undefined;
587
- };
588
- fileUrl: string | null;
589
- filePath: string | null;
590
- fileSize: number | null;
591
- fileType: string | null;
592
- checksum: string | null;
593
- version: number;
594
- createdAt: Date;
595
- updatedAt: Date;
596
- deletedAt: Date | null;
597
- } | {
598
- type: "person";
599
- id: string;
600
- userId: string;
601
- workspaceId: string | null;
602
- title: string | null;
603
- preview: string | null;
604
- documentId: string | null;
605
- metadata: {
606
- email?: string | undefined;
607
- phone?: string | undefined;
608
- company?: string | undefined;
609
- role?: string | undefined;
610
- linkedInUrl?: string | undefined;
611
- twitterHandle?: string | undefined;
612
- notes?: string | undefined;
613
- };
614
- fileUrl: string | null;
615
- filePath: string | null;
616
- fileSize: number | null;
617
- fileType: string | null;
618
- checksum: string | null;
619
- version: number;
620
- createdAt: Date;
621
- updatedAt: Date;
622
- deletedAt: Date | null;
623
- } | {
624
- type: "event";
625
- id: string;
626
- userId: string;
627
- workspaceId: string | null;
628
- title: string | null;
629
- preview: string | null;
630
- documentId: string | null;
631
- metadata: {
632
- startTime: string;
633
- endTime: string;
634
- recurring: boolean;
635
- isAllDay: boolean;
636
- location?: string | undefined;
637
- attendees?: string[] | undefined;
638
- recurrenceRule?: string | undefined;
639
- reminderMinutes?: number | undefined;
640
- };
641
- fileUrl: string | null;
642
- filePath: string | null;
643
- fileSize: number | null;
644
- fileType: string | null;
645
- checksum: string | null;
646
- version: number;
647
- createdAt: Date;
648
- updatedAt: Date;
649
- deletedAt: Date | null;
650
- } | {
651
- type: "file";
652
- id: string;
653
- userId: string;
654
- workspaceId: string | null;
655
- title: string | null;
656
- preview: string | null;
657
- documentId: string | null;
658
- metadata: {
659
- mimeType: string;
660
- sizeBytes: number;
661
- extension: string;
662
- thumbnailUrl?: string | undefined;
663
- downloadUrl?: string | undefined;
664
- };
665
- fileUrl: string | null;
666
- filePath: string | null;
667
- fileSize: number | null;
668
- fileType: string | null;
669
- checksum: string | null;
670
- version: number;
671
- createdAt: Date;
672
- updatedAt: Date;
673
- deletedAt: Date | null;
674
- } | {
675
- type: "code";
676
- id: string;
677
- userId: string;
678
- workspaceId: string | null;
679
- title: string | null;
680
- preview: string | null;
681
- documentId: string | null;
682
- metadata: {
683
- language: string;
684
- snippet?: string | undefined;
685
- };
686
- fileUrl: string | null;
687
- filePath: string | null;
688
- fileSize: number | null;
689
- fileType: string | null;
690
- checksum: string | null;
691
- version: number;
692
- createdAt: Date;
693
- updatedAt: Date;
694
- deletedAt: Date | null;
695
- } | {
696
- type: "bookmark";
697
- id: string;
698
- userId: string;
699
- workspaceId: string | null;
700
- title: string | null;
701
- preview: string | null;
702
- documentId: string | null;
703
- metadata: {
704
- url: string;
705
- favicon?: string | undefined;
706
- };
707
- fileUrl: string | null;
708
- filePath: string | null;
709
- fileSize: number | null;
710
- fileType: string | null;
711
- checksum: string | null;
712
- version: number;
713
- createdAt: Date;
714
- updatedAt: Date;
715
- deletedAt: Date | null;
716
- } | {
717
- type: "company";
718
- id: string;
719
- userId: string;
720
- workspaceId: string | null;
721
- title: string | null;
722
- preview: string | null;
723
- documentId: string | null;
724
- metadata: {
725
- website?: string | undefined;
726
- industry?: string | undefined;
727
- foundedYear?: number | undefined;
728
- };
729
- fileUrl: string | null;
730
- filePath: string | null;
731
- fileSize: number | null;
732
- fileType: string | null;
733
- checksum: string | null;
734
- version: number;
735
- createdAt: Date;
736
- updatedAt: Date;
737
- deletedAt: Date | null;
738
- };
739
- };
740
- meta: object;
741
- }>;
742
- update: TRPCMutationProcedure< {
743
- input: {
744
- type: string;
745
- id: string;
746
- workspaceId: string;
747
- title?: string | null | undefined;
748
- preview?: string | null | undefined;
749
- documentId?: string | null | undefined;
750
- };
751
- output: {
752
- status: string;
753
- message: string;
754
- };
755
- meta: object;
756
- }>;
757
- delete: TRPCMutationProcedure< {
758
- input: {
759
- id: string;
760
- };
761
- output: {
762
- status: string;
763
- message: string;
764
- };
765
- meta: object;
766
- }>;
767
- }>>;
768
- chat: TRPCBuiltRouter< {
769
- ctx: Context;
770
- meta: object;
771
- errorShape: TRPCDefaultErrorShape;
772
- transformer: true;
773
- }, TRPCDecorateCreateRouterOptions<TRPCCreateRouterOptions>>;
774
- proposals: TRPCBuiltRouter< {
775
- ctx: Context;
776
- meta: object;
777
- errorShape: TRPCDefaultErrorShape;
778
- transformer: true;
779
- }, TRPCDecorateCreateRouterOptions< {
780
- list: TRPCQueryProcedure< {
781
- input: {
782
- status?: "pending" | "validated" | "rejected" | "all" | undefined;
783
- workspaceId?: string | undefined;
784
- limit?: number | undefined;
785
- targetType?: "entity" | "document" | "whiteboard" | "view" | undefined;
786
- targetId?: string | undefined;
787
- };
788
- output: {
789
- proposals: {
790
- status: string;
791
- id: string;
792
- workspaceId: string;
793
- createdAt: Date;
794
- updatedAt: Date;
795
- targetType: string;
796
- targetId: string;
797
- request: unknown;
798
- reviewedBy: string | null;
799
- reviewedAt: Date | null;
800
- rejectionReason: string | null;
801
- }[];
802
- };
803
- meta: object;
804
- }>;
805
- approve: TRPCMutationProcedure< {
806
- input: {
807
- proposalId: string;
808
- comment?: string | undefined;
809
- };
810
- output: {
811
- success: boolean;
812
- };
813
- meta: object;
814
- }>;
815
- reject: TRPCMutationProcedure< {
816
- input: {
817
- proposalId: string;
818
- reason?: string | undefined;
819
- };
820
- output: {
821
- success: boolean;
822
- };
823
- meta: object;
824
- }>;
825
- submit: TRPCMutationProcedure< {
826
- input: {
827
- data: Record<string, any>;
828
- targetType: "entity" | "relation" | "document" | "view" | "workspace";
829
- changeType: "create" | "update" | "delete";
830
- targetId?: string | undefined;
831
- reasoning?: string | undefined;
832
- };
833
- output: {
834
- success: boolean;
835
- requestId: `${string}-${string}-${string}-${string}-${string}`;
836
- status: string;
837
- message: string;
838
- };
839
- meta: object;
840
- }>;
841
- }>>;
842
- suggestions: TRPCBuiltRouter< {
843
- ctx: Context;
844
- meta: object;
845
- errorShape: TRPCDefaultErrorShape;
846
- transformer: true;
847
- }, TRPCDecorateCreateRouterOptions< {}>>;
848
- system: TRPCBuiltRouter< {
849
- ctx: Context;
850
- meta: object;
851
- errorShape: TRPCDefaultErrorShape;
852
- transformer: true;
853
- }, TRPCDecorateCreateRouterOptions< {
854
- getCapabilities: TRPCQueryProcedure< {
855
- input: void;
856
- output: {
857
- eventTypes: ({
858
- type: GeneratedEventType;
859
- hasSchema: boolean;
860
- category: "generated";
861
- table: string | undefined;
862
- action: TableAction | undefined;
863
- } | {
864
- type: "webhooks.deliver.requested";
865
- hasSchema: boolean;
866
- category: "custom";
867
- })[];
868
- workers: WorkerMetadata[];
869
- tools: {
870
- name: string;
871
- description: string | undefined;
872
- version: string;
873
- source: string;
874
- }[];
875
- routers: {
876
- name: string;
877
- version: string;
878
- source: string;
879
- description: string | undefined;
880
- }[];
881
- stats: {
882
- totalEventTypes: number;
883
- totalHandlers: number;
884
- totalTools: number;
885
- totalRouters: number;
886
- connectedSSEClients: number;
887
- toolsBySource: Record<string, number>;
888
- routersBySource: Record<string, number>;
889
- };
890
- };
891
- meta: object;
892
- }>;
893
- getEventTypeSchema: TRPCQueryProcedure< {
894
- input: {
895
- eventType: string;
896
- };
897
- output: {
898
- hasSchema: boolean;
899
- fields: null;
900
- } | {
901
- hasSchema: boolean;
902
- fields: {
903
- name: string;
904
- type: string;
905
- required: boolean;
906
- description?: string;
907
- options?: string[];
908
- defaultValue?: unknown;
909
- }[];
910
- };
911
- meta: object;
912
- }>;
913
- publishEvent: TRPCMutationProcedure< {
914
- input: {
915
- userId: string;
916
- type: string;
917
- data: Record<string, unknown>;
918
- subjectId?: string | undefined;
919
- source?: "system" | "api" | "automation" | "sync" | "migration" | undefined;
920
- correlationId?: string | undefined;
921
- causationId?: string | undefined;
922
- };
923
- output: {
924
- success: boolean;
925
- eventId: string;
926
- timestamp: string;
927
- message: string;
928
- };
929
- meta: object;
930
- }>;
931
- getRecentEvents: TRPCQueryProcedure< {
932
- input: {
933
- userId?: string | undefined;
934
- limit?: number | undefined;
935
- eventType?: string | undefined;
936
- since?: string | undefined;
937
- };
938
- output: {
939
- events: {
940
- id: string;
941
- type: string;
942
- userId: string;
943
- timestamp: string;
944
- correlationId: string | undefined;
945
- isError: boolean;
946
- }[];
947
- total: number;
948
- timestamp: string;
949
- };
950
- meta: object;
951
- }>;
952
- getTrace: TRPCQueryProcedure< {
953
- input: {
954
- correlationId: string;
955
- };
956
- output: {
957
- correlationId: string;
958
- events: {
959
- id: string;
960
- type: string;
961
- timestamp: string;
962
- userId: string;
963
- subjectId: string;
964
- data: Record<string, unknown>;
965
- metadata: Record<string, unknown> | undefined;
966
- causationId: string | undefined;
967
- }[];
968
- totalEvents: number;
969
- };
970
- meta: object;
971
- }>;
972
- getEventTrace: TRPCQueryProcedure< {
973
- input: {
974
- eventId: string;
975
- };
976
- output: {
977
- event: {
978
- eventId: string;
979
- eventType: string;
980
- timestamp: string;
981
- userId: string;
982
- data: Record<string, unknown>;
983
- metadata: Record<string, unknown> | undefined;
984
- correlationId: string | undefined;
985
- };
986
- relatedEvents: {
987
- eventId: string;
988
- eventType: string;
989
- timestamp: string;
990
- userId: string;
991
- data: Record<string, unknown>;
992
- correlationId: string | undefined;
993
- }[];
994
- };
995
- meta: object;
996
- }>;
997
- searchEvents: TRPCQueryProcedure< {
998
- input: {
999
- userId?: string | undefined;
1000
- limit?: number | undefined;
1001
- subjectId?: string | undefined;
1002
- subjectType?: string | undefined;
1003
- correlationId?: string | undefined;
1004
- offset?: number | undefined;
1005
- eventType?: string | undefined;
1006
- fromDate?: string | undefined;
1007
- toDate?: string | undefined;
1008
- };
1009
- output: {
1010
- events: {
1011
- id: string;
1012
- type: string;
1013
- timestamp: string;
1014
- userId: string;
1015
- subjectId: string;
1016
- subjectType: string;
1017
- data: Record<string, unknown>;
1018
- metadata: Record<string, unknown> | undefined;
1019
- causationId: string | undefined;
1020
- correlationId: string | undefined;
1021
- source: string;
1022
- }[];
1023
- pagination: {
1024
- total: number;
1025
- limit: number;
1026
- offset: number;
1027
- hasMore: boolean;
1028
- };
1029
- };
1030
- meta: object;
1031
- }>;
1032
- getToolSchema: TRPCQueryProcedure< {
1033
- input: {
1034
- toolName: string;
1035
- };
1036
- output: {
1037
- name: string;
1038
- description: string;
1039
- schema: {
1040
- type: string;
1041
- properties: any;
1042
- required: string[];
1043
- };
1044
- metadata: {
1045
- version: string;
1046
- source: string;
1047
- registeredAt: string | undefined;
1048
- };
1049
- };
1050
- meta: object;
1051
- }>;
1052
- executeTool: TRPCMutationProcedure< {
1053
- input: {
1054
- userId: string;
1055
- toolName: string;
1056
- parameters: Record<string, any>;
1057
- threadId?: string | undefined;
1058
- };
1059
- output: {
1060
- success: boolean;
1061
- result: {
1062
- result: any;
1063
- };
1064
- toolName: string;
1065
- executedAt: string;
1066
- };
1067
- meta: object;
1068
- }>;
1069
- getDashboardMetrics: TRPCQueryProcedure< {
1070
- input: void;
1071
- output: {
1072
- timestamp: string;
1073
- health: {
1074
- status: "healthy" | "degraded" | "critical";
1075
- errorRate: number;
1076
- };
1077
- throughput: {
1078
- eventsPerSecond: number;
1079
- totalEventsLast5Min: number;
1080
- };
1081
- connections: {
1082
- activeSSEClients: number;
1083
- activeHandlers: number;
1084
- };
1085
- tools: {
1086
- totalTools: number;
1087
- totalExecutions: number;
1088
- };
1089
- latestEvents: {
1090
- id: string;
1091
- type: string;
1092
- userId: string;
1093
- timestamp: string;
1094
- isError: boolean;
1095
- }[];
1096
- };
1097
- meta: object;
1098
- }>;
1099
- getDatabaseTables: TRPCQueryProcedure< {
1100
- input: void;
1101
- output: any[];
1102
- meta: object;
1103
- }>;
1104
- getDatabaseTableRows: TRPCQueryProcedure< {
1105
- input: {
1106
- tableName: string;
1107
- limit?: number | undefined;
1108
- offset?: number | undefined;
1109
- };
1110
- output: any[];
1111
- meta: object;
1112
- }>;
1113
- }>>;
1114
- hub: TRPCBuiltRouter< {
1115
- ctx: Context;
1116
- meta: object;
1117
- errorShape: TRPCDefaultErrorShape;
1118
- transformer: true;
1119
- }, TRPCDecorateCreateRouterOptions< {
1120
- generateAccessToken: TRPCMutationProcedure< {
1121
- input: {
1122
- scope: ("entities" | "relations" | "projects" | "preferences" | "calendar" | "notes" | "tasks" | "conversations" | "knowledge_facts")[];
1123
- requestId: string;
1124
- expiresIn?: number | undefined;
1125
- };
1126
- output: {
1127
- token: string;
1128
- expiresAt: number;
1129
- requestId: string;
1130
- };
1131
- meta: object;
1132
- }>;
1133
- requestData: TRPCQueryProcedure< {
1134
- input: {
1135
- [x: string]: unknown;
1136
- token: string;
1137
- scope: ("entities" | "relations" | "projects" | "preferences" | "calendar" | "notes" | "tasks" | "conversations" | "knowledge_facts")[];
1138
- filters?: {
1139
- limit?: number | undefined;
1140
- entityTypes?: string[] | undefined;
1141
- offset?: number | undefined;
1142
- dateRange?: {
1143
- start: string;
1144
- end: string;
1145
- } | undefined;
1146
- } | undefined;
1147
- };
1148
- output: {
1149
- userId: string;
1150
- requestId: string;
1151
- data: Record<string, unknown>;
1152
- metadata: {
1153
- retrievedAt: string;
1154
- scope: ("entities" | "relations" | "projects" | "preferences" | "calendar" | "notes" | "tasks" | "conversations" | "knowledge_facts")[];
1155
- recordCount: number;
1156
- };
1157
- };
1158
- meta: object;
1159
- }>;
1160
- submitInsight: TRPCMutationProcedure< {
1161
- input: {
1162
- [x: string]: unknown;
1163
- token: string;
1164
- insight?: any;
1165
- };
1166
- output: {
1167
- success: boolean;
1168
- requestId: string;
1169
- eventIds: string[];
1170
- eventsCreated: number;
1171
- errors: {
1172
- actionIndex: number;
1173
- error: string;
1174
- }[] | undefined;
1175
- };
1176
- meta: object;
1177
- }>;
1178
- }>>;
1179
- apiKeys: TRPCBuiltRouter< {
1180
- ctx: Context;
1181
- meta: object;
1182
- errorShape: TRPCDefaultErrorShape;
1183
- transformer: true;
1184
- }, TRPCDecorateCreateRouterOptions< {
1185
- list: TRPCQueryProcedure< {
1186
- input: void;
1187
- output: {
1188
- id: string;
1189
- keyName: string;
1190
- keyPrefix: string;
1191
- hubId: string | null;
1192
- scope: string[];
1193
- isActive: boolean;
1194
- expiresAt: Date | null;
1195
- lastUsedAt: Date | null;
1196
- usageCount: number;
1197
- createdAt: Date;
1198
- revokedAt: Date | null;
1199
- revokedReason: string | null;
1200
- }[];
1201
- meta: object;
1202
- }>;
1203
- create: TRPCMutationProcedure< {
1204
- input: {
1205
- keyName: string;
1206
- scope: string[];
1207
- hubId?: string | undefined;
1208
- expiresInDays?: number | undefined;
1209
- };
1210
- output: {
1211
- id: `${string}-${string}-${string}-${string}-${string}`;
1212
- key: string;
1213
- keyPrefix: string;
1214
- status: string;
1215
- message: string;
1216
- };
1217
- meta: object;
1218
- }>;
1219
- revoke: TRPCMutationProcedure< {
1220
- input: {
1221
- keyId: string;
1222
- reason?: string | undefined;
1223
- };
1224
- output: {
1225
- status: string;
1226
- message: string;
1227
- };
1228
- meta: object;
1229
- }>;
1230
- rotate: TRPCMutationProcedure< {
1231
- input: {
1232
- keyId: string;
1233
- };
1234
- output: {
1235
- status: string;
1236
- message: string;
1237
- };
1238
- meta: object;
1239
- }>;
1240
- }>>;
1241
- health: TRPCBuiltRouter< {
1242
- ctx: Context;
1243
- meta: object;
1244
- errorShape: TRPCDefaultErrorShape;
1245
- transformer: true;
1246
- }, TRPCDecorateCreateRouterOptions< {
1247
- alive: TRPCQueryProcedure< {
1248
- input: void;
1249
- output: {
1250
- status: string;
1251
- timestamp: string;
1252
- };
1253
- meta: object;
1254
- }>;
1255
- ready: TRPCQueryProcedure< {
1256
- input: void;
1257
- output: {
1258
- status: string;
1259
- timestamp: string;
1260
- checks: {
1261
- database: string;
1262
- inngest: string;
1263
- };
1264
- details: {
1265
- database: any;
1266
- inngest: any;
1267
- };
1268
- };
1269
- meta: object;
1270
- }>;
1271
- migrations: TRPCQueryProcedure< {
1272
- input: void;
1273
- output: {
1274
- total: number;
1275
- migrations: {
1276
- version: string;
1277
- appliedAt: string;
1278
- description: string;
1279
- }[];
1280
- note: string;
1281
- };
1282
- meta: object;
1283
- }>;
1284
- metrics: TRPCQueryProcedure< {
1285
- input: void;
1286
- output: {
1287
- timestamp: string;
1288
- uptime: number;
1289
- memory: {
1290
- used: number;
1291
- total: number;
1292
- rss: number;
1293
- };
1294
- events24h: number;
1295
- totalEntities: number;
1296
- };
1297
- meta: object;
1298
- }>;
1299
- }>>;
1300
- integrations: TRPCBuiltRouter< {
1301
- ctx: Context;
1302
- meta: object;
1303
- errorShape: TRPCDefaultErrorShape;
1304
- transformer: true;
1305
- }, TRPCDecorateCreateRouterOptions< {
1306
- create: TRPCMutationProcedure< {
1307
- input: {
1308
- name: string;
1309
- url: string;
1310
- eventTypes: string[];
1311
- secret?: string | undefined;
1312
- };
1313
- output: {
1314
- subscription: {
1315
- userId: string;
1316
- id: string;
1317
- createdAt: Date;
1318
- name: string;
1319
- url: string;
1320
- eventTypes: string[];
1321
- secret: string;
1322
- active: boolean;
1323
- retryConfig: unknown;
1324
- lastTriggeredAt: Date | null;
1325
- };
1326
- secret: string;
1327
- };
1328
- meta: object;
1329
- }>;
1330
- list: TRPCQueryProcedure< {
1331
- input: void;
1332
- output: {
1333
- userId: string;
1334
- id: string;
1335
- createdAt: Date;
1336
- name: string;
1337
- url: string;
1338
- eventTypes: string[];
1339
- active: boolean;
1340
- retryConfig: unknown;
1341
- lastTriggeredAt: Date | null;
1342
- }[];
1343
- meta: object;
1344
- }>;
1345
- update: TRPCMutationProcedure< {
1346
- input: {
1347
- id: string;
1348
- name?: string | undefined;
1349
- url?: string | undefined;
1350
- eventTypes?: string[] | undefined;
1351
- active?: boolean | undefined;
1352
- };
1353
- output: {
1354
- id: string;
1355
- userId: string;
1356
- name: string;
1357
- url: string;
1358
- eventTypes: string[];
1359
- active: boolean;
1360
- retryConfig: unknown;
1361
- createdAt: Date;
1362
- lastTriggeredAt: Date | null;
1363
- };
1364
- meta: object;
1365
- }>;
1366
- delete: TRPCMutationProcedure< {
1367
- input: {
1368
- id: string;
1369
- };
1370
- output: {
1371
- success: boolean;
1372
- };
1373
- meta: object;
1374
- }>;
1375
- }>>;
1376
- documents: TRPCBuiltRouter< {
1377
- ctx: Context;
1378
- meta: object;
1379
- errorShape: TRPCDefaultErrorShape;
1380
- transformer: true;
1381
- }, TRPCDecorateCreateRouterOptions< {
1382
- upload: TRPCMutationProcedure< {
1383
- input: {
1384
- type: "code" | "text" | "markdown" | "pdf" | "docx";
1385
- title: string;
1386
- content: string;
1387
- language?: string | null | undefined;
1388
- mimeType?: string | null | undefined;
1389
- projectId?: string | null | undefined;
1390
- };
1391
- output: {
1392
- status: string;
1393
- message: string;
1394
- documentId: `${string}-${string}-${string}-${string}-${string}`;
1395
- };
1396
- meta: object;
1397
- }>;
1398
- get: TRPCQueryProcedure< {
1399
- input: {
1400
- documentId: string;
1401
- };
1402
- output: {
1403
- document: {
1404
- id: string;
1405
- userId: string;
1406
- workspaceId: string;
1407
- projectIds: string[] | null;
1408
- title: string;
1409
- type: string;
1410
- language: string | null;
1411
- storageUrl: string;
1412
- storageKey: string;
1413
- size: number;
1414
- mimeType: string | null;
1415
- currentVersion: number;
1416
- lastSavedVersion: number;
1417
- workingState: string | null;
1418
- workingStateUpdatedAt: Date | null;
1419
- projectId: string | null;
1420
- metadata: unknown;
1421
- createdAt: Date;
1422
- updatedAt: Date;
1423
- deletedAt: Date | null;
1424
- };
1425
- content: string;
1426
- };
1427
- meta: object;
1428
- }>;
1429
- update: TRPCMutationProcedure< {
1430
- input: {
1431
- documentId: string;
1432
- version: number;
1433
- message?: string | undefined;
1434
- delta?: {
1435
- content: string;
1436
- }[] | undefined;
1437
- };
1438
- output: {
1439
- version: number;
1440
- success: boolean;
1441
- };
1442
- meta: object;
1443
- }>;
1444
- delete: TRPCMutationProcedure< {
1445
- input: {
1446
- documentId: string;
1447
- };
1448
- output: {
1449
- success: boolean;
1450
- };
1451
- meta: object;
1452
- }>;
1453
- saveVersion: TRPCMutationProcedure< {
1454
- input: {
1455
- documentId: string;
1456
- message?: string | undefined;
1457
- };
1458
- output: {
1459
- status: string;
1460
- message: string;
1461
- };
1462
- meta: object;
1463
- }>;
1464
- listVersions: TRPCQueryProcedure< {
1465
- input: {
1466
- documentId: string;
1467
- limit?: number | undefined;
1468
- };
1469
- output: {
1470
- versions: {
1471
- id: string;
1472
- version: number;
1473
- message: string | null;
1474
- createdBy: string;
1475
- createdAt: Date;
1476
- }[];
1477
- latest: {
1478
- currentVersion: number;
1479
- lastSavedVersion: number;
1480
- };
1481
- };
1482
- meta: object;
1483
- }>;
1484
- restoreVersion: TRPCMutationProcedure< {
1485
- input: {
1486
- documentId: string;
1487
- versionId: string;
1488
- };
1489
- output: {
1490
- status: string;
1491
- message: string;
1492
- };
1493
- meta: object;
1494
- }>;
1495
- getVersionPreview: TRPCQueryProcedure< {
1496
- input: {
1497
- versionId: string;
1498
- };
1499
- output: {
1500
- message: string | null;
1501
- type: string;
1502
- id: string;
1503
- documentId: string;
1504
- version: number;
1505
- createdAt: Date;
1506
- content: string;
1507
- delta: unknown;
1508
- author: string;
1509
- authorId: string;
1510
- };
1511
- meta: object;
1512
- }>;
1513
- startSession: TRPCMutationProcedure< {
1514
- input: {
1515
- documentId: string;
1516
- };
1517
- output: {
1518
- sessionId: string;
1519
- chatThreadId: `${string}-${string}-${string}-${string}-${string}`;
1520
- };
1521
- meta: object;
1522
- }>;
1523
- list: TRPCQueryProcedure< {
1524
- input: {
1525
- type?: "code" | "text" | "markdown" | "pdf" | "docx" | undefined;
1526
- limit?: number | undefined;
1527
- projectId?: string | undefined;
1528
- };
1529
- output: {
1530
- documents: {
1531
- id: string;
1532
- userId: string;
1533
- workspaceId: string;
1534
- projectIds: string[] | null;
1535
- title: string;
1536
- type: string;
1537
- language: string | null;
1538
- storageUrl: string;
1539
- storageKey: string;
1540
- size: number;
1541
- mimeType: string | null;
1542
- currentVersion: number;
1543
- lastSavedVersion: number;
1544
- workingState: string | null;
1545
- workingStateUpdatedAt: Date | null;
1546
- projectId: string | null;
1547
- metadata: unknown;
1548
- createdAt: Date;
1549
- updatedAt: Date;
1550
- deletedAt: Date | null;
1551
- }[];
1552
- total: number;
1553
- };
1554
- meta: object;
1555
- }>;
1556
- }>>;
1557
- content: TRPCBuiltRouter< {
1558
- ctx: Context;
1559
- meta: object;
1560
- errorShape: TRPCDefaultErrorShape;
1561
- transformer: true;
1562
- }, TRPCDecorateCreateRouterOptions< {
1563
- createFromText: TRPCMutationProcedure< {
1564
- input: {
1565
- content: string;
1566
- targetType: "task" | "note";
1567
- metadata?: {
1568
- title?: string | undefined;
1569
- tags?: string[] | undefined;
1570
- } | undefined;
1571
- };
1572
- output: {
1573
- success: boolean;
1574
- status: "pending";
1575
- requestId: `${string}-${string}-${string}-${string}-${string}`;
1576
- entityId: `${string}-${string}-${string}-${string}-${string}`;
1577
- };
1578
- meta: object;
1579
- }>;
1580
- createFromFile: TRPCMutationProcedure< {
1581
- input: {
1582
- targetType: "note" | "document";
1583
- file: string;
1584
- filename: string;
1585
- contentType: string;
1586
- metadata?: {
1587
- title?: string | undefined;
1588
- description?: string | undefined;
1589
- tags?: string[] | undefined;
1590
- } | undefined;
1591
- };
1592
- output: any;
1593
- meta: object;
1594
- }>;
1595
- }>>;
1596
- storage: TRPCBuiltRouter< {
1597
- ctx: Context;
1598
- meta: object;
1599
- errorShape: TRPCDefaultErrorShape;
1600
- transformer: true;
1601
- }, TRPCDecorateCreateRouterOptions< {
1602
- listBuckets: TRPCQueryProcedure< {
1603
- input: void;
1604
- output: {
1605
- buckets: {
1606
- name: string;
1607
- createdAt: string | null;
1608
- }[];
1609
- };
1610
- meta: object;
1611
- }>;
1612
- listFiles: TRPCQueryProcedure< {
1613
- input: {
1614
- bucket?: string | undefined;
1615
- prefix?: string | undefined;
1616
- maxKeys?: number | undefined;
1617
- };
1618
- output: {
1619
- items: ({
1620
- type: "folder";
1621
- name: string;
1622
- path: string;
1623
- } | {
1624
- type: "file";
1625
- name: string;
1626
- path: string;
1627
- size: number;
1628
- lastModified: string | null;
1629
- })[];
1630
- totalItems: number;
1631
- prefix: string;
1632
- bucket: string;
1633
- isTruncated: boolean;
1634
- error?: undefined;
1635
- } | {
1636
- items: never[];
1637
- totalItems: number;
1638
- prefix: string;
1639
- bucket: string;
1640
- isTruncated: boolean;
1641
- error: string;
1642
- };
1643
- meta: object;
1644
- }>;
1645
- getFileMetadata: TRPCQueryProcedure< {
1646
- input: {
1647
- path: string;
1648
- };
1649
- output: {
1650
- success: boolean;
1651
- path: string;
1652
- size: number;
1653
- lastModified: string;
1654
- contentType: string;
1655
- error?: undefined;
1656
- } | {
1657
- success: boolean;
1658
- path: string;
1659
- error: string;
1660
- size?: undefined;
1661
- lastModified?: undefined;
1662
- contentType?: undefined;
1663
- };
1664
- meta: object;
1665
- }>;
1666
- getDownloadUrl: TRPCQueryProcedure< {
1667
- input: {
1668
- path: string;
1669
- expiresIn?: number | undefined;
1670
- };
1671
- output: {
1672
- success: boolean;
1673
- url: string;
1674
- expiresIn: number;
1675
- error?: undefined;
1676
- } | {
1677
- success: boolean;
1678
- error: string;
1679
- url?: undefined;
1680
- expiresIn?: undefined;
1681
- };
1682
- meta: object;
1683
- }>;
1684
- exists: TRPCQueryProcedure< {
1685
- input: {
1686
- path: string;
1687
- };
1688
- output: {
1689
- exists: boolean;
1690
- path: string;
1691
- };
1692
- meta: object;
1693
- }>;
1694
- deleteFile: TRPCMutationProcedure< {
1695
- input: {
1696
- path: string;
1697
- };
1698
- output: {
1699
- success: boolean;
1700
- path: string;
1701
- error?: undefined;
1702
- } | {
1703
- success: boolean;
1704
- path: string;
1705
- error: string;
1706
- };
1707
- meta: object;
1708
- }>;
1709
- }>>;
1710
- notifications: TRPCBuiltRouter< {
1711
- ctx: Context;
1712
- meta: object;
1713
- errorShape: TRPCDefaultErrorShape;
1714
- transformer: true;
1715
- }, TRPCDecorateCreateRouterOptions< {
1716
- ingest: TRPCMutationProcedure< {
1717
- input: {
1718
- items: any[];
1719
- };
1720
- output: {
1721
- success: boolean;
1722
- created: number;
1723
- skipped: number;
1724
- total: number;
1725
- };
1726
- meta: object;
1727
- }>;
1728
- list: TRPCQueryProcedure< {
1729
- input: {
1730
- status?: "archived" | "unread" | "snoozed" | undefined;
1731
- limit?: number | undefined;
1732
- offset?: number | undefined;
1733
- types?: string[] | undefined;
1734
- };
1735
- output: {
1736
- userId: string;
1737
- type: string;
1738
- status: string | null;
1739
- id: string;
1740
- workspaceId: string;
1741
- projectIds: string[] | null;
1742
- title: string;
1743
- preview: string | null;
1744
- createdAt: Date;
1745
- updatedAt: Date;
1746
- data: unknown;
1747
- tags: string[] | null;
1748
- timestamp: Date;
1749
- priority: string | null;
1750
- provider: string;
1751
- account: string;
1752
- externalId: string;
1753
- deepLink: string | null;
1754
- snoozedUntil: Date | null;
1755
- processedAt: Date | null;
1756
- }[];
1757
- meta: object;
1758
- }>;
1759
- updateStatus: TRPCMutationProcedure< {
1760
- input: {
1761
- status: "archived" | "read" | "snoozed";
1762
- id: string;
1763
- snoozedUntil?: Date | undefined;
1764
- };
1765
- output: {
1766
- success: boolean;
1767
- id: string;
1768
- };
1769
- meta: object;
1770
- }>;
1771
- batchUpdate: TRPCMutationProcedure< {
1772
- input: {
1773
- action: "archive" | "snooze" | "markRead";
1774
- ids: string[];
1775
- snoozedUntil?: Date | undefined;
1776
- };
1777
- output: {
1778
- success: boolean;
1779
- updated: number;
1780
- };
1781
- meta: object;
1782
- }>;
1783
- stats: TRPCQueryProcedure< {
1784
- input: void;
1785
- output: {
1786
- unread: number;
1787
- snoozed: number;
1788
- };
1789
- meta: object;
1790
- }>;
1791
- }>>;
1792
- intelligenceRegistry: TRPCBuiltRouter< {
1793
- ctx: Context;
1794
- meta: object;
1795
- errorShape: TRPCDefaultErrorShape;
1796
- transformer: true;
1797
- }, TRPCDecorateCreateRouterOptions< {
1798
- register: TRPCMutationProcedure< {
1799
- input: {
1800
- name: string;
1801
- capabilities: string[];
1802
- serviceId: string;
1803
- webhookUrl: string;
1804
- apiKey: string;
1805
- metadata?: Record<string, unknown> | undefined;
1806
- version?: string | undefined;
1807
- description?: string | undefined;
1808
- pricing?: "custom" | "free" | "premium" | "enterprise" | undefined;
1809
- };
1810
- output: {
1811
- status: string;
1812
- id: string;
1813
- metadata: Record<string, unknown> | null;
1814
- version: string | null;
1815
- createdAt: Date;
1816
- updatedAt: Date;
1817
- name: string;
1818
- description: string | null;
1819
- capabilities: string[];
1820
- serviceId: string;
1821
- webhookUrl: string;
1822
- apiKey: string;
1823
- pricing: string | null;
1824
- enabled: boolean;
1825
- lastHealthCheck: Date | null;
1826
- };
1827
- meta: object;
1828
- }>;
1829
- list: TRPCQueryProcedure< {
1830
- input: {
1831
- status?: "active" | "inactive" | "suspended" | undefined;
1832
- enabled?: boolean | undefined;
1833
- } | undefined;
1834
- output: {
1835
- id: string;
1836
- serviceId: string;
1837
- name: string;
1838
- description: string | null;
1839
- version: string | null;
1840
- capabilities: string[];
1841
- pricing: string | null;
1842
- status: string;
1843
- enabled: boolean;
1844
- createdAt: Date;
1845
- updatedAt: Date;
1846
- }[];
1847
- meta: object;
1848
- }>;
1849
- get: TRPCQueryProcedure< {
1850
- input: {
1851
- id: string;
1852
- };
1853
- output: {
1854
- status: string;
1855
- id: string;
1856
- metadata: Record<string, unknown> | null;
1857
- version: string | null;
1858
- createdAt: Date;
1859
- updatedAt: Date;
1860
- name: string;
1861
- description: string | null;
1862
- capabilities: string[];
1863
- serviceId: string;
1864
- webhookUrl: string;
1865
- pricing: string | null;
1866
- enabled: boolean;
1867
- lastHealthCheck: Date | null;
1868
- };
1869
- meta: object;
1870
- }>;
1871
- update: TRPCMutationProcedure< {
1872
- input: {
1873
- id: string;
1874
- status?: "active" | "inactive" | "suspended" | undefined;
1875
- metadata?: Record<string, unknown> | undefined;
1876
- version?: string | undefined;
1877
- name?: string | undefined;
1878
- description?: string | undefined;
1879
- capabilities?: string[] | undefined;
1880
- webhookUrl?: string | undefined;
1881
- enabled?: boolean | undefined;
1882
- };
1883
- output: {
1884
- id: string;
1885
- serviceId: string;
1886
- name: string;
1887
- description: string | null;
1888
- version: string | null;
1889
- webhookUrl: string;
1890
- apiKey: string;
1891
- capabilities: string[];
1892
- pricing: string | null;
1893
- status: string;
1894
- enabled: boolean;
1895
- metadata: Record<string, unknown> | null;
1896
- createdAt: Date;
1897
- updatedAt: Date;
1898
- lastHealthCheck: Date | null;
1899
- };
1900
- meta: object;
1901
- }>;
1902
- unregister: TRPCMutationProcedure< {
1903
- input: {
1904
- id: string;
1905
- };
1906
- output: {
1907
- success: boolean;
1908
- };
1909
- meta: object;
1910
- }>;
1911
- findByCapability: TRPCQueryProcedure< {
1912
- input: {
1913
- capability: string;
1914
- };
1915
- output: {
1916
- id: string;
1917
- serviceId: string;
1918
- name: string;
1919
- capabilities: string[];
1920
- webhookUrl: string;
1921
- }[];
1922
- meta: object;
1923
- }>;
1924
- }>>;
1925
- capabilities: TRPCBuiltRouter< {
1926
- ctx: Context;
1927
- meta: object;
1928
- errorShape: TRPCDefaultErrorShape;
1929
- transformer: true;
1930
- }, TRPCDecorateCreateRouterOptions< {
1931
- list: TRPCQueryProcedure< {
1932
- input: void;
1933
- output: {
1934
- core: {
1935
- version: string;
1936
- features: string[];
1937
- };
1938
- plugins: {
1939
- name: string;
1940
- version: string;
1941
- enabled: boolean;
1942
- }[];
1943
- intelligenceServices: {
1944
- id: string;
1945
- serviceId: string;
1946
- name: string;
1947
- capabilities: string[];
1948
- pricing: string;
1949
- version: string | null;
1950
- }[];
1951
- };
1952
- meta: object;
1953
- }>;
1954
- hasCapability: TRPCQueryProcedure< {
1955
- input: {
1956
- capability: string;
1957
- };
1958
- output: {
1959
- available: boolean;
1960
- };
1961
- meta: object;
1962
- }>;
1963
- }>>;
1964
- tags: TRPCBuiltRouter< {
1965
- ctx: Context;
1966
- meta: object;
1967
- errorShape: TRPCDefaultErrorShape;
1968
- transformer: true;
1969
- }, TRPCDecorateCreateRouterOptions< {
1970
- list: TRPCQueryProcedure< {
1971
- input: void;
1972
- output: {
1973
- tags: {
1974
- userId: string;
1975
- id: string;
1976
- workspaceId: string;
1977
- projectIds: string[] | null;
1978
- createdAt: Date;
1979
- name: string;
1980
- color: string | null;
1981
- }[];
1982
- };
1983
- meta: object;
1984
- }>;
1985
- create: TRPCMutationProcedure< {
1986
- input: {
1987
- name: string;
1988
- color?: string | null | undefined;
1989
- };
1990
- output: {
1991
- tag: {
1992
- id: `${string}-${string}-${string}-${string}-${string}`;
1993
- userId: string;
1994
- name: string;
1995
- color: string;
1996
- createdAt: Date;
1997
- updatedAt: Date;
1998
- };
1999
- };
2000
- meta: object;
2001
- }>;
2002
- update: TRPCMutationProcedure< {
2003
- input: {
2004
- id?: string | undefined;
2005
- name?: string | undefined;
2006
- color?: string | null | undefined;
2007
- };
2008
- output: {
2009
- tag: {
2010
- name: string;
2011
- color: string | null;
2012
- updatedAt: Date;
2013
- userId: string;
2014
- id: string;
2015
- workspaceId: string;
2016
- projectIds: string[] | null;
2017
- createdAt: Date;
2018
- };
2019
- };
2020
- meta: object;
2021
- }>;
2022
- delete: TRPCMutationProcedure< {
2023
- input: {
2024
- id?: string | undefined;
2025
- };
2026
- output: {
2027
- success: boolean;
2028
- };
2029
- meta: object;
2030
- }>;
2031
- attach: TRPCMutationProcedure< {
2032
- input: {
2033
- entityId: string;
2034
- tagId: string;
2035
- };
2036
- output: {
2037
- status: string;
2038
- };
2039
- meta: object;
2040
- }>;
2041
- detach: TRPCMutationProcedure< {
2042
- input: {
2043
- entityId: string;
2044
- tagId: string;
2045
- };
2046
- output: {
2047
- status: string;
2048
- };
2049
- meta: object;
2050
- }>;
2051
- getForEntity: TRPCQueryProcedure< {
2052
- input: {
2053
- entityId: string;
2054
- };
2055
- output: {
2056
- tags: any[];
2057
- };
2058
- meta: object;
2059
- }>;
2060
- getEntitiesWithTag: TRPCQueryProcedure< {
2061
- input: {
2062
- tagId: string;
2063
- limit?: number | undefined;
2064
- };
2065
- output: {
2066
- entities: any[];
2067
- };
2068
- meta: object;
2069
- }>;
2070
- }>>;
2071
- search: TRPCBuiltRouter< {
2072
- ctx: Context;
2073
- meta: object;
2074
- errorShape: TRPCDefaultErrorShape;
2075
- transformer: true;
2076
- }, TRPCDecorateCreateRouterOptions< {
2077
- entities: TRPCQueryProcedure< {
2078
- input: {
2079
- query: string;
2080
- type?: "task" | "note" | "project" | "document" | undefined;
2081
- limit?: number | undefined;
2082
- };
2083
- output: {
2084
- entities: {
2085
- userId: string;
2086
- type: string;
2087
- id: string;
2088
- workspaceId: string;
2089
- projectIds: string[] | null;
2090
- title: string | null;
2091
- preview: string | null;
2092
- documentId: string | null;
2093
- metadata: unknown;
2094
- version: number;
2095
- createdAt: Date;
2096
- updatedAt: Date;
2097
- deletedAt: Date | null;
2098
- }[];
2099
- };
2100
- meta: object;
2101
- }>;
2102
- semantic: TRPCQueryProcedure< {
2103
- input: {
2104
- query: string;
2105
- type?: "task" | "note" | "project" | "document" | undefined;
2106
- limit?: number | undefined;
2107
- threshold?: number | undefined;
2108
- };
2109
- output: {
2110
- entities: never[];
2111
- message: string;
2112
- };
2113
- meta: object;
2114
- }>;
2115
- related: TRPCQueryProcedure< {
2116
- input: {
2117
- entityId: string;
2118
- limit?: number | undefined;
2119
- };
2120
- output: {
2121
- entities: {
2122
- userId: string;
2123
- type: string;
2124
- id: string;
2125
- workspaceId: string;
2126
- projectIds: string[] | null;
2127
- title: string | null;
2128
- preview: string | null;
2129
- documentId: string | null;
2130
- metadata: unknown;
2131
- version: number;
2132
- createdAt: Date;
2133
- updatedAt: Date;
2134
- deletedAt: Date | null;
2135
- }[];
2136
- };
2137
- meta: object;
2138
- }>;
2139
- byTags: TRPCQueryProcedure< {
2140
- input: {
2141
- tagIds: string[];
2142
- limit?: number | undefined;
2143
- };
2144
- output: {
2145
- entities: any[];
2146
- };
2147
- meta: object;
2148
- }>;
2149
- }>>;
2150
- relations: TRPCBuiltRouter< {
2151
- ctx: Context;
2152
- meta: object;
2153
- errorShape: TRPCDefaultErrorShape;
2154
- transformer: true;
2155
- }, TRPCDecorateCreateRouterOptions< {
2156
- get: TRPCQueryProcedure< {
2157
- input: {
2158
- entityId: string;
2159
- type?: "assigned_to" | "mentions" | "links_to" | "parent_of" | "relates_to" | "tagged_with" | "created_by" | "attended_by" | "depends_on" | "blocks" | undefined;
2160
- limit?: number | undefined;
2161
- direction?: "source" | "target" | "both" | undefined;
2162
- };
2163
- output: {
2164
- relations: {
2165
- userId: string;
2166
- type: string;
2167
- id: string;
2168
- workspaceId: string;
2169
- projectIds: string[] | null;
2170
- createdAt: Date;
2171
- sourceEntityId: string;
2172
- targetEntityId: string;
2173
- }[];
2174
- };
2175
- meta: object;
2176
- }>;
2177
- getRelated: TRPCQueryProcedure< {
2178
- input: {
2179
- entityId: string;
2180
- type?: "assigned_to" | "mentions" | "links_to" | "parent_of" | "relates_to" | "tagged_with" | "created_by" | "attended_by" | "depends_on" | "blocks" | undefined;
2181
- limit?: number | undefined;
2182
- direction?: "source" | "target" | "both" | undefined;
2183
- };
2184
- output: {
2185
- entities: {
2186
- userId: string;
2187
- type: string;
2188
- id: string;
2189
- workspaceId: string;
2190
- projectIds: string[] | null;
2191
- title: string | null;
2192
- preview: string | null;
2193
- documentId: string | null;
2194
- metadata: unknown;
2195
- version: number;
2196
- createdAt: Date;
2197
- updatedAt: Date;
2198
- deletedAt: Date | null;
2199
- }[];
2200
- };
2201
- meta: object;
2202
- }>;
2203
- getStats: TRPCQueryProcedure< {
2204
- input: {
2205
- entityId: string;
2206
- };
2207
- output: {
2208
- total: number;
2209
- outgoing: number;
2210
- incoming: number;
2211
- byType: Record<string, number>;
2212
- };
2213
- meta: object;
2214
- }>;
2215
- create: TRPCMutationProcedure< {
2216
- input: {
2217
- type: "assigned_to" | "mentions" | "links_to" | "parent_of" | "relates_to" | "tagged_with" | "created_by" | "attended_by" | "depends_on" | "blocks";
2218
- sourceEntityId: string;
2219
- targetEntityId: string;
2220
- metadata?: Record<string, any> | undefined;
2221
- };
2222
- output: {
2223
- id: `${string}-${string}-${string}-${string}-${string}`;
2224
- status: string;
2225
- message: string;
2226
- };
2227
- meta: object;
2228
- }>;
2229
- delete: TRPCMutationProcedure< {
2230
- input: {
2231
- id: string;
2232
- };
2233
- output: {
2234
- status: string;
2235
- message: string;
2236
- };
2237
- meta: object;
2238
- }>;
2239
- }>>;
2240
- graph: TRPCBuiltRouter< {
2241
- ctx: Context;
2242
- meta: object;
2243
- errorShape: TRPCDefaultErrorShape;
2244
- transformer: true;
2245
- }, TRPCDecorateCreateRouterOptions< {
2246
- getNode: TRPCQueryProcedure< {
2247
- input: {
2248
- entityId: string;
2249
- relationTypes?: string[] | undefined;
2250
- includeRelations?: boolean | undefined;
2251
- includeRelatedPreviews?: boolean | undefined;
2252
- };
2253
- output: {
2254
- entity: {
2255
- userId: string;
2256
- type: string;
2257
- id: string;
2258
- workspaceId: string;
2259
- projectIds: string[] | null;
2260
- title: string | null;
2261
- preview: string | null;
2262
- documentId: string | null;
2263
- metadata: unknown;
2264
- version: number;
2265
- createdAt: Date;
2266
- updatedAt: Date;
2267
- deletedAt: Date | null;
2268
- };
2269
- relations: never[];
2270
- relatedEntities: never[];
2271
- stats: null;
2272
- } | {
2273
- entity: {
2274
- userId: string;
2275
- type: string;
2276
- id: string;
2277
- workspaceId: string;
2278
- projectIds: string[] | null;
2279
- title: string | null;
2280
- preview: string | null;
2281
- documentId: string | null;
2282
- metadata: unknown;
2283
- version: number;
2284
- createdAt: Date;
2285
- updatedAt: Date;
2286
- deletedAt: Date | null;
2287
- };
2288
- relations: {
2289
- userId: string;
2290
- type: string;
2291
- id: string;
2292
- workspaceId: string;
2293
- projectIds: string[] | null;
2294
- createdAt: Date;
2295
- sourceEntityId: string;
2296
- targetEntityId: string;
2297
- }[];
2298
- relatedEntities: any[];
2299
- stats: {
2300
- total: number;
2301
- outgoing: number;
2302
- incoming: number;
2303
- byType: Record<string, number>;
2304
- };
2305
- };
2306
- meta: object;
2307
- }>;
2308
- getSubgraph: TRPCQueryProcedure< {
2309
- input: {
2310
- entityIds: string[];
2311
- includeInternalRelations?: boolean | undefined;
2312
- includeExternalRelations?: boolean | undefined;
2313
- };
2314
- output: {
2315
- entities: {
2316
- userId: string;
2317
- type: string;
2318
- id: string;
2319
- workspaceId: string;
2320
- projectIds: string[] | null;
2321
- title: string | null;
2322
- preview: string | null;
2323
- documentId: string | null;
2324
- metadata: unknown;
2325
- version: number;
2326
- createdAt: Date;
2327
- updatedAt: Date;
2328
- deletedAt: Date | null;
2329
- }[];
2330
- relations: {
2331
- userId: string;
2332
- type: string;
2333
- id: string;
2334
- workspaceId: string;
2335
- projectIds: string[] | null;
2336
- createdAt: Date;
2337
- sourceEntityId: string;
2338
- targetEntityId: string;
2339
- }[];
2340
- };
2341
- meta: object;
2342
- }>;
2343
- getStats: TRPCQueryProcedure< {
2344
- input: {
2345
- entityId?: string | undefined;
2346
- entityType?: string | undefined;
2347
- };
2348
- output: {
2349
- entityId: string;
2350
- relationCount: number;
2351
- outgoing: number;
2352
- incoming: number;
2353
- totalEntities?: undefined;
2354
- totalRelations?: undefined;
2355
- entityTypeDistribution?: undefined;
2356
- relationTypeDistribution?: undefined;
2357
- averageRelationsPerEntity?: undefined;
2358
- } | {
2359
- totalEntities: number;
2360
- totalRelations: number;
2361
- entityTypeDistribution: Record<string, number>;
2362
- relationTypeDistribution: Record<string, number>;
2363
- averageRelationsPerEntity: number;
2364
- entityId?: undefined;
2365
- relationCount?: undefined;
2366
- outgoing?: undefined;
2367
- incoming?: undefined;
2368
- };
2369
- meta: object;
2370
- }>;
2371
- }>>;
2372
- workspaces: TRPCBuiltRouter< {
2373
- ctx: Context;
2374
- meta: object;
2375
- errorShape: TRPCDefaultErrorShape;
2376
- transformer: true;
2377
- }, TRPCDecorateCreateRouterOptions< {
2378
- create: TRPCMutationProcedure< {
2379
- input: {
2380
- name: string;
2381
- type?: "enterprise" | "personal" | "team" | undefined;
2382
- description?: string | undefined;
2383
- settings?: Record<string, unknown> | undefined;
2384
- };
2385
- output: {
2386
- status: string;
2387
- message: string;
2388
- workspaceId: `${string}-${string}-${string}-${string}-${string}`;
2389
- };
2390
- meta: object;
2391
- }>;
2392
- list: TRPCQueryProcedure< {
2393
- input: void;
2394
- output: {
2395
- role: string;
2396
- joinedAt: Date;
2397
- type: string;
2398
- id: string;
2399
- createdAt: Date;
2400
- updatedAt: Date;
2401
- name: string;
2402
- description: string | null;
2403
- settings: WorkspaceSettings;
2404
- ownerId: string;
2405
- subscriptionTier: string | null;
2406
- subscriptionStatus: string | null;
2407
- stripeCustomerId: string | null;
2408
- }[];
2409
- meta: object;
2410
- }>;
2411
- get: TRPCQueryProcedure< {
2412
- input: {
2413
- id: string;
2414
- };
2415
- output: {
2416
- role: string;
2417
- type: string;
2418
- id: string;
2419
- createdAt: Date;
2420
- updatedAt: Date;
2421
- name: string;
2422
- description: string | null;
2423
- settings: WorkspaceSettings;
2424
- ownerId: string;
2425
- subscriptionTier: string | null;
2426
- subscriptionStatus: string | null;
2427
- stripeCustomerId: string | null;
2428
- };
2429
- meta: object;
2430
- }>;
2431
- update: TRPCMutationProcedure< {
2432
- input: {
2433
- id: string;
2434
- name?: string | undefined;
2435
- description?: string | undefined;
2436
- settings?: Record<string, unknown> | undefined;
2437
- };
2438
- output: {
2439
- status: string;
2440
- message: string;
2441
- };
2442
- meta: object;
2443
- }>;
2444
- delete: TRPCMutationProcedure< {
2445
- input: {
2446
- id: string;
2447
- };
2448
- output: {
2449
- status: string;
2450
- message: string;
2451
- };
2452
- meta: object;
2453
- }>;
2454
- addMember: TRPCMutationProcedure< {
2455
- input: {
2456
- userId: string;
2457
- workspaceId: string;
2458
- role: "owner" | "editor" | "viewer";
2459
- };
2460
- output: {
2461
- status: string;
2462
- message: string;
2463
- };
2464
- meta: object;
2465
- }>;
2466
- listMembers: TRPCQueryProcedure< {
2467
- input: {
2468
- workspaceId: string;
2469
- };
2470
- output: {
2471
- userId: string;
2472
- id: string;
2473
- workspaceId: string;
2474
- role: string;
2475
- joinedAt: Date;
2476
- invitedBy: string | null;
2477
- }[];
2478
- meta: object;
2479
- }>;
2480
- removeMember: TRPCMutationProcedure< {
2481
- input: {
2482
- userId: string;
2483
- workspaceId: string;
2484
- };
2485
- output: {
2486
- status: string;
2487
- message: string;
2488
- };
2489
- meta: object;
2490
- }>;
2491
- updateMemberRole: TRPCMutationProcedure< {
2492
- input: {
2493
- userId: string;
2494
- workspaceId: string;
2495
- role: "editor" | "viewer" | "admin";
2496
- };
2497
- output: {
2498
- status: string;
2499
- message: string;
2500
- };
2501
- meta: object;
2502
- }>;
2503
- createInvite: TRPCMutationProcedure< {
2504
- input: {
2505
- workspaceId: string;
2506
- email: string;
2507
- role: "editor" | "viewer" | "admin";
2508
- };
2509
- output: {
2510
- id: string;
2511
- workspaceId: string;
2512
- createdAt: Date;
2513
- email: string;
2514
- role: string;
2515
- expiresAt: Date;
2516
- invitedBy: string;
2517
- token: string;
2518
- };
2519
- meta: object;
2520
- }>;
2521
- listInvites: TRPCQueryProcedure< {
2522
- input: {
2523
- workspaceId: string;
2524
- };
2525
- output: {
2526
- id: string;
2527
- workspaceId: string;
2528
- createdAt: Date;
2529
- email: string;
2530
- role: string;
2531
- expiresAt: Date;
2532
- invitedBy: string;
2533
- token: string;
2534
- }[];
2535
- meta: object;
2536
- }>;
2537
- acceptInvite: TRPCMutationProcedure< {
2538
- input: {
2539
- token: string;
2540
- };
2541
- output: {
2542
- status: string;
2543
- workspaceId: string;
2544
- message: string;
2545
- };
2546
- meta: object;
2547
- }>;
2548
- revokeInvite: TRPCMutationProcedure< {
2549
- input: {
2550
- id: string;
2551
- };
2552
- output: {
2553
- success: boolean;
2554
- };
2555
- meta: object;
2556
- }>;
2557
- }>>;
2558
- views: TRPCBuiltRouter< {
2559
- ctx: Context;
2560
- meta: object;
2561
- errorShape: TRPCDefaultErrorShape;
2562
- transformer: true;
2563
- }, TRPCDecorateCreateRouterOptions< {
2564
- create: TRPCMutationProcedure< {
2565
- input: {
2566
- type: "list" | "calendar" | "grid" | "timeline" | "whiteboard" | "table" | "graph" | "kanban" | "gallery" | "gantt" | "mindmap";
2567
- name: string;
2568
- workspaceId?: string | null | undefined;
2569
- description?: string | null | undefined;
2570
- initialContent?: any;
2571
- };
2572
- output: {
2573
- view: {
2574
- id: `${string}-${string}-${string}-${string}-${string}`;
2575
- workspaceId: string | null | undefined;
2576
- userId: string;
2577
- type: "list" | "calendar" | "grid" | "timeline" | "whiteboard" | "table" | "graph" | "kanban" | "gallery" | "gantt" | "mindmap";
2578
- category: ViewCategory;
2579
- name: string;
2580
- description: string | null | undefined;
2581
- documentId: string;
2582
- metadata: {
2583
- entityCount: number;
2584
- createdBy: string;
2585
- };
2586
- createdAt: Date;
2587
- updatedAt: Date;
2588
- };
2589
- documentId: string;
2590
- status: string;
2591
- };
2592
- meta: object;
2593
- }>;
2594
- list: TRPCQueryProcedure< {
2595
- input: {
2596
- type?: "list" | "calendar" | "grid" | "timeline" | "whiteboard" | "all" | "table" | "graph" | "kanban" | "gallery" | "gantt" | "mindmap" | undefined;
2597
- workspaceId?: string | undefined;
2598
- };
2599
- output: {
2600
- userId: string;
2601
- type: string;
2602
- id: string;
2603
- workspaceId: string | null;
2604
- projectIds: string[] | null;
2605
- documentId: string | null;
2606
- metadata: unknown;
2607
- createdAt: Date;
2608
- updatedAt: Date;
2609
- name: string;
2610
- description: string | null;
2611
- category: string;
2612
- yjsRoomId: string | null;
2613
- thumbnailUrl: string | null;
2614
- }[];
2615
- meta: object;
2616
- }>;
2617
- get: TRPCQueryProcedure< {
2618
- input: {
2619
- id: string;
2620
- };
2621
- output: {
2622
- view: {
2623
- userId: string;
2624
- type: string;
2625
- id: string;
2626
- workspaceId: string | null;
2627
- projectIds: string[] | null;
2628
- documentId: string | null;
2629
- metadata: unknown;
2630
- createdAt: Date;
2631
- updatedAt: Date;
2632
- name: string;
2633
- description: string | null;
2634
- category: string;
2635
- yjsRoomId: string | null;
2636
- thumbnailUrl: string | null;
2637
- };
2638
- content: {};
2639
- };
2640
- meta: object;
2641
- }>;
2642
- execute: TRPCQueryProcedure< {
2643
- input: {
2644
- id: string;
2645
- };
2646
- output: {
2647
- view: {
2648
- userId: string;
2649
- type: string;
2650
- id: string;
2651
- workspaceId: string | null;
2652
- projectIds: string[] | null;
2653
- documentId: string | null;
2654
- metadata: unknown;
2655
- createdAt: Date;
2656
- updatedAt: Date;
2657
- name: string;
2658
- description: string | null;
2659
- category: string;
2660
- yjsRoomId: string | null;
2661
- thumbnailUrl: string | null;
2662
- };
2663
- content: {};
2664
- entities: never[];
2665
- relations: never[];
2666
- config?: undefined;
2667
- } | {
2668
- view: {
2669
- userId: string;
2670
- type: string;
2671
- id: string;
2672
- workspaceId: string | null;
2673
- projectIds: string[] | null;
2674
- documentId: string | null;
2675
- metadata: unknown;
2676
- createdAt: Date;
2677
- updatedAt: Date;
2678
- name: string;
2679
- description: string | null;
2680
- category: string;
2681
- yjsRoomId: string | null;
2682
- thumbnailUrl: string | null;
2683
- };
2684
- config: StructuredViewConfig | undefined;
2685
- entities: never[];
2686
- relations: never[];
2687
- content?: undefined;
2688
- } | {
2689
- view: {
2690
- userId: string;
2691
- type: string;
2692
- id: string;
2693
- workspaceId: string | null;
2694
- projectIds: string[] | null;
2695
- documentId: string | null;
2696
- metadata: unknown;
2697
- createdAt: Date;
2698
- updatedAt: Date;
2699
- name: string;
2700
- description: string | null;
2701
- category: string;
2702
- yjsRoomId: string | null;
2703
- thumbnailUrl: string | null;
2704
- };
2705
- config: StructuredViewConfig;
2706
- entities: {
2707
- id: string;
2708
- userId: string;
2709
- workspaceId: string;
2710
- projectIds: string[] | null;
2711
- type: string;
2712
- title: string | null;
2713
- preview: string | null;
2714
- documentId: string | null;
2715
- metadata: unknown;
2716
- version: number;
2717
- createdAt: Date;
2718
- updatedAt: Date;
2719
- deletedAt: Date | null;
2720
- }[];
2721
- relations: {
2722
- id: string;
2723
- userId: string;
2724
- workspaceId: string;
2725
- projectIds: string[] | null;
2726
- sourceEntityId: string;
2727
- targetEntityId: string;
2728
- type: string;
2729
- createdAt: Date;
2730
- }[];
2731
- content?: undefined;
2732
- };
2733
- meta: object;
2734
- }>;
2735
- save: TRPCMutationProcedure< {
2736
- input: {
2737
- id: string;
2738
- metadata?: Record<string, any> | undefined;
2739
- content?: any;
2740
- };
2741
- output: {
2742
- success: boolean;
2743
- };
2744
- meta: object;
2745
- }>;
2746
- update: TRPCMutationProcedure< {
2747
- input: {
2748
- id: string;
2749
- name?: string | undefined;
2750
- description?: string | null | undefined;
2751
- };
2752
- output: {
2753
- status: string;
2754
- message: string;
2755
- };
2756
- meta: object;
2757
- }>;
2758
- delete: TRPCMutationProcedure< {
2759
- input: {
2760
- id: string;
2761
- };
2762
- output: {
2763
- success: boolean;
2764
- status: string;
2765
- };
2766
- meta: object;
2767
- }>;
2768
- reorderEntity: TRPCMutationProcedure< {
2769
- input: {
2770
- entityId: string;
2771
- viewId: string;
2772
- beforeEntityId?: string | undefined;
2773
- afterEntityId?: string | undefined;
2774
- };
2775
- output: {
2776
- success: boolean;
2777
- newOrder: number;
2778
- };
2779
- meta: object;
2780
- }>;
2781
- }>>;
2782
- preferences: TRPCBuiltRouter< {
2783
- ctx: Context;
2784
- meta: object;
2785
- errorShape: TRPCDefaultErrorShape;
2786
- transformer: true;
2787
- }, TRPCDecorateCreateRouterOptions< {
2788
- get: TRPCQueryProcedure< {
2789
- input: void;
2790
- output: any;
2791
- meta: object;
2792
- }>;
2793
- update: TRPCMutationProcedure< {
2794
- input: {
2795
- theme?: "light" | "dark" | "system" | undefined;
2796
- customTheme?: {
2797
- colors?: {
2798
- text?: string | undefined;
2799
- primary?: string | undefined;
2800
- accent?: string | undefined;
2801
- background?: string | undefined;
2802
- border?: string | undefined;
2803
- } | undefined;
2804
- spacing?: {
2805
- medium?: string | undefined;
2806
- small?: string | undefined;
2807
- large?: string | undefined;
2808
- } | undefined;
2809
- radii?: {
2810
- medium?: string | undefined;
2811
- small?: string | undefined;
2812
- large?: string | undefined;
2813
- } | undefined;
2814
- animations?: {
2815
- enabled?: boolean | undefined;
2816
- speed?: "normal" | "slow" | "fast" | undefined;
2817
- } | undefined;
2818
- } | undefined;
2819
- defaultTemplates?: Record<string, string> | undefined;
2820
- customEntityTypes?: any[] | undefined;
2821
- entityMetadataSchemas?: Record<string, Record<string, any>> | undefined;
2822
- uiPreferences?: {
2823
- fontSize?: string | undefined;
2824
- animations?: boolean | undefined;
2825
- sidebarCollapsed?: boolean | undefined;
2826
- panelPositions?: Record<string, {
2827
- x: number;
2828
- y: number;
2829
- }> | undefined;
2830
- lastActiveView?: string | undefined;
2831
- compactMode?: boolean | undefined;
2832
- defaultView?: "timeline" | "grid" | "list" | undefined;
2833
- } | undefined;
2834
- graphPreferences?: {
2835
- forceSettings?: {
2836
- linkDistance?: number | undefined;
2837
- chargeStrength?: number | undefined;
2838
- alphaDecay?: number | undefined;
2839
- velocityDecay?: number | undefined;
2840
- } | undefined;
2841
- defaultFilters?: {
2842
- entityTypes?: string[] | undefined;
2843
- relationTypes?: string[] | undefined;
2844
- } | undefined;
2845
- zoom?: number | undefined;
2846
- pan?: {
2847
- x: number;
2848
- y: number;
2849
- } | undefined;
2850
- showMinimap?: boolean | undefined;
2851
- } | undefined;
2852
- onboardingCompleted?: boolean | undefined;
2853
- onboardingStep?: string | undefined;
2854
- };
2855
- output: any;
2856
- meta: object;
2857
- }>;
2858
- updateTheme: TRPCMutationProcedure< {
2859
- input: {
2860
- theme?: "system" | "light" | "dark" | undefined;
2861
- customTheme?: {
2862
- colors?: {
2863
- primary?: string | undefined;
2864
- accent?: string | undefined;
2865
- background?: string | undefined;
2866
- border?: string | undefined;
2867
- text?: string | undefined;
2868
- } | undefined;
2869
- spacing?: {
2870
- small?: string | undefined;
2871
- medium?: string | undefined;
2872
- large?: string | undefined;
2873
- } | undefined;
2874
- radii?: {
2875
- small?: string | undefined;
2876
- medium?: string | undefined;
2877
- large?: string | undefined;
2878
- } | undefined;
2879
- animations?: {
2880
- enabled?: boolean | undefined;
2881
- speed?: "slow" | "normal" | "fast" | undefined;
2882
- } | undefined;
2883
- } | undefined;
2884
- };
2885
- output: {
2886
- success: boolean;
2887
- };
2888
- meta: object;
2889
- }>;
2890
- updateDefaultTemplates: TRPCMutationProcedure< {
2891
- input: {
2892
- entityType: string;
2893
- templateId: string;
2894
- };
2895
- output: {
2896
- success: boolean;
2897
- defaultTemplates: {
2898
- [x: string]: string;
2899
- };
2900
- };
2901
- meta: object;
2902
- }>;
2903
- updateCustomEntityTypes: TRPCMutationProcedure< {
2904
- input: {
2905
- customEntityTypes: any[];
2906
- };
2907
- output: {
2908
- success: boolean;
2909
- };
2910
- meta: object;
2911
- }>;
2912
- getViewModes: TRPCQueryProcedure< {
2913
- input: void;
2914
- output: any;
2915
- meta: object;
2916
- }>;
2917
- updateViewMode: TRPCMutationProcedure< {
2918
- input: {
2919
- context: "entities" | "documents" | "views";
2920
- mode: "list" | "grid" | "table";
2921
- };
2922
- output: {
2923
- success: boolean;
2924
- viewModes: any;
2925
- };
2926
- meta: object;
2927
- }>;
2928
- getIntelligenceServices: TRPCQueryProcedure< {
2929
- input: void;
2930
- output: {
2931
- preferences: any;
2932
- available: any;
2933
- };
2934
- meta: object;
2935
- }>;
2936
- setIntelligenceService: TRPCMutationProcedure< {
2937
- input: {
2938
- serviceId: string;
2939
- capability?: "default" | "chat" | "analysis" | undefined;
2940
- };
2941
- output: {
2942
- success: boolean;
2943
- preferences: any;
2944
- };
2945
- meta: object;
2946
- }>;
2947
- }>>;
2948
- roles: TRPCBuiltRouter< {
2949
- ctx: Context;
2950
- meta: object;
2951
- errorShape: TRPCDefaultErrorShape;
2952
- transformer: true;
2953
- }, TRPCDecorateCreateRouterOptions< {
2954
- list: TRPCQueryProcedure< {
2955
- input: {
2956
- workspaceId?: string | undefined;
2957
- } | undefined;
2958
- output: {
2959
- id: string;
2960
- workspaceId: string | null;
2961
- createdAt: Date;
2962
- updatedAt: Date;
2963
- name: string;
2964
- description: string | null;
2965
- createdBy: string;
2966
- permissions: unknown;
2967
- filters: unknown;
2968
- }[];
2969
- meta: object;
2970
- }>;
2971
- get: TRPCQueryProcedure< {
2972
- input: {
2973
- id: string;
2974
- };
2975
- output: {
2976
- id: string;
2977
- workspaceId: string | null;
2978
- createdAt: Date;
2979
- updatedAt: Date;
2980
- name: string;
2981
- description: string | null;
2982
- createdBy: string;
2983
- permissions: unknown;
2984
- filters: unknown;
2985
- };
2986
- meta: object;
2987
- }>;
2988
- create: TRPCMutationProcedure< {
2989
- input: {
2990
- name: string;
2991
- permissions: Record<string, any>;
2992
- workspaceId?: string | undefined;
2993
- description?: string | undefined;
2994
- filters?: Record<string, any> | undefined;
2995
- };
2996
- output: {
2997
- id: `${string}-${string}-${string}-${string}-${string}`;
2998
- status: string;
2999
- message: string;
3000
- };
3001
- meta: object;
3002
- }>;
3003
- update: TRPCMutationProcedure< {
3004
- input: {
3005
- id: string;
3006
- name?: string | undefined;
3007
- description?: string | undefined;
3008
- permissions?: Record<string, any> | undefined;
3009
- filters?: Record<string, any> | undefined;
3010
- };
3011
- output: {
3012
- status: string;
3013
- message: string;
3014
- };
3015
- meta: object;
3016
- }>;
3017
- delete: TRPCMutationProcedure< {
3018
- input: {
3019
- id: string;
3020
- };
3021
- output: {
3022
- status: string;
3023
- message: string;
3024
- };
3025
- meta: object;
3026
- }>;
3027
- }>>;
3028
- sharing: TRPCBuiltRouter< {
3029
- ctx: Context;
3030
- meta: object;
3031
- errorShape: TRPCDefaultErrorShape;
3032
- transformer: true;
3033
- }, TRPCDecorateCreateRouterOptions< {
3034
- createPublicLink: TRPCMutationProcedure< {
3035
- input: {
3036
- resourceType: string;
3037
- resourceId: string;
3038
- expiresInDays?: number | undefined;
3039
- };
3040
- output: {
3041
- status: string;
3042
- shareId: `${string}-${string}-${string}-${string}-${string}`;
3043
- url: string;
3044
- };
3045
- meta: object;
3046
- }>;
3047
- invite: TRPCMutationProcedure< {
3048
- input: {
3049
- resourceType: string;
3050
- resourceId: string;
3051
- userEmail: string;
3052
- };
3053
- output: {
3054
- status: string;
3055
- inviteId: `${string}-${string}-${string}-${string}-${string}`;
3056
- };
3057
- meta: object;
3058
- }>;
3059
- incrementView: TRPCMutationProcedure< {
3060
- input: {
3061
- shareId: string;
3062
- };
3063
- output: {
3064
- success: boolean;
3065
- };
3066
- meta: object;
3067
- }>;
3068
- getPublic: TRPCQueryProcedure< {
3069
- input: {
3070
- token: string;
3071
- };
3072
- output: {
3073
- resource: {
3074
- userId: string;
3075
- type: string;
3076
- id: string;
3077
- workspaceId: string;
3078
- projectIds: string[] | null;
3079
- title: string | null;
3080
- preview: string | null;
3081
- documentId: string | null;
3082
- metadata: unknown;
3083
- version: number;
3084
- createdAt: Date;
3085
- updatedAt: Date;
3086
- deletedAt: Date | null;
3087
- } | {
3088
- userId: string;
3089
- type: string;
3090
- id: string;
3091
- workspaceId: string | null;
3092
- projectIds: string[] | null;
3093
- documentId: string | null;
3094
- metadata: unknown;
3095
- createdAt: Date;
3096
- updatedAt: Date;
3097
- name: string;
3098
- description: string | null;
3099
- category: string;
3100
- yjsRoomId: string | null;
3101
- thumbnailUrl: string | null;
3102
- document: never;
3103
- };
3104
- permissions: unknown;
3105
- };
3106
- meta: object;
3107
- }>;
3108
- list: TRPCQueryProcedure< {
3109
- input: {
3110
- resourceType: string;
3111
- resourceId: string;
3112
- expiresAt?: Date | null | undefined;
3113
- visibility?: string | undefined;
3114
- };
3115
- output: {
3116
- id: string;
3117
- createdAt: Date;
3118
- updatedAt: Date;
3119
- expiresAt: Date | null;
3120
- createdBy: string;
3121
- permissions: unknown;
3122
- resourceType: string;
3123
- resourceId: string;
3124
- visibility: string;
3125
- publicToken: string | null;
3126
- invitedUsers: string[] | null;
3127
- viewCount: number | null;
3128
- lastAccessedAt: Date | null;
3129
- }[];
3130
- meta: object;
3131
- }>;
3132
- revoke: TRPCMutationProcedure< {
3133
- input: {
3134
- shareId: string;
3135
- };
3136
- output: {
3137
- status: string;
3138
- };
3139
- meta: object;
3140
- }>;
3141
- }>>;
3142
- templates: TRPCBuiltRouter< {
3143
- ctx: Context;
3144
- meta: object;
3145
- errorShape: TRPCDefaultErrorShape;
3146
- transformer: true;
3147
- }, TRPCDecorateCreateRouterOptions< {
3148
- list: TRPCQueryProcedure< {
3149
- input: {
3150
- workspaceId?: string | undefined;
3151
- entityType?: string | undefined;
3152
- targetType?: "project" | "entity" | "document" | "inbox_item" | undefined;
3153
- inboxItemType?: string | undefined;
3154
- includePublic?: boolean | undefined;
3155
- };
3156
- output: {
3157
- id: string;
3158
- name: string;
3159
- description: string | null;
3160
- userId: string | null;
3161
- workspaceId: string | null;
3162
- projectIds: string[] | null;
3163
- targetType: string;
3164
- entityType: string | null;
3165
- inboxItemType: string | null;
3166
- config: unknown;
3167
- schema: unknown;
3168
- isDefault: boolean;
3169
- isPublic: boolean;
3170
- version: number;
3171
- createdAt: Date;
3172
- updatedAt: Date;
3173
- }[];
3174
- meta: object;
3175
- }>;
3176
- getDefault: TRPCQueryProcedure< {
3177
- input: {
3178
- targetType: "project" | "entity" | "document" | "inbox_item";
3179
- workspaceId?: string | undefined;
3180
- entityType?: string | undefined;
3181
- inboxItemType?: string | undefined;
3182
- };
3183
- output: unknown;
3184
- meta: object;
3185
- }>;
3186
- create: TRPCMutationProcedure< {
3187
- input: {
3188
- name: string;
3189
- targetType: "project" | "entity" | "document" | "inbox_item";
3190
- config: {
3191
- layout?: {
3192
- structure: {
3193
- banner?: {
3194
- enabled: boolean;
3195
- slots?: string[] | undefined;
3196
- position?: "left" | "right" | undefined;
3197
- width?: string | undefined;
3198
- layout?: "horizontal" | "vertical" | undefined;
3199
- align?: "left" | "right" | "center" | undefined;
3200
- } | undefined;
3201
- header?: {
3202
- enabled: boolean;
3203
- slots?: string[] | undefined;
3204
- position?: "left" | "right" | undefined;
3205
- width?: string | undefined;
3206
- layout?: "horizontal" | "vertical" | undefined;
3207
- align?: "left" | "right" | "center" | undefined;
3208
- } | undefined;
3209
- sidebar?: {
3210
- enabled: boolean;
3211
- slots?: string[] | undefined;
3212
- position?: "left" | "right" | undefined;
3213
- width?: string | undefined;
3214
- layout?: "horizontal" | "vertical" | undefined;
3215
- align?: "left" | "right" | "center" | undefined;
3216
- } | undefined;
3217
- contentBefore?: {
3218
- enabled: boolean;
3219
- slots?: string[] | undefined;
3220
- position?: "left" | "right" | undefined;
3221
- width?: string | undefined;
3222
- layout?: "horizontal" | "vertical" | undefined;
3223
- align?: "left" | "right" | "center" | undefined;
3224
- } | undefined;
3225
- content?: {
3226
- enabled: boolean;
3227
- slots?: string[] | undefined;
3228
- position?: "left" | "right" | undefined;
3229
- width?: string | undefined;
3230
- layout?: "horizontal" | "vertical" | undefined;
3231
- align?: "left" | "right" | "center" | undefined;
3232
- } | undefined;
3233
- contentAfter?: {
3234
- enabled: boolean;
3235
- slots?: string[] | undefined;
3236
- position?: "left" | "right" | undefined;
3237
- width?: string | undefined;
3238
- layout?: "horizontal" | "vertical" | undefined;
3239
- align?: "left" | "right" | "center" | undefined;
3240
- } | undefined;
3241
- footer?: {
3242
- enabled: boolean;
3243
- slots?: string[] | undefined;
3244
- position?: "left" | "right" | undefined;
3245
- width?: string | undefined;
3246
- layout?: "horizontal" | "vertical" | undefined;
3247
- align?: "left" | "right" | "center" | undefined;
3248
- } | undefined;
3249
- };
3250
- fieldMapping: Record<string, {
3251
- slot: string;
3252
- renderer?: {
3253
- type: "number" | "date" | "link" | "text" | "badge" | "avatar" | "progress" | "checkbox" | "currency" | "relations";
3254
- format?: string | undefined;
3255
- variant?: string | undefined;
3256
- size?: string | undefined;
3257
- appearance?: "compact" | "detailed" | "cards" | undefined;
3258
- } | undefined;
3259
- label?: string | undefined;
3260
- showLabel?: boolean | undefined;
3261
- order?: number | undefined;
3262
- }>;
3263
- } | undefined;
3264
- colors?: {
3265
- text?: string | undefined;
3266
- primary?: string | undefined;
3267
- accent?: string | undefined;
3268
- background?: string | undefined;
3269
- border?: string | undefined;
3270
- muted?: string | undefined;
3271
- success?: string | undefined;
3272
- warning?: string | undefined;
3273
- error?: string | undefined;
3274
- } | undefined;
3275
- styling?: {
3276
- borderRadius?: string | undefined;
3277
- padding?: string | undefined;
3278
- gap?: string | undefined;
3279
- fontSize?: string | undefined;
3280
- fontWeight?: string | undefined;
3281
- shadow?: string | undefined;
3282
- fontFamily?: string | undefined;
3283
- } | undefined;
3284
- };
3285
- workspaceId?: string | null | undefined;
3286
- schema?: Record<string, any> | undefined;
3287
- description?: string | null | undefined;
3288
- entityType?: string | null | undefined;
3289
- inboxItemType?: string | null | undefined;
3290
- isDefault?: boolean | undefined;
3291
- isPublic?: boolean | undefined;
3292
- };
3293
- output: {
3294
- status: string;
3295
- templateId: `${string}-${string}-${string}-${string}-${string}`;
3296
- };
3297
- meta: object;
3298
- }>;
3299
- update: TRPCMutationProcedure< {
3300
- input: {
3301
- id: string;
3302
- name?: string | undefined;
3303
- schema?: Record<string, any> | undefined;
3304
- description?: string | null | undefined;
3305
- config?: {
3306
- layout?: {
3307
- structure: {
3308
- banner?: {
3309
- enabled: boolean;
3310
- slots?: string[] | undefined;
3311
- position?: "left" | "right" | undefined;
3312
- width?: string | undefined;
3313
- layout?: "horizontal" | "vertical" | undefined;
3314
- align?: "left" | "right" | "center" | undefined;
3315
- } | undefined;
3316
- header?: {
3317
- enabled: boolean;
3318
- slots?: string[] | undefined;
3319
- position?: "left" | "right" | undefined;
3320
- width?: string | undefined;
3321
- layout?: "horizontal" | "vertical" | undefined;
3322
- align?: "left" | "right" | "center" | undefined;
3323
- } | undefined;
3324
- sidebar?: {
3325
- enabled: boolean;
3326
- slots?: string[] | undefined;
3327
- position?: "left" | "right" | undefined;
3328
- width?: string | undefined;
3329
- layout?: "horizontal" | "vertical" | undefined;
3330
- align?: "left" | "right" | "center" | undefined;
3331
- } | undefined;
3332
- contentBefore?: {
3333
- enabled: boolean;
3334
- slots?: string[] | undefined;
3335
- position?: "left" | "right" | undefined;
3336
- width?: string | undefined;
3337
- layout?: "horizontal" | "vertical" | undefined;
3338
- align?: "left" | "right" | "center" | undefined;
3339
- } | undefined;
3340
- content?: {
3341
- enabled: boolean;
3342
- slots?: string[] | undefined;
3343
- position?: "left" | "right" | undefined;
3344
- width?: string | undefined;
3345
- layout?: "horizontal" | "vertical" | undefined;
3346
- align?: "left" | "right" | "center" | undefined;
3347
- } | undefined;
3348
- contentAfter?: {
3349
- enabled: boolean;
3350
- slots?: string[] | undefined;
3351
- position?: "left" | "right" | undefined;
3352
- width?: string | undefined;
3353
- layout?: "horizontal" | "vertical" | undefined;
3354
- align?: "left" | "right" | "center" | undefined;
3355
- } | undefined;
3356
- footer?: {
3357
- enabled: boolean;
3358
- slots?: string[] | undefined;
3359
- position?: "left" | "right" | undefined;
3360
- width?: string | undefined;
3361
- layout?: "horizontal" | "vertical" | undefined;
3362
- align?: "left" | "right" | "center" | undefined;
3363
- } | undefined;
3364
- };
3365
- fieldMapping: Record<string, {
3366
- slot: string;
3367
- renderer?: {
3368
- type: "number" | "date" | "link" | "text" | "badge" | "avatar" | "progress" | "checkbox" | "currency" | "relations";
3369
- format?: string | undefined;
3370
- variant?: string | undefined;
3371
- size?: string | undefined;
3372
- appearance?: "compact" | "detailed" | "cards" | undefined;
3373
- } | undefined;
3374
- label?: string | undefined;
3375
- showLabel?: boolean | undefined;
3376
- order?: number | undefined;
3377
- }>;
3378
- } | undefined;
3379
- colors?: {
3380
- text?: string | undefined;
3381
- primary?: string | undefined;
3382
- accent?: string | undefined;
3383
- background?: string | undefined;
3384
- border?: string | undefined;
3385
- muted?: string | undefined;
3386
- success?: string | undefined;
3387
- warning?: string | undefined;
3388
- error?: string | undefined;
3389
- } | undefined;
3390
- styling?: {
3391
- borderRadius?: string | undefined;
3392
- padding?: string | undefined;
3393
- gap?: string | undefined;
3394
- fontSize?: string | undefined;
3395
- fontWeight?: string | undefined;
3396
- shadow?: string | undefined;
3397
- fontFamily?: string | undefined;
3398
- } | undefined;
3399
- } | undefined;
3400
- isDefault?: boolean | undefined;
3401
- isPublic?: boolean | undefined;
3402
- };
3403
- output: {
3404
- status: string;
3405
- };
3406
- meta: object;
3407
- }>;
3408
- delete: TRPCMutationProcedure< {
3409
- input: {
3410
- id: string;
3411
- };
3412
- output: {
3413
- status: string;
3414
- };
3415
- meta: object;
3416
- }>;
3417
- duplicate: TRPCMutationProcedure< {
3418
- input: {
3419
- id: string;
3420
- };
3421
- output: {
3422
- userId: string | null;
3423
- id: string;
3424
- workspaceId: string | null;
3425
- projectIds: string[] | null;
3426
- version: number;
3427
- createdAt: Date;
3428
- updatedAt: Date;
3429
- name: string;
3430
- schema: unknown;
3431
- description: string | null;
3432
- entityType: string | null;
3433
- targetType: string;
3434
- inboxItemType: string | null;
3435
- config: unknown;
3436
- isDefault: boolean;
3437
- isPublic: boolean;
3438
- };
3439
- meta: object;
3440
- }>;
3441
- setDefault: TRPCMutationProcedure< {
3442
- input: {
3443
- id: string;
3444
- };
3445
- output: {
3446
- success: boolean;
3447
- };
3448
- meta: object;
3449
- }>;
3450
- }>>;
3451
- whiteboards: TRPCBuiltRouter< {
3452
- ctx: Context;
3453
- meta: object;
3454
- errorShape: TRPCDefaultErrorShape;
3455
- transformer: true;
3456
- }, TRPCDecorateCreateRouterOptions< {
3457
- saveVersion: TRPCMutationProcedure< {
3458
- input: {
3459
- viewId: string;
3460
- message?: string | undefined;
3461
- };
3462
- output: {
3463
- status: string;
3464
- message: string;
3465
- };
3466
- meta: object;
3467
- }>;
3468
- listVersions: TRPCQueryProcedure< {
3469
- input: {
3470
- viewId: string;
3471
- limit?: number | undefined;
3472
- };
3473
- output: {
3474
- versions: {
3475
- message: string | null;
3476
- type: string;
3477
- id: string;
3478
- documentId: string;
3479
- version: number;
3480
- createdAt: Date;
3481
- content: string;
3482
- delta: unknown;
3483
- author: string;
3484
- authorId: string;
3485
- }[];
3486
- };
3487
- meta: object;
3488
- }>;
3489
- restoreVersion: TRPCMutationProcedure< {
3490
- input: {
3491
- versionId: string;
3492
- viewId: string;
3493
- };
3494
- output: {
3495
- status: string;
3496
- message: string;
3497
- };
3498
- meta: object;
3499
- }>;
3500
- getVersionPreview: TRPCQueryProcedure< {
3501
- input: {
3502
- versionId: string;
3503
- };
3504
- output: {
3505
- version: {
3506
- message: string | null;
3507
- type: string;
3508
- id: string;
3509
- documentId: string;
3510
- version: number;
3511
- createdAt: Date;
3512
- content: string;
3513
- delta: unknown;
3514
- author: string;
3515
- authorId: string;
3516
- };
3517
- metadata: {
3518
- size: number;
3519
- message: string | null;
3520
- author: string;
3521
- createdAt: Date;
3522
- };
3523
- };
3524
- meta: object;
3525
- }>;
3526
- deleteVersion: TRPCMutationProcedure< {
3527
- input: {
3528
- versionId: string;
3529
- viewId: string;
3530
- };
3531
- output: {
3532
- success: boolean;
3533
- };
3534
- meta: object;
3535
- }>;
3536
- }>>;
3537
- }>>;
3538
-
3539
- /**
3540
- * Context Types
3541
- *
3542
- * Proper type definitions for tRPC context to avoid `any` types.
3543
- */
3544
- /**
3545
- * Database client type
3546
- *
3547
- * Note: Using `any` here to preserve Drizzle's schema inference.
3548
- * Attempting to use PostgresJsDatabase<any> loses the schema generic
3549
- * and breaks db.query.tableName access patterns.
3550
- */
3551
- declare type DatabaseClient = any;
3552
-
3553
- /**
3554
- * Ory Kratos identity
3555
- */
3556
- declare interface KratosIdentity {
3557
- id: string;
3558
- traits: {
3559
- email: string;
3560
- name?: string;
3561
- [key: string]: unknown;
3562
- };
3563
- }
3564
-
3565
- /**
3566
- * Ory Kratos session
3567
- */
3568
- declare interface KratosSession {
3569
- identity: KratosIdentity;
3570
- active: boolean;
3571
- expires_at?: string;
3572
- authenticated_at?: string;
3573
- }
3574
-
3575
- /**
3576
- * User object (simplified from Kratos identity)
3577
- */
3578
- declare interface User {
3579
- id: string;
3580
- email: string;
3581
- name?: string;
3582
- }
6
+ declare const coreRouter = router({
7
+ setup: setupRouter,
8
+ events: eventsRouter,
9
+ capture: captureRouter,
10
+ entities: entitiesRouter,
11
+ chat: chatRouter,
12
+ proposals: proposalsRouter,
13
+ suggestions: suggestionsRouter,
14
+ system: systemRouter,
15
+ hub: hubRouter,
16
+ apiKeys: apiKeysRouter,
17
+ health: healthRouter,
18
+ integrations: webhooksRouter,
19
+ documents: documentsRouter,
20
+ content: contentRouter,
21
+ storage: filesRouter,
22
+ notifications: inboxRouter,
23
+ intelligenceRegistry: intelligenceRegistryRouter,
24
+ capabilities: capabilitiesRouter,
25
+ tags: tagsRouter,
26
+ search: searchRouter,
27
+ relations: relationsRouter,
28
+ graph: graphRouter,
29
+ workspaces: workspacesRouter,
30
+ views: viewsRouter,
31
+ preferences: preferencesRouter,
32
+ roles: rolesRouter,
33
+ sharing: sharingRouter,
34
+ templates: templatesRouter,
35
+ whiteboards: whiteboardsRouter,
36
+ });
3583
37
 
3584
38
  export { }