@synap-core/api-types 1.5.0 → 1.6.1

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.
@@ -2,23 +2,8 @@
2
2
 
3
3
  import { Column, SQL } from 'drizzle-orm';
4
4
 
5
- /**
6
- * Context Types
7
- *
8
- * Proper type definitions for tRPC context to avoid `any` types.
9
- */
10
- /**
11
- * Database client type
12
- *
13
- * Note: Using `any` here to preserve Drizzle's schema inference.
14
- * Attempting to use PostgresJsDatabase<any> loses the schema generic
15
- * and breaks db.query.tableName access patterns.
16
- */
17
- export type DatabaseClient = any;
18
- /**
19
- * Ory Kratos identity
20
- */
21
- export interface KratosIdentity {
5
+ type DatabaseClient = any;
6
+ interface KratosIdentity {
22
7
  id: string;
23
8
  traits: {
24
9
  email: string;
@@ -26,27 +11,18 @@ export interface KratosIdentity {
26
11
  [key: string]: unknown;
27
12
  };
28
13
  }
29
- /**
30
- * Ory Kratos session
31
- */
32
- export interface KratosSession {
14
+ interface KratosSession {
33
15
  identity: KratosIdentity;
34
16
  active: boolean;
35
17
  expires_at?: string;
36
18
  authenticated_at?: string;
37
19
  }
38
- /**
39
- * User object (simplified from Kratos identity)
40
- */
41
- export interface User {
20
+ interface User {
42
21
  id: string;
43
22
  email: string;
44
23
  name?: string;
45
24
  }
46
- /**
47
- * Full tRPC context
48
- */
49
- export interface Context {
25
+ interface Context {
50
26
  db: DatabaseClient;
51
27
  authenticated: boolean;
52
28
  userId?: string | null;
@@ -57,15 +33,7 @@ export interface Context {
57
33
  workspaceId?: string | null;
58
34
  workspaceRole?: string | null;
59
35
  }
60
- /**
61
- * Users Table - Cache for Kratos Identity Data
62
- *
63
- * Purpose: Store Kratos identity data in Synap DB for performance
64
- * - Allows JOINs without calling Kratos API
65
- * - Can add Synap-specific fields (avatar, timezone)
66
- * - Kratos remains source of truth for authentication
67
- */
68
- export interface AgentMetadata {
36
+ interface AgentMetadata {
69
37
  agentType: string;
70
38
  description?: string;
71
39
  createdByUserId: string;
@@ -419,7 +387,7 @@ declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColumns<{
419
387
  };
420
388
  dialect: "pg";
421
389
  }>;
422
- export type ChatThread = typeof chatThreads.$inferSelect;
390
+ type ChatThread = typeof chatThreads.$inferSelect;
423
391
  declare enum ThreadEntityRelationshipType {
424
392
  USED_AS_CONTEXT = "used_as_context",
425
393
  CREATED = "created",
@@ -444,33 +412,25 @@ declare enum ThreadDocumentConflictStatus {
444
412
  PENDING = "pending",
445
413
  RESOLVED = "resolved"
446
414
  }
447
- export interface DerivedInput {
415
+ interface DerivedInput {
448
416
  name: string;
449
417
  label?: string;
450
418
  type?: string;
451
419
  options?: string[];
452
420
  default?: string;
453
421
  }
454
- export interface InputOverride {
422
+ interface InputOverride {
455
423
  label?: string;
456
424
  default?: string;
457
425
  options?: string[];
458
426
  }
459
- /**
460
- * Workspaces Schema - Multi-user workspace support
461
- *
462
- * A workspace can be:
463
- * - Personal (single user)
464
- * - Team (multiple users with roles)
465
- * - Enterprise (advanced features)
466
- */
467
- export interface WorkspaceLayoutConfig {
427
+ interface WorkspaceLayoutConfig {
468
428
  pinnedApps?: string[];
469
429
  sidebarApps?: string[];
470
430
  defaultView?: string;
471
431
  theme?: string;
472
432
  }
473
- export interface WorkspaceSettings {
433
+ interface WorkspaceSettings {
474
434
  defaultEntityTypes?: string[];
475
435
  theme?: string;
476
436
  aiEnabled?: boolean;
@@ -711,7 +671,7 @@ declare const messageLinks: import("drizzle-orm/pg-core").PgTableWithColumns<{
711
671
  };
712
672
  dialect: "pg";
713
673
  }>;
714
- export type MessageLink = typeof messageLinks.$inferSelect;
674
+ type MessageLink = typeof messageLinks.$inferSelect;
715
675
  declare enum PropertyValueType {
716
676
  STRING = "string",
717
677
  NUMBER = "number",
@@ -860,19 +820,13 @@ declare const propertyDefs: import("drizzle-orm/pg-core").PgTableWithColumns<{
860
820
  };
861
821
  dialect: "pg";
862
822
  }>;
863
- export type PropertyDef = typeof propertyDefs.$inferSelect;
823
+ type PropertyDef = typeof propertyDefs.$inferSelect;
864
824
  declare enum ProfileScope {
865
825
  SYSTEM = "system",// Available to all users
866
826
  WORKSPACE = "workspace",// Shared within workspace
867
827
  USER = "user"
868
828
  }
869
- /**
870
- * EventRecord - Database representation of an event
871
- *
872
- * This is the format returned from the database.
873
- * It maps directly to the events table structure.
874
- */
875
- export interface EventRecord {
829
+ interface EventRecord {
876
830
  id: string;
877
831
  timestamp: Date;
878
832
  subjectId: string;
@@ -886,8 +840,7 @@ export interface EventRecord {
886
840
  correlationId?: string;
887
841
  source: string;
888
842
  }
889
- /** Minimal message fields for list/preview */
890
- export interface LinkedMessagePreview {
843
+ interface LinkedMessagePreview {
891
844
  id: string;
892
845
  threadId: string;
893
846
  role: string;
@@ -895,19 +848,16 @@ export interface LinkedMessagePreview {
895
848
  timestamp: Date;
896
849
  userId: string;
897
850
  }
898
- export interface LinkedMessageItem {
851
+ interface LinkedMessageItem {
899
852
  link: MessageLink;
900
853
  message: LinkedMessagePreview;
901
854
  }
902
- export interface EffectiveProperty extends PropertyDef {
855
+ interface EffectiveProperty extends PropertyDef {
903
856
  required: boolean;
904
857
  defaultValue: unknown;
905
858
  displayOrder: number;
906
859
  }
907
- /**
908
- * Column definition for views
909
- */
910
- export interface ViewColumn {
860
+ interface ViewColumn {
911
861
  id: string;
912
862
  field: string;
913
863
  title?: string;
@@ -916,38 +866,17 @@ export interface ViewColumn {
916
866
  visible?: boolean;
917
867
  width?: number;
918
868
  }
919
- /**
920
- * View Query Types
921
- *
922
- * Single source of truth for all view query and filter types.
923
- */
924
- /**
925
- * Filter operator types
926
- */
927
- export type FilterOperator = "equals" | "not_equals" | "contains" | "not_contains" | "in" | "not_in" | "is_empty" | "is_not_empty" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal";
928
- /**
929
- * Filter definition for entity queries
930
- */
931
- export interface EntityFilter {
869
+ type FilterOperator = "equals" | "not_equals" | "contains" | "not_contains" | "in" | "not_in" | "is_empty" | "is_not_empty" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal";
870
+ interface EntityFilter {
932
871
  field: string;
933
872
  operator: FilterOperator;
934
873
  value?: unknown;
935
874
  }
936
- /**
937
- * Sort rule for entity queries
938
- */
939
- export interface SortRule {
875
+ interface SortRule {
940
876
  field: string;
941
877
  direction: "asc" | "desc";
942
878
  }
943
- /**
944
- * Query definition for structured views
945
- * Defines which entities to show and how to filter them
946
- *
947
- * NOTE: profileIds/profileSlugs are now stored in views.scopeProfileIds
948
- * This query structure only contains filters, sorts, search, pagination, and groupBy
949
- */
950
- export interface EntityQuery {
879
+ interface EntityQuery {
951
880
  /** @deprecated - Profile IDs now stored in views.scopeProfileIds */
952
881
  profileIds?: string[];
953
882
  /** @deprecated - Profile slugs now stored in views.scopeProfileIds (resolved to IDs) */
@@ -978,10 +907,7 @@ declare enum AgentType {
978
907
  WRITING = "writing",
979
908
  ACTION = "action"
980
909
  }
981
- /**
982
- * Agent type as string literal union (for flexibility)
983
- */
984
- export type AgentTypeString = `${AgentType}` | (string & {});
910
+ type AgentTypeString = `${AgentType}` | (string & {});
985
911
  declare enum AIStepType {
986
912
  THINKING = "thinking",
987
913
  TOOL_CALL = "tool_call",
@@ -989,17 +915,7 @@ declare enum AIStepType {
989
915
  DECISION = "decision",
990
916
  ERROR = "error"
991
917
  }
992
- /**
993
- * AI step - shows what the AI is doing
994
- *
995
- * Represents any step in the AI's reasoning/execution process:
996
- * - thinking: General analysis and reasoning
997
- * - tool_call: When AI calls a tool
998
- * - tool_result: Result from tool execution
999
- * - decision: AI making a decision
1000
- * - error: Error during processing
1001
- */
1002
- export interface AIStep {
918
+ interface AIStep {
1003
919
  id: string;
1004
920
  type: AIStepType | string;
1005
921
  content: string;
@@ -1013,10 +929,7 @@ export interface AIStep {
1013
929
  description?: string;
1014
930
  status?: "pending" | "running" | "complete" | "error";
1015
931
  }
1016
- /**
1017
- * Branch decision from meta-agent
1018
- */
1019
- export interface BranchDecision {
932
+ interface BranchDecision {
1020
933
  shouldBranch: boolean;
1021
934
  reason: string;
1022
935
  suggestedAgentType?: AgentTypeString;
@@ -1056,35 +969,7 @@ declare enum MessageLinkRelationshipType {
1056
969
  QUOTES = "quotes",// Message quotes this object
1057
970
  CONTEXT = "context"
1058
971
  }
1059
- /**
1060
- * @synap/events - Schema-Driven Event Generator
1061
- *
1062
- * This module generates event types and payload schemas from Drizzle database tables.
1063
- *
1064
- * V2.0 CONSOLIDATED PATTERN: {table}.{action}.{modifier}
1065
- *
1066
- * Actions: create | update | delete
1067
- * Modifiers: requested | validated
1068
- *
1069
- * Examples:
1070
- * entities.create.requested ← Intent submitted (by user or AI)
1071
- * entities.create.validated ← Change confirmed and applied
1072
- * entities.update.requested ← Update intent
1073
- * entities.update.validated ← Update confirmed
1074
- *
1075
- * No direct actions (e.g., entities.create) - all changes go through requested→validated flow.
1076
- */
1077
- /**
1078
- * Standard CRUD actions with modifiers for table events
1079
- *
1080
- * V2.1: Added 'approved' modifier for 3-phase flow
1081
- *
1082
- * Flow:
1083
- * 1. requested: Intent (user/AI wants to do something)
1084
- * 2. approved: Validated (permissions checked, user approved if needed)
1085
- * 3. validated: Completed (DB operation done, entity exists)
1086
- */
1087
- export type TableAction = "create.requested" | "create.approved" | "create.validated" | "update.requested" | "update.approved" | "update.validated" | "delete.requested" | "delete.approved" | "delete.validated";
972
+ type TableAction = "create.requested" | "create.approved" | "create.validated" | "update.requested" | "update.approved" | "update.validated" | "delete.requested" | "delete.approved" | "delete.validated";
1088
973
  declare const CORE_TABLES: readonly [
1089
974
  "entities",
1090
975
  "documents",
@@ -1100,22 +985,9 @@ declare const CORE_TABLES: readonly [
1100
985
  "views",
1101
986
  "userPreferences"
1102
987
  ];
1103
- export type CoreTable = (typeof CORE_TABLES)[number];
1104
- /**
1105
- * Flat list of all generated event types (for type checking)
1106
- *
1107
- * V2.1: Added .approved phase for 3-phase flow
1108
- */
1109
- export type GeneratedEventType = `${CoreTable}.create.requested` | `${CoreTable}.create.approved` | `${CoreTable}.create.validated` | `${CoreTable}.update.requested` | `${CoreTable}.update.approved` | `${CoreTable}.update.validated` | `${CoreTable}.delete.requested` | `${CoreTable}.delete.approved` | `${CoreTable}.delete.validated`;
1110
- /**
1111
- * Worker Registry - Static worker metadata for Admin UI
1112
- *
1113
- * V2.0: Simplified registry with only active workers
1114
- *
1115
- * Pattern: Table workers handle {table}.{crud}.requested events
1116
- * and emit {table}.{crud}.completed events.
1117
- */
1118
- export interface WorkerMetadata {
988
+ type CoreTable = (typeof CORE_TABLES)[number];
989
+ type GeneratedEventType = `${CoreTable}.create.requested` | `${CoreTable}.create.approved` | `${CoreTable}.create.validated` | `${CoreTable}.update.requested` | `${CoreTable}.update.approved` | `${CoreTable}.update.validated` | `${CoreTable}.delete.requested` | `${CoreTable}.delete.approved` | `${CoreTable}.delete.validated`;
990
+ interface WorkerMetadata {
1119
991
  id: string;
1120
992
  name: string;
1121
993
  description: string;
@@ -3611,9 +3483,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3611
3483
  input: {
3612
3484
  sourceEntityId: string;
3613
3485
  targetEntityId: string;
3614
- 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";
3615
- workspaceId: string;
3486
+ type: string;
3616
3487
  metadata?: Record<string, any> | undefined;
3488
+ workspaceId?: string | undefined;
3617
3489
  };
3618
3490
  output: {
3619
3491
  status: "proposed";
@@ -4024,7 +3896,88 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4024
3896
  }>;
4025
3897
  createFromDefinition: import("@trpc/server").TRPCMutationProcedure<{
4026
3898
  input: {
4027
- definition: unknown;
3899
+ definition: {
3900
+ [x: string]: unknown;
3901
+ workspaceName?: string | undefined;
3902
+ description?: string | undefined;
3903
+ profiles?: {
3904
+ slug: string;
3905
+ displayName: string;
3906
+ icon?: string | undefined;
3907
+ color?: string | undefined;
3908
+ description?: string | undefined;
3909
+ scope?: string | undefined;
3910
+ properties?: {
3911
+ slug: string;
3912
+ valueType: string;
3913
+ label?: string | undefined;
3914
+ inputType?: string | undefined;
3915
+ placeholder?: string | undefined;
3916
+ enumValues?: string[] | undefined;
3917
+ constraints?: Record<string, unknown> | undefined;
3918
+ }[] | undefined;
3919
+ }[] | undefined;
3920
+ views?: {
3921
+ name: string;
3922
+ type: string;
3923
+ scopeProfileSlug?: string | undefined;
3924
+ scopeProfileSlugs?: string[] | undefined;
3925
+ config?: Record<string, unknown> | undefined;
3926
+ }[] | undefined;
3927
+ bentoLayout?: {
3928
+ widgetType: string;
3929
+ pos: {
3930
+ x: number;
3931
+ y: number;
3932
+ w: number;
3933
+ h: number;
3934
+ };
3935
+ config?: Record<string, unknown> | undefined;
3936
+ }[] | undefined;
3937
+ bentoViewBlocks?: {
3938
+ viewName: string;
3939
+ pos: {
3940
+ x: number;
3941
+ y: number;
3942
+ w: number;
3943
+ h: number;
3944
+ };
3945
+ kind?: "view" | undefined;
3946
+ overrides?: Record<string, unknown> | undefined;
3947
+ }[] | undefined;
3948
+ suggestedEntities?: {
3949
+ profileSlug: string;
3950
+ title: string;
3951
+ properties?: Record<string, unknown> | undefined;
3952
+ content?: string | undefined;
3953
+ }[] | undefined;
3954
+ suggestedRelations?: {
3955
+ sourceRef: string;
3956
+ targetRef: string;
3957
+ type: string;
3958
+ metadata?: Record<string, unknown> | undefined;
3959
+ }[] | undefined;
3960
+ displayTemplates?: {
3961
+ name: string;
3962
+ config: Record<string, unknown>;
3963
+ description?: string | undefined;
3964
+ entityType?: string | undefined;
3965
+ targetType?: string | undefined;
3966
+ isDefault?: boolean | undefined;
3967
+ }[] | undefined;
3968
+ layoutConfig?: {
3969
+ pinnedApps?: string[] | undefined;
3970
+ sidebarApps?: string[] | undefined;
3971
+ defaultView?: string | undefined;
3972
+ theme?: string | undefined;
3973
+ } | undefined;
3974
+ entityLinks?: {
3975
+ sourceProfileSlug: string;
3976
+ targetProfileSlug: string;
3977
+ type: string;
3978
+ label?: string | undefined;
3979
+ }[] | undefined;
3980
+ };
4028
3981
  packageSlug?: string | undefined;
4029
3982
  packageVersion?: string | undefined;
4030
3983
  workspaceName?: string | undefined;
@@ -5777,7 +5730,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5777
5730
  create: import("@trpc/server").TRPCMutationProcedure<{
5778
5731
  input: {
5779
5732
  slug: string;
5780
- valueType: "string" | "number" | "boolean" | "object" | "array" | "date" | "entity_id";
5733
+ valueType: "string" | "number" | "boolean" | "object" | "array" | "date" | "secret" | "entity_id";
5781
5734
  constraints?: Record<string, unknown> | undefined;
5782
5735
  uiHints?: Record<string, unknown> | undefined;
5783
5736
  };
@@ -5810,7 +5763,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5810
5763
  input: {
5811
5764
  id: string;
5812
5765
  slug?: string | undefined;
5813
- valueType?: "string" | "number" | "boolean" | "object" | "array" | "date" | "entity_id" | undefined;
5766
+ valueType?: "string" | "number" | "boolean" | "object" | "array" | "date" | "secret" | "entity_id" | undefined;
5814
5767
  constraints?: Record<string, unknown> | undefined;
5815
5768
  uiHints?: Record<string, unknown> | undefined;
5816
5769
  };
@@ -5901,6 +5854,116 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5901
5854
  meta: object;
5902
5855
  }>;
5903
5856
  }>>;
5857
+ relationDefs: import("@trpc/server").TRPCBuiltRouter<{
5858
+ ctx: Context;
5859
+ meta: object;
5860
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
5861
+ transformer: true;
5862
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
5863
+ list: import("@trpc/server").TRPCQueryProcedure<{
5864
+ input: void;
5865
+ output: {
5866
+ relationDefs: {
5867
+ workspaceId: string;
5868
+ userId: string;
5869
+ id: string;
5870
+ updatedAt: Date;
5871
+ createdAt: Date;
5872
+ description: string | null;
5873
+ slug: string;
5874
+ uiHints: unknown;
5875
+ displayName: string;
5876
+ isDirectional: boolean;
5877
+ }[];
5878
+ };
5879
+ meta: object;
5880
+ }>;
5881
+ create: import("@trpc/server").TRPCMutationProcedure<{
5882
+ input: {
5883
+ slug: string;
5884
+ displayName: string;
5885
+ description?: string | undefined;
5886
+ uiHints?: Record<string, unknown> | undefined;
5887
+ isDirectional?: boolean | undefined;
5888
+ };
5889
+ output: {
5890
+ relationDef: {
5891
+ workspaceId: string;
5892
+ userId: string;
5893
+ id: string;
5894
+ updatedAt: Date;
5895
+ createdAt: Date;
5896
+ description: string | null;
5897
+ slug: string;
5898
+ uiHints: unknown;
5899
+ displayName: string;
5900
+ isDirectional: boolean;
5901
+ };
5902
+ };
5903
+ meta: object;
5904
+ }>;
5905
+ delete: import("@trpc/server").TRPCMutationProcedure<{
5906
+ input: {
5907
+ id: string;
5908
+ };
5909
+ output: {
5910
+ success: boolean;
5911
+ };
5912
+ meta: object;
5913
+ }>;
5914
+ }>>;
5915
+ profileRelations: import("@trpc/server").TRPCBuiltRouter<{
5916
+ ctx: Context;
5917
+ meta: object;
5918
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
5919
+ transformer: true;
5920
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
5921
+ link: import("@trpc/server").TRPCMutationProcedure<{
5922
+ input: {
5923
+ sourceProfileId: string;
5924
+ targetProfileId: string;
5925
+ relationDefId: string;
5926
+ displayOrder?: number | undefined;
5927
+ metadata?: Record<string, unknown> | undefined;
5928
+ };
5929
+ output: {
5930
+ link: {
5931
+ metadata: unknown;
5932
+ displayOrder: number;
5933
+ sourceProfileId: string;
5934
+ targetProfileId: string;
5935
+ relationDefId: string;
5936
+ };
5937
+ };
5938
+ meta: object;
5939
+ }>;
5940
+ unlink: import("@trpc/server").TRPCMutationProcedure<{
5941
+ input: {
5942
+ sourceProfileId: string;
5943
+ targetProfileId: string;
5944
+ relationDefId: string;
5945
+ };
5946
+ output: {
5947
+ success: boolean;
5948
+ };
5949
+ meta: object;
5950
+ }>;
5951
+ getByProfile: import("@trpc/server").TRPCQueryProcedure<{
5952
+ input: {
5953
+ profileId: string;
5954
+ };
5955
+ output: {
5956
+ relations: {
5957
+ metadata: unknown;
5958
+ displayOrder: number;
5959
+ sourceProfileId: string;
5960
+ targetProfileId: string;
5961
+ relationDefId: string;
5962
+ }[];
5963
+ };
5964
+ meta: object;
5965
+ }>;
5966
+ }>>;
5904
5967
  agentUsers: import("@trpc/server").TRPCBuiltRouter<{
5905
5968
  ctx: Context;
5906
5969
  meta: object;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synap-core/api-types",
3
- "version": "1.5.0",
3
+ "version": "1.6.1",
4
4
  "description": "Type definitions for Synap API Router - tRPC types for frontend",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -22,7 +22,7 @@
22
22
  "typecheck": "tsc --noEmit"
23
23
  },
24
24
  "dependencies": {
25
- "@synap-core/types": "^1.5.0",
25
+ "@synap-core/types": "workspace:*",
26
26
  "yjs": "^13.0.0"
27
27
  },
28
28
  "devDependencies": {
@@ -3371,7 +3371,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3371
3371
  errorMessage: string | null;
3372
3372
  startedAt: Date;
3373
3373
  threadId: string;
3374
- status: "completed" | "failed" | "running";
3374
+ status: "completed" | "running" | "failed";
3375
3375
  commandId: string;
3376
3376
  permissionsSnapshot: Record<string, unknown> | null;
3377
3377
  inputs: Record<string, unknown> | null;
@@ -3397,7 +3397,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3397
3397
  errorMessage: string | null;
3398
3398
  startedAt: Date;
3399
3399
  threadId: string;
3400
- status: "completed" | "failed" | "running";
3400
+ status: "completed" | "running" | "failed";
3401
3401
  commandId: string;
3402
3402
  permissionsSnapshot: Record<string, unknown> | null;
3403
3403
  inputs: Record<string, unknown> | null;
@@ -3611,9 +3611,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3611
3611
  input: {
3612
3612
  sourceEntityId: string;
3613
3613
  targetEntityId: string;
3614
- 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";
3615
- workspaceId: string;
3614
+ type: string;
3616
3615
  metadata?: Record<string, any> | undefined;
3616
+ workspaceId?: string | undefined;
3617
3617
  };
3618
3618
  output: {
3619
3619
  status: "proposed";
@@ -4024,7 +4024,88 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4024
4024
  }>;
4025
4025
  createFromDefinition: import("@trpc/server").TRPCMutationProcedure<{
4026
4026
  input: {
4027
- definition: unknown;
4027
+ definition: {
4028
+ [x: string]: unknown;
4029
+ workspaceName?: string | undefined;
4030
+ description?: string | undefined;
4031
+ profiles?: {
4032
+ slug: string;
4033
+ displayName: string;
4034
+ icon?: string | undefined;
4035
+ color?: string | undefined;
4036
+ description?: string | undefined;
4037
+ scope?: string | undefined;
4038
+ properties?: {
4039
+ slug: string;
4040
+ valueType: string;
4041
+ label?: string | undefined;
4042
+ inputType?: string | undefined;
4043
+ placeholder?: string | undefined;
4044
+ enumValues?: string[] | undefined;
4045
+ constraints?: Record<string, unknown> | undefined;
4046
+ }[] | undefined;
4047
+ }[] | undefined;
4048
+ views?: {
4049
+ name: string;
4050
+ type: string;
4051
+ scopeProfileSlug?: string | undefined;
4052
+ scopeProfileSlugs?: string[] | undefined;
4053
+ config?: Record<string, unknown> | undefined;
4054
+ }[] | undefined;
4055
+ bentoLayout?: {
4056
+ widgetType: string;
4057
+ pos: {
4058
+ x: number;
4059
+ y: number;
4060
+ w: number;
4061
+ h: number;
4062
+ };
4063
+ config?: Record<string, unknown> | undefined;
4064
+ }[] | undefined;
4065
+ bentoViewBlocks?: {
4066
+ viewName: string;
4067
+ pos: {
4068
+ x: number;
4069
+ y: number;
4070
+ w: number;
4071
+ h: number;
4072
+ };
4073
+ kind?: "view" | undefined;
4074
+ overrides?: Record<string, unknown> | undefined;
4075
+ }[] | undefined;
4076
+ suggestedEntities?: {
4077
+ profileSlug: string;
4078
+ title: string;
4079
+ properties?: Record<string, unknown> | undefined;
4080
+ content?: string | undefined;
4081
+ }[] | undefined;
4082
+ suggestedRelations?: {
4083
+ sourceRef: string;
4084
+ targetRef: string;
4085
+ type: string;
4086
+ metadata?: Record<string, unknown> | undefined;
4087
+ }[] | undefined;
4088
+ displayTemplates?: {
4089
+ name: string;
4090
+ config: Record<string, unknown>;
4091
+ description?: string | undefined;
4092
+ entityType?: string | undefined;
4093
+ targetType?: string | undefined;
4094
+ isDefault?: boolean | undefined;
4095
+ }[] | undefined;
4096
+ layoutConfig?: {
4097
+ pinnedApps?: string[] | undefined;
4098
+ sidebarApps?: string[] | undefined;
4099
+ defaultView?: string | undefined;
4100
+ theme?: string | undefined;
4101
+ } | undefined;
4102
+ entityLinks?: {
4103
+ sourceProfileSlug: string;
4104
+ targetProfileSlug: string;
4105
+ type: string;
4106
+ label?: string | undefined;
4107
+ }[] | undefined;
4108
+ };
4028
4109
  packageSlug?: string | undefined;
4029
4110
  packageVersion?: string | undefined;
4030
4111
  workspaceName?: string | undefined;
@@ -5777,7 +5858,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5777
5858
  create: import("@trpc/server").TRPCMutationProcedure<{
5778
5859
  input: {
5779
5860
  slug: string;
5780
- valueType: "string" | "number" | "boolean" | "object" | "array" | "date" | "entity_id";
5861
+ valueType: "string" | "number" | "boolean" | "object" | "array" | "date" | "secret" | "entity_id";
5781
5862
  constraints?: Record<string, unknown> | undefined;
5782
5863
  uiHints?: Record<string, unknown> | undefined;
5783
5864
  };
@@ -5810,7 +5891,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5810
5891
  input: {
5811
5892
  id: string;
5812
5893
  slug?: string | undefined;
5813
- valueType?: "string" | "number" | "boolean" | "object" | "array" | "date" | "entity_id" | undefined;
5894
+ valueType?: "string" | "number" | "boolean" | "object" | "array" | "date" | "secret" | "entity_id" | undefined;
5814
5895
  constraints?: Record<string, unknown> | undefined;
5815
5896
  uiHints?: Record<string, unknown> | undefined;
5816
5897
  };
@@ -5901,6 +5982,116 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5901
5982
  meta: object;
5902
5983
  }>;
5903
5984
  }>>;
5985
+ relationDefs: import("@trpc/server").TRPCBuiltRouter<{
5986
+ ctx: Context;
5987
+ meta: object;
5988
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
5989
+ transformer: true;
5990
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
5991
+ list: import("@trpc/server").TRPCQueryProcedure<{
5992
+ input: void;
5993
+ output: {
5994
+ relationDefs: {
5995
+ workspaceId: string;
5996
+ userId: string;
5997
+ id: string;
5998
+ updatedAt: Date;
5999
+ createdAt: Date;
6000
+ description: string | null;
6001
+ slug: string;
6002
+ uiHints: unknown;
6003
+ displayName: string;
6004
+ isDirectional: boolean;
6005
+ }[];
6006
+ };
6007
+ meta: object;
6008
+ }>;
6009
+ create: import("@trpc/server").TRPCMutationProcedure<{
6010
+ input: {
6011
+ slug: string;
6012
+ displayName: string;
6013
+ description?: string | undefined;
6014
+ uiHints?: Record<string, unknown> | undefined;
6015
+ isDirectional?: boolean | undefined;
6016
+ };
6017
+ output: {
6018
+ relationDef: {
6019
+ workspaceId: string;
6020
+ userId: string;
6021
+ id: string;
6022
+ updatedAt: Date;
6023
+ createdAt: Date;
6024
+ description: string | null;
6025
+ slug: string;
6026
+ uiHints: unknown;
6027
+ displayName: string;
6028
+ isDirectional: boolean;
6029
+ };
6030
+ };
6031
+ meta: object;
6032
+ }>;
6033
+ delete: import("@trpc/server").TRPCMutationProcedure<{
6034
+ input: {
6035
+ id: string;
6036
+ };
6037
+ output: {
6038
+ success: boolean;
6039
+ };
6040
+ meta: object;
6041
+ }>;
6042
+ }>>;
6043
+ profileRelations: import("@trpc/server").TRPCBuiltRouter<{
6044
+ ctx: Context;
6045
+ meta: object;
6046
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
6047
+ transformer: true;
6048
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
6049
+ link: import("@trpc/server").TRPCMutationProcedure<{
6050
+ input: {
6051
+ sourceProfileId: string;
6052
+ targetProfileId: string;
6053
+ relationDefId: string;
6054
+ displayOrder?: number | undefined;
6055
+ metadata?: Record<string, unknown> | undefined;
6056
+ };
6057
+ output: {
6058
+ link: {
6059
+ metadata: unknown;
6060
+ displayOrder: number;
6061
+ sourceProfileId: string;
6062
+ targetProfileId: string;
6063
+ relationDefId: string;
6064
+ };
6065
+ };
6066
+ meta: object;
6067
+ }>;
6068
+ unlink: import("@trpc/server").TRPCMutationProcedure<{
6069
+ input: {
6070
+ sourceProfileId: string;
6071
+ targetProfileId: string;
6072
+ relationDefId: string;
6073
+ };
6074
+ output: {
6075
+ success: boolean;
6076
+ };
6077
+ meta: object;
6078
+ }>;
6079
+ getByProfile: import("@trpc/server").TRPCQueryProcedure<{
6080
+ input: {
6081
+ profileId: string;
6082
+ };
6083
+ output: {
6084
+ relations: {
6085
+ metadata: unknown;
6086
+ displayOrder: number;
6087
+ sourceProfileId: string;
6088
+ targetProfileId: string;
6089
+ relationDefId: string;
6090
+ }[];
6091
+ };
6092
+ meta: object;
6093
+ }>;
6094
+ }>>;
5904
6095
  agentUsers: import("@trpc/server").TRPCBuiltRouter<{
5905
6096
  ctx: Context;
5906
6097
  meta: object;