@synap-core/api-types 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/generated.d.ts +1293 -1641
  2. package/package.json +2 -2
  3. package/src/generated.d.ts +1293 -1641
@@ -54,6 +54,26 @@ export interface Context {
54
54
  session?: KratosSession | null;
55
55
  req?: Request;
56
56
  socketIO?: any;
57
+ workspaceId?: string | null;
58
+ workspaceRole?: string | null;
59
+ }
60
+ declare enum ChatThreadType {
61
+ MAIN = "main",
62
+ BRANCH = "branch"
63
+ }
64
+ declare enum ChatThreadStatus {
65
+ ACTIVE = "active",
66
+ MERGED = "merged",
67
+ ARCHIVED = "archived"
68
+ }
69
+ declare enum ChatThreadAgentType {
70
+ DEFAULT = "default",
71
+ META = "meta",
72
+ PROMPTING = "prompting",
73
+ KNOWLEDGE_SEARCH = "knowledge-search",
74
+ CODE = "code",
75
+ WRITING = "writing",
76
+ ACTION = "action"
57
77
  }
58
78
  declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColumns<{
59
79
  name: "chat_threads";
@@ -96,23 +116,49 @@ declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColumns<{
96
116
  identity: undefined;
97
117
  generated: undefined;
98
118
  }, {}, {}>;
99
- projectId: import("drizzle-orm/pg-core").PgColumn<{
100
- name: "project_id";
119
+ projectIds: import("drizzle-orm/pg-core").PgColumn<{
120
+ name: "project_ids";
101
121
  tableName: "chat_threads";
102
- dataType: "string";
103
- columnType: "PgUUID";
104
- data: string;
105
- driverParam: string;
122
+ dataType: "array";
123
+ columnType: "PgArray";
124
+ data: string[];
125
+ driverParam: string | string[];
106
126
  notNull: false;
107
127
  hasDefault: false;
108
128
  isPrimaryKey: false;
109
129
  isAutoincrement: false;
110
130
  hasRuntimeDefault: false;
111
131
  enumValues: undefined;
112
- baseColumn: never;
132
+ baseColumn: import("drizzle-orm").Column<{
133
+ name: "project_ids";
134
+ tableName: "chat_threads";
135
+ dataType: "string";
136
+ columnType: "PgUUID";
137
+ data: string;
138
+ driverParam: string;
139
+ notNull: false;
140
+ hasDefault: false;
141
+ isPrimaryKey: false;
142
+ isAutoincrement: false;
143
+ hasRuntimeDefault: false;
144
+ enumValues: undefined;
145
+ baseColumn: never;
146
+ identity: undefined;
147
+ generated: undefined;
148
+ }, {}, {}>;
113
149
  identity: undefined;
114
150
  generated: undefined;
115
- }, {}, {}>;
151
+ }, {}, {
152
+ baseBuilder: import("drizzle-orm/pg-core").PgColumnBuilder<{
153
+ name: "project_ids";
154
+ dataType: "string";
155
+ columnType: "PgUUID";
156
+ data: string;
157
+ driverParam: string;
158
+ enumValues: undefined;
159
+ }, {}, {}, import("drizzle-orm").ColumnBuilderExtraConfig>;
160
+ size: undefined;
161
+ }>;
116
162
  title: import("drizzle-orm/pg-core").PgColumn<{
117
163
  name: "title";
118
164
  tableName: "chat_threads";
@@ -138,7 +184,7 @@ declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColumns<{
138
184
  tableName: "chat_threads";
139
185
  dataType: "string";
140
186
  columnType: "PgText";
141
- data: "main" | "branch";
187
+ data: ChatThreadType;
142
188
  driverParam: string;
143
189
  notNull: true;
144
190
  hasDefault: true;
@@ -146,8 +192,8 @@ declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColumns<{
146
192
  isAutoincrement: false;
147
193
  hasRuntimeDefault: false;
148
194
  enumValues: [
149
- "main",
150
- "branch"
195
+ ChatThreadType.MAIN,
196
+ ChatThreadType.BRANCH
151
197
  ];
152
198
  baseColumn: never;
153
199
  identity: undefined;
@@ -232,7 +278,7 @@ declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColumns<{
232
278
  tableName: "chat_threads";
233
279
  dataType: "string";
234
280
  columnType: "PgText";
235
- data: "active" | "archived" | "merged";
281
+ data: ChatThreadStatus;
236
282
  driverParam: string;
237
283
  notNull: true;
238
284
  hasDefault: true;
@@ -240,9 +286,9 @@ declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColumns<{
240
286
  isAutoincrement: false;
241
287
  hasRuntimeDefault: false;
242
288
  enumValues: [
243
- "active",
244
- "merged",
245
- "archived"
289
+ ChatThreadStatus.ACTIVE,
290
+ ChatThreadStatus.MERGED,
291
+ ChatThreadStatus.ARCHIVED
246
292
  ];
247
293
  baseColumn: never;
248
294
  identity: undefined;
@@ -253,7 +299,7 @@ declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColumns<{
253
299
  tableName: "chat_threads";
254
300
  dataType: "string";
255
301
  columnType: "PgText";
256
- data: "default" | "meta" | "prompting" | "knowledge-search" | "code" | "writing" | "action";
302
+ data: ChatThreadAgentType;
257
303
  driverParam: string;
258
304
  notNull: true;
259
305
  hasDefault: true;
@@ -261,13 +307,13 @@ declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColumns<{
261
307
  isAutoincrement: false;
262
308
  hasRuntimeDefault: false;
263
309
  enumValues: [
264
- "default",
265
- "meta",
266
- "prompting",
267
- "knowledge-search",
268
- "code",
269
- "writing",
270
- "action"
310
+ ChatThreadAgentType.DEFAULT,
311
+ ChatThreadAgentType.META,
312
+ ChatThreadAgentType.PROMPTING,
313
+ ChatThreadAgentType.KNOWLEDGE_SEARCH,
314
+ ChatThreadAgentType.CODE,
315
+ ChatThreadAgentType.WRITING,
316
+ ChatThreadAgentType.ACTION
271
317
  ];
272
318
  baseColumn: never;
273
319
  identity: undefined;
@@ -382,6 +428,30 @@ declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColumns<{
382
428
  dialect: "pg";
383
429
  }>;
384
430
  export type ChatThread = typeof chatThreads.$inferSelect;
431
+ declare enum ThreadEntityRelationshipType {
432
+ USED_AS_CONTEXT = "used_as_context",
433
+ CREATED = "created",
434
+ UPDATED = "updated",
435
+ REFERENCED = "referenced",
436
+ INHERITED_FROM_PARENT = "inherited_from_parent"
437
+ }
438
+ declare enum ThreadEntityConflictStatus {
439
+ NONE = "none",
440
+ PENDING = "pending",
441
+ RESOLVED = "resolved"
442
+ }
443
+ declare enum ThreadDocumentRelationshipType {
444
+ USED_AS_CONTEXT = "used_as_context",
445
+ CREATED = "created",
446
+ UPDATED = "updated",
447
+ REFERENCED = "referenced",
448
+ INHERITED_FROM_PARENT = "inherited_from_parent"
449
+ }
450
+ declare enum ThreadDocumentConflictStatus {
451
+ NONE = "none",
452
+ PENDING = "pending",
453
+ RESOLVED = "resolved"
454
+ }
385
455
  /**
386
456
  * Workspaces Schema - Multi-user workspace support
387
457
  *
@@ -395,6 +465,7 @@ export interface WorkspaceSettings {
395
465
  theme?: string;
396
466
  aiEnabled?: boolean;
397
467
  allowExternalSharing?: boolean;
468
+ mainWhiteboardId?: string;
398
469
  intelligenceServiceId?: string;
399
470
  intelligenceServiceOverrides?: {
400
471
  chat?: string;
@@ -424,6 +495,163 @@ export interface WorkspaceSettings {
424
495
  allowAgentCreation?: boolean;
425
496
  };
426
497
  }
498
+ declare enum ProposalStatus {
499
+ PENDING = "pending",
500
+ APPROVED = "approved",
501
+ REJECTED = "rejected"
502
+ }
503
+ declare enum PropertyValueType {
504
+ STRING = "string",
505
+ NUMBER = "number",
506
+ BOOLEAN = "boolean",
507
+ DATE = "date",
508
+ ENTITY_ID = "entity_id",
509
+ ARRAY = "array",
510
+ OBJECT = "object"
511
+ }
512
+ declare const propertyDefs: import("drizzle-orm/pg-core").PgTableWithColumns<{
513
+ name: "property_defs";
514
+ schema: undefined;
515
+ columns: {
516
+ id: import("drizzle-orm/pg-core").PgColumn<{
517
+ name: "id";
518
+ tableName: "property_defs";
519
+ dataType: "string";
520
+ columnType: "PgUUID";
521
+ data: string;
522
+ driverParam: string;
523
+ notNull: true;
524
+ hasDefault: true;
525
+ isPrimaryKey: true;
526
+ isAutoincrement: false;
527
+ hasRuntimeDefault: false;
528
+ enumValues: undefined;
529
+ baseColumn: never;
530
+ identity: undefined;
531
+ generated: undefined;
532
+ }, {}, {}>;
533
+ slug: import("drizzle-orm/pg-core").PgColumn<{
534
+ name: "slug";
535
+ tableName: "property_defs";
536
+ dataType: "string";
537
+ columnType: "PgText";
538
+ data: string;
539
+ driverParam: string;
540
+ notNull: true;
541
+ hasDefault: false;
542
+ isPrimaryKey: false;
543
+ isAutoincrement: false;
544
+ hasRuntimeDefault: false;
545
+ enumValues: [
546
+ string,
547
+ ...string[]
548
+ ];
549
+ baseColumn: never;
550
+ identity: undefined;
551
+ generated: undefined;
552
+ }, {}, {}>;
553
+ valueType: import("drizzle-orm/pg-core").PgColumn<{
554
+ name: "value_type";
555
+ tableName: "property_defs";
556
+ dataType: "string";
557
+ columnType: "PgText";
558
+ data: PropertyValueType;
559
+ driverParam: string;
560
+ notNull: true;
561
+ hasDefault: false;
562
+ isPrimaryKey: false;
563
+ isAutoincrement: false;
564
+ hasRuntimeDefault: false;
565
+ enumValues: [
566
+ PropertyValueType.STRING,
567
+ PropertyValueType.NUMBER,
568
+ PropertyValueType.BOOLEAN,
569
+ PropertyValueType.DATE,
570
+ PropertyValueType.ENTITY_ID,
571
+ PropertyValueType.ARRAY,
572
+ PropertyValueType.OBJECT
573
+ ];
574
+ baseColumn: never;
575
+ identity: undefined;
576
+ generated: undefined;
577
+ }, {}, {}>;
578
+ constraints: import("drizzle-orm/pg-core").PgColumn<{
579
+ name: "constraints";
580
+ tableName: "property_defs";
581
+ dataType: "json";
582
+ columnType: "PgJsonb";
583
+ data: unknown;
584
+ driverParam: unknown;
585
+ notNull: true;
586
+ hasDefault: true;
587
+ isPrimaryKey: false;
588
+ isAutoincrement: false;
589
+ hasRuntimeDefault: false;
590
+ enumValues: undefined;
591
+ baseColumn: never;
592
+ identity: undefined;
593
+ generated: undefined;
594
+ }, {}, {}>;
595
+ uiHints: import("drizzle-orm/pg-core").PgColumn<{
596
+ name: "ui_hints";
597
+ tableName: "property_defs";
598
+ dataType: "json";
599
+ columnType: "PgJsonb";
600
+ data: unknown;
601
+ driverParam: unknown;
602
+ notNull: true;
603
+ hasDefault: true;
604
+ isPrimaryKey: false;
605
+ isAutoincrement: false;
606
+ hasRuntimeDefault: false;
607
+ enumValues: undefined;
608
+ baseColumn: never;
609
+ identity: undefined;
610
+ generated: undefined;
611
+ }, {}, {}>;
612
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
613
+ name: "created_at";
614
+ tableName: "property_defs";
615
+ dataType: "date";
616
+ columnType: "PgTimestamp";
617
+ data: Date;
618
+ driverParam: string;
619
+ notNull: true;
620
+ hasDefault: true;
621
+ isPrimaryKey: false;
622
+ isAutoincrement: false;
623
+ hasRuntimeDefault: false;
624
+ enumValues: undefined;
625
+ baseColumn: never;
626
+ identity: undefined;
627
+ generated: undefined;
628
+ }, {}, {}>;
629
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
630
+ name: "updated_at";
631
+ tableName: "property_defs";
632
+ dataType: "date";
633
+ columnType: "PgTimestamp";
634
+ data: Date;
635
+ driverParam: string;
636
+ notNull: true;
637
+ hasDefault: true;
638
+ isPrimaryKey: false;
639
+ isAutoincrement: false;
640
+ hasRuntimeDefault: false;
641
+ enumValues: undefined;
642
+ baseColumn: never;
643
+ identity: undefined;
644
+ generated: undefined;
645
+ }, {}, {}>;
646
+ };
647
+ dialect: "pg";
648
+ }>;
649
+ export type PropertyDef = typeof propertyDefs.$inferSelect;
650
+ declare enum ProfileScope {
651
+ SYSTEM = "system",// Available to all users
652
+ WORKSPACE = "workspace",// Shared within workspace
653
+ USER = "user"
654
+ }
427
655
  /**
428
656
  * EventRecord - Database representation of an event
429
657
  *
@@ -444,6 +672,11 @@ export interface EventRecord {
444
672
  correlationId?: string;
445
673
  source: string;
446
674
  }
675
+ export interface EffectiveProperty extends PropertyDef {
676
+ required: boolean;
677
+ defaultValue: unknown;
678
+ displayOrder: number;
679
+ }
447
680
  /**
448
681
  * View Query Types
449
682
  *
@@ -473,7 +706,9 @@ export interface SortRule {
473
706
  * Defines which entities to show and how to filter them
474
707
  */
475
708
  export interface EntityQuery {
476
- /** Entity types to include */
709
+ /** Profile slugs to include (preferred - dynamic profiles) */
710
+ profileSlugs?: string[];
711
+ /** Entity types to include (deprecated - use profileSlugs instead) */
477
712
  entityTypes?: string[];
478
713
  /** Specific entity IDs (for fixed sets) */
479
714
  entityIds?: string[];
@@ -621,6 +856,39 @@ export interface BranchDecision {
621
856
  suggestedTitle?: string;
622
857
  suggestedPurpose?: string;
623
858
  }
859
+ declare enum MessageLinkTargetType {
860
+ ENTITY = "entity",
861
+ DOCUMENT = "document",
862
+ PROPOSAL = "proposal",
863
+ MESSAGE = "message",
864
+ EVENT = "event",
865
+ USER = "user",
866
+ WORKSPACE = "workspace",
867
+ VIEW = "view",
868
+ RELATION = "relation",
869
+ PROJECT = "project",
870
+ TAG = "tag",
871
+ ROLE = "role",
872
+ API_KEY = "apiKey",
873
+ SKILL = "skill",
874
+ BACKGROUND_TASK = "backgroundTask",
875
+ AGENT = "agent",
876
+ CHAT_THREAD = "chatThread",
877
+ TEMPLATE = "template",
878
+ INBOX_ITEM = "inboxItem"
879
+ }
880
+ declare enum MessageLinkRelationshipType {
881
+ CREATED = "created",// Message created this object
882
+ UPDATED = "updated",// Message updated this object
883
+ REFERENCES = "references",// Message references/mentions this object
884
+ APPROVES = "approves",// Message approves this proposal
885
+ REJECTS = "rejects",// Message rejects this proposal
886
+ COMMENTS = "comments",// Message is a comment on this object
887
+ REVIEWS = "reviews",// Message reviews this object
888
+ RESPONDS_TO = "responds_to",// Message responds to another message
889
+ QUOTES = "quotes",// Message quotes this object
890
+ CONTEXT = "context"
891
+ }
624
892
  /**
625
893
  * @synap/events - Schema-Driven Event Generator
626
894
  *
@@ -721,12 +989,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
721
989
  log: import("@trpc/server").TRPCMutationProcedure<{
722
990
  input: {
723
991
  subjectId: string;
724
- subjectType: "user" | "entity" | "relation" | "system";
992
+ subjectType: "user" | "system" | "entity" | "relation";
725
993
  eventType: string;
726
994
  data: Record<string, unknown>;
727
995
  version: number;
728
996
  metadata?: Record<string, unknown> | undefined;
729
- source?: "system" | "api" | "automation" | "sync" | "migration" | undefined;
997
+ source?: "system" | "sync" | "api" | "automation" | "migration" | undefined;
730
998
  causationId?: string | undefined;
731
999
  correlationId?: string | undefined;
732
1000
  };
@@ -775,23 +1043,37 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
775
1043
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
776
1044
  create: import("@trpc/server").TRPCMutationProcedure<{
777
1045
  input: {
778
- type: "event" | "file" | "project" | "task" | "contact" | "meeting" | "idea" | "note" | "person" | "code" | "bookmark" | "company";
1046
+ profileSlug?: string | undefined;
1047
+ profileId?: string | undefined;
779
1048
  title?: string | undefined;
780
1049
  description?: string | undefined;
781
- workspaceId?: string | undefined;
1050
+ properties?: Record<string, unknown> | undefined;
782
1051
  documentId?: string | undefined;
783
1052
  };
784
1053
  output: {
785
1054
  status: string;
786
1055
  message: string;
787
1056
  id: string;
788
- entity: {
1057
+ entity: any;
1058
+ };
1059
+ meta: object;
1060
+ }>;
1061
+ list: import("@trpc/server").TRPCQueryProcedure<{
1062
+ input: {
1063
+ profileSlug?: string | undefined;
1064
+ limit?: number | undefined;
1065
+ };
1066
+ output: {
1067
+ entities: {
789
1068
  id: string;
790
1069
  userId: string;
791
1070
  workspaceId: string | null;
1071
+ type: string;
1072
+ profileId: string | null;
792
1073
  title: string | null;
793
1074
  preview: string | null;
794
1075
  documentId: string | null;
1076
+ properties: Record<string, unknown>;
795
1077
  fileUrl: string | null;
796
1078
  filePath: string | null;
797
1079
  fileSize: number | null;
@@ -802,23 +1084,27 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
802
1084
  createdAt: Date;
803
1085
  updatedAt: Date;
804
1086
  deletedAt: Date | null;
805
- type: "task";
806
- metadata: {
807
- status: "todo" | "in_progress" | "done" | "archived";
808
- priority?: "low" | "medium" | "high" | "urgent" | undefined;
809
- dueDate?: string | undefined;
810
- completedAt?: string | undefined;
811
- assignee?: string | undefined;
812
- estimatedMinutes?: number | undefined;
813
- actualMinutes?: number | undefined;
814
- };
815
- } | {
1087
+ }[];
1088
+ };
1089
+ meta: object;
1090
+ }>;
1091
+ search: import("@trpc/server").TRPCQueryProcedure<{
1092
+ input: {
1093
+ query: string;
1094
+ profileSlug?: string | undefined;
1095
+ limit?: number | undefined;
1096
+ };
1097
+ output: {
1098
+ entities: {
816
1099
  id: string;
817
1100
  userId: string;
818
1101
  workspaceId: string | null;
1102
+ type: string;
1103
+ profileId: string | null;
819
1104
  title: string | null;
820
1105
  preview: string | null;
821
1106
  documentId: string | null;
1107
+ properties: Record<string, unknown>;
822
1108
  fileUrl: string | null;
823
1109
  filePath: string | null;
824
1110
  fileSize: number | null;
@@ -829,1264 +1115,87 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
829
1115
  createdAt: Date;
830
1116
  updatedAt: Date;
831
1117
  deletedAt: Date | null;
832
- type: "note";
833
- metadata: {
834
- tags: string[];
835
- format: "markdown" | "plain" | "rich";
836
- isFavorite: boolean;
837
- linkedEntities?: string[] | undefined;
838
- };
839
- } | {
840
- id: string;
1118
+ }[];
1119
+ };
1120
+ meta: object;
1121
+ }>;
1122
+ get: import("@trpc/server").TRPCQueryProcedure<{
1123
+ input: {
1124
+ id: string;
1125
+ };
1126
+ output: {
1127
+ entity: any;
1128
+ };
1129
+ meta: object;
1130
+ }>;
1131
+ update: import("@trpc/server").TRPCMutationProcedure<{
1132
+ input: {
1133
+ id: string;
1134
+ title?: string | undefined;
1135
+ description?: string | undefined;
1136
+ properties?: Record<string, unknown> | undefined;
1137
+ };
1138
+ output: {
1139
+ status: string;
1140
+ message: string;
1141
+ };
1142
+ meta: object;
1143
+ }>;
1144
+ delete: import("@trpc/server").TRPCMutationProcedure<{
1145
+ input: {
1146
+ id: string;
1147
+ };
1148
+ output: {
1149
+ status: string;
1150
+ message: string;
1151
+ };
1152
+ meta: object;
1153
+ }>;
1154
+ }>>;
1155
+ chat: import("@trpc/server").TRPCBuiltRouter<{
1156
+ ctx: Context;
1157
+ meta: object;
1158
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
1159
+ transformer: true;
1160
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1161
+ createThread: import("@trpc/server").TRPCMutationProcedure<{
1162
+ input: {
1163
+ projectId?: string | undefined;
1164
+ parentThreadId?: string | undefined;
1165
+ branchPurpose?: string | undefined;
1166
+ agentId?: string | undefined;
1167
+ agentType?: "code" | "action" | "meta" | "default" | "prompting" | "knowledge-search" | "writing" | undefined;
1168
+ agentConfig?: Record<string, any> | undefined;
1169
+ inheritContext?: boolean | undefined;
1170
+ };
1171
+ output: {
1172
+ threadId: undefined;
1173
+ status: string;
1174
+ message: string;
1175
+ thread?: undefined;
1176
+ } | {
1177
+ threadId: string;
1178
+ thread: {
841
1179
  userId: string;
842
- workspaceId: string | null;
843
- title: string | null;
844
- preview: string | null;
845
- documentId: string | null;
846
- fileUrl: string | null;
847
- filePath: string | null;
848
- fileSize: number | null;
849
- fileType: string | null;
850
- checksum: string | null;
851
- projectIds: string[] | null;
852
- version: number;
853
- createdAt: Date;
854
- updatedAt: Date;
855
- deletedAt: Date | null;
856
- type: "person";
857
- metadata: {
858
- email?: string | undefined;
859
- phone?: string | undefined;
860
- company?: string | undefined;
861
- role?: string | undefined;
862
- linkedInUrl?: string | undefined;
863
- twitterHandle?: string | undefined;
864
- notes?: string | undefined;
865
- };
866
- } | {
867
1180
  id: string;
868
- userId: string;
869
- workspaceId: string | null;
870
- title: string | null;
871
- preview: string | null;
872
- documentId: string | null;
873
- fileUrl: string | null;
874
- filePath: string | null;
875
- fileSize: number | null;
876
- fileType: string | null;
877
- checksum: string | null;
878
- projectIds: string[] | null;
879
- version: number;
880
- createdAt: Date;
881
1181
  updatedAt: Date;
882
- deletedAt: Date | null;
883
- type: "event";
884
- metadata: {
885
- startTime: string;
886
- endTime: string;
887
- recurring: boolean;
888
- isAllDay: boolean;
889
- location?: string | undefined;
890
- attendees?: string[] | undefined;
891
- recurrenceRule?: string | undefined;
892
- reminderMinutes?: number | undefined;
893
- };
894
- } | {
895
- id: string;
896
- userId: string;
897
- workspaceId: string | null;
898
- title: string | null;
899
- preview: string | null;
900
- documentId: string | null;
901
- fileUrl: string | null;
902
- filePath: string | null;
903
- fileSize: number | null;
904
- fileType: string | null;
905
- checksum: string | null;
906
- projectIds: string[] | null;
907
- version: number;
908
- createdAt: Date;
909
- updatedAt: Date;
910
- deletedAt: Date | null;
911
- type: "file";
912
- metadata: {
913
- mimeType: string;
914
- sizeBytes: number;
915
- extension: string;
916
- thumbnailUrl?: string | undefined;
917
- downloadUrl?: string | undefined;
918
- };
919
- } | {
920
- id: string;
921
- userId: string;
922
- workspaceId: string | null;
923
- title: string | null;
924
- preview: string | null;
925
- documentId: string | null;
926
- fileUrl: string | null;
927
- filePath: string | null;
928
- fileSize: number | null;
929
- fileType: string | null;
930
- checksum: string | null;
931
- projectIds: string[] | null;
932
- version: number;
933
- createdAt: Date;
934
- updatedAt: Date;
935
- deletedAt: Date | null;
936
- type: "code";
937
- metadata: {
938
- language: string;
939
- snippet?: string | undefined;
940
- };
941
- } | {
942
- id: string;
943
- userId: string;
944
- workspaceId: string | null;
945
- title: string | null;
946
- preview: string | null;
947
- documentId: string | null;
948
- fileUrl: string | null;
949
- filePath: string | null;
950
- fileSize: number | null;
951
- fileType: string | null;
952
- checksum: string | null;
953
- projectIds: string[] | null;
954
- version: number;
955
- createdAt: Date;
956
- updatedAt: Date;
957
- deletedAt: Date | null;
958
- type: "bookmark";
959
- metadata: {
960
- url: string;
961
- favicon?: string | undefined;
962
- };
963
- } | {
964
- id: string;
965
- userId: string;
966
- workspaceId: string | null;
967
- title: string | null;
968
- preview: string | null;
969
- documentId: string | null;
970
- fileUrl: string | null;
971
- filePath: string | null;
972
- fileSize: number | null;
973
- fileType: string | null;
974
- checksum: string | null;
975
- projectIds: string[] | null;
976
- version: number;
977
- createdAt: Date;
978
- updatedAt: Date;
979
- deletedAt: Date | null;
980
- type: "company";
981
- metadata: {
982
- website?: string | undefined;
983
- industry?: string | undefined;
984
- foundedYear?: number | undefined;
985
- };
986
- } | {
987
- id: string;
988
- userId: string;
989
- workspaceId: string | null;
990
- title: string | null;
991
- preview: string | null;
992
- documentId: string | null;
993
- fileUrl: string | null;
994
- filePath: string | null;
995
- fileSize: number | null;
996
- fileType: string | null;
997
- checksum: string | null;
998
- projectIds: string[] | null;
999
- version: number;
1000
- createdAt: Date;
1001
- updatedAt: Date;
1002
- deletedAt: Date | null;
1003
- type: "contact";
1004
- metadata: {
1005
- email?: string | undefined;
1006
- phone?: string | undefined;
1007
- company?: string | undefined;
1008
- role?: string | undefined;
1009
- linkedInUrl?: string | undefined;
1010
- twitterHandle?: string | undefined;
1011
- notes?: string | undefined;
1012
- };
1013
- } | {
1014
- id: string;
1015
- userId: string;
1016
- workspaceId: string | null;
1017
- title: string | null;
1018
- preview: string | null;
1019
- documentId: string | null;
1020
- fileUrl: string | null;
1021
- filePath: string | null;
1022
- fileSize: number | null;
1023
- fileType: string | null;
1024
- checksum: string | null;
1025
- projectIds: string[] | null;
1026
- version: number;
1027
- createdAt: Date;
1028
- updatedAt: Date;
1029
- deletedAt: Date | null;
1030
- type: "meeting";
1031
- metadata: {
1032
- startTime: string;
1033
- endTime: string;
1034
- recurring: boolean;
1035
- isAllDay: boolean;
1036
- location?: string | undefined;
1037
- attendees?: string[] | undefined;
1038
- recurrenceRule?: string | undefined;
1039
- reminderMinutes?: number | undefined;
1040
- };
1041
- } | {
1042
- id: string;
1043
- userId: string;
1044
- workspaceId: string | null;
1045
- title: string | null;
1046
- preview: string | null;
1047
- documentId: string | null;
1048
- fileUrl: string | null;
1049
- filePath: string | null;
1050
- fileSize: number | null;
1051
- fileType: string | null;
1052
- checksum: string | null;
1053
- projectIds: string[] | null;
1054
- version: number;
1055
- createdAt: Date;
1056
- updatedAt: Date;
1057
- deletedAt: Date | null;
1058
- type: "idea";
1059
- metadata: {
1060
- tags: string[];
1061
- impact?: "low" | "medium" | "high" | undefined;
1062
- effort?: "low" | "medium" | "high" | undefined;
1063
- };
1064
- } | {
1065
- id: string;
1066
- userId: string;
1067
- workspaceId: string | null;
1068
- title: string | null;
1069
- preview: string | null;
1070
- documentId: string | null;
1071
- fileUrl: string | null;
1072
- filePath: string | null;
1073
- fileSize: number | null;
1074
- fileType: string | null;
1075
- checksum: string | null;
1076
- projectIds: string[] | null;
1077
- version: number;
1078
- createdAt: Date;
1079
- updatedAt: Date;
1080
- deletedAt: Date | null;
1081
- type: "project";
1082
- metadata: {
1083
- status: "archived" | "active" | "on_hold" | "completed";
1084
- priority?: "low" | "medium" | "high" | "urgent" | undefined;
1085
- dueDate?: string | undefined;
1086
- completedAt?: string | undefined;
1087
- owner?: string | undefined;
1088
- };
1089
- };
1090
- };
1091
- meta: object;
1092
- }>;
1093
- list: import("@trpc/server").TRPCQueryProcedure<{
1094
- input: {
1095
- type?: "event" | "file" | "project" | "task" | "contact" | "meeting" | "idea" | "note" | "person" | "code" | "bookmark" | "company" | undefined;
1096
- workspaceId?: string | undefined;
1097
- limit?: number | undefined;
1098
- };
1099
- output: {
1100
- entities: ({
1101
- id: string;
1102
- userId: string;
1103
- workspaceId: string | null;
1104
- title: string | null;
1105
- preview: string | null;
1106
- documentId: string | null;
1107
- fileUrl: string | null;
1108
- filePath: string | null;
1109
- fileSize: number | null;
1110
- fileType: string | null;
1111
- checksum: string | null;
1112
- projectIds: string[] | null;
1113
- version: number;
1114
- createdAt: Date;
1115
- updatedAt: Date;
1116
- deletedAt: Date | null;
1117
- type: "task";
1118
- metadata: {
1119
- status: "todo" | "in_progress" | "done" | "archived";
1120
- priority?: "low" | "medium" | "high" | "urgent" | undefined;
1121
- dueDate?: string | undefined;
1122
- completedAt?: string | undefined;
1123
- assignee?: string | undefined;
1124
- estimatedMinutes?: number | undefined;
1125
- actualMinutes?: number | undefined;
1126
- };
1127
- } | {
1128
- id: string;
1129
- userId: string;
1130
- workspaceId: string | null;
1131
- title: string | null;
1132
- preview: string | null;
1133
- documentId: string | null;
1134
- fileUrl: string | null;
1135
- filePath: string | null;
1136
- fileSize: number | null;
1137
- fileType: string | null;
1138
- checksum: string | null;
1139
- projectIds: string[] | null;
1140
- version: number;
1141
- createdAt: Date;
1142
- updatedAt: Date;
1143
- deletedAt: Date | null;
1144
- type: "note";
1145
- metadata: {
1146
- tags: string[];
1147
- format: "markdown" | "plain" | "rich";
1148
- isFavorite: boolean;
1149
- linkedEntities?: string[] | undefined;
1150
- };
1151
- } | {
1152
- id: string;
1153
- userId: string;
1154
- workspaceId: string | null;
1155
- title: string | null;
1156
- preview: string | null;
1157
- documentId: string | null;
1158
- fileUrl: string | null;
1159
- filePath: string | null;
1160
- fileSize: number | null;
1161
- fileType: string | null;
1162
- checksum: string | null;
1163
- projectIds: string[] | null;
1164
- version: number;
1165
- createdAt: Date;
1166
- updatedAt: Date;
1167
- deletedAt: Date | null;
1168
- type: "person";
1169
- metadata: {
1170
- email?: string | undefined;
1171
- phone?: string | undefined;
1172
- company?: string | undefined;
1173
- role?: string | undefined;
1174
- linkedInUrl?: string | undefined;
1175
- twitterHandle?: string | undefined;
1176
- notes?: string | undefined;
1177
- };
1178
- } | {
1179
- id: string;
1180
- userId: string;
1181
- workspaceId: string | null;
1182
- title: string | null;
1183
- preview: string | null;
1184
- documentId: string | null;
1185
- fileUrl: string | null;
1186
- filePath: string | null;
1187
- fileSize: number | null;
1188
- fileType: string | null;
1189
- checksum: string | null;
1190
- projectIds: string[] | null;
1191
- version: number;
1192
- createdAt: Date;
1193
- updatedAt: Date;
1194
- deletedAt: Date | null;
1195
- type: "event";
1196
- metadata: {
1197
- startTime: string;
1198
- endTime: string;
1199
- recurring: boolean;
1200
- isAllDay: boolean;
1201
- location?: string | undefined;
1202
- attendees?: string[] | undefined;
1203
- recurrenceRule?: string | undefined;
1204
- reminderMinutes?: number | undefined;
1205
- };
1206
- } | {
1207
- id: string;
1208
- userId: string;
1209
- workspaceId: string | null;
1210
- title: string | null;
1211
- preview: string | null;
1212
- documentId: string | null;
1213
- fileUrl: string | null;
1214
- filePath: string | null;
1215
- fileSize: number | null;
1216
- fileType: string | null;
1217
- checksum: string | null;
1218
- projectIds: string[] | null;
1219
- version: number;
1220
- createdAt: Date;
1221
- updatedAt: Date;
1222
- deletedAt: Date | null;
1223
- type: "file";
1224
- metadata: {
1225
- mimeType: string;
1226
- sizeBytes: number;
1227
- extension: string;
1228
- thumbnailUrl?: string | undefined;
1229
- downloadUrl?: string | undefined;
1230
- };
1231
- } | {
1232
- id: string;
1233
- userId: string;
1234
- workspaceId: string | null;
1235
- title: string | null;
1236
- preview: string | null;
1237
- documentId: string | null;
1238
- fileUrl: string | null;
1239
- filePath: string | null;
1240
- fileSize: number | null;
1241
- fileType: string | null;
1242
- checksum: string | null;
1243
- projectIds: string[] | null;
1244
- version: number;
1245
- createdAt: Date;
1246
- updatedAt: Date;
1247
- deletedAt: Date | null;
1248
- type: "code";
1249
- metadata: {
1250
- language: string;
1251
- snippet?: string | undefined;
1252
- };
1253
- } | {
1254
- id: string;
1255
- userId: string;
1256
- workspaceId: string | null;
1257
- title: string | null;
1258
- preview: string | null;
1259
- documentId: string | null;
1260
- fileUrl: string | null;
1261
- filePath: string | null;
1262
- fileSize: number | null;
1263
- fileType: string | null;
1264
- checksum: string | null;
1265
- projectIds: string[] | null;
1266
- version: number;
1267
- createdAt: Date;
1268
- updatedAt: Date;
1269
- deletedAt: Date | null;
1270
- type: "bookmark";
1271
- metadata: {
1272
- url: string;
1273
- favicon?: string | undefined;
1274
- };
1275
- } | {
1276
- id: string;
1277
- userId: string;
1278
- workspaceId: string | null;
1279
- title: string | null;
1280
- preview: string | null;
1281
- documentId: string | null;
1282
- fileUrl: string | null;
1283
- filePath: string | null;
1284
- fileSize: number | null;
1285
- fileType: string | null;
1286
- checksum: string | null;
1287
- projectIds: string[] | null;
1288
- version: number;
1289
- createdAt: Date;
1290
- updatedAt: Date;
1291
- deletedAt: Date | null;
1292
- type: "company";
1293
- metadata: {
1294
- website?: string | undefined;
1295
- industry?: string | undefined;
1296
- foundedYear?: number | undefined;
1297
- };
1298
- } | {
1299
- id: string;
1300
- userId: string;
1301
- workspaceId: string | null;
1302
- title: string | null;
1303
- preview: string | null;
1304
- documentId: string | null;
1305
- fileUrl: string | null;
1306
- filePath: string | null;
1307
- fileSize: number | null;
1308
- fileType: string | null;
1309
- checksum: string | null;
1310
- projectIds: string[] | null;
1311
- version: number;
1312
- createdAt: Date;
1313
- updatedAt: Date;
1314
- deletedAt: Date | null;
1315
- type: "contact";
1316
- metadata: {
1317
- email?: string | undefined;
1318
- phone?: string | undefined;
1319
- company?: string | undefined;
1320
- role?: string | undefined;
1321
- linkedInUrl?: string | undefined;
1322
- twitterHandle?: string | undefined;
1323
- notes?: string | undefined;
1324
- };
1325
- } | {
1326
- id: string;
1327
- userId: string;
1328
- workspaceId: string | null;
1329
- title: string | null;
1330
- preview: string | null;
1331
- documentId: string | null;
1332
- fileUrl: string | null;
1333
- filePath: string | null;
1334
- fileSize: number | null;
1335
- fileType: string | null;
1336
- checksum: string | null;
1337
- projectIds: string[] | null;
1338
- version: number;
1339
- createdAt: Date;
1340
- updatedAt: Date;
1341
- deletedAt: Date | null;
1342
- type: "meeting";
1343
- metadata: {
1344
- startTime: string;
1345
- endTime: string;
1346
- recurring: boolean;
1347
- isAllDay: boolean;
1348
- location?: string | undefined;
1349
- attendees?: string[] | undefined;
1350
- recurrenceRule?: string | undefined;
1351
- reminderMinutes?: number | undefined;
1352
- };
1353
- } | {
1354
- id: string;
1355
- userId: string;
1356
- workspaceId: string | null;
1357
- title: string | null;
1358
- preview: string | null;
1359
- documentId: string | null;
1360
- fileUrl: string | null;
1361
- filePath: string | null;
1362
- fileSize: number | null;
1363
- fileType: string | null;
1364
- checksum: string | null;
1365
- projectIds: string[] | null;
1366
- version: number;
1367
- createdAt: Date;
1368
- updatedAt: Date;
1369
- deletedAt: Date | null;
1370
- type: "idea";
1371
- metadata: {
1372
- tags: string[];
1373
- impact?: "low" | "medium" | "high" | undefined;
1374
- effort?: "low" | "medium" | "high" | undefined;
1375
- };
1376
- } | {
1377
- id: string;
1378
- userId: string;
1379
- workspaceId: string | null;
1380
- title: string | null;
1381
- preview: string | null;
1382
- documentId: string | null;
1383
- fileUrl: string | null;
1384
- filePath: string | null;
1385
- fileSize: number | null;
1386
- fileType: string | null;
1387
- checksum: string | null;
1388
- projectIds: string[] | null;
1389
- version: number;
1390
- createdAt: Date;
1391
- updatedAt: Date;
1392
- deletedAt: Date | null;
1393
- type: "project";
1394
- metadata: {
1395
- status: "archived" | "active" | "on_hold" | "completed";
1396
- priority?: "low" | "medium" | "high" | "urgent" | undefined;
1397
- dueDate?: string | undefined;
1398
- completedAt?: string | undefined;
1399
- owner?: string | undefined;
1400
- };
1401
- })[];
1402
- };
1403
- meta: object;
1404
- }>;
1405
- search: import("@trpc/server").TRPCQueryProcedure<{
1406
- input: {
1407
- query: string;
1408
- type?: "event" | "file" | "project" | "task" | "contact" | "meeting" | "idea" | "note" | "person" | "code" | "bookmark" | "company" | undefined;
1409
- limit?: number | undefined;
1410
- };
1411
- output: {
1412
- entities: ({
1413
- id: string;
1414
- userId: string;
1415
- workspaceId: string | null;
1416
- title: string | null;
1417
- preview: string | null;
1418
- documentId: string | null;
1419
- fileUrl: string | null;
1420
- filePath: string | null;
1421
- fileSize: number | null;
1422
- fileType: string | null;
1423
- checksum: string | null;
1424
- projectIds: string[] | null;
1425
- version: number;
1426
- createdAt: Date;
1427
- updatedAt: Date;
1428
- deletedAt: Date | null;
1429
- type: "task";
1430
- metadata: {
1431
- status: "todo" | "in_progress" | "done" | "archived";
1432
- priority?: "low" | "medium" | "high" | "urgent" | undefined;
1433
- dueDate?: string | undefined;
1434
- completedAt?: string | undefined;
1435
- assignee?: string | undefined;
1436
- estimatedMinutes?: number | undefined;
1437
- actualMinutes?: number | undefined;
1438
- };
1439
- } | {
1440
- id: string;
1441
- userId: string;
1442
- workspaceId: string | null;
1443
- title: string | null;
1444
- preview: string | null;
1445
- documentId: string | null;
1446
- fileUrl: string | null;
1447
- filePath: string | null;
1448
- fileSize: number | null;
1449
- fileType: string | null;
1450
- checksum: string | null;
1451
- projectIds: string[] | null;
1452
- version: number;
1453
- createdAt: Date;
1454
- updatedAt: Date;
1455
- deletedAt: Date | null;
1456
- type: "note";
1457
- metadata: {
1458
- tags: string[];
1459
- format: "markdown" | "plain" | "rich";
1460
- isFavorite: boolean;
1461
- linkedEntities?: string[] | undefined;
1462
- };
1463
- } | {
1464
- id: string;
1465
- userId: string;
1466
- workspaceId: string | null;
1467
- title: string | null;
1468
- preview: string | null;
1469
- documentId: string | null;
1470
- fileUrl: string | null;
1471
- filePath: string | null;
1472
- fileSize: number | null;
1473
- fileType: string | null;
1474
- checksum: string | null;
1475
- projectIds: string[] | null;
1476
- version: number;
1477
- createdAt: Date;
1478
- updatedAt: Date;
1479
- deletedAt: Date | null;
1480
- type: "person";
1481
- metadata: {
1482
- email?: string | undefined;
1483
- phone?: string | undefined;
1484
- company?: string | undefined;
1485
- role?: string | undefined;
1486
- linkedInUrl?: string | undefined;
1487
- twitterHandle?: string | undefined;
1488
- notes?: string | undefined;
1489
- };
1490
- } | {
1491
- id: string;
1492
- userId: string;
1493
- workspaceId: string | null;
1494
- title: string | null;
1495
- preview: string | null;
1496
- documentId: string | null;
1497
- fileUrl: string | null;
1498
- filePath: string | null;
1499
- fileSize: number | null;
1500
- fileType: string | null;
1501
- checksum: string | null;
1502
- projectIds: string[] | null;
1503
- version: number;
1504
- createdAt: Date;
1505
- updatedAt: Date;
1506
- deletedAt: Date | null;
1507
- type: "event";
1508
- metadata: {
1509
- startTime: string;
1510
- endTime: string;
1511
- recurring: boolean;
1512
- isAllDay: boolean;
1513
- location?: string | undefined;
1514
- attendees?: string[] | undefined;
1515
- recurrenceRule?: string | undefined;
1516
- reminderMinutes?: number | undefined;
1517
- };
1518
- } | {
1519
- id: string;
1520
- userId: string;
1521
- workspaceId: string | null;
1522
- title: string | null;
1523
- preview: string | null;
1524
- documentId: string | null;
1525
- fileUrl: string | null;
1526
- filePath: string | null;
1527
- fileSize: number | null;
1528
- fileType: string | null;
1529
- checksum: string | null;
1530
- projectIds: string[] | null;
1531
- version: number;
1532
- createdAt: Date;
1533
- updatedAt: Date;
1534
- deletedAt: Date | null;
1535
- type: "file";
1536
- metadata: {
1537
- mimeType: string;
1538
- sizeBytes: number;
1539
- extension: string;
1540
- thumbnailUrl?: string | undefined;
1541
- downloadUrl?: string | undefined;
1542
- };
1543
- } | {
1544
- id: string;
1545
- userId: string;
1546
- workspaceId: string | null;
1547
- title: string | null;
1548
- preview: string | null;
1549
- documentId: string | null;
1550
- fileUrl: string | null;
1551
- filePath: string | null;
1552
- fileSize: number | null;
1553
- fileType: string | null;
1554
- checksum: string | null;
1555
- projectIds: string[] | null;
1556
- version: number;
1557
- createdAt: Date;
1558
- updatedAt: Date;
1559
- deletedAt: Date | null;
1560
- type: "code";
1561
- metadata: {
1562
- language: string;
1563
- snippet?: string | undefined;
1564
- };
1565
- } | {
1566
- id: string;
1567
- userId: string;
1568
- workspaceId: string | null;
1569
- title: string | null;
1570
- preview: string | null;
1571
- documentId: string | null;
1572
- fileUrl: string | null;
1573
- filePath: string | null;
1574
- fileSize: number | null;
1575
- fileType: string | null;
1576
- checksum: string | null;
1577
- projectIds: string[] | null;
1578
- version: number;
1579
- createdAt: Date;
1580
- updatedAt: Date;
1581
- deletedAt: Date | null;
1582
- type: "bookmark";
1583
- metadata: {
1584
- url: string;
1585
- favicon?: string | undefined;
1586
- };
1587
- } | {
1588
- id: string;
1589
- userId: string;
1590
- workspaceId: string | null;
1591
- title: string | null;
1592
- preview: string | null;
1593
- documentId: string | null;
1594
- fileUrl: string | null;
1595
- filePath: string | null;
1596
- fileSize: number | null;
1597
- fileType: string | null;
1598
- checksum: string | null;
1599
- projectIds: string[] | null;
1600
- version: number;
1601
- createdAt: Date;
1602
- updatedAt: Date;
1603
- deletedAt: Date | null;
1604
- type: "company";
1605
- metadata: {
1606
- website?: string | undefined;
1607
- industry?: string | undefined;
1608
- foundedYear?: number | undefined;
1609
- };
1610
- } | {
1611
- id: string;
1612
- userId: string;
1613
- workspaceId: string | null;
1614
- title: string | null;
1615
- preview: string | null;
1616
- documentId: string | null;
1617
- fileUrl: string | null;
1618
- filePath: string | null;
1619
- fileSize: number | null;
1620
- fileType: string | null;
1621
- checksum: string | null;
1622
- projectIds: string[] | null;
1623
- version: number;
1624
- createdAt: Date;
1625
- updatedAt: Date;
1626
- deletedAt: Date | null;
1627
- type: "contact";
1628
- metadata: {
1629
- email?: string | undefined;
1630
- phone?: string | undefined;
1631
- company?: string | undefined;
1632
- role?: string | undefined;
1633
- linkedInUrl?: string | undefined;
1634
- twitterHandle?: string | undefined;
1635
- notes?: string | undefined;
1636
- };
1637
- } | {
1638
- id: string;
1639
- userId: string;
1640
- workspaceId: string | null;
1641
- title: string | null;
1642
- preview: string | null;
1643
- documentId: string | null;
1644
- fileUrl: string | null;
1645
- filePath: string | null;
1646
- fileSize: number | null;
1647
- fileType: string | null;
1648
- checksum: string | null;
1649
- projectIds: string[] | null;
1650
- version: number;
1651
- createdAt: Date;
1652
- updatedAt: Date;
1653
- deletedAt: Date | null;
1654
- type: "meeting";
1655
- metadata: {
1656
- startTime: string;
1657
- endTime: string;
1658
- recurring: boolean;
1659
- isAllDay: boolean;
1660
- location?: string | undefined;
1661
- attendees?: string[] | undefined;
1662
- recurrenceRule?: string | undefined;
1663
- reminderMinutes?: number | undefined;
1664
- };
1665
- } | {
1666
- id: string;
1667
- userId: string;
1668
- workspaceId: string | null;
1669
- title: string | null;
1670
- preview: string | null;
1671
- documentId: string | null;
1672
- fileUrl: string | null;
1673
- filePath: string | null;
1674
- fileSize: number | null;
1675
- fileType: string | null;
1676
- checksum: string | null;
1677
- projectIds: string[] | null;
1678
- version: number;
1679
- createdAt: Date;
1680
- updatedAt: Date;
1681
- deletedAt: Date | null;
1682
- type: "idea";
1683
- metadata: {
1684
- tags: string[];
1685
- impact?: "low" | "medium" | "high" | undefined;
1686
- effort?: "low" | "medium" | "high" | undefined;
1687
- };
1688
- } | {
1689
- id: string;
1690
- userId: string;
1691
- workspaceId: string | null;
1692
- title: string | null;
1693
- preview: string | null;
1694
- documentId: string | null;
1695
- fileUrl: string | null;
1696
- filePath: string | null;
1697
- fileSize: number | null;
1698
- fileType: string | null;
1699
- checksum: string | null;
1700
- projectIds: string[] | null;
1701
- version: number;
1702
- createdAt: Date;
1703
- updatedAt: Date;
1704
- deletedAt: Date | null;
1705
- type: "project";
1706
- metadata: {
1707
- status: "archived" | "active" | "on_hold" | "completed";
1708
- priority?: "low" | "medium" | "high" | "urgent" | undefined;
1709
- dueDate?: string | undefined;
1710
- completedAt?: string | undefined;
1711
- owner?: string | undefined;
1712
- };
1713
- })[];
1714
- };
1715
- meta: object;
1716
- }>;
1717
- get: import("@trpc/server").TRPCQueryProcedure<{
1718
- input: {
1719
- id: string;
1720
- };
1721
- output: {
1722
- entity: {
1723
- id: string;
1724
- userId: string;
1725
- workspaceId: string | null;
1726
- title: string | null;
1727
- preview: string | null;
1728
- documentId: string | null;
1729
- fileUrl: string | null;
1730
- filePath: string | null;
1731
- fileSize: number | null;
1732
- fileType: string | null;
1733
- checksum: string | null;
1734
- projectIds: string[] | null;
1735
- version: number;
1736
- createdAt: Date;
1737
- updatedAt: Date;
1738
- deletedAt: Date | null;
1739
- type: "task";
1740
- metadata: {
1741
- status: "todo" | "in_progress" | "done" | "archived";
1742
- priority?: "low" | "medium" | "high" | "urgent" | undefined;
1743
- dueDate?: string | undefined;
1744
- completedAt?: string | undefined;
1745
- assignee?: string | undefined;
1746
- estimatedMinutes?: number | undefined;
1747
- actualMinutes?: number | undefined;
1748
- };
1749
- } | {
1750
- id: string;
1751
- userId: string;
1752
- workspaceId: string | null;
1753
- title: string | null;
1754
- preview: string | null;
1755
- documentId: string | null;
1756
- fileUrl: string | null;
1757
- filePath: string | null;
1758
- fileSize: number | null;
1759
- fileType: string | null;
1760
- checksum: string | null;
1761
- projectIds: string[] | null;
1762
- version: number;
1763
- createdAt: Date;
1764
- updatedAt: Date;
1765
- deletedAt: Date | null;
1766
- type: "note";
1767
- metadata: {
1768
- tags: string[];
1769
- format: "markdown" | "plain" | "rich";
1770
- isFavorite: boolean;
1771
- linkedEntities?: string[] | undefined;
1772
- };
1773
- } | {
1774
- id: string;
1775
- userId: string;
1776
- workspaceId: string | null;
1777
- title: string | null;
1778
- preview: string | null;
1779
- documentId: string | null;
1780
- fileUrl: string | null;
1781
- filePath: string | null;
1782
- fileSize: number | null;
1783
- fileType: string | null;
1784
- checksum: string | null;
1785
- projectIds: string[] | null;
1786
- version: number;
1787
- createdAt: Date;
1788
- updatedAt: Date;
1789
- deletedAt: Date | null;
1790
- type: "person";
1791
- metadata: {
1792
- email?: string | undefined;
1793
- phone?: string | undefined;
1794
- company?: string | undefined;
1795
- role?: string | undefined;
1796
- linkedInUrl?: string | undefined;
1797
- twitterHandle?: string | undefined;
1798
- notes?: string | undefined;
1799
- };
1800
- } | {
1801
- id: string;
1802
- userId: string;
1803
- workspaceId: string | null;
1804
- title: string | null;
1805
- preview: string | null;
1806
- documentId: string | null;
1807
- fileUrl: string | null;
1808
- filePath: string | null;
1809
- fileSize: number | null;
1810
- fileType: string | null;
1811
- checksum: string | null;
1812
- projectIds: string[] | null;
1813
- version: number;
1814
- createdAt: Date;
1815
- updatedAt: Date;
1816
- deletedAt: Date | null;
1817
- type: "event";
1818
- metadata: {
1819
- startTime: string;
1820
- endTime: string;
1821
- recurring: boolean;
1822
- isAllDay: boolean;
1823
- location?: string | undefined;
1824
- attendees?: string[] | undefined;
1825
- recurrenceRule?: string | undefined;
1826
- reminderMinutes?: number | undefined;
1827
- };
1828
- } | {
1829
- id: string;
1830
- userId: string;
1831
- workspaceId: string | null;
1832
- title: string | null;
1833
- preview: string | null;
1834
- documentId: string | null;
1835
- fileUrl: string | null;
1836
- filePath: string | null;
1837
- fileSize: number | null;
1838
- fileType: string | null;
1839
- checksum: string | null;
1840
- projectIds: string[] | null;
1841
- version: number;
1842
- createdAt: Date;
1843
- updatedAt: Date;
1844
- deletedAt: Date | null;
1845
- type: "file";
1846
- metadata: {
1847
- mimeType: string;
1848
- sizeBytes: number;
1849
- extension: string;
1850
- thumbnailUrl?: string | undefined;
1851
- downloadUrl?: string | undefined;
1852
- };
1853
- } | {
1854
- id: string;
1855
- userId: string;
1856
- workspaceId: string | null;
1857
- title: string | null;
1858
- preview: string | null;
1859
- documentId: string | null;
1860
- fileUrl: string | null;
1861
- filePath: string | null;
1862
- fileSize: number | null;
1863
- fileType: string | null;
1864
- checksum: string | null;
1865
- projectIds: string[] | null;
1866
- version: number;
1867
- createdAt: Date;
1868
- updatedAt: Date;
1869
- deletedAt: Date | null;
1870
- type: "code";
1871
- metadata: {
1872
- language: string;
1873
- snippet?: string | undefined;
1874
- };
1875
- } | {
1876
- id: string;
1877
- userId: string;
1878
- workspaceId: string | null;
1879
- title: string | null;
1880
- preview: string | null;
1881
- documentId: string | null;
1882
- fileUrl: string | null;
1883
- filePath: string | null;
1884
- fileSize: number | null;
1885
- fileType: string | null;
1886
- checksum: string | null;
1887
- projectIds: string[] | null;
1888
- version: number;
1889
- createdAt: Date;
1890
- updatedAt: Date;
1891
- deletedAt: Date | null;
1892
- type: "bookmark";
1893
- metadata: {
1894
- url: string;
1895
- favicon?: string | undefined;
1896
- };
1897
- } | {
1898
- id: string;
1899
- userId: string;
1900
- workspaceId: string | null;
1901
- title: string | null;
1902
- preview: string | null;
1903
- documentId: string | null;
1904
- fileUrl: string | null;
1905
- filePath: string | null;
1906
- fileSize: number | null;
1907
- fileType: string | null;
1908
- checksum: string | null;
1909
- projectIds: string[] | null;
1910
- version: number;
1911
- createdAt: Date;
1912
- updatedAt: Date;
1913
- deletedAt: Date | null;
1914
- type: "company";
1915
- metadata: {
1916
- website?: string | undefined;
1917
- industry?: string | undefined;
1918
- foundedYear?: number | undefined;
1919
- };
1920
- } | {
1921
- id: string;
1922
- userId: string;
1923
- workspaceId: string | null;
1924
- title: string | null;
1925
- preview: string | null;
1926
- documentId: string | null;
1927
- fileUrl: string | null;
1928
- filePath: string | null;
1929
- fileSize: number | null;
1930
- fileType: string | null;
1931
- checksum: string | null;
1932
- projectIds: string[] | null;
1933
- version: number;
1934
- createdAt: Date;
1935
- updatedAt: Date;
1936
- deletedAt: Date | null;
1937
- type: "contact";
1938
- metadata: {
1939
- email?: string | undefined;
1940
- phone?: string | undefined;
1941
- company?: string | undefined;
1942
- role?: string | undefined;
1943
- linkedInUrl?: string | undefined;
1944
- twitterHandle?: string | undefined;
1945
- notes?: string | undefined;
1946
- };
1947
- } | {
1948
- id: string;
1949
- userId: string;
1950
- workspaceId: string | null;
1951
- title: string | null;
1952
- preview: string | null;
1953
- documentId: string | null;
1954
- fileUrl: string | null;
1955
- filePath: string | null;
1956
- fileSize: number | null;
1957
- fileType: string | null;
1958
- checksum: string | null;
1959
- projectIds: string[] | null;
1960
- version: number;
1961
- createdAt: Date;
1962
- updatedAt: Date;
1963
- deletedAt: Date | null;
1964
- type: "meeting";
1965
- metadata: {
1966
- startTime: string;
1967
- endTime: string;
1968
- recurring: boolean;
1969
- isAllDay: boolean;
1970
- location?: string | undefined;
1971
- attendees?: string[] | undefined;
1972
- recurrenceRule?: string | undefined;
1973
- reminderMinutes?: number | undefined;
1974
- };
1975
- } | {
1976
- id: string;
1977
- userId: string;
1978
- workspaceId: string | null;
1979
- title: string | null;
1980
- preview: string | null;
1981
- documentId: string | null;
1982
- fileUrl: string | null;
1983
- filePath: string | null;
1984
- fileSize: number | null;
1985
- fileType: string | null;
1986
- checksum: string | null;
1987
- projectIds: string[] | null;
1988
- version: number;
1989
- createdAt: Date;
1990
- updatedAt: Date;
1991
- deletedAt: Date | null;
1992
- type: "idea";
1993
- metadata: {
1994
- tags: string[];
1995
- impact?: "low" | "medium" | "high" | undefined;
1996
- effort?: "low" | "medium" | "high" | undefined;
1997
- };
1998
- } | {
1999
- id: string;
2000
- userId: string;
2001
- workspaceId: string | null;
2002
- title: string | null;
2003
- preview: string | null;
2004
- documentId: string | null;
2005
- fileUrl: string | null;
2006
- filePath: string | null;
2007
- fileSize: number | null;
2008
- fileType: string | null;
2009
- checksum: string | null;
2010
- projectIds: string[] | null;
2011
- version: number;
2012
- createdAt: Date;
2013
- updatedAt: Date;
2014
- deletedAt: Date | null;
2015
- type: "project";
2016
- metadata: {
2017
- status: "archived" | "active" | "on_hold" | "completed";
2018
- priority?: "low" | "medium" | "high" | "urgent" | undefined;
2019
- dueDate?: string | undefined;
2020
- completedAt?: string | undefined;
2021
- owner?: string | undefined;
2022
- };
2023
- };
2024
- };
2025
- meta: object;
2026
- }>;
2027
- update: import("@trpc/server").TRPCMutationProcedure<{
2028
- input: {
2029
- id: string;
2030
- type?: "project" | "task" | "contact" | "meeting" | "idea" | "note" | undefined;
2031
- title?: string | undefined;
2032
- preview?: string | undefined;
2033
- workspaceId?: string | undefined;
2034
- documentId?: string | undefined;
2035
- };
2036
- output: {
2037
- status: string;
2038
- message: string;
2039
- };
2040
- meta: object;
2041
- }>;
2042
- delete: import("@trpc/server").TRPCMutationProcedure<{
2043
- input: {
2044
- id: string;
2045
- };
2046
- output: {
2047
- status: string;
2048
- message: string;
2049
- };
2050
- meta: object;
2051
- }>;
2052
- }>>;
2053
- chat: import("@trpc/server").TRPCBuiltRouter<{
2054
- ctx: Context;
2055
- meta: object;
2056
- errorShape: import("@trpc/server").TRPCDefaultErrorShape;
2057
- transformer: true;
2058
- }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2059
- createThread: import("@trpc/server").TRPCMutationProcedure<{
2060
- input: {
2061
- projectId?: string | undefined;
2062
- parentThreadId?: string | undefined;
2063
- branchPurpose?: string | undefined;
2064
- agentId?: string | undefined;
2065
- agentType?: "meta" | "default" | "code" | "prompting" | "knowledge-search" | "writing" | "action" | undefined;
2066
- agentConfig?: Record<string, any> | undefined;
2067
- inheritContext?: boolean | undefined;
2068
- };
2069
- output: {
2070
- threadId: `${string}-${string}-${string}-${string}-${string}`;
2071
- thread: {
2072
- userId: string;
2073
- id: string;
2074
- status: "archived" | "active" | "merged";
2075
1182
  createdAt: Date;
2076
- updatedAt: Date;
2077
1183
  metadata: unknown;
1184
+ projectIds: string[] | null;
2078
1185
  title: string | null;
2079
- projectId: string | null;
2080
- threadType: "main" | "branch";
1186
+ status: ChatThreadStatus;
1187
+ threadType: ChatThreadType;
2081
1188
  parentThreadId: string | null;
2082
1189
  branchedFromMessageId: string | null;
2083
1190
  branchPurpose: string | null;
2084
1191
  agentId: string;
2085
- agentType: "meta" | "default" | "code" | "prompting" | "knowledge-search" | "writing" | "action";
1192
+ agentType: ChatThreadAgentType;
2086
1193
  agentConfig: unknown;
2087
1194
  contextSummary: string | null;
2088
1195
  mergedAt: Date | null;
2089
1196
  };
1197
+ status?: undefined;
1198
+ message?: undefined;
2090
1199
  };
2091
1200
  meta: object;
2092
1201
  }>;
@@ -2107,18 +1216,18 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2107
1216
  branchThread: {
2108
1217
  userId: string;
2109
1218
  id: string;
2110
- status: "archived" | "active" | "merged";
2111
- createdAt: Date;
2112
1219
  updatedAt: Date;
1220
+ createdAt: Date;
2113
1221
  metadata: unknown;
1222
+ projectIds: string[] | null;
2114
1223
  title: string | null;
2115
- projectId: string | null;
2116
- threadType: "main" | "branch";
1224
+ status: ChatThreadStatus;
1225
+ threadType: ChatThreadType;
2117
1226
  parentThreadId: string | null;
2118
1227
  branchedFromMessageId: string | null;
2119
1228
  branchPurpose: string | null;
2120
1229
  agentId: string;
2121
- agentType: "meta" | "default" | "code" | "prompting" | "knowledge-search" | "writing" | "action";
1230
+ agentType: ChatThreadAgentType;
2122
1231
  agentConfig: unknown;
2123
1232
  contextSummary: string | null;
2124
1233
  mergedAt: Date | null;
@@ -2137,13 +1246,62 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2137
1246
  messages: {
2138
1247
  userId: string;
2139
1248
  id: string;
2140
- metadata: any;
2141
1249
  timestamp: Date;
2142
- content: string;
2143
- role: "user" | "system" | "assistant";
1250
+ metadata: {
1251
+ agentState?: {
1252
+ plan: {
1253
+ tool: string;
1254
+ params: Record<string, unknown>;
1255
+ reasoning: string;
1256
+ }[];
1257
+ executionSummaries: {
1258
+ tool: string;
1259
+ status: "error" | "success" | "skipped";
1260
+ result?: unknown;
1261
+ error?: string | undefined;
1262
+ }[];
1263
+ finalResponse: string;
1264
+ intentAnalysis?: {
1265
+ label: string;
1266
+ confidence: number;
1267
+ reasoning?: string | undefined;
1268
+ needsFollowUp?: boolean | undefined;
1269
+ } | undefined;
1270
+ context?: {
1271
+ retrievedNotesCount: number;
1272
+ retrievedFactsCount: number;
1273
+ } | undefined;
1274
+ suggestedActions?: {
1275
+ type: string;
1276
+ description: string;
1277
+ params: Record<string, unknown>;
1278
+ }[] | undefined;
1279
+ model?: string | undefined;
1280
+ tokens?: number | undefined;
1281
+ latency?: number | undefined;
1282
+ } | undefined;
1283
+ suggestedActions?: {
1284
+ type: string;
1285
+ description: string;
1286
+ params: Record<string, unknown>;
1287
+ }[] | undefined;
1288
+ executedAction?: {
1289
+ type: string;
1290
+ result: unknown;
1291
+ } | undefined;
1292
+ attachments?: {
1293
+ type: string;
1294
+ url: string;
1295
+ }[] | undefined;
1296
+ model?: string | undefined;
1297
+ tokens?: number | undefined;
1298
+ latency?: number | undefined;
1299
+ } | null;
2144
1300
  deletedAt: Date | null;
1301
+ content: string;
2145
1302
  threadId: string;
2146
1303
  parentId: string | null;
1304
+ role: "user" | "system" | "assistant";
2147
1305
  previousHash: string | null;
2148
1306
  hash: string;
2149
1307
  }[];
@@ -2162,18 +1320,18 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2162
1320
  threads: {
2163
1321
  userId: string;
2164
1322
  id: string;
2165
- status: "archived" | "active" | "merged";
2166
- createdAt: Date;
2167
1323
  updatedAt: Date;
1324
+ createdAt: Date;
2168
1325
  metadata: unknown;
1326
+ projectIds: string[] | null;
2169
1327
  title: string | null;
2170
- projectId: string | null;
2171
- threadType: "main" | "branch";
1328
+ status: ChatThreadStatus;
1329
+ threadType: ChatThreadType;
2172
1330
  parentThreadId: string | null;
2173
1331
  branchedFromMessageId: string | null;
2174
1332
  branchPurpose: string | null;
2175
1333
  agentId: string;
2176
- agentType: "meta" | "default" | "code" | "prompting" | "knowledge-search" | "writing" | "action";
1334
+ agentType: ChatThreadAgentType;
2177
1335
  agentConfig: unknown;
2178
1336
  contextSummary: string | null;
2179
1337
  mergedAt: Date | null;
@@ -2189,18 +1347,18 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2189
1347
  branches: {
2190
1348
  userId: string;
2191
1349
  id: string;
2192
- status: "archived" | "active" | "merged";
2193
- createdAt: Date;
2194
1350
  updatedAt: Date;
1351
+ createdAt: Date;
2195
1352
  metadata: unknown;
1353
+ projectIds: string[] | null;
2196
1354
  title: string | null;
2197
- projectId: string | null;
2198
- threadType: "main" | "branch";
1355
+ status: ChatThreadStatus;
1356
+ threadType: ChatThreadType;
2199
1357
  parentThreadId: string | null;
2200
1358
  branchedFromMessageId: string | null;
2201
1359
  branchPurpose: string | null;
2202
1360
  agentId: string;
2203
- agentType: "meta" | "default" | "code" | "prompting" | "knowledge-search" | "writing" | "action";
1361
+ agentType: ChatThreadAgentType;
2204
1362
  agentConfig: unknown;
2205
1363
  contextSummary: string | null;
2206
1364
  mergedAt: Date | null;
@@ -2211,9 +1369,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2211
1369
  mergeBranch: import("@trpc/server").TRPCMutationProcedure<{
2212
1370
  input: {
2213
1371
  branchId: string;
1372
+ summary?: string | undefined;
2214
1373
  };
2215
1374
  output: {
2216
- summary: string;
1375
+ status: string;
1376
+ message: string;
2217
1377
  };
2218
1378
  meta: object;
2219
1379
  }>;
@@ -2227,44 +1387,44 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2227
1387
  thread: {
2228
1388
  userId: string;
2229
1389
  id: string;
2230
- status: "archived" | "active" | "merged";
2231
- createdAt: Date;
2232
1390
  updatedAt: Date;
1391
+ createdAt: Date;
2233
1392
  metadata: unknown;
1393
+ projectIds: string[] | null;
2234
1394
  title: string | null;
2235
- projectId: string | null;
2236
- threadType: "main" | "branch";
1395
+ status: ChatThreadStatus;
1396
+ threadType: ChatThreadType;
2237
1397
  parentThreadId: string | null;
2238
1398
  branchedFromMessageId: string | null;
2239
1399
  branchPurpose: string | null;
2240
1400
  agentId: string;
2241
- agentType: "meta" | "default" | "code" | "prompting" | "knowledge-search" | "writing" | "action";
1401
+ agentType: ChatThreadAgentType;
2242
1402
  agentConfig: unknown;
2243
1403
  contextSummary: string | null;
2244
1404
  mergedAt: Date | null;
2245
1405
  };
2246
1406
  entities: {
2247
1407
  userId: string;
1408
+ workspaceId: string;
2248
1409
  id: string;
2249
1410
  createdAt: Date;
2250
- workspaceId: string;
2251
1411
  entityId: string;
2252
1412
  threadId: string;
2253
1413
  sourceMessageId: string | null;
2254
- relationshipType: "used_as_context" | "created" | "updated" | "referenced" | "inherited_from_parent";
2255
- conflictStatus: "none" | "pending" | "resolved";
1414
+ relationshipType: ThreadEntityRelationshipType;
1415
+ conflictStatus: ThreadEntityConflictStatus;
2256
1416
  sourceEventId: string | null;
2257
1417
  }[] | undefined;
2258
1418
  documents: {
2259
1419
  userId: string;
1420
+ workspaceId: string;
2260
1421
  id: string;
2261
1422
  createdAt: Date;
2262
- workspaceId: string;
2263
1423
  documentId: string;
2264
1424
  threadId: string;
2265
1425
  sourceMessageId: string | null;
2266
- relationshipType: "used_as_context" | "created" | "updated" | "referenced" | "inherited_from_parent";
2267
- conflictStatus: "none" | "pending" | "resolved";
1426
+ relationshipType: ThreadDocumentRelationshipType;
1427
+ conflictStatus: ThreadDocumentConflictStatus;
2268
1428
  sourceEventId: string | null;
2269
1429
  }[] | undefined;
2270
1430
  branchTree: any;
@@ -2276,7 +1436,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2276
1436
  threadId: string;
2277
1437
  title?: string | undefined;
2278
1438
  agentId?: string | undefined;
2279
- agentType?: "meta" | "default" | "code" | "prompting" | "knowledge-search" | "writing" | "action" | undefined;
1439
+ agentType?: "code" | "action" | "meta" | "default" | "prompting" | "knowledge-search" | "writing" | undefined;
2280
1440
  agentConfig?: Record<string, unknown> | undefined;
2281
1441
  };
2282
1442
  output: {
@@ -2307,18 +1467,18 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2307
1467
  flatBranches: {
2308
1468
  userId: string;
2309
1469
  id: string;
2310
- status: "archived" | "active" | "merged";
2311
- createdAt: Date;
2312
1470
  updatedAt: Date;
1471
+ createdAt: Date;
2313
1472
  metadata: unknown;
1473
+ projectIds: string[] | null;
2314
1474
  title: string | null;
2315
- projectId: string | null;
2316
- threadType: "main" | "branch";
1475
+ status: ChatThreadStatus;
1476
+ threadType: ChatThreadType;
2317
1477
  parentThreadId: string | null;
2318
1478
  branchedFromMessageId: string | null;
2319
1479
  branchPurpose: string | null;
2320
1480
  agentId: string;
2321
- agentType: "meta" | "default" | "code" | "prompting" | "knowledge-search" | "writing" | "action";
1481
+ agentType: ChatThreadAgentType;
2322
1482
  agentConfig: unknown;
2323
1483
  contextSummary: string | null;
2324
1484
  mergedAt: Date | null;
@@ -2326,18 +1486,18 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2326
1486
  activeBranches: {
2327
1487
  userId: string;
2328
1488
  id: string;
2329
- status: "archived" | "active" | "merged";
2330
- createdAt: Date;
2331
1489
  updatedAt: Date;
1490
+ createdAt: Date;
2332
1491
  metadata: unknown;
1492
+ projectIds: string[] | null;
2333
1493
  title: string | null;
2334
- projectId: string | null;
2335
- threadType: "main" | "branch";
1494
+ status: ChatThreadStatus;
1495
+ threadType: ChatThreadType;
2336
1496
  parentThreadId: string | null;
2337
1497
  branchedFromMessageId: string | null;
2338
1498
  branchPurpose: string | null;
2339
1499
  agentId: string;
2340
- agentType: "meta" | "default" | "code" | "prompting" | "knowledge-search" | "writing" | "action";
1500
+ agentType: ChatThreadAgentType;
2341
1501
  agentConfig: unknown;
2342
1502
  contextSummary: string | null;
2343
1503
  mergedAt: Date | null;
@@ -2345,18 +1505,18 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2345
1505
  mergedBranches: {
2346
1506
  userId: string;
2347
1507
  id: string;
2348
- status: "archived" | "active" | "merged";
2349
- createdAt: Date;
2350
1508
  updatedAt: Date;
1509
+ createdAt: Date;
2351
1510
  metadata: unknown;
1511
+ projectIds: string[] | null;
2352
1512
  title: string | null;
2353
- projectId: string | null;
2354
- threadType: "main" | "branch";
1513
+ status: ChatThreadStatus;
1514
+ threadType: ChatThreadType;
2355
1515
  parentThreadId: string | null;
2356
1516
  branchedFromMessageId: string | null;
2357
1517
  branchPurpose: string | null;
2358
1518
  agentId: string;
2359
- agentType: "meta" | "default" | "code" | "prompting" | "knowledge-search" | "writing" | "action";
1519
+ agentType: ChatThreadAgentType;
2360
1520
  agentConfig: unknown;
2361
1521
  contextSummary: string | null;
2362
1522
  mergedAt: Date | null;
@@ -2372,26 +1532,26 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2372
1532
  output: {
2373
1533
  entities: {
2374
1534
  userId: string;
1535
+ workspaceId: string;
2375
1536
  id: string;
2376
1537
  createdAt: Date;
2377
- workspaceId: string;
2378
1538
  entityId: string;
2379
1539
  threadId: string;
2380
1540
  sourceMessageId: string | null;
2381
- relationshipType: "used_as_context" | "created" | "updated" | "referenced" | "inherited_from_parent";
2382
- conflictStatus: "none" | "pending" | "resolved";
1541
+ relationshipType: ThreadEntityRelationshipType;
1542
+ conflictStatus: ThreadEntityConflictStatus;
2383
1543
  sourceEventId: string | null;
2384
1544
  }[];
2385
1545
  documents: {
2386
1546
  userId: string;
1547
+ workspaceId: string;
2387
1548
  id: string;
2388
1549
  createdAt: Date;
2389
- workspaceId: string;
2390
1550
  documentId: string;
2391
1551
  threadId: string;
2392
1552
  sourceMessageId: string | null;
2393
- relationshipType: "used_as_context" | "created" | "updated" | "referenced" | "inherited_from_parent";
2394
- conflictStatus: "none" | "pending" | "resolved";
1553
+ relationshipType: ThreadDocumentRelationshipType;
1554
+ conflictStatus: ThreadDocumentConflictStatus;
2395
1555
  sourceEventId: string | null;
2396
1556
  }[];
2397
1557
  };
@@ -2407,24 +1567,26 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2407
1567
  list: import("@trpc/server").TRPCQueryProcedure<{
2408
1568
  input: {
2409
1569
  workspaceId?: string | undefined;
2410
- targetType?: "entity" | "document" | "view" | "whiteboard" | undefined;
1570
+ targetType?: "entity" | "document" | "whiteboard" | "view" | undefined;
2411
1571
  targetId?: string | undefined;
2412
1572
  status?: "pending" | "validated" | "rejected" | "all" | undefined;
2413
1573
  limit?: number | undefined;
2414
1574
  };
2415
1575
  output: {
2416
1576
  proposals: {
1577
+ workspaceId: string;
2417
1578
  id: string;
2418
- status: string;
2419
- createdAt: Date;
1579
+ data: unknown;
2420
1580
  updatedAt: Date;
2421
- workspaceId: string;
1581
+ createdAt: Date;
1582
+ status: ProposalStatus;
2422
1583
  targetType: string;
2423
1584
  targetId: string;
2424
- request: unknown;
1585
+ proposalType: string;
2425
1586
  reviewedBy: string | null;
2426
1587
  reviewedAt: Date | null;
2427
1588
  rejectionReason: string | null;
1589
+ comments: unknown;
2428
1590
  }[];
2429
1591
  };
2430
1592
  meta: object;
@@ -2451,7 +1613,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2451
1613
  }>;
2452
1614
  submit: import("@trpc/server").TRPCMutationProcedure<{
2453
1615
  input: {
2454
- targetType: "entity" | "relation" | "document" | "workspace" | "view";
1616
+ targetType: "entity" | "relation" | "document" | "view" | "workspace";
2455
1617
  changeType: "create" | "update" | "delete";
2456
1618
  data: Record<string, any>;
2457
1619
  targetId?: string | undefined;
@@ -2543,7 +1705,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2543
1705
  data: Record<string, unknown>;
2544
1706
  userId: string;
2545
1707
  subjectId?: string | undefined;
2546
- source?: "system" | "api" | "automation" | "sync" | "migration" | undefined;
1708
+ source?: "system" | "sync" | "api" | "automation" | "migration" | undefined;
2547
1709
  correlationId?: string | undefined;
2548
1710
  causationId?: string | undefined;
2549
1711
  };
@@ -2737,6 +1899,16 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2737
1899
  output: any[];
2738
1900
  meta: object;
2739
1901
  }>;
1902
+ getServiceHealth: import("@trpc/server").TRPCQueryProcedure<{
1903
+ input: void;
1904
+ output: {
1905
+ name: string;
1906
+ status: "healthy" | "unhealthy" | "degraded";
1907
+ message?: string;
1908
+ latency?: number;
1909
+ }[];
1910
+ meta: object;
1911
+ }>;
2740
1912
  }>>;
2741
1913
  hub: import("@trpc/server").TRPCBuiltRouter<{
2742
1914
  ctx: Context;
@@ -2747,7 +1919,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2747
1919
  generateAccessToken: import("@trpc/server").TRPCMutationProcedure<{
2748
1920
  input: {
2749
1921
  requestId: string;
2750
- scope: ("entities" | "notes" | "relations" | "projects" | "preferences" | "calendar" | "tasks" | "conversations" | "knowledge_facts")[];
1922
+ scope: ("entities" | "relations" | "projects" | "preferences" | "calendar" | "notes" | "tasks" | "conversations" | "knowledge_facts")[];
2751
1923
  expiresIn?: number | undefined;
2752
1924
  };
2753
1925
  output: {
@@ -2761,7 +1933,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2761
1933
  input: {
2762
1934
  [x: string]: unknown;
2763
1935
  token: string;
2764
- scope: ("entities" | "notes" | "relations" | "projects" | "preferences" | "calendar" | "tasks" | "conversations" | "knowledge_facts")[];
1936
+ scope: ("entities" | "relations" | "projects" | "preferences" | "calendar" | "notes" | "tasks" | "conversations" | "knowledge_facts")[];
2765
1937
  filters?: {
2766
1938
  dateRange?: {
2767
1939
  start: string;
@@ -2778,7 +1950,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2778
1950
  data: Record<string, unknown>;
2779
1951
  metadata: {
2780
1952
  retrievedAt: string;
2781
- scope: ("entities" | "notes" | "relations" | "projects" | "preferences" | "calendar" | "tasks" | "conversations" | "knowledge_facts")[];
1953
+ scope: ("entities" | "relations" | "projects" | "preferences" | "calendar" | "notes" | "tasks" | "conversations" | "knowledge_facts")[];
2782
1954
  recordCount: number;
2783
1955
  };
2784
1956
  };
@@ -2944,9 +2116,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2944
2116
  id: string;
2945
2117
  createdAt: Date;
2946
2118
  url: string;
2947
- active: boolean;
2948
2119
  eventTypes: string[];
2949
2120
  secret: string;
2121
+ active: boolean;
2950
2122
  retryConfig: unknown;
2951
2123
  lastTriggeredAt: Date | null;
2952
2124
  };
@@ -2962,8 +2134,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2962
2134
  id: string;
2963
2135
  createdAt: Date;
2964
2136
  url: string;
2965
- active: boolean;
2966
2137
  eventTypes: string[];
2138
+ active: boolean;
2967
2139
  retryConfig: unknown;
2968
2140
  lastTriggeredAt: Date | null;
2969
2141
  }[];
@@ -3008,7 +2180,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3008
2180
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
3009
2181
  upload: import("@trpc/server").TRPCMutationProcedure<{
3010
2182
  input: {
3011
- type: "text" | "code" | "markdown" | "pdf" | "docx";
2183
+ type: "code" | "text" | "markdown" | "pdf" | "docx";
3012
2184
  content: string;
3013
2185
  title?: string | undefined;
3014
2186
  language?: string | undefined;
@@ -3035,15 +2207,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3035
2207
  title: string;
3036
2208
  type: string;
3037
2209
  language: string | null;
3038
- storageUrl: string;
3039
- storageKey: string;
2210
+ storageUrl: string | null;
2211
+ storageKey: string | null;
3040
2212
  size: number;
3041
2213
  mimeType: string | null;
3042
2214
  currentVersion: number;
3043
2215
  lastSavedVersion: number;
3044
2216
  workingState: string | null;
3045
2217
  workingStateUpdatedAt: Date | null;
3046
- projectId: string | null;
3047
2218
  metadata: unknown;
3048
2219
  createdAt: Date;
3049
2220
  updatedAt: Date;
@@ -3125,15 +2296,15 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3125
2296
  };
3126
2297
  output: {
3127
2298
  id: string;
3128
- version: number;
3129
2299
  createdAt: Date;
3130
2300
  type: string;
3131
- message: string | null;
3132
- content: string;
3133
2301
  documentId: string;
2302
+ version: number;
2303
+ content: string;
3134
2304
  delta: unknown;
3135
2305
  author: string;
3136
2306
  authorId: string;
2307
+ message: string | null;
3137
2308
  };
3138
2309
  meta: object;
3139
2310
  }>;
@@ -3150,7 +2321,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3150
2321
  list: import("@trpc/server").TRPCQueryProcedure<{
3151
2322
  input: {
3152
2323
  projectId?: string | undefined;
3153
- type?: "text" | "code" | "markdown" | "pdf" | "docx" | undefined;
2324
+ type?: "code" | "text" | "markdown" | "pdf" | "docx" | undefined;
3154
2325
  limit?: number | undefined;
3155
2326
  };
3156
2327
  output: {
@@ -3162,15 +2333,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3162
2333
  title: string;
3163
2334
  type: string;
3164
2335
  language: string | null;
3165
- storageUrl: string;
3166
- storageKey: string;
2336
+ storageUrl: string | null;
2337
+ storageKey: string | null;
3167
2338
  size: number;
3168
2339
  mimeType: string | null;
3169
2340
  currentVersion: number;
3170
2341
  lastSavedVersion: number;
3171
2342
  workingState: string | null;
3172
2343
  workingStateUpdatedAt: Date | null;
3173
- projectId: string | null;
3174
2344
  metadata: unknown;
3175
2345
  createdAt: Date;
3176
2346
  updatedAt: Date;
@@ -3372,24 +2542,24 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3372
2542
  };
3373
2543
  output: {
3374
2544
  userId: string;
2545
+ workspaceId: string;
3375
2546
  id: string;
3376
2547
  data: unknown;
3377
- status: string | null;
3378
- createdAt: Date;
3379
2548
  updatedAt: Date;
3380
- priority: string | null;
3381
- type: string;
2549
+ tags: string[] | null;
2550
+ createdAt: Date;
3382
2551
  timestamp: Date;
2552
+ type: string;
2553
+ projectIds: string[] | null;
3383
2554
  title: string;
3384
- workspaceId: string;
3385
2555
  preview: string | null;
3386
- projectIds: string[] | null;
3387
- tags: string[] | null;
2556
+ status: string | null;
3388
2557
  provider: string;
3389
2558
  account: string;
3390
2559
  externalId: string;
3391
2560
  deepLink: string | null;
3392
2561
  snoozedUntil: Date | null;
2562
+ priority: string | null;
3393
2563
  processedAt: Date | null;
3394
2564
  }[];
3395
2565
  meta: object;
@@ -3448,12 +2618,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3448
2618
  output: {
3449
2619
  name: string;
3450
2620
  id: string;
3451
- status: string;
3452
- version: string | null;
3453
- createdAt: Date;
3454
2621
  updatedAt: Date;
3455
- description: string | null;
2622
+ createdAt: Date;
3456
2623
  metadata: Record<string, unknown> | null;
2624
+ version: string | null;
2625
+ status: string;
2626
+ description: string | null;
3457
2627
  capabilities: string[];
3458
2628
  serviceId: string;
3459
2629
  webhookUrl: string;
@@ -3491,12 +2661,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3491
2661
  output: {
3492
2662
  name: string;
3493
2663
  id: string;
3494
- status: string;
3495
- version: string | null;
3496
- createdAt: Date;
3497
2664
  updatedAt: Date;
2665
+ createdAt: Date;
2666
+ metadata: Record<string, unknown> | null;
2667
+ version: string | null;
2668
+ status: string;
3498
2669
  description: string | null;
3499
- metadata: Record<string, unknown> | null;
3500
2670
  capabilities: string[];
3501
2671
  serviceId: string;
3502
2672
  webhookUrl: string;
@@ -3599,113 +2769,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3599
2769
  meta: object;
3600
2770
  }>;
3601
2771
  }>>;
3602
- tags: import("@trpc/server").TRPCBuiltRouter<{
3603
- ctx: Context;
3604
- meta: object;
3605
- errorShape: import("@trpc/server").TRPCDefaultErrorShape;
3606
- transformer: true;
3607
- }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
3608
- list: import("@trpc/server").TRPCQueryProcedure<{
3609
- input: void;
3610
- output: {
3611
- tags: {
3612
- name: string;
3613
- userId: string;
3614
- id: string;
3615
- createdAt: Date;
3616
- workspaceId: string;
3617
- projectIds: string[] | null;
3618
- color: string | null;
3619
- }[];
3620
- };
3621
- meta: object;
3622
- }>;
3623
- create: import("@trpc/server").TRPCMutationProcedure<{
3624
- input: {
3625
- name: string;
3626
- color?: string | undefined;
3627
- };
3628
- output: {
3629
- tag: {
3630
- id: `${string}-${string}-${string}-${string}-${string}`;
3631
- userId: string;
3632
- name: string;
3633
- color: string;
3634
- createdAt: Date;
3635
- updatedAt: Date;
3636
- };
3637
- };
3638
- meta: object;
3639
- }>;
3640
- update: import("@trpc/server").TRPCMutationProcedure<{
3641
- input: {
3642
- id: string;
3643
- name?: string | undefined;
3644
- color?: string | undefined;
3645
- };
3646
- output: {
3647
- tag: {
3648
- name: string;
3649
- color: string | null;
3650
- updatedAt: Date;
3651
- userId: string;
3652
- id: string;
3653
- createdAt: Date;
3654
- workspaceId: string;
3655
- projectIds: string[] | null;
3656
- };
3657
- };
3658
- meta: object;
3659
- }>;
3660
- delete: import("@trpc/server").TRPCMutationProcedure<{
3661
- input: {
3662
- id: string;
3663
- };
3664
- output: {
3665
- success: boolean;
3666
- };
3667
- meta: object;
3668
- }>;
3669
- attach: import("@trpc/server").TRPCMutationProcedure<{
3670
- input: {
3671
- tagId: string;
3672
- entityId: string;
3673
- };
3674
- output: {
3675
- status: string;
3676
- };
3677
- meta: object;
3678
- }>;
3679
- detach: import("@trpc/server").TRPCMutationProcedure<{
3680
- input: {
3681
- tagId: string;
3682
- entityId: string;
3683
- };
3684
- output: {
3685
- status: string;
3686
- };
3687
- meta: object;
3688
- }>;
3689
- getForEntity: import("@trpc/server").TRPCQueryProcedure<{
3690
- input: {
3691
- entityId: string;
3692
- };
3693
- output: {
3694
- tags: any[];
3695
- };
3696
- meta: object;
3697
- }>;
3698
- getEntitiesWithTag: import("@trpc/server").TRPCQueryProcedure<{
3699
- input: {
3700
- tagId: string;
3701
- limit?: number | undefined;
3702
- };
3703
- output: {
3704
- entities: any[];
3705
- };
3706
- meta: object;
3707
- }>;
3708
- }>>;
3709
2772
  search: import("@trpc/server").TRPCBuiltRouter<{
3710
2773
  ctx: Context;
3711
2774
  meta: object;
@@ -3715,23 +2778,24 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3715
2778
  entities: import("@trpc/server").TRPCQueryProcedure<{
3716
2779
  input: {
3717
2780
  query: string;
3718
- type?: "document" | "project" | "task" | "note" | undefined;
2781
+ type?: "task" | "document" | "note" | "project" | undefined;
3719
2782
  limit?: number | undefined;
3720
2783
  };
3721
2784
  output: {
3722
2785
  entities: {
3723
2786
  userId: string;
2787
+ workspaceId: string;
3724
2788
  id: string;
3725
- version: number;
3726
- createdAt: Date;
3727
2789
  updatedAt: Date;
2790
+ createdAt: Date;
3728
2791
  type: string;
3729
- metadata: unknown;
2792
+ projectIds: string[] | null;
2793
+ profileId: string | null;
3730
2794
  title: string | null;
3731
- workspaceId: string;
3732
- documentId: string | null;
3733
2795
  preview: string | null;
3734
- projectIds: string[] | null;
2796
+ documentId: string | null;
2797
+ properties: unknown;
2798
+ version: number;
3735
2799
  deletedAt: Date | null;
3736
2800
  }[];
3737
2801
  };
@@ -3740,7 +2804,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3740
2804
  semantic: import("@trpc/server").TRPCQueryProcedure<{
3741
2805
  input: {
3742
2806
  query: string;
3743
- type?: "document" | "project" | "task" | "note" | undefined;
2807
+ type?: "task" | "document" | "note" | "project" | undefined;
3744
2808
  limit?: number | undefined;
3745
2809
  threshold?: number | undefined;
3746
2810
  };
@@ -3758,17 +2822,18 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3758
2822
  output: {
3759
2823
  entities: {
3760
2824
  userId: string;
2825
+ workspaceId: string;
3761
2826
  id: string;
3762
- version: number;
3763
- createdAt: Date;
3764
2827
  updatedAt: Date;
2828
+ createdAt: Date;
3765
2829
  type: string;
3766
- metadata: unknown;
2830
+ projectIds: string[] | null;
2831
+ profileId: string | null;
3767
2832
  title: string | null;
3768
- workspaceId: string;
3769
- documentId: string | null;
3770
2833
  preview: string | null;
3771
- projectIds: string[] | null;
2834
+ documentId: string | null;
2835
+ properties: unknown;
2836
+ version: number;
3772
2837
  deletedAt: Date | null;
3773
2838
  }[];
3774
2839
  };
@@ -3801,10 +2866,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3801
2866
  output: {
3802
2867
  relations: {
3803
2868
  userId: string;
2869
+ workspaceId: string;
3804
2870
  id: string;
3805
2871
  createdAt: Date;
3806
2872
  type: string;
3807
- workspaceId: string;
3808
2873
  projectIds: string[] | null;
3809
2874
  sourceEntityId: string;
3810
2875
  targetEntityId: string;
@@ -3822,17 +2887,18 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3822
2887
  output: {
3823
2888
  entities: {
3824
2889
  userId: string;
2890
+ workspaceId: string;
3825
2891
  id: string;
3826
- version: number;
3827
- createdAt: Date;
3828
2892
  updatedAt: Date;
2893
+ createdAt: Date;
3829
2894
  type: string;
3830
- metadata: unknown;
2895
+ projectIds: string[] | null;
2896
+ profileId: string | null;
3831
2897
  title: string | null;
3832
- workspaceId: string;
3833
- documentId: string | null;
3834
2898
  preview: string | null;
3835
- projectIds: string[] | null;
2899
+ documentId: string | null;
2900
+ properties: unknown;
2901
+ version: number;
3836
2902
  deletedAt: Date | null;
3837
2903
  }[];
3838
2904
  };
@@ -3891,17 +2957,18 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3891
2957
  output: {
3892
2958
  entity: {
3893
2959
  userId: string;
2960
+ workspaceId: string;
3894
2961
  id: string;
3895
- version: number;
3896
- createdAt: Date;
3897
2962
  updatedAt: Date;
2963
+ createdAt: Date;
3898
2964
  type: string;
3899
- metadata: unknown;
2965
+ projectIds: string[] | null;
2966
+ profileId: string | null;
3900
2967
  title: string | null;
3901
- workspaceId: string;
3902
- documentId: string | null;
3903
2968
  preview: string | null;
3904
- projectIds: string[] | null;
2969
+ documentId: string | null;
2970
+ properties: unknown;
2971
+ version: number;
3905
2972
  deletedAt: Date | null;
3906
2973
  };
3907
2974
  relations: never[];
@@ -3910,25 +2977,26 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3910
2977
  } | {
3911
2978
  entity: {
3912
2979
  userId: string;
2980
+ workspaceId: string;
3913
2981
  id: string;
3914
- version: number;
3915
- createdAt: Date;
3916
2982
  updatedAt: Date;
2983
+ createdAt: Date;
3917
2984
  type: string;
3918
- metadata: unknown;
2985
+ projectIds: string[] | null;
2986
+ profileId: string | null;
3919
2987
  title: string | null;
3920
- workspaceId: string;
3921
- documentId: string | null;
3922
2988
  preview: string | null;
3923
- projectIds: string[] | null;
2989
+ documentId: string | null;
2990
+ properties: unknown;
2991
+ version: number;
3924
2992
  deletedAt: Date | null;
3925
2993
  };
3926
2994
  relations: {
3927
2995
  userId: string;
2996
+ workspaceId: string;
3928
2997
  id: string;
3929
2998
  createdAt: Date;
3930
2999
  type: string;
3931
- workspaceId: string;
3932
3000
  projectIds: string[] | null;
3933
3001
  sourceEntityId: string;
3934
3002
  targetEntityId: string;
@@ -3952,25 +3020,26 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3952
3020
  output: {
3953
3021
  entities: {
3954
3022
  userId: string;
3023
+ workspaceId: string;
3955
3024
  id: string;
3956
- version: number;
3957
- createdAt: Date;
3958
3025
  updatedAt: Date;
3026
+ createdAt: Date;
3959
3027
  type: string;
3960
- metadata: unknown;
3028
+ projectIds: string[] | null;
3029
+ profileId: string | null;
3961
3030
  title: string | null;
3962
- workspaceId: string;
3963
- documentId: string | null;
3964
3031
  preview: string | null;
3965
- projectIds: string[] | null;
3032
+ documentId: string | null;
3033
+ properties: unknown;
3034
+ version: number;
3966
3035
  deletedAt: Date | null;
3967
3036
  }[];
3968
3037
  relations: {
3969
3038
  userId: string;
3039
+ workspaceId: string;
3970
3040
  id: string;
3971
3041
  createdAt: Date;
3972
3042
  type: string;
3973
- workspaceId: string;
3974
3043
  projectIds: string[] | null;
3975
3044
  sourceEntityId: string;
3976
3045
  targetEntityId: string;
@@ -4034,12 +3103,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4034
3103
  joinedAt: Date;
4035
3104
  name: string;
4036
3105
  id: string;
4037
- createdAt: Date;
4038
3106
  updatedAt: Date;
4039
- description: string | null;
3107
+ createdAt: Date;
4040
3108
  type: string;
4041
- ownerId: string;
3109
+ description: string | null;
4042
3110
  settings: WorkspaceSettings;
3111
+ ownerId: string;
4043
3112
  subscriptionTier: string | null;
4044
3113
  subscriptionStatus: string | null;
4045
3114
  stripeCustomerId: string | null;
@@ -4054,12 +3123,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4054
3123
  role: string;
4055
3124
  name: string;
4056
3125
  id: string;
4057
- createdAt: Date;
4058
3126
  updatedAt: Date;
4059
- description: string | null;
3127
+ createdAt: Date;
4060
3128
  type: string;
4061
- ownerId: string;
3129
+ description: string | null;
4062
3130
  settings: WorkspaceSettings;
3131
+ ownerId: string;
4063
3132
  subscriptionTier: string | null;
4064
3133
  subscriptionStatus: string | null;
4065
3134
  stripeCustomerId: string | null;
@@ -4107,9 +3176,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4107
3176
  };
4108
3177
  output: {
4109
3178
  userId: string;
3179
+ workspaceId: string;
4110
3180
  id: string;
4111
3181
  role: string;
4112
- workspaceId: string;
4113
3182
  joinedAt: Date;
4114
3183
  invitedBy: string | null;
4115
3184
  }[];
@@ -4146,10 +3215,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4146
3215
  };
4147
3216
  output: {
4148
3217
  email: string;
3218
+ workspaceId: string;
4149
3219
  id: string;
4150
3220
  createdAt: Date;
4151
3221
  role: string;
4152
- workspaceId: string;
4153
3222
  expiresAt: Date;
4154
3223
  invitedBy: string;
4155
3224
  token: string;
@@ -4162,10 +3231,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4162
3231
  };
4163
3232
  output: {
4164
3233
  email: string;
3234
+ workspaceId: string;
4165
3235
  id: string;
4166
3236
  createdAt: Date;
4167
3237
  role: string;
4168
- workspaceId: string;
4169
3238
  expiresAt: Date;
4170
3239
  invitedBy: string;
4171
3240
  token: string;
@@ -4202,7 +3271,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4202
3271
  create: import("@trpc/server").TRPCMutationProcedure<{
4203
3272
  input: {
4204
3273
  name: string;
4205
- type: "list" | "calendar" | "table" | "whiteboard" | "timeline" | "kanban" | "grid" | "gallery" | "gantt" | "mindmap" | "graph";
3274
+ type: "calendar" | "list" | "table" | "whiteboard" | "graph" | "timeline" | "kanban" | "grid" | "gallery" | "gantt" | "mindmap";
4206
3275
  workspaceId?: string | undefined;
4207
3276
  description?: string | undefined;
4208
3277
  initialContent?: any;
@@ -4212,7 +3281,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4212
3281
  id: `${string}-${string}-${string}-${string}-${string}`;
4213
3282
  workspaceId: string | undefined;
4214
3283
  userId: string;
4215
- type: "list" | "calendar" | "table" | "whiteboard" | "timeline" | "kanban" | "grid" | "gallery" | "gantt" | "mindmap" | "graph";
3284
+ type: "calendar" | "list" | "table" | "whiteboard" | "graph" | "timeline" | "kanban" | "grid" | "gallery" | "gantt" | "mindmap";
4216
3285
  category: ViewCategory;
4217
3286
  name: string;
4218
3287
  description: string | undefined;
@@ -4232,23 +3301,27 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4232
3301
  list: import("@trpc/server").TRPCQueryProcedure<{
4233
3302
  input: {
4234
3303
  workspaceId?: string | undefined;
4235
- type?: "list" | "calendar" | "table" | "whiteboard" | "all" | "timeline" | "kanban" | "grid" | "gallery" | "gantt" | "mindmap" | "graph" | undefined;
3304
+ type?: "calendar" | "list" | "table" | "whiteboard" | "all" | "graph" | "timeline" | "kanban" | "grid" | "gallery" | "gantt" | "mindmap" | undefined;
4236
3305
  };
4237
3306
  output: {
4238
3307
  name: string;
4239
3308
  userId: string;
3309
+ workspaceId: string | null;
4240
3310
  id: string;
4241
- createdAt: Date;
3311
+ columns: unknown;
4242
3312
  updatedAt: Date;
4243
- description: string | null;
3313
+ createdAt: Date;
4244
3314
  type: string;
4245
3315
  metadata: unknown;
4246
- workspaceId: string | null;
4247
- documentId: string | null;
4248
3316
  projectIds: string[] | null;
4249
- thumbnailUrl: string | null;
3317
+ documentId: string | null;
3318
+ description: string | null;
4250
3319
  category: string;
3320
+ filter: unknown;
3321
+ sort: unknown;
3322
+ layoutConfig: unknown;
4251
3323
  yjsRoomId: string | null;
3324
+ thumbnailUrl: string | null;
4252
3325
  }[];
4253
3326
  meta: object;
4254
3327
  }>;
@@ -4260,18 +3333,22 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4260
3333
  view: {
4261
3334
  name: string;
4262
3335
  userId: string;
3336
+ workspaceId: string | null;
4263
3337
  id: string;
4264
- createdAt: Date;
3338
+ columns: unknown;
4265
3339
  updatedAt: Date;
4266
- description: string | null;
3340
+ createdAt: Date;
4267
3341
  type: string;
4268
3342
  metadata: unknown;
4269
- workspaceId: string | null;
4270
- documentId: string | null;
4271
3343
  projectIds: string[] | null;
4272
- thumbnailUrl: string | null;
3344
+ documentId: string | null;
3345
+ description: string | null;
4273
3346
  category: string;
3347
+ filter: unknown;
3348
+ sort: unknown;
3349
+ layoutConfig: unknown;
4274
3350
  yjsRoomId: string | null;
3351
+ thumbnailUrl: string | null;
4275
3352
  };
4276
3353
  content: {};
4277
3354
  };
@@ -4285,18 +3362,22 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4285
3362
  view: {
4286
3363
  name: string;
4287
3364
  userId: string;
3365
+ workspaceId: string | null;
4288
3366
  id: string;
4289
- createdAt: Date;
3367
+ columns: unknown;
4290
3368
  updatedAt: Date;
4291
- description: string | null;
3369
+ createdAt: Date;
4292
3370
  type: string;
4293
3371
  metadata: unknown;
4294
- workspaceId: string | null;
4295
- documentId: string | null;
4296
3372
  projectIds: string[] | null;
4297
- thumbnailUrl: string | null;
3373
+ documentId: string | null;
3374
+ description: string | null;
4298
3375
  category: string;
3376
+ filter: unknown;
3377
+ sort: unknown;
3378
+ layoutConfig: unknown;
4299
3379
  yjsRoomId: string | null;
3380
+ thumbnailUrl: string | null;
4300
3381
  };
4301
3382
  content: {};
4302
3383
  entities: never[];
@@ -4306,18 +3387,22 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4306
3387
  view: {
4307
3388
  name: string;
4308
3389
  userId: string;
3390
+ workspaceId: string | null;
4309
3391
  id: string;
4310
- createdAt: Date;
3392
+ columns: unknown;
4311
3393
  updatedAt: Date;
4312
- description: string | null;
3394
+ createdAt: Date;
4313
3395
  type: string;
4314
3396
  metadata: unknown;
4315
- workspaceId: string | null;
4316
- documentId: string | null;
4317
3397
  projectIds: string[] | null;
4318
- thumbnailUrl: string | null;
3398
+ documentId: string | null;
3399
+ description: string | null;
4319
3400
  category: string;
3401
+ filter: unknown;
3402
+ sort: unknown;
3403
+ layoutConfig: unknown;
4320
3404
  yjsRoomId: string | null;
3405
+ thumbnailUrl: string | null;
4321
3406
  };
4322
3407
  config: StructuredViewConfig | undefined;
4323
3408
  entities: never[];
@@ -4327,18 +3412,22 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4327
3412
  view: {
4328
3413
  name: string;
4329
3414
  userId: string;
3415
+ workspaceId: string | null;
4330
3416
  id: string;
4331
- createdAt: Date;
3417
+ columns: unknown;
4332
3418
  updatedAt: Date;
4333
- description: string | null;
3419
+ createdAt: Date;
4334
3420
  type: string;
4335
3421
  metadata: unknown;
4336
- workspaceId: string | null;
4337
- documentId: string | null;
4338
3422
  projectIds: string[] | null;
4339
- thumbnailUrl: string | null;
3423
+ documentId: string | null;
3424
+ description: string | null;
4340
3425
  category: string;
3426
+ filter: unknown;
3427
+ sort: unknown;
3428
+ layoutConfig: unknown;
4341
3429
  yjsRoomId: string | null;
3430
+ thumbnailUrl: string | null;
4342
3431
  };
4343
3432
  config: StructuredViewConfig;
4344
3433
  entities: {
@@ -4346,11 +3435,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4346
3435
  userId: string;
4347
3436
  workspaceId: string;
4348
3437
  projectIds: string[] | null;
3438
+ profileId: string | null;
4349
3439
  type: string;
4350
3440
  title: string | null;
4351
3441
  preview: string | null;
4352
3442
  documentId: string | null;
4353
- metadata: unknown;
3443
+ properties: unknown;
4354
3444
  version: number;
4355
3445
  createdAt: Date;
4356
3446
  updatedAt: Date;
@@ -4595,11 +3685,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4595
3685
  } | undefined;
4596
3686
  output: {
4597
3687
  name: string;
3688
+ workspaceId: string | null;
4598
3689
  id: string;
4599
- createdAt: Date;
4600
3690
  updatedAt: Date;
3691
+ createdAt: Date;
4601
3692
  description: string | null;
4602
- workspaceId: string | null;
4603
3693
  createdBy: string;
4604
3694
  permissions: unknown;
4605
3695
  filters: unknown;
@@ -4612,11 +3702,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4612
3702
  };
4613
3703
  output: {
4614
3704
  name: string;
3705
+ workspaceId: string | null;
4615
3706
  id: string;
4616
- createdAt: Date;
4617
3707
  updatedAt: Date;
3708
+ createdAt: Date;
4618
3709
  description: string | null;
4619
- workspaceId: string | null;
4620
3710
  createdBy: string;
4621
3711
  permissions: unknown;
4622
3712
  filters: unknown;
@@ -4710,33 +3800,38 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4710
3800
  output: {
4711
3801
  resource: {
4712
3802
  userId: string;
3803
+ workspaceId: string;
4713
3804
  id: string;
4714
- version: number;
4715
- createdAt: Date;
4716
3805
  updatedAt: Date;
3806
+ createdAt: Date;
4717
3807
  type: string;
4718
- metadata: unknown;
3808
+ projectIds: string[] | null;
3809
+ profileId: string | null;
4719
3810
  title: string | null;
4720
- workspaceId: string;
4721
- documentId: string | null;
4722
3811
  preview: string | null;
4723
- projectIds: string[] | null;
3812
+ documentId: string | null;
3813
+ properties: unknown;
3814
+ version: number;
4724
3815
  deletedAt: Date | null;
4725
3816
  } | {
4726
3817
  name: string;
4727
3818
  userId: string;
3819
+ workspaceId: string | null;
4728
3820
  id: string;
4729
- createdAt: Date;
3821
+ columns: unknown;
4730
3822
  updatedAt: Date;
4731
- description: string | null;
3823
+ createdAt: Date;
4732
3824
  type: string;
4733
3825
  metadata: unknown;
4734
- workspaceId: string | null;
4735
- documentId: string | null;
4736
3826
  projectIds: string[] | null;
4737
- thumbnailUrl: string | null;
3827
+ documentId: string | null;
3828
+ description: string | null;
4738
3829
  category: string;
3830
+ filter: unknown;
3831
+ sort: unknown;
3832
+ layoutConfig: unknown;
4739
3833
  yjsRoomId: string | null;
3834
+ thumbnailUrl: string | null;
4740
3835
  document: never;
4741
3836
  };
4742
3837
  permissions: unknown;
@@ -4752,8 +3847,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4752
3847
  };
4753
3848
  output: {
4754
3849
  id: string;
4755
- createdAt: Date;
4756
3850
  updatedAt: Date;
3851
+ createdAt: Date;
4757
3852
  expiresAt: Date | null;
4758
3853
  createdBy: string;
4759
3854
  permissions: unknown;
@@ -4888,7 +3983,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4888
3983
  fieldMapping: Record<string, {
4889
3984
  slot: string;
4890
3985
  renderer?: {
4891
- type: "number" | "date" | "link" | "text" | "relations" | "badge" | "avatar" | "progress" | "checkbox" | "currency";
3986
+ type: "number" | "date" | "relations" | "link" | "text" | "badge" | "avatar" | "progress" | "checkbox" | "currency";
4892
3987
  variant?: string | undefined;
4893
3988
  size?: string | undefined;
4894
3989
  format?: string | undefined;
@@ -5002,7 +4097,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5002
4097
  fieldMapping: Record<string, {
5003
4098
  slot: string;
5004
4099
  renderer?: {
5005
- type: "number" | "date" | "link" | "text" | "relations" | "badge" | "avatar" | "progress" | "checkbox" | "currency";
4100
+ type: "number" | "date" | "relations" | "link" | "text" | "badge" | "avatar" | "progress" | "checkbox" | "currency";
5006
4101
  variant?: string | undefined;
5007
4102
  size?: string | undefined;
5008
4103
  format?: string | undefined;
@@ -5034,12 +4129,318 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5034
4129
  fontFamily?: string | undefined;
5035
4130
  } | undefined;
5036
4131
  } | undefined;
5037
- schema?: Record<string, any> | undefined;
5038
- isDefault?: boolean | undefined;
5039
- isPublic?: boolean | undefined;
4132
+ schema?: Record<string, any> | undefined;
4133
+ isDefault?: boolean | undefined;
4134
+ isPublic?: boolean | undefined;
4135
+ };
4136
+ output: {
4137
+ status: string;
4138
+ };
4139
+ meta: object;
4140
+ }>;
4141
+ delete: import("@trpc/server").TRPCMutationProcedure<{
4142
+ input: {
4143
+ id: string;
4144
+ };
4145
+ output: {
4146
+ status: string;
4147
+ };
4148
+ meta: object;
4149
+ }>;
4150
+ duplicate: import("@trpc/server").TRPCMutationProcedure<{
4151
+ input: {
4152
+ id: string;
4153
+ };
4154
+ output: {
4155
+ name: string;
4156
+ userId: string | null;
4157
+ workspaceId: string | null;
4158
+ id: string;
4159
+ updatedAt: Date;
4160
+ createdAt: Date;
4161
+ projectIds: string[] | null;
4162
+ version: number;
4163
+ entityType: string | null;
4164
+ description: string | null;
4165
+ targetType: string;
4166
+ inboxItemType: string | null;
4167
+ config: unknown;
4168
+ schema: unknown;
4169
+ isDefault: boolean;
4170
+ isPublic: boolean;
4171
+ };
4172
+ meta: object;
4173
+ }>;
4174
+ setDefault: import("@trpc/server").TRPCMutationProcedure<{
4175
+ input: {
4176
+ id: string;
4177
+ };
4178
+ output: {
4179
+ success: boolean;
4180
+ };
4181
+ meta: object;
4182
+ }>;
4183
+ }>>;
4184
+ whiteboards: import("@trpc/server").TRPCBuiltRouter<{
4185
+ ctx: Context;
4186
+ meta: object;
4187
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
4188
+ transformer: true;
4189
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
4190
+ saveVersion: import("@trpc/server").TRPCMutationProcedure<{
4191
+ input: {
4192
+ viewId: string;
4193
+ message?: string | undefined;
4194
+ };
4195
+ output: {
4196
+ status: string;
4197
+ message: string;
4198
+ };
4199
+ meta: object;
4200
+ }>;
4201
+ listVersions: import("@trpc/server").TRPCQueryProcedure<{
4202
+ input: {
4203
+ viewId: string;
4204
+ limit?: number | undefined;
4205
+ };
4206
+ output: {
4207
+ versions: {
4208
+ id: string;
4209
+ createdAt: Date;
4210
+ type: string;
4211
+ documentId: string;
4212
+ version: number;
4213
+ content: string;
4214
+ delta: unknown;
4215
+ author: string;
4216
+ authorId: string;
4217
+ message: string | null;
4218
+ }[];
4219
+ };
4220
+ meta: object;
4221
+ }>;
4222
+ restoreVersion: import("@trpc/server").TRPCMutationProcedure<{
4223
+ input: {
4224
+ viewId: string;
4225
+ versionId: string;
4226
+ };
4227
+ output: {
4228
+ status: string;
4229
+ message: string;
4230
+ };
4231
+ meta: object;
4232
+ }>;
4233
+ getVersionPreview: import("@trpc/server").TRPCQueryProcedure<{
4234
+ input: {
4235
+ versionId: string;
4236
+ };
4237
+ output: {
4238
+ version: {
4239
+ id: string;
4240
+ createdAt: Date;
4241
+ type: string;
4242
+ documentId: string;
4243
+ version: number;
4244
+ content: string;
4245
+ delta: unknown;
4246
+ author: string;
4247
+ authorId: string;
4248
+ message: string | null;
4249
+ };
4250
+ metadata: {
4251
+ size: number;
4252
+ message: string | null;
4253
+ author: string;
4254
+ createdAt: Date;
4255
+ };
4256
+ };
4257
+ meta: object;
4258
+ }>;
4259
+ deleteVersion: import("@trpc/server").TRPCMutationProcedure<{
4260
+ input: {
4261
+ viewId: string;
4262
+ versionId: string;
4263
+ };
4264
+ output: {
4265
+ success: boolean;
4266
+ };
4267
+ meta: object;
4268
+ }>;
4269
+ }>>;
4270
+ skills: import("@trpc/server").TRPCBuiltRouter<{
4271
+ ctx: Context;
4272
+ meta: object;
4273
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
4274
+ transformer: true;
4275
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
4276
+ list: import("@trpc/server").TRPCQueryProcedure<{
4277
+ input: {
4278
+ workspaceId?: string | undefined;
4279
+ status?: "error" | "active" | "inactive" | "all" | undefined;
4280
+ limit?: number | undefined;
4281
+ offset?: number | undefined;
4282
+ } | undefined;
4283
+ output: {
4284
+ skills: any;
4285
+ };
4286
+ meta: object;
4287
+ }>;
4288
+ get: import("@trpc/server").TRPCQueryProcedure<{
4289
+ input: {
4290
+ id: string;
4291
+ };
4292
+ output: {
4293
+ skill: any;
4294
+ };
4295
+ meta: object;
4296
+ }>;
4297
+ create: import("@trpc/server").TRPCMutationProcedure<{
4298
+ input: {
4299
+ name: string;
4300
+ code: string;
4301
+ workspaceId?: string | undefined;
4302
+ description?: string | undefined;
4303
+ parameters?: Record<string, unknown> | undefined;
4304
+ category?: string | undefined;
4305
+ executionMode?: "sync" | "async" | undefined;
4306
+ timeoutSeconds?: number | undefined;
4307
+ };
4308
+ output: {
4309
+ id: `${string}-${string}-${string}-${string}-${string}`;
4310
+ success: boolean;
4311
+ message: string;
4312
+ };
4313
+ meta: object;
4314
+ }>;
4315
+ update: import("@trpc/server").TRPCMutationProcedure<{
4316
+ input: {
4317
+ id: string;
4318
+ name?: string | undefined;
4319
+ description?: string | undefined;
4320
+ code?: string | undefined;
4321
+ parameters?: Record<string, unknown> | undefined;
4322
+ category?: string | undefined;
4323
+ executionMode?: "sync" | "async" | undefined;
4324
+ timeoutSeconds?: number | undefined;
4325
+ };
4326
+ output: {
4327
+ success: boolean;
4328
+ message: string;
4329
+ };
4330
+ meta: object;
4331
+ }>;
4332
+ delete: import("@trpc/server").TRPCMutationProcedure<{
4333
+ input: {
4334
+ id: string;
4335
+ };
4336
+ output: {
4337
+ success: boolean;
4338
+ message: string;
4339
+ };
4340
+ meta: object;
4341
+ }>;
4342
+ }>>;
4343
+ backgroundTasks: import("@trpc/server").TRPCBuiltRouter<{
4344
+ ctx: Context;
4345
+ meta: object;
4346
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
4347
+ transformer: true;
4348
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
4349
+ list: import("@trpc/server").TRPCQueryProcedure<{
4350
+ input: {
4351
+ workspaceId?: string | undefined;
4352
+ status?: "error" | "active" | "paused" | "all" | undefined;
4353
+ type?: "cron" | "event" | "interval" | undefined;
4354
+ limit?: number | undefined;
4355
+ offset?: number | undefined;
4356
+ } | undefined;
4357
+ output: {
4358
+ tasks: any;
4359
+ };
4360
+ meta: object;
4361
+ }>;
4362
+ get: import("@trpc/server").TRPCQueryProcedure<{
4363
+ input: {
4364
+ id: string;
4365
+ };
4366
+ output: {
4367
+ task: any;
4368
+ };
4369
+ meta: object;
4370
+ }>;
4371
+ create: import("@trpc/server").TRPCMutationProcedure<{
4372
+ input: {
4373
+ name: string;
4374
+ type: "cron" | "event" | "interval";
4375
+ action: string;
4376
+ workspaceId?: string | undefined;
4377
+ description?: string | undefined;
4378
+ schedule?: string | undefined;
4379
+ context?: Record<string, unknown> | undefined;
4380
+ };
4381
+ output: {
4382
+ id: `${string}-${string}-${string}-${string}-${string}`;
4383
+ success: boolean;
4384
+ message: string;
4385
+ };
4386
+ meta: object;
4387
+ }>;
4388
+ update: import("@trpc/server").TRPCMutationProcedure<{
4389
+ input: {
4390
+ id: string;
4391
+ name?: string | undefined;
4392
+ description?: string | undefined;
4393
+ schedule?: string | undefined;
4394
+ action?: string | undefined;
4395
+ context?: Record<string, unknown> | undefined;
4396
+ status?: "error" | "active" | "paused" | undefined;
4397
+ };
4398
+ output: {
4399
+ success: boolean;
4400
+ message: string;
4401
+ };
4402
+ meta: object;
4403
+ }>;
4404
+ delete: import("@trpc/server").TRPCMutationProcedure<{
4405
+ input: {
4406
+ id: string;
4407
+ };
4408
+ output: {
4409
+ success: boolean;
4410
+ message: string;
4411
+ };
4412
+ meta: object;
4413
+ }>;
4414
+ }>>;
4415
+ messageLinks: import("@trpc/server").TRPCBuiltRouter<{
4416
+ ctx: Context;
4417
+ meta: object;
4418
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
4419
+ transformer: true;
4420
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
4421
+ create: import("@trpc/server").TRPCMutationProcedure<{
4422
+ input: {
4423
+ messageId: string;
4424
+ targetType: MessageLinkTargetType;
4425
+ targetId: string;
4426
+ relationshipType: MessageLinkRelationshipType;
4427
+ position?: {
4428
+ start: number;
4429
+ end: number;
4430
+ } | undefined;
4431
+ metadata?: Record<string, unknown> | undefined;
5040
4432
  };
5041
4433
  output: {
5042
- status: string;
4434
+ userId: string;
4435
+ workspaceId: string;
4436
+ id: string;
4437
+ createdAt: Date;
4438
+ metadata: unknown;
4439
+ relationshipType: string;
4440
+ targetType: string;
4441
+ targetId: string;
4442
+ messageId: string;
4443
+ position: unknown;
5043
4444
  };
5044
4445
  meta: object;
5045
4446
  }>;
@@ -5048,129 +4449,380 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5048
4449
  id: string;
5049
4450
  };
5050
4451
  output: {
5051
- status: string;
4452
+ success: boolean;
5052
4453
  };
5053
4454
  meta: object;
5054
4455
  }>;
5055
- duplicate: import("@trpc/server").TRPCMutationProcedure<{
4456
+ getByMessage: import("@trpc/server").TRPCQueryProcedure<{
5056
4457
  input: {
5057
- id: string;
4458
+ messageId: string;
5058
4459
  };
5059
4460
  output: {
5060
- name: string;
5061
- userId: string | null;
4461
+ userId: string;
4462
+ workspaceId: string;
5062
4463
  id: string;
5063
- version: number;
5064
4464
  createdAt: Date;
5065
- updatedAt: Date;
5066
- schema: unknown;
5067
- description: string | null;
5068
- workspaceId: string | null;
5069
- projectIds: string[] | null;
5070
- entityType: string | null;
4465
+ metadata: unknown;
4466
+ relationshipType: string;
5071
4467
  targetType: string;
5072
- inboxItemType: string | null;
5073
- config: unknown;
5074
- isDefault: boolean;
5075
- isPublic: boolean;
5076
- };
4468
+ targetId: string;
4469
+ messageId: string;
4470
+ position: unknown;
4471
+ }[];
5077
4472
  meta: object;
5078
4473
  }>;
5079
- setDefault: import("@trpc/server").TRPCMutationProcedure<{
4474
+ getByTarget: import("@trpc/server").TRPCQueryProcedure<{
5080
4475
  input: {
4476
+ targetType: MessageLinkTargetType;
4477
+ targetId: string;
4478
+ };
4479
+ output: {
4480
+ userId: string;
4481
+ workspaceId: string;
5081
4482
  id: string;
4483
+ createdAt: Date;
4484
+ metadata: unknown;
4485
+ relationshipType: string;
4486
+ targetType: string;
4487
+ targetId: string;
4488
+ messageId: string;
4489
+ position: unknown;
4490
+ }[];
4491
+ meta: object;
4492
+ }>;
4493
+ getApprovalChain: import("@trpc/server").TRPCQueryProcedure<{
4494
+ input: {
4495
+ proposalId: string;
5082
4496
  };
5083
4497
  output: {
5084
- success: boolean;
4498
+ userId: string;
4499
+ workspaceId: string;
4500
+ id: string;
4501
+ createdAt: Date;
4502
+ metadata: unknown;
4503
+ relationshipType: string;
4504
+ targetType: string;
4505
+ targetId: string;
4506
+ messageId: string;
4507
+ position: unknown;
4508
+ }[];
4509
+ meta: object;
4510
+ }>;
4511
+ query: import("@trpc/server").TRPCQueryProcedure<{
4512
+ input: {
4513
+ messageId?: string | undefined;
4514
+ targetType?: MessageLinkTargetType | undefined;
4515
+ targetId?: string | undefined;
4516
+ relationshipType?: MessageLinkRelationshipType | undefined;
5085
4517
  };
4518
+ output: {
4519
+ userId: string;
4520
+ workspaceId: string;
4521
+ id: string;
4522
+ createdAt: Date;
4523
+ metadata: unknown;
4524
+ relationshipType: string;
4525
+ targetType: string;
4526
+ targetId: string;
4527
+ messageId: string;
4528
+ position: unknown;
4529
+ }[];
5086
4530
  meta: object;
5087
4531
  }>;
5088
4532
  }>>;
5089
- whiteboards: import("@trpc/server").TRPCBuiltRouter<{
4533
+ profiles: import("@trpc/server").TRPCBuiltRouter<{
5090
4534
  ctx: Context;
5091
4535
  meta: object;
5092
4536
  errorShape: import("@trpc/server").TRPCDefaultErrorShape;
5093
4537
  transformer: true;
5094
4538
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
5095
- saveVersion: import("@trpc/server").TRPCMutationProcedure<{
4539
+ list: import("@trpc/server").TRPCQueryProcedure<{
4540
+ input: void;
4541
+ output: {
4542
+ profiles: {
4543
+ userId: string | null;
4544
+ workspaceId: string | null;
4545
+ id: string;
4546
+ updatedAt: Date;
4547
+ createdAt: Date;
4548
+ version: number;
4549
+ isActive: boolean;
4550
+ scope: ProfileScope;
4551
+ slug: string;
4552
+ uiHints: unknown;
4553
+ displayName: string;
4554
+ parentProfileId: string | null;
4555
+ }[];
4556
+ };
4557
+ meta: object;
4558
+ }>;
4559
+ get: import("@trpc/server").TRPCQueryProcedure<{
5096
4560
  input: {
5097
- viewId: string;
5098
- message?: string | undefined;
4561
+ identifier: string;
5099
4562
  };
5100
4563
  output: {
5101
- status: string;
5102
- message: string;
4564
+ profile: {
4565
+ userId: string | null;
4566
+ workspaceId: string | null;
4567
+ id: string;
4568
+ updatedAt: Date;
4569
+ createdAt: Date;
4570
+ version: number;
4571
+ isActive: boolean;
4572
+ scope: ProfileScope;
4573
+ slug: string;
4574
+ uiHints: unknown;
4575
+ displayName: string;
4576
+ parentProfileId: string | null;
4577
+ };
4578
+ effectiveProperties: EffectiveProperty[];
5103
4579
  };
5104
4580
  meta: object;
5105
4581
  }>;
5106
- listVersions: import("@trpc/server").TRPCQueryProcedure<{
4582
+ create: import("@trpc/server").TRPCMutationProcedure<{
5107
4583
  input: {
5108
- viewId: string;
5109
- limit?: number | undefined;
4584
+ slug: string;
4585
+ displayName: string;
4586
+ parentProfileId?: string | undefined;
4587
+ uiHints?: Record<string, unknown> | undefined;
4588
+ scope?: "user" | "system" | "workspace" | undefined;
5110
4589
  };
5111
4590
  output: {
5112
- versions: {
4591
+ profile: {
4592
+ userId: string | null;
4593
+ workspaceId: string | null;
5113
4594
  id: string;
4595
+ updatedAt: Date;
4596
+ createdAt: Date;
5114
4597
  version: number;
4598
+ isActive: boolean;
4599
+ scope: ProfileScope;
4600
+ slug: string;
4601
+ uiHints: unknown;
4602
+ displayName: string;
4603
+ parentProfileId: string | null;
4604
+ };
4605
+ };
4606
+ meta: object;
4607
+ }>;
4608
+ update: import("@trpc/server").TRPCMutationProcedure<{
4609
+ input: {
4610
+ id: string;
4611
+ displayName?: string | undefined;
4612
+ parentProfileId?: string | null | undefined;
4613
+ uiHints?: Record<string, unknown> | undefined;
4614
+ };
4615
+ output: {
4616
+ profile: {
4617
+ userId: string | null;
4618
+ workspaceId: string | null;
4619
+ id: string;
4620
+ updatedAt: Date;
5115
4621
  createdAt: Date;
5116
- type: string;
5117
- message: string | null;
5118
- content: string;
5119
- documentId: string;
5120
- delta: unknown;
5121
- author: string;
5122
- authorId: string;
5123
- }[];
4622
+ version: number;
4623
+ isActive: boolean;
4624
+ scope: ProfileScope;
4625
+ slug: string;
4626
+ uiHints: unknown;
4627
+ displayName: string;
4628
+ parentProfileId: string | null;
4629
+ };
5124
4630
  };
5125
4631
  meta: object;
5126
4632
  }>;
5127
- restoreVersion: import("@trpc/server").TRPCMutationProcedure<{
4633
+ delete: import("@trpc/server").TRPCMutationProcedure<{
5128
4634
  input: {
5129
- viewId: string;
5130
- versionId: string;
4635
+ id: string;
5131
4636
  };
5132
4637
  output: {
5133
- status: string;
5134
- message: string;
4638
+ success: boolean;
5135
4639
  };
5136
4640
  meta: object;
5137
4641
  }>;
5138
- getVersionPreview: import("@trpc/server").TRPCQueryProcedure<{
4642
+ getEffectiveProperties: import("@trpc/server").TRPCQueryProcedure<{
5139
4643
  input: {
5140
- versionId: string;
4644
+ profileId: string;
5141
4645
  };
5142
4646
  output: {
5143
- version: {
4647
+ properties: EffectiveProperty[];
4648
+ };
4649
+ meta: object;
4650
+ }>;
4651
+ getHierarchy: import("@trpc/server").TRPCQueryProcedure<{
4652
+ input: {
4653
+ profileId: string;
4654
+ };
4655
+ output: {
4656
+ hierarchy: {
4657
+ userId: string | null;
4658
+ workspaceId: string | null;
5144
4659
  id: string;
4660
+ updatedAt: Date;
4661
+ createdAt: Date;
5145
4662
  version: number;
4663
+ isActive: boolean;
4664
+ scope: ProfileScope;
4665
+ slug: string;
4666
+ uiHints: unknown;
4667
+ displayName: string;
4668
+ parentProfileId: string | null;
4669
+ }[];
4670
+ };
4671
+ meta: object;
4672
+ }>;
4673
+ }>>;
4674
+ propertyDefs: import("@trpc/server").TRPCBuiltRouter<{
4675
+ ctx: Context;
4676
+ meta: object;
4677
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
4678
+ transformer: true;
4679
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
4680
+ list: import("@trpc/server").TRPCQueryProcedure<{
4681
+ input: void;
4682
+ output: {
4683
+ propertyDefs: {
4684
+ id: string;
4685
+ updatedAt: Date;
5146
4686
  createdAt: Date;
5147
- type: string;
5148
- message: string | null;
5149
- content: string;
5150
- documentId: string;
5151
- delta: unknown;
5152
- author: string;
5153
- authorId: string;
4687
+ slug: string;
4688
+ valueType: PropertyValueType;
4689
+ constraints: unknown;
4690
+ uiHints: unknown;
4691
+ }[];
4692
+ };
4693
+ meta: object;
4694
+ }>;
4695
+ get: import("@trpc/server").TRPCQueryProcedure<{
4696
+ input: {
4697
+ slug: string;
4698
+ };
4699
+ output: {
4700
+ propertyDef: {
4701
+ id: string;
4702
+ updatedAt: Date;
4703
+ createdAt: Date;
4704
+ slug: string;
4705
+ valueType: PropertyValueType;
4706
+ constraints: unknown;
4707
+ uiHints: unknown;
5154
4708
  };
5155
- metadata: {
5156
- size: number;
5157
- message: string | null;
5158
- author: string;
4709
+ };
4710
+ meta: object;
4711
+ }>;
4712
+ create: import("@trpc/server").TRPCMutationProcedure<{
4713
+ input: {
4714
+ slug: string;
4715
+ valueType: "string" | "number" | "boolean" | "object" | "array" | "date" | "entity_id";
4716
+ constraints?: Record<string, unknown> | undefined;
4717
+ uiHints?: Record<string, unknown> | undefined;
4718
+ };
4719
+ output: {
4720
+ propertyDef: {
4721
+ id: string;
4722
+ updatedAt: Date;
5159
4723
  createdAt: Date;
4724
+ slug: string;
4725
+ valueType: PropertyValueType;
4726
+ constraints: unknown;
4727
+ uiHints: unknown;
5160
4728
  };
5161
4729
  };
5162
4730
  meta: object;
5163
4731
  }>;
5164
- deleteVersion: import("@trpc/server").TRPCMutationProcedure<{
4732
+ update: import("@trpc/server").TRPCMutationProcedure<{
5165
4733
  input: {
5166
- viewId: string;
5167
- versionId: string;
4734
+ id: string;
4735
+ slug?: string | undefined;
4736
+ valueType?: "string" | "number" | "boolean" | "object" | "array" | "date" | "entity_id" | undefined;
4737
+ constraints?: Record<string, unknown> | undefined;
4738
+ uiHints?: Record<string, unknown> | undefined;
4739
+ };
4740
+ output: {
4741
+ propertyDef: {
4742
+ id: string;
4743
+ updatedAt: Date;
4744
+ createdAt: Date;
4745
+ slug: string;
4746
+ valueType: PropertyValueType;
4747
+ constraints: unknown;
4748
+ uiHints: unknown;
4749
+ };
4750
+ };
4751
+ meta: object;
4752
+ }>;
4753
+ delete: import("@trpc/server").TRPCMutationProcedure<{
4754
+ input: {
4755
+ id: string;
4756
+ };
4757
+ output: {
4758
+ success: boolean;
4759
+ };
4760
+ meta: object;
4761
+ }>;
4762
+ }>>;
4763
+ profileProperties: import("@trpc/server").TRPCBuiltRouter<{
4764
+ ctx: Context;
4765
+ meta: object;
4766
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
4767
+ transformer: true;
4768
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
4769
+ link: import("@trpc/server").TRPCMutationProcedure<{
4770
+ input: {
4771
+ profileId: string;
4772
+ propertyDefId: string;
4773
+ required?: boolean | undefined;
4774
+ defaultValue?: unknown;
4775
+ displayOrder?: number | undefined;
4776
+ };
4777
+ output: {
4778
+ link: {
4779
+ profileId: string;
4780
+ propertyDefId: string;
4781
+ required: boolean;
4782
+ defaultValue: unknown;
4783
+ displayOrder: number;
4784
+ };
4785
+ };
4786
+ meta: object;
4787
+ }>;
4788
+ unlink: import("@trpc/server").TRPCMutationProcedure<{
4789
+ input: {
4790
+ profileId: string;
4791
+ propertyDefId: string;
5168
4792
  };
5169
4793
  output: {
5170
4794
  success: boolean;
5171
4795
  };
5172
4796
  meta: object;
5173
4797
  }>;
4798
+ update: import("@trpc/server").TRPCMutationProcedure<{
4799
+ input: {
4800
+ profileId: string;
4801
+ propertyDefId: string;
4802
+ required?: boolean | undefined;
4803
+ defaultValue?: unknown;
4804
+ displayOrder?: number | undefined;
4805
+ };
4806
+ output: {
4807
+ link: {
4808
+ profileId: string;
4809
+ propertyDefId: string;
4810
+ required: boolean;
4811
+ defaultValue: unknown;
4812
+ displayOrder: number;
4813
+ };
4814
+ };
4815
+ meta: object;
4816
+ }>;
4817
+ getByProfile: import("@trpc/server").TRPCQueryProcedure<{
4818
+ input: {
4819
+ profileId: string;
4820
+ };
4821
+ output: {
4822
+ properties: EffectiveProperty[];
4823
+ };
4824
+ meta: object;
4825
+ }>;
5174
4826
  }>>;
5175
4827
  }>>;
5176
4828
  export type AppRouter = typeof coreRouter;