@synap-core/api-types 1.3.0 → 1.4.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.
@@ -116,49 +116,6 @@ declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColumns<{
116
116
  identity: undefined;
117
117
  generated: undefined;
118
118
  }, {}, {}>;
119
- projectIds: import("drizzle-orm/pg-core").PgColumn<{
120
- name: "project_ids";
121
- tableName: "chat_threads";
122
- dataType: "array";
123
- columnType: "PgArray";
124
- data: string[];
125
- driverParam: string | string[];
126
- notNull: false;
127
- hasDefault: false;
128
- isPrimaryKey: false;
129
- isAutoincrement: false;
130
- hasRuntimeDefault: false;
131
- enumValues: undefined;
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
- }, {}, {}>;
149
- identity: undefined;
150
- generated: undefined;
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
- }>;
162
119
  title: import("drizzle-orm/pg-core").PgColumn<{
163
120
  name: "title";
164
121
  tableName: "chat_threads";
@@ -500,6 +457,193 @@ declare enum ProposalStatus {
500
457
  APPROVED = "approved",
501
458
  REJECTED = "rejected"
502
459
  }
460
+ declare const messageLinks: import("drizzle-orm/pg-core").PgTableWithColumns<{
461
+ name: "message_links";
462
+ schema: undefined;
463
+ columns: {
464
+ id: import("drizzle-orm/pg-core").PgColumn<{
465
+ name: "id";
466
+ tableName: "message_links";
467
+ dataType: "string";
468
+ columnType: "PgUUID";
469
+ data: string;
470
+ driverParam: string;
471
+ notNull: true;
472
+ hasDefault: true;
473
+ isPrimaryKey: true;
474
+ isAutoincrement: false;
475
+ hasRuntimeDefault: false;
476
+ enumValues: undefined;
477
+ baseColumn: never;
478
+ identity: undefined;
479
+ generated: undefined;
480
+ }, {}, {}>;
481
+ messageId: import("drizzle-orm/pg-core").PgColumn<{
482
+ name: "message_id";
483
+ tableName: "message_links";
484
+ dataType: "string";
485
+ columnType: "PgUUID";
486
+ data: string;
487
+ driverParam: string;
488
+ notNull: true;
489
+ hasDefault: false;
490
+ isPrimaryKey: false;
491
+ isAutoincrement: false;
492
+ hasRuntimeDefault: false;
493
+ enumValues: undefined;
494
+ baseColumn: never;
495
+ identity: undefined;
496
+ generated: undefined;
497
+ }, {}, {}>;
498
+ targetType: import("drizzle-orm/pg-core").PgColumn<{
499
+ name: "target_type";
500
+ tableName: "message_links";
501
+ dataType: "string";
502
+ columnType: "PgText";
503
+ data: string;
504
+ driverParam: string;
505
+ notNull: true;
506
+ hasDefault: false;
507
+ isPrimaryKey: false;
508
+ isAutoincrement: false;
509
+ hasRuntimeDefault: false;
510
+ enumValues: [
511
+ string,
512
+ ...string[]
513
+ ];
514
+ baseColumn: never;
515
+ identity: undefined;
516
+ generated: undefined;
517
+ }, {}, {}>;
518
+ targetId: import("drizzle-orm/pg-core").PgColumn<{
519
+ name: "target_id";
520
+ tableName: "message_links";
521
+ dataType: "string";
522
+ columnType: "PgUUID";
523
+ data: string;
524
+ driverParam: string;
525
+ notNull: true;
526
+ hasDefault: false;
527
+ isPrimaryKey: false;
528
+ isAutoincrement: false;
529
+ hasRuntimeDefault: false;
530
+ enumValues: undefined;
531
+ baseColumn: never;
532
+ identity: undefined;
533
+ generated: undefined;
534
+ }, {}, {}>;
535
+ relationshipType: import("drizzle-orm/pg-core").PgColumn<{
536
+ name: "relationship_type";
537
+ tableName: "message_links";
538
+ dataType: "string";
539
+ columnType: "PgText";
540
+ data: string;
541
+ driverParam: string;
542
+ notNull: true;
543
+ hasDefault: false;
544
+ isPrimaryKey: false;
545
+ isAutoincrement: false;
546
+ hasRuntimeDefault: false;
547
+ enumValues: [
548
+ string,
549
+ ...string[]
550
+ ];
551
+ baseColumn: never;
552
+ identity: undefined;
553
+ generated: undefined;
554
+ }, {}, {}>;
555
+ position: import("drizzle-orm/pg-core").PgColumn<{
556
+ name: "position";
557
+ tableName: "message_links";
558
+ dataType: "json";
559
+ columnType: "PgJsonb";
560
+ data: unknown;
561
+ driverParam: unknown;
562
+ notNull: false;
563
+ hasDefault: false;
564
+ isPrimaryKey: false;
565
+ isAutoincrement: false;
566
+ hasRuntimeDefault: false;
567
+ enumValues: undefined;
568
+ baseColumn: never;
569
+ identity: undefined;
570
+ generated: undefined;
571
+ }, {}, {}>;
572
+ metadata: import("drizzle-orm/pg-core").PgColumn<{
573
+ name: "metadata";
574
+ tableName: "message_links";
575
+ dataType: "json";
576
+ columnType: "PgJsonb";
577
+ data: unknown;
578
+ driverParam: unknown;
579
+ notNull: false;
580
+ hasDefault: false;
581
+ isPrimaryKey: false;
582
+ isAutoincrement: false;
583
+ hasRuntimeDefault: false;
584
+ enumValues: undefined;
585
+ baseColumn: never;
586
+ identity: undefined;
587
+ generated: undefined;
588
+ }, {}, {}>;
589
+ userId: import("drizzle-orm/pg-core").PgColumn<{
590
+ name: "user_id";
591
+ tableName: "message_links";
592
+ dataType: "string";
593
+ columnType: "PgText";
594
+ data: string;
595
+ driverParam: string;
596
+ notNull: true;
597
+ hasDefault: false;
598
+ isPrimaryKey: false;
599
+ isAutoincrement: false;
600
+ hasRuntimeDefault: false;
601
+ enumValues: [
602
+ string,
603
+ ...string[]
604
+ ];
605
+ baseColumn: never;
606
+ identity: undefined;
607
+ generated: undefined;
608
+ }, {}, {}>;
609
+ workspaceId: import("drizzle-orm/pg-core").PgColumn<{
610
+ name: "workspace_id";
611
+ tableName: "message_links";
612
+ dataType: "string";
613
+ columnType: "PgUUID";
614
+ data: string;
615
+ driverParam: string;
616
+ notNull: true;
617
+ hasDefault: false;
618
+ isPrimaryKey: false;
619
+ isAutoincrement: false;
620
+ hasRuntimeDefault: false;
621
+ enumValues: undefined;
622
+ baseColumn: never;
623
+ identity: undefined;
624
+ generated: undefined;
625
+ }, {}, {}>;
626
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
627
+ name: "created_at";
628
+ tableName: "message_links";
629
+ dataType: "date";
630
+ columnType: "PgTimestamp";
631
+ data: Date;
632
+ driverParam: string;
633
+ notNull: true;
634
+ hasDefault: true;
635
+ isPrimaryKey: false;
636
+ isAutoincrement: false;
637
+ hasRuntimeDefault: false;
638
+ enumValues: undefined;
639
+ baseColumn: never;
640
+ identity: undefined;
641
+ generated: undefined;
642
+ }, {}, {}>;
643
+ };
644
+ dialect: "pg";
645
+ }>;
646
+ export type MessageLink = typeof messageLinks.$inferSelect;
503
647
  declare enum PropertyValueType {
504
648
  STRING = "string",
505
649
  NUMBER = "number",
@@ -672,11 +816,36 @@ export interface EventRecord {
672
816
  correlationId?: string;
673
817
  source: string;
674
818
  }
819
+ /** Minimal message fields for list/preview */
820
+ export interface LinkedMessagePreview {
821
+ id: string;
822
+ threadId: string;
823
+ role: string;
824
+ content: string;
825
+ timestamp: Date;
826
+ userId: string;
827
+ }
828
+ export interface LinkedMessageItem {
829
+ link: MessageLink;
830
+ message: LinkedMessagePreview;
831
+ }
675
832
  export interface EffectiveProperty extends PropertyDef {
676
833
  required: boolean;
677
834
  defaultValue: unknown;
678
835
  displayOrder: number;
679
836
  }
837
+ /**
838
+ * Column definition for views
839
+ */
840
+ export interface ViewColumn {
841
+ id: string;
842
+ field: string;
843
+ title?: string;
844
+ valueType?: string;
845
+ indexed?: boolean;
846
+ visible?: boolean;
847
+ width?: number;
848
+ }
680
849
  /**
681
850
  * View Query Types
682
851
  *
@@ -704,11 +873,16 @@ export interface SortRule {
704
873
  /**
705
874
  * Query definition for structured views
706
875
  * Defines which entities to show and how to filter them
876
+ *
877
+ * NOTE: profileIds/profileSlugs are now stored in views.scopeProfileIds
878
+ * This query structure only contains filters, sorts, search, pagination, and groupBy
707
879
  */
708
880
  export interface EntityQuery {
709
- /** Profile slugs to include (preferred - dynamic profiles) */
881
+ /** @deprecated - Profile IDs now stored in views.scopeProfileIds */
882
+ profileIds?: string[];
883
+ /** @deprecated - Profile slugs now stored in views.scopeProfileIds (resolved to IDs) */
710
884
  profileSlugs?: string[];
711
- /** Entity types to include (deprecated - use profileSlugs instead) */
885
+ /** @deprecated - Use profileSlugs instead, which is also deprecated */
712
886
  entityTypes?: string[];
713
887
  /** Specific entity IDs (for fixed sets) */
714
888
  entityIds?: string[];
@@ -735,73 +909,9 @@ export interface EntityQuery {
735
909
  * View category determines content structure and rendering approach
736
910
  * - structured: Query-based views with interchangeable layouts (table, kanban, graph, etc.)
737
911
  * - canvas: Freeform drawing views (whiteboard, mindmap)
912
+ * - composite: Views that compose other views (bento grid, dashboard)
738
913
  */
739
- export type ViewCategory = "structured" | "canvas";
740
- /**
741
- * View Configuration Types
742
- *
743
- * Discriminated union for view configurations.
744
- */
745
- export interface ColumnDisplayConfig {
746
- type: "text" | "badge" | "date" | "user" | "url" | "boolean" | "progress" | "rating" | "image" | "file";
747
- params?: {
748
- colors?: Record<string, string>;
749
- format?: string;
750
- relative?: boolean;
751
- wrap?: boolean;
752
- lines?: number;
753
- precision?: number;
754
- currency?: string;
755
- align?: "left" | "center" | "right";
756
- icon?: string;
757
- };
758
- }
759
- export interface ColumnConfig {
760
- id: string;
761
- field: string;
762
- width?: number;
763
- visible?: boolean;
764
- title?: string;
765
- display?: ColumnDisplayConfig;
766
- }
767
- export interface FormattingRule {
768
- id: string;
769
- name?: string;
770
- target: "row" | "cell" | "card";
771
- filter: EntityFilter;
772
- style: {
773
- color?: string;
774
- backgroundColor?: string;
775
- fontWeight?: "bold" | "normal";
776
- fontStyle?: "italic" | "normal";
777
- strikeThrough?: boolean;
778
- icon?: string;
779
- };
780
- }
781
- export interface RenderSettings {
782
- rowHeight?: "compact" | "default" | "tall";
783
- formatting?: FormattingRule[];
784
- columns?: ColumnConfig[];
785
- groupByField?: string;
786
- cardFields?: string[];
787
- cardSettings?: {
788
- coverField?: string;
789
- showAvatars?: boolean;
790
- visibleFields?: string[];
791
- colorField?: string;
792
- };
793
- dateField?: string;
794
- endDateField?: string;
795
- colorField?: string;
796
- layout?: "force" | "hierarchical" | "circular";
797
- nodeColorField?: string;
798
- edgeLabelField?: string;
799
- }
800
- export interface StructuredViewConfig {
801
- category: "structured";
802
- query: EntityQuery;
803
- render?: RenderSettings;
804
- }
914
+ export type ViewCategory = "structured" | "canvas" | "composite";
805
915
  declare enum AgentType {
806
916
  DEFAULT = "default",
807
917
  META = "meta",
@@ -989,7 +1099,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
989
1099
  log: import("@trpc/server").TRPCMutationProcedure<{
990
1100
  input: {
991
1101
  subjectId: string;
992
- subjectType: "user" | "system" | "entity" | "relation";
1102
+ subjectType: unknown;
993
1103
  eventType: string;
994
1104
  data: Record<string, unknown>;
995
1105
  version: number;
@@ -1009,6 +1119,36 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1009
1119
  output: EventRecord[];
1010
1120
  meta: object;
1011
1121
  }>;
1122
+ search: import("@trpc/server").TRPCQueryProcedure<{
1123
+ input: {
1124
+ userId?: string | undefined;
1125
+ eventType?: string | undefined;
1126
+ subjectType?: unknown;
1127
+ subjectId?: string | undefined;
1128
+ correlationId?: string | undefined;
1129
+ fromDate?: Date | undefined;
1130
+ toDate?: Date | undefined;
1131
+ limit?: number | undefined;
1132
+ offset?: number | undefined;
1133
+ workspaceId?: string | undefined;
1134
+ };
1135
+ output: EventRecord[];
1136
+ meta: object;
1137
+ }>;
1138
+ count: import("@trpc/server").TRPCQueryProcedure<{
1139
+ input: {
1140
+ userId?: string | undefined;
1141
+ eventType?: string | undefined;
1142
+ subjectType?: unknown;
1143
+ fromDate?: Date | undefined;
1144
+ toDate?: Date | undefined;
1145
+ workspaceId?: string | undefined;
1146
+ };
1147
+ output: {
1148
+ count: number;
1149
+ };
1150
+ meta: object;
1151
+ }>;
1012
1152
  }>>;
1013
1153
  capture: import("@trpc/server").TRPCBuiltRouter<{
1014
1154
  ctx: Context;
@@ -1079,7 +1219,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1079
1219
  fileSize: number | null;
1080
1220
  fileType: string | null;
1081
1221
  checksum: string | null;
1082
- projectIds: string[] | null;
1083
1222
  version: number;
1084
1223
  createdAt: Date;
1085
1224
  updatedAt: Date;
@@ -1110,7 +1249,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1110
1249
  fileSize: number | null;
1111
1250
  fileType: string | null;
1112
1251
  checksum: string | null;
1113
- projectIds: string[] | null;
1114
1252
  version: number;
1115
1253
  createdAt: Date;
1116
1254
  updatedAt: Date;
@@ -1119,6 +1257,15 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1119
1257
  };
1120
1258
  meta: object;
1121
1259
  }>;
1260
+ getByDocumentId: import("@trpc/server").TRPCQueryProcedure<{
1261
+ input: {
1262
+ documentId: string;
1263
+ };
1264
+ output: {
1265
+ entity: any;
1266
+ };
1267
+ meta: object;
1268
+ }>;
1122
1269
  get: import("@trpc/server").TRPCQueryProcedure<{
1123
1270
  input: {
1124
1271
  id: string;
@@ -1160,7 +1307,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1160
1307
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1161
1308
  createThread: import("@trpc/server").TRPCMutationProcedure<{
1162
1309
  input: {
1163
- projectId?: string | undefined;
1164
1310
  parentThreadId?: string | undefined;
1165
1311
  branchPurpose?: string | undefined;
1166
1312
  agentId?: string | undefined;
@@ -1181,7 +1327,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1181
1327
  updatedAt: Date;
1182
1328
  createdAt: Date;
1183
1329
  metadata: unknown;
1184
- projectIds: string[] | null;
1185
1330
  title: string | null;
1186
1331
  status: ChatThreadStatus;
1187
1332
  threadType: ChatThreadType;
@@ -1203,6 +1348,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1203
1348
  input: {
1204
1349
  threadId: string;
1205
1350
  content: string;
1351
+ workspaceId?: string | undefined;
1206
1352
  };
1207
1353
  output: {
1208
1354
  messageId: `${string}-${string}-${string}-${string}-${string}`;
@@ -1219,7 +1365,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1219
1365
  updatedAt: Date;
1220
1366
  createdAt: Date;
1221
1367
  metadata: unknown;
1222
- projectIds: string[] | null;
1223
1368
  title: string | null;
1224
1369
  status: ChatThreadStatus;
1225
1370
  threadType: ChatThreadType;
@@ -1256,7 +1401,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1256
1401
  }[];
1257
1402
  executionSummaries: {
1258
1403
  tool: string;
1259
- status: "error" | "success" | "skipped";
1404
+ status: "error" | "skipped" | "success";
1260
1405
  result?: unknown;
1261
1406
  error?: string | undefined;
1262
1407
  }[];
@@ -1301,7 +1446,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1301
1446
  content: string;
1302
1447
  threadId: string;
1303
1448
  parentId: string | null;
1304
- role: "user" | "system" | "assistant";
1449
+ role: "user" | "assistant" | "system";
1305
1450
  previousHash: string | null;
1306
1451
  hash: string;
1307
1452
  }[];
@@ -1312,7 +1457,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1312
1457
  }>;
1313
1458
  listThreads: import("@trpc/server").TRPCQueryProcedure<{
1314
1459
  input: {
1315
- projectId?: string | undefined;
1316
1460
  threadType?: "main" | "branch" | undefined;
1317
1461
  limit?: number | undefined;
1318
1462
  };
@@ -1323,7 +1467,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1323
1467
  updatedAt: Date;
1324
1468
  createdAt: Date;
1325
1469
  metadata: unknown;
1326
- projectIds: string[] | null;
1327
1470
  title: string | null;
1328
1471
  status: ChatThreadStatus;
1329
1472
  threadType: ChatThreadType;
@@ -1350,7 +1493,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1350
1493
  updatedAt: Date;
1351
1494
  createdAt: Date;
1352
1495
  metadata: unknown;
1353
- projectIds: string[] | null;
1354
1496
  title: string | null;
1355
1497
  status: ChatThreadStatus;
1356
1498
  threadType: ChatThreadType;
@@ -1390,7 +1532,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1390
1532
  updatedAt: Date;
1391
1533
  createdAt: Date;
1392
1534
  metadata: unknown;
1393
- projectIds: string[] | null;
1394
1535
  title: string | null;
1395
1536
  status: ChatThreadStatus;
1396
1537
  threadType: ChatThreadType;
@@ -1404,8 +1545,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1404
1545
  mergedAt: Date | null;
1405
1546
  };
1406
1547
  entities: {
1407
- userId: string;
1408
1548
  workspaceId: string;
1549
+ userId: string;
1409
1550
  id: string;
1410
1551
  createdAt: Date;
1411
1552
  entityId: string;
@@ -1416,8 +1557,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1416
1557
  sourceEventId: string | null;
1417
1558
  }[] | undefined;
1418
1559
  documents: {
1419
- userId: string;
1420
1560
  workspaceId: string;
1561
+ userId: string;
1421
1562
  id: string;
1422
1563
  createdAt: Date;
1423
1564
  documentId: string;
@@ -1470,7 +1611,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1470
1611
  updatedAt: Date;
1471
1612
  createdAt: Date;
1472
1613
  metadata: unknown;
1473
- projectIds: string[] | null;
1474
1614
  title: string | null;
1475
1615
  status: ChatThreadStatus;
1476
1616
  threadType: ChatThreadType;
@@ -1489,7 +1629,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1489
1629
  updatedAt: Date;
1490
1630
  createdAt: Date;
1491
1631
  metadata: unknown;
1492
- projectIds: string[] | null;
1493
1632
  title: string | null;
1494
1633
  status: ChatThreadStatus;
1495
1634
  threadType: ChatThreadType;
@@ -1508,7 +1647,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1508
1647
  updatedAt: Date;
1509
1648
  createdAt: Date;
1510
1649
  metadata: unknown;
1511
- projectIds: string[] | null;
1512
1650
  title: string | null;
1513
1651
  status: ChatThreadStatus;
1514
1652
  threadType: ChatThreadType;
@@ -1531,8 +1669,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1531
1669
  };
1532
1670
  output: {
1533
1671
  entities: {
1534
- userId: string;
1535
1672
  workspaceId: string;
1673
+ userId: string;
1536
1674
  id: string;
1537
1675
  createdAt: Date;
1538
1676
  entityId: string;
@@ -1543,8 +1681,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1543
1681
  sourceEventId: string | null;
1544
1682
  }[];
1545
1683
  documents: {
1546
- userId: string;
1547
1684
  workspaceId: string;
1685
+ userId: string;
1548
1686
  id: string;
1549
1687
  createdAt: Date;
1550
1688
  documentId: string;
@@ -1567,7 +1705,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1567
1705
  list: import("@trpc/server").TRPCQueryProcedure<{
1568
1706
  input: {
1569
1707
  workspaceId?: string | undefined;
1570
- targetType?: "entity" | "document" | "whiteboard" | "view" | undefined;
1708
+ targetType?: "entity" | "document" | "view" | "whiteboard" | undefined;
1571
1709
  targetId?: string | undefined;
1572
1710
  status?: "pending" | "validated" | "rejected" | "all" | undefined;
1573
1711
  limit?: number | undefined;
@@ -1613,7 +1751,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1613
1751
  }>;
1614
1752
  submit: import("@trpc/server").TRPCMutationProcedure<{
1615
1753
  input: {
1616
- targetType: "entity" | "relation" | "document" | "view" | "workspace";
1754
+ targetType: "workspace" | "entity" | "document" | "view" | "relation";
1617
1755
  changeType: "create" | "update" | "delete";
1618
1756
  data: Record<string, any>;
1619
1757
  targetId?: string | undefined;
@@ -2036,6 +2174,50 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2036
2174
  };
2037
2175
  meta: object;
2038
2176
  }>;
2177
+ listSystemKeys: import("@trpc/server").TRPCQueryProcedure<{
2178
+ input: void;
2179
+ output: {
2180
+ id: string;
2181
+ keyName: string;
2182
+ keyPrefix: string;
2183
+ hubId: string | null;
2184
+ scope: string[];
2185
+ isActive: boolean;
2186
+ expiresAt: Date | null;
2187
+ lastUsedAt: Date | null;
2188
+ usageCount: number;
2189
+ createdAt: Date;
2190
+ user: {
2191
+ id: string;
2192
+ email: string;
2193
+ name: string | null;
2194
+ };
2195
+ }[];
2196
+ meta: object;
2197
+ }>;
2198
+ listWorkspaceKeys: import("@trpc/server").TRPCQueryProcedure<{
2199
+ input: {
2200
+ workspaceId: string;
2201
+ };
2202
+ output: {
2203
+ id: string;
2204
+ keyName: string;
2205
+ keyPrefix: string;
2206
+ hubId: string | null;
2207
+ scope: string[];
2208
+ isActive: boolean;
2209
+ expiresAt: Date | null;
2210
+ lastUsedAt: Date | null;
2211
+ usageCount: number;
2212
+ createdAt: Date;
2213
+ user: {
2214
+ id: string;
2215
+ email: string;
2216
+ name: string | null;
2217
+ };
2218
+ }[];
2219
+ meta: object;
2220
+ }>;
2039
2221
  }>>;
2040
2222
  health: import("@trpc/server").TRPCBuiltRouter<{
2041
2223
  ctx: Context;
@@ -2178,6 +2360,23 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2178
2360
  errorShape: import("@trpc/server").TRPCDefaultErrorShape;
2179
2361
  transformer: true;
2180
2362
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2363
+ create: import("@trpc/server").TRPCMutationProcedure<{
2364
+ input: {
2365
+ title: string;
2366
+ content?: string | undefined;
2367
+ type?: "code" | "text" | "markdown" | "pdf" | "docx" | undefined;
2368
+ projectId?: string | undefined;
2369
+ };
2370
+ output: {
2371
+ status: string;
2372
+ message: string;
2373
+ document: {
2374
+ id: `${string}-${string}-${string}-${string}-${string}`;
2375
+ title: string;
2376
+ };
2377
+ };
2378
+ meta: object;
2379
+ }>;
2181
2380
  upload: import("@trpc/server").TRPCMutationProcedure<{
2182
2381
  input: {
2183
2382
  type: "code" | "text" | "markdown" | "pdf" | "docx";
@@ -2203,7 +2402,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2203
2402
  id: string;
2204
2403
  userId: string;
2205
2404
  workspaceId: string;
2206
- projectIds: string[] | null;
2207
2405
  title: string;
2208
2406
  type: string;
2209
2407
  language: string | null;
@@ -2297,11 +2495,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2297
2495
  output: {
2298
2496
  id: string;
2299
2497
  createdAt: Date;
2300
- type: string;
2301
2498
  documentId: string;
2302
2499
  version: number;
2303
2500
  content: string;
2304
- delta: unknown;
2305
2501
  author: string;
2306
2502
  authorId: string;
2307
2503
  message: string | null;
@@ -2329,7 +2525,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2329
2525
  id: string;
2330
2526
  userId: string;
2331
2527
  workspaceId: string;
2332
- projectIds: string[] | null;
2333
2528
  title: string;
2334
2529
  type: string;
2335
2530
  language: string | null;
@@ -2541,16 +2736,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2541
2736
  offset?: number | undefined;
2542
2737
  };
2543
2738
  output: {
2544
- userId: string;
2545
2739
  workspaceId: string;
2740
+ userId: string;
2546
2741
  id: string;
2547
2742
  data: unknown;
2548
2743
  updatedAt: Date;
2549
- tags: string[] | null;
2550
2744
  createdAt: Date;
2551
2745
  timestamp: Date;
2552
2746
  type: string;
2553
- projectIds: string[] | null;
2554
2747
  title: string;
2555
2748
  preview: string | null;
2556
2749
  status: string | null;
@@ -2560,6 +2753,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2560
2753
  deepLink: string | null;
2561
2754
  snoozedUntil: Date | null;
2562
2755
  priority: string | null;
2756
+ tags: string[] | null;
2563
2757
  processedAt: Date | null;
2564
2758
  }[];
2565
2759
  meta: object;
@@ -2778,18 +2972,17 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2778
2972
  entities: import("@trpc/server").TRPCQueryProcedure<{
2779
2973
  input: {
2780
2974
  query: string;
2781
- type?: "task" | "document" | "note" | "project" | undefined;
2975
+ type?: "task" | "document" | "project" | "note" | undefined;
2782
2976
  limit?: number | undefined;
2783
2977
  };
2784
2978
  output: {
2785
2979
  entities: {
2786
- userId: string;
2787
2980
  workspaceId: string;
2981
+ userId: string;
2788
2982
  id: string;
2789
2983
  updatedAt: Date;
2790
2984
  createdAt: Date;
2791
2985
  type: string;
2792
- projectIds: string[] | null;
2793
2986
  profileId: string | null;
2794
2987
  title: string | null;
2795
2988
  preview: string | null;
@@ -2804,7 +2997,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2804
2997
  semantic: import("@trpc/server").TRPCQueryProcedure<{
2805
2998
  input: {
2806
2999
  query: string;
2807
- type?: "task" | "document" | "note" | "project" | undefined;
3000
+ type?: "task" | "document" | "project" | "note" | undefined;
2808
3001
  limit?: number | undefined;
2809
3002
  threshold?: number | undefined;
2810
3003
  };
@@ -2821,13 +3014,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2821
3014
  };
2822
3015
  output: {
2823
3016
  entities: {
2824
- userId: string;
2825
3017
  workspaceId: string;
3018
+ userId: string;
2826
3019
  id: string;
2827
3020
  updatedAt: Date;
2828
3021
  createdAt: Date;
2829
3022
  type: string;
2830
- projectIds: string[] | null;
2831
3023
  profileId: string | null;
2832
3024
  title: string | null;
2833
3025
  preview: string | null;
@@ -2856,21 +3048,34 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2856
3048
  errorShape: import("@trpc/server").TRPCDefaultErrorShape;
2857
3049
  transformer: true;
2858
3050
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
3051
+ listTypes: import("@trpc/server").TRPCQueryProcedure<{
3052
+ input: void;
3053
+ output: {
3054
+ types: {
3055
+ label: string;
3056
+ description: string;
3057
+ directionality: "unidirectional" | "bidirectional";
3058
+ category: "workflow" | "social" | "reference" | "hierarchy";
3059
+ type: string;
3060
+ }[];
3061
+ };
3062
+ meta: object;
3063
+ }>;
2859
3064
  get: import("@trpc/server").TRPCQueryProcedure<{
2860
3065
  input: {
2861
3066
  entityId: string;
2862
- type?: "created_by" | "depends_on" | "assigned_to" | "mentions" | "links_to" | "parent_of" | "relates_to" | "tagged_with" | "attended_by" | "blocks" | undefined;
3067
+ type?: "created_by" | "depends_on" | "assigned_to" | "mentions" | "links_to" | "parent_of" | "relates_to" | "tagged_with" | "attended_by" | "blocks" | "belongs_to_project" | "embedded_in" | "visualized_in" | "references" | undefined;
2863
3068
  direction?: "source" | "target" | "both" | undefined;
2864
3069
  limit?: number | undefined;
2865
3070
  };
2866
3071
  output: {
2867
3072
  relations: {
2868
- userId: string;
2869
3073
  workspaceId: string;
3074
+ userId: string;
2870
3075
  id: string;
2871
3076
  createdAt: Date;
2872
3077
  type: string;
2873
- projectIds: string[] | null;
3078
+ metadata: unknown;
2874
3079
  sourceEntityId: string;
2875
3080
  targetEntityId: string;
2876
3081
  }[];
@@ -2880,19 +3085,18 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2880
3085
  getRelated: import("@trpc/server").TRPCQueryProcedure<{
2881
3086
  input: {
2882
3087
  entityId: string;
2883
- type?: "created_by" | "depends_on" | "assigned_to" | "mentions" | "links_to" | "parent_of" | "relates_to" | "tagged_with" | "attended_by" | "blocks" | undefined;
3088
+ type?: "created_by" | "depends_on" | "assigned_to" | "mentions" | "links_to" | "parent_of" | "relates_to" | "tagged_with" | "attended_by" | "blocks" | "belongs_to_project" | "embedded_in" | "visualized_in" | "references" | undefined;
2884
3089
  direction?: "source" | "target" | "both" | undefined;
2885
3090
  limit?: number | undefined;
2886
3091
  };
2887
3092
  output: {
2888
3093
  entities: {
2889
- userId: string;
2890
3094
  workspaceId: string;
3095
+ userId: string;
2891
3096
  id: string;
2892
3097
  updatedAt: Date;
2893
3098
  createdAt: Date;
2894
3099
  type: string;
2895
- projectIds: string[] | null;
2896
3100
  profileId: string | null;
2897
3101
  title: string | null;
2898
3102
  preview: string | null;
@@ -2920,7 +3124,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2920
3124
  input: {
2921
3125
  sourceEntityId: string;
2922
3126
  targetEntityId: string;
2923
- type: "created_by" | "depends_on" | "assigned_to" | "mentions" | "links_to" | "parent_of" | "relates_to" | "tagged_with" | "attended_by" | "blocks";
3127
+ type: "created_by" | "depends_on" | "assigned_to" | "mentions" | "links_to" | "parent_of" | "relates_to" | "tagged_with" | "attended_by" | "blocks" | "belongs_to_project" | "embedded_in" | "visualized_in" | "references";
3128
+ workspaceId: string;
2924
3129
  metadata?: Record<string, any> | undefined;
2925
3130
  };
2926
3131
  output: {
@@ -2956,13 +3161,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2956
3161
  };
2957
3162
  output: {
2958
3163
  entity: {
2959
- userId: string;
2960
3164
  workspaceId: string;
3165
+ userId: string;
2961
3166
  id: string;
2962
3167
  updatedAt: Date;
2963
3168
  createdAt: Date;
2964
3169
  type: string;
2965
- projectIds: string[] | null;
2966
3170
  profileId: string | null;
2967
3171
  title: string | null;
2968
3172
  preview: string | null;
@@ -2976,13 +3180,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2976
3180
  stats: null;
2977
3181
  } | {
2978
3182
  entity: {
2979
- userId: string;
2980
3183
  workspaceId: string;
3184
+ userId: string;
2981
3185
  id: string;
2982
3186
  updatedAt: Date;
2983
3187
  createdAt: Date;
2984
3188
  type: string;
2985
- projectIds: string[] | null;
2986
3189
  profileId: string | null;
2987
3190
  title: string | null;
2988
3191
  preview: string | null;
@@ -2992,12 +3195,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2992
3195
  deletedAt: Date | null;
2993
3196
  };
2994
3197
  relations: {
2995
- userId: string;
2996
3198
  workspaceId: string;
3199
+ userId: string;
2997
3200
  id: string;
2998
3201
  createdAt: Date;
2999
3202
  type: string;
3000
- projectIds: string[] | null;
3203
+ metadata: unknown;
3001
3204
  sourceEntityId: string;
3002
3205
  targetEntityId: string;
3003
3206
  }[];
@@ -3019,13 +3222,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3019
3222
  };
3020
3223
  output: {
3021
3224
  entities: {
3022
- userId: string;
3023
3225
  workspaceId: string;
3226
+ userId: string;
3024
3227
  id: string;
3025
3228
  updatedAt: Date;
3026
3229
  createdAt: Date;
3027
3230
  type: string;
3028
- projectIds: string[] | null;
3029
3231
  profileId: string | null;
3030
3232
  title: string | null;
3031
3233
  preview: string | null;
@@ -3035,12 +3237,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3035
3237
  deletedAt: Date | null;
3036
3238
  }[];
3037
3239
  relations: {
3038
- userId: string;
3039
3240
  workspaceId: string;
3241
+ userId: string;
3040
3242
  id: string;
3041
3243
  createdAt: Date;
3042
3244
  type: string;
3043
- projectIds: string[] | null;
3245
+ metadata: unknown;
3044
3246
  sourceEntityId: string;
3045
3247
  targetEntityId: string;
3046
3248
  }[];
@@ -3175,12 +3377,25 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3175
3377
  workspaceId: string;
3176
3378
  };
3177
3379
  output: {
3178
- userId: string;
3179
3380
  workspaceId: string;
3381
+ userId: string;
3180
3382
  id: string;
3181
3383
  role: string;
3182
3384
  joinedAt: Date;
3183
3385
  invitedBy: string | null;
3386
+ user: {
3387
+ email: string;
3388
+ name: string | null;
3389
+ id: string;
3390
+ updatedAt: Date;
3391
+ emailVerified: boolean;
3392
+ avatarUrl: string | null;
3393
+ timezone: string;
3394
+ locale: string;
3395
+ kratosIdentityId: string;
3396
+ lastSyncedAt: Date | null;
3397
+ createdAt: Date;
3398
+ };
3184
3399
  }[];
3185
3400
  meta: object;
3186
3401
  }>;
@@ -3199,7 +3414,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3199
3414
  input: {
3200
3415
  workspaceId: string;
3201
3416
  userId: string;
3202
- role: "editor" | "viewer" | "admin";
3417
+ role: "admin" | "editor" | "viewer";
3203
3418
  };
3204
3419
  output: {
3205
3420
  status: string;
@@ -3211,7 +3426,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3211
3426
  input: {
3212
3427
  workspaceId: string;
3213
3428
  email: string;
3214
- role: "editor" | "viewer" | "admin";
3429
+ role: "admin" | "editor" | "viewer";
3215
3430
  };
3216
3431
  output: {
3217
3432
  email: string;
@@ -3271,9 +3486,21 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3271
3486
  create: import("@trpc/server").TRPCMutationProcedure<{
3272
3487
  input: {
3273
3488
  name: string;
3274
- type: "calendar" | "list" | "table" | "whiteboard" | "graph" | "timeline" | "kanban" | "grid" | "gallery" | "gantt" | "mindmap";
3489
+ type: "calendar" | "list" | "table" | "whiteboard" | "graph" | "grid" | "timeline" | "kanban" | "gallery" | "gantt" | "mindmap" | "bento";
3275
3490
  workspaceId?: string | undefined;
3276
3491
  description?: string | undefined;
3492
+ scopeProfileIds?: string[] | undefined;
3493
+ scopeMode?: "explicit" | "observed" | undefined;
3494
+ query?: {
3495
+ filters?: any[] | undefined;
3496
+ sorts?: any[] | undefined;
3497
+ search?: string | undefined;
3498
+ limit?: number | undefined;
3499
+ offset?: number | undefined;
3500
+ groupBy?: string | undefined;
3501
+ } | undefined;
3502
+ config?: Record<string, any> | undefined;
3503
+ embeddedViewIds?: string[] | undefined;
3277
3504
  initialContent?: any;
3278
3505
  };
3279
3506
  output: {
@@ -3281,7 +3508,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3281
3508
  id: `${string}-${string}-${string}-${string}-${string}`;
3282
3509
  workspaceId: string | undefined;
3283
3510
  userId: string;
3284
- type: "calendar" | "list" | "table" | "whiteboard" | "graph" | "timeline" | "kanban" | "grid" | "gallery" | "gantt" | "mindmap";
3511
+ type: "calendar" | "list" | "table" | "whiteboard" | "graph" | "grid" | "timeline" | "kanban" | "gallery" | "gantt" | "mindmap" | "bento";
3285
3512
  category: ViewCategory;
3286
3513
  name: string;
3287
3514
  description: string | undefined;
@@ -3301,27 +3528,33 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3301
3528
  list: import("@trpc/server").TRPCQueryProcedure<{
3302
3529
  input: {
3303
3530
  workspaceId?: string | undefined;
3304
- type?: "calendar" | "list" | "table" | "whiteboard" | "all" | "graph" | "timeline" | "kanban" | "grid" | "gallery" | "gantt" | "mindmap" | undefined;
3531
+ type?: "calendar" | "list" | "table" | "whiteboard" | "all" | "graph" | "grid" | "timeline" | "kanban" | "gallery" | "gantt" | "mindmap" | undefined;
3305
3532
  };
3306
3533
  output: {
3307
3534
  name: string;
3308
- userId: string;
3309
3535
  workspaceId: string | null;
3536
+ userId: string;
3310
3537
  id: string;
3538
+ query: unknown;
3311
3539
  columns: unknown;
3312
3540
  updatedAt: Date;
3313
3541
  createdAt: Date;
3314
3542
  type: string;
3315
3543
  metadata: unknown;
3316
- projectIds: string[] | null;
3317
3544
  documentId: string | null;
3318
3545
  description: string | null;
3319
3546
  category: string;
3547
+ scopeProfileIds: string[] | null;
3548
+ scopeMode: string | null;
3549
+ config: unknown;
3320
3550
  filter: unknown;
3321
3551
  sort: unknown;
3322
3552
  layoutConfig: unknown;
3323
3553
  yjsRoomId: string | null;
3324
3554
  thumbnailUrl: string | null;
3555
+ schemaSnapshot: unknown;
3556
+ snapshotUpdatedAt: Date | null;
3557
+ embeddedViewIds: string[] | null;
3325
3558
  }[];
3326
3559
  meta: object;
3327
3560
  }>;
@@ -3332,23 +3565,29 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3332
3565
  output: {
3333
3566
  view: {
3334
3567
  name: string;
3335
- userId: string;
3336
3568
  workspaceId: string | null;
3569
+ userId: string;
3337
3570
  id: string;
3571
+ query: unknown;
3338
3572
  columns: unknown;
3339
3573
  updatedAt: Date;
3340
3574
  createdAt: Date;
3341
3575
  type: string;
3342
3576
  metadata: unknown;
3343
- projectIds: string[] | null;
3344
3577
  documentId: string | null;
3345
3578
  description: string | null;
3346
3579
  category: string;
3580
+ scopeProfileIds: string[] | null;
3581
+ scopeMode: string | null;
3582
+ config: unknown;
3347
3583
  filter: unknown;
3348
3584
  sort: unknown;
3349
3585
  layoutConfig: unknown;
3350
3586
  yjsRoomId: string | null;
3351
3587
  thumbnailUrl: string | null;
3588
+ schemaSnapshot: unknown;
3589
+ snapshotUpdatedAt: Date | null;
3590
+ embeddedViewIds: string[] | null;
3352
3591
  };
3353
3592
  content: {};
3354
3593
  };
@@ -3361,80 +3600,69 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3361
3600
  output: {
3362
3601
  view: {
3363
3602
  name: string;
3364
- userId: string;
3365
3603
  workspaceId: string | null;
3604
+ userId: string;
3366
3605
  id: string;
3606
+ query: unknown;
3367
3607
  columns: unknown;
3368
3608
  updatedAt: Date;
3369
3609
  createdAt: Date;
3370
3610
  type: string;
3371
3611
  metadata: unknown;
3372
- projectIds: string[] | null;
3373
3612
  documentId: string | null;
3374
3613
  description: string | null;
3375
3614
  category: string;
3615
+ scopeProfileIds: string[] | null;
3616
+ scopeMode: string | null;
3617
+ config: unknown;
3376
3618
  filter: unknown;
3377
3619
  sort: unknown;
3378
3620
  layoutConfig: unknown;
3379
3621
  yjsRoomId: string | null;
3380
3622
  thumbnailUrl: string | null;
3623
+ schemaSnapshot: unknown;
3624
+ snapshotUpdatedAt: Date | null;
3625
+ embeddedViewIds: string[] | null;
3381
3626
  };
3382
3627
  content: {};
3383
3628
  entities: never[];
3384
3629
  relations: never[];
3630
+ query?: undefined;
3385
3631
  config?: undefined;
3632
+ columns?: undefined;
3386
3633
  } | {
3387
3634
  view: {
3388
3635
  name: string;
3389
- userId: string;
3390
3636
  workspaceId: string | null;
3391
- id: string;
3392
- columns: unknown;
3393
- updatedAt: Date;
3394
- createdAt: Date;
3395
- type: string;
3396
- metadata: unknown;
3397
- projectIds: string[] | null;
3398
- documentId: string | null;
3399
- description: string | null;
3400
- category: string;
3401
- filter: unknown;
3402
- sort: unknown;
3403
- layoutConfig: unknown;
3404
- yjsRoomId: string | null;
3405
- thumbnailUrl: string | null;
3406
- };
3407
- config: StructuredViewConfig | undefined;
3408
- entities: never[];
3409
- relations: never[];
3410
- content?: undefined;
3411
- } | {
3412
- view: {
3413
- name: string;
3414
3637
  userId: string;
3415
- workspaceId: string | null;
3416
3638
  id: string;
3639
+ query: unknown;
3417
3640
  columns: unknown;
3418
3641
  updatedAt: Date;
3419
3642
  createdAt: Date;
3420
3643
  type: string;
3421
3644
  metadata: unknown;
3422
- projectIds: string[] | null;
3423
3645
  documentId: string | null;
3424
3646
  description: string | null;
3425
3647
  category: string;
3648
+ scopeProfileIds: string[] | null;
3649
+ scopeMode: string | null;
3650
+ config: unknown;
3426
3651
  filter: unknown;
3427
3652
  sort: unknown;
3428
3653
  layoutConfig: unknown;
3429
3654
  yjsRoomId: string | null;
3430
3655
  thumbnailUrl: string | null;
3656
+ schemaSnapshot: unknown;
3657
+ snapshotUpdatedAt: Date | null;
3658
+ embeddedViewIds: string[] | null;
3431
3659
  };
3432
- config: StructuredViewConfig;
3660
+ query: EntityQuery;
3661
+ config: {};
3433
3662
  entities: {
3434
3663
  id: string;
3435
3664
  userId: string;
3436
3665
  workspaceId: string;
3437
- projectIds: string[] | null;
3438
3666
  profileId: string | null;
3439
3667
  type: string;
3440
3668
  title: string | null;
@@ -3450,12 +3678,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3450
3678
  id: string;
3451
3679
  userId: string;
3452
3680
  workspaceId: string;
3453
- projectIds: string[] | null;
3454
3681
  sourceEntityId: string;
3455
3682
  targetEntityId: string;
3456
3683
  type: string;
3684
+ metadata: unknown;
3457
3685
  createdAt: Date;
3458
3686
  }[];
3687
+ columns: ViewColumn[];
3459
3688
  content?: undefined;
3460
3689
  };
3461
3690
  meta: object;
@@ -3476,6 +3705,21 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3476
3705
  id: string;
3477
3706
  name?: string | undefined;
3478
3707
  description?: string | undefined;
3708
+ scopeProfileIds?: string[] | undefined;
3709
+ scopeMode?: "explicit" | "observed" | undefined;
3710
+ query?: {
3711
+ filters?: any[] | undefined;
3712
+ sorts?: any[] | undefined;
3713
+ search?: string | undefined;
3714
+ limit?: number | undefined;
3715
+ offset?: number | undefined;
3716
+ groupBy?: string | undefined;
3717
+ } | undefined;
3718
+ config?: Record<string, any> | undefined;
3719
+ embeddedViewIds?: string[] | undefined;
3720
+ schemaSnapshot?: Record<string, any> | undefined;
3721
+ snapshotUpdatedAt?: Date | undefined;
3722
+ type?: "calendar" | "list" | "table" | "whiteboard" | "graph" | "grid" | "timeline" | "kanban" | "gallery" | "gantt" | "mindmap" | "bento" | undefined;
3479
3723
  };
3480
3724
  output: {
3481
3725
  status: string;
@@ -3506,6 +3750,15 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3506
3750
  };
3507
3751
  meta: object;
3508
3752
  }>;
3753
+ getAvailableColumns: import("@trpc/server").TRPCQueryProcedure<{
3754
+ input: {
3755
+ id: string;
3756
+ };
3757
+ output: {
3758
+ columns: ViewColumn[];
3759
+ };
3760
+ meta: object;
3761
+ }>;
3509
3762
  }>>;
3510
3763
  preferences: import("@trpc/server").TRPCBuiltRouter<{
3511
3764
  ctx: Context;
@@ -3557,7 +3810,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3557
3810
  compactMode?: boolean | undefined;
3558
3811
  fontSize?: string | undefined;
3559
3812
  animations?: boolean | undefined;
3560
- defaultView?: "list" | "timeline" | "grid" | undefined;
3813
+ defaultView?: "list" | "grid" | "timeline" | undefined;
3561
3814
  } | undefined;
3562
3815
  graphPreferences?: {
3563
3816
  forceSettings?: {
@@ -3764,6 +4017,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3764
4017
  resourceType: "entity" | "document" | "view";
3765
4018
  resourceId: string;
3766
4019
  expiresInDays?: number | undefined;
4020
+ access?: "workspace_only" | "anyone_with_link" | undefined;
4021
+ password?: string | undefined;
3767
4022
  };
3768
4023
  output: {
3769
4024
  status: string;
@@ -3796,16 +4051,16 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3796
4051
  getPublic: import("@trpc/server").TRPCQueryProcedure<{
3797
4052
  input: {
3798
4053
  token: string;
4054
+ password?: string | undefined;
3799
4055
  };
3800
4056
  output: {
3801
4057
  resource: {
3802
- userId: string;
3803
4058
  workspaceId: string;
4059
+ userId: string;
3804
4060
  id: string;
3805
4061
  updatedAt: Date;
3806
4062
  createdAt: Date;
3807
4063
  type: string;
3808
- projectIds: string[] | null;
3809
4064
  profileId: string | null;
3810
4065
  title: string | null;
3811
4066
  preview: string | null;
@@ -3815,29 +4070,64 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3815
4070
  deletedAt: Date | null;
3816
4071
  } | {
3817
4072
  name: string;
3818
- userId: string;
3819
4073
  workspaceId: string | null;
4074
+ userId: string;
3820
4075
  id: string;
4076
+ query: unknown;
3821
4077
  columns: unknown;
3822
4078
  updatedAt: Date;
3823
4079
  createdAt: Date;
3824
4080
  type: string;
3825
4081
  metadata: unknown;
3826
- projectIds: string[] | null;
3827
4082
  documentId: string | null;
3828
4083
  description: string | null;
3829
4084
  category: string;
4085
+ scopeProfileIds: string[] | null;
4086
+ scopeMode: string | null;
4087
+ config: unknown;
3830
4088
  filter: unknown;
3831
4089
  sort: unknown;
3832
4090
  layoutConfig: unknown;
3833
4091
  yjsRoomId: string | null;
3834
4092
  thumbnailUrl: string | null;
4093
+ schemaSnapshot: unknown;
4094
+ snapshotUpdatedAt: Date | null;
4095
+ embeddedViewIds: string[] | null;
3835
4096
  document: never;
3836
4097
  };
4098
+ resourceType: string;
3837
4099
  permissions: unknown;
3838
4100
  };
3839
4101
  meta: object;
3840
4102
  }>;
4103
+ listByWorkspace: import("@trpc/server").TRPCQueryProcedure<{
4104
+ input: {
4105
+ workspaceId: string;
4106
+ };
4107
+ output: {
4108
+ shares: {
4109
+ id: string;
4110
+ updatedAt: Date;
4111
+ createdAt: Date;
4112
+ expiresAt: Date | null;
4113
+ createdBy: string;
4114
+ revokedAt: Date | null;
4115
+ permissions: unknown;
4116
+ resourceType: string;
4117
+ resourceId: string;
4118
+ visibility: string;
4119
+ publicToken: string | null;
4120
+ tokenHash: string | null;
4121
+ passwordHash: string | null;
4122
+ access: string | null;
4123
+ invitedUsers: string[] | null;
4124
+ viewCount: number | null;
4125
+ lastAccessedAt: Date | null;
4126
+ }[];
4127
+ resourceLabels: Record<string, string>;
4128
+ };
4129
+ meta: object;
4130
+ }>;
3841
4131
  list: import("@trpc/server").TRPCQueryProcedure<{
3842
4132
  input: {
3843
4133
  resourceType: "entity" | "document" | "view";
@@ -3851,11 +4141,15 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3851
4141
  createdAt: Date;
3852
4142
  expiresAt: Date | null;
3853
4143
  createdBy: string;
4144
+ revokedAt: Date | null;
3854
4145
  permissions: unknown;
3855
4146
  resourceType: string;
3856
4147
  resourceId: string;
3857
4148
  visibility: string;
3858
4149
  publicToken: string | null;
4150
+ tokenHash: string | null;
4151
+ passwordHash: string | null;
4152
+ access: string | null;
3859
4153
  invitedUsers: string[] | null;
3860
4154
  viewCount: number | null;
3861
4155
  lastAccessedAt: Date | null;
@@ -3871,6 +4165,27 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3871
4165
  };
3872
4166
  meta: object;
3873
4167
  }>;
4168
+ extendShareLink: import("@trpc/server").TRPCMutationProcedure<{
4169
+ input: {
4170
+ shareId: string;
4171
+ expiresInDays: number;
4172
+ };
4173
+ output: {
4174
+ status: string;
4175
+ expiresAt: Date;
4176
+ };
4177
+ meta: object;
4178
+ }>;
4179
+ rotateShareLinkToken: import("@trpc/server").TRPCMutationProcedure<{
4180
+ input: {
4181
+ shareId: string;
4182
+ };
4183
+ output: {
4184
+ status: string;
4185
+ url: string;
4186
+ };
4187
+ meta: object;
4188
+ }>;
3874
4189
  }>>;
3875
4190
  templates: import("@trpc/server").TRPCBuiltRouter<{
3876
4191
  ctx: Context;
@@ -3880,7 +4195,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3880
4195
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
3881
4196
  list: import("@trpc/server").TRPCQueryProcedure<{
3882
4197
  input: {
3883
- targetType?: "entity" | "document" | "project" | "inbox_item" | undefined;
4198
+ targetType?: "entity" | "inbox_item" | "document" | "project" | undefined;
3884
4199
  entityType?: string | undefined;
3885
4200
  inboxItemType?: string | undefined;
3886
4201
  workspaceId?: string | undefined;
@@ -3892,7 +4207,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3892
4207
  description: string | null;
3893
4208
  userId: string | null;
3894
4209
  workspaceId: string | null;
3895
- projectIds: string[] | null;
3896
4210
  targetType: string;
3897
4211
  entityType: string | null;
3898
4212
  inboxItemType: string | null;
@@ -3908,7 +4222,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3908
4222
  }>;
3909
4223
  getDefault: import("@trpc/server").TRPCQueryProcedure<{
3910
4224
  input: {
3911
- targetType: "entity" | "document" | "project" | "inbox_item";
4225
+ targetType: "entity" | "inbox_item" | "document" | "project";
3912
4226
  entityType?: string | undefined;
3913
4227
  inboxItemType?: string | undefined;
3914
4228
  workspaceId?: string | undefined;
@@ -3919,7 +4233,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3919
4233
  create: import("@trpc/server").TRPCMutationProcedure<{
3920
4234
  input: {
3921
4235
  name: string;
3922
- targetType: "entity" | "document" | "project" | "inbox_item";
4236
+ targetType: "entity" | "inbox_item" | "document" | "project";
3923
4237
  config: {
3924
4238
  layout?: {
3925
4239
  structure: {
@@ -4153,18 +4467,17 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4153
4467
  };
4154
4468
  output: {
4155
4469
  name: string;
4156
- userId: string | null;
4157
4470
  workspaceId: string | null;
4471
+ userId: string | null;
4158
4472
  id: string;
4159
4473
  updatedAt: Date;
4160
4474
  createdAt: Date;
4161
- projectIds: string[] | null;
4162
4475
  version: number;
4163
4476
  entityType: string | null;
4164
4477
  description: string | null;
4478
+ config: unknown;
4165
4479
  targetType: string;
4166
4480
  inboxItemType: string | null;
4167
- config: unknown;
4168
4481
  schema: unknown;
4169
4482
  isDefault: boolean;
4170
4483
  isPublic: boolean;
@@ -4207,15 +4520,17 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4207
4520
  versions: {
4208
4521
  id: string;
4209
4522
  createdAt: Date;
4210
- type: string;
4211
4523
  documentId: string;
4212
4524
  version: number;
4213
4525
  content: string;
4214
- delta: unknown;
4215
4526
  author: string;
4216
4527
  authorId: string;
4217
4528
  message: string | null;
4218
4529
  }[];
4530
+ latest: {
4531
+ currentVersion: number;
4532
+ lastSavedVersion: number;
4533
+ };
4219
4534
  };
4220
4535
  meta: object;
4221
4536
  }>;
@@ -4238,11 +4553,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4238
4553
  version: {
4239
4554
  id: string;
4240
4555
  createdAt: Date;
4241
- type: string;
4242
4556
  documentId: string;
4243
4557
  version: number;
4244
4558
  content: string;
4245
- delta: unknown;
4246
4559
  author: string;
4247
4560
  authorId: string;
4248
4561
  message: string | null;
@@ -4431,8 +4744,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4431
4744
  metadata?: Record<string, unknown> | undefined;
4432
4745
  };
4433
4746
  output: {
4434
- userId: string;
4435
4747
  workspaceId: string;
4748
+ userId: string;
4436
4749
  id: string;
4437
4750
  createdAt: Date;
4438
4751
  metadata: unknown;
@@ -4458,8 +4771,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4458
4771
  messageId: string;
4459
4772
  };
4460
4773
  output: {
4461
- userId: string;
4462
4774
  workspaceId: string;
4775
+ userId: string;
4463
4776
  id: string;
4464
4777
  createdAt: Date;
4465
4778
  metadata: unknown;
@@ -4477,8 +4790,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4477
4790
  targetId: string;
4478
4791
  };
4479
4792
  output: {
4480
- userId: string;
4481
4793
  workspaceId: string;
4794
+ userId: string;
4482
4795
  id: string;
4483
4796
  createdAt: Date;
4484
4797
  metadata: unknown;
@@ -4495,8 +4808,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4495
4808
  proposalId: string;
4496
4809
  };
4497
4810
  output: {
4498
- userId: string;
4499
4811
  workspaceId: string;
4812
+ userId: string;
4500
4813
  id: string;
4501
4814
  createdAt: Date;
4502
4815
  metadata: unknown;
@@ -4516,8 +4829,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4516
4829
  relationshipType?: MessageLinkRelationshipType | undefined;
4517
4830
  };
4518
4831
  output: {
4519
- userId: string;
4520
4832
  workspaceId: string;
4833
+ userId: string;
4521
4834
  id: string;
4522
4835
  createdAt: Date;
4523
4836
  metadata: unknown;
@@ -4529,6 +4842,20 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4529
4842
  }[];
4530
4843
  meta: object;
4531
4844
  }>;
4845
+ listLinkedMessages: import("@trpc/server").TRPCQueryProcedure<{
4846
+ input: {
4847
+ targetType: MessageLinkTargetType;
4848
+ targetId: string;
4849
+ limit?: number | undefined;
4850
+ cursor?: string | undefined;
4851
+ };
4852
+ output: {
4853
+ items: LinkedMessageItem[];
4854
+ nextCursor: string | undefined;
4855
+ hasMore: boolean;
4856
+ };
4857
+ meta: object;
4858
+ }>;
4532
4859
  }>>;
4533
4860
  profiles: import("@trpc/server").TRPCBuiltRouter<{
4534
4861
  ctx: Context;
@@ -4540,8 +4867,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4540
4867
  input: void;
4541
4868
  output: {
4542
4869
  profiles: {
4543
- userId: string | null;
4544
4870
  workspaceId: string | null;
4871
+ userId: string | null;
4545
4872
  id: string;
4546
4873
  updatedAt: Date;
4547
4874
  createdAt: Date;
@@ -4562,8 +4889,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4562
4889
  };
4563
4890
  output: {
4564
4891
  profile: {
4565
- userId: string | null;
4566
4892
  workspaceId: string | null;
4893
+ userId: string | null;
4567
4894
  id: string;
4568
4895
  updatedAt: Date;
4569
4896
  createdAt: Date;
@@ -4585,12 +4912,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4585
4912
  displayName: string;
4586
4913
  parentProfileId?: string | undefined;
4587
4914
  uiHints?: Record<string, unknown> | undefined;
4588
- scope?: "user" | "system" | "workspace" | undefined;
4915
+ scope?: "workspace" | "user" | "system" | undefined;
4589
4916
  };
4590
4917
  output: {
4591
4918
  profile: {
4592
- userId: string | null;
4593
4919
  workspaceId: string | null;
4920
+ userId: string | null;
4594
4921
  id: string;
4595
4922
  updatedAt: Date;
4596
4923
  createdAt: Date;
@@ -4614,8 +4941,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4614
4941
  };
4615
4942
  output: {
4616
4943
  profile: {
4617
- userId: string | null;
4618
4944
  workspaceId: string | null;
4945
+ userId: string | null;
4619
4946
  id: string;
4620
4947
  updatedAt: Date;
4621
4948
  createdAt: Date;
@@ -4654,8 +4981,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4654
4981
  };
4655
4982
  output: {
4656
4983
  hierarchy: {
4657
- userId: string | null;
4658
4984
  workspaceId: string | null;
4985
+ userId: string | null;
4659
4986
  id: string;
4660
4987
  updatedAt: Date;
4661
4988
  createdAt: Date;