@synap-core/api-types 1.3.0 → 1.3.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.
@@ -677,6 +677,18 @@ export interface EffectiveProperty extends PropertyDef {
677
677
  defaultValue: unknown;
678
678
  displayOrder: number;
679
679
  }
680
+ /**
681
+ * Column definition for views
682
+ */
683
+ export interface ViewColumn {
684
+ id: string;
685
+ field: string;
686
+ title?: string;
687
+ valueType?: string;
688
+ indexed?: boolean;
689
+ visible?: boolean;
690
+ width?: number;
691
+ }
680
692
  /**
681
693
  * View Query Types
682
694
  *
@@ -704,11 +716,16 @@ export interface SortRule {
704
716
  /**
705
717
  * Query definition for structured views
706
718
  * Defines which entities to show and how to filter them
719
+ *
720
+ * NOTE: profileIds/profileSlugs are now stored in views.scopeProfileIds
721
+ * This query structure only contains filters, sorts, search, pagination, and groupBy
707
722
  */
708
723
  export interface EntityQuery {
709
- /** Profile slugs to include (preferred - dynamic profiles) */
724
+ /** @deprecated - Profile IDs now stored in views.scopeProfileIds */
725
+ profileIds?: string[];
726
+ /** @deprecated - Profile slugs now stored in views.scopeProfileIds (resolved to IDs) */
710
727
  profileSlugs?: string[];
711
- /** Entity types to include (deprecated - use profileSlugs instead) */
728
+ /** @deprecated - Use profileSlugs instead, which is also deprecated */
712
729
  entityTypes?: string[];
713
730
  /** Specific entity IDs (for fixed sets) */
714
731
  entityIds?: string[];
@@ -737,71 +754,6 @@ export interface EntityQuery {
737
754
  * - canvas: Freeform drawing views (whiteboard, mindmap)
738
755
  */
739
756
  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
- }
805
757
  declare enum AgentType {
806
758
  DEFAULT = "default",
807
759
  META = "meta",
@@ -1256,7 +1208,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1256
1208
  }[];
1257
1209
  executionSummaries: {
1258
1210
  tool: string;
1259
- status: "error" | "success" | "skipped";
1211
+ status: "error" | "skipped" | "success";
1260
1212
  result?: unknown;
1261
1213
  error?: string | undefined;
1262
1214
  }[];
@@ -1301,7 +1253,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1301
1253
  content: string;
1302
1254
  threadId: string;
1303
1255
  parentId: string | null;
1304
- role: "user" | "system" | "assistant";
1256
+ role: "user" | "assistant" | "system";
1305
1257
  previousHash: string | null;
1306
1258
  hash: string;
1307
1259
  }[];
@@ -2297,11 +2249,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2297
2249
  output: {
2298
2250
  id: string;
2299
2251
  createdAt: Date;
2300
- type: string;
2301
2252
  documentId: string;
2302
2253
  version: number;
2303
2254
  content: string;
2304
- delta: unknown;
2305
2255
  author: string;
2306
2256
  authorId: string;
2307
2257
  message: string | null;
@@ -3274,6 +3224,17 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3274
3224
  type: "calendar" | "list" | "table" | "whiteboard" | "graph" | "timeline" | "kanban" | "grid" | "gallery" | "gantt" | "mindmap";
3275
3225
  workspaceId?: string | undefined;
3276
3226
  description?: string | undefined;
3227
+ scopeProfileIds?: string[] | undefined;
3228
+ scopeMode?: "explicit" | "observed" | undefined;
3229
+ query?: {
3230
+ filters?: any[] | undefined;
3231
+ sorts?: any[] | undefined;
3232
+ search?: string | undefined;
3233
+ limit?: number | undefined;
3234
+ offset?: number | undefined;
3235
+ groupBy?: string | undefined;
3236
+ } | undefined;
3237
+ config?: Record<string, any> | undefined;
3277
3238
  initialContent?: any;
3278
3239
  };
3279
3240
  output: {
@@ -3308,6 +3269,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3308
3269
  userId: string;
3309
3270
  workspaceId: string | null;
3310
3271
  id: string;
3272
+ query: unknown;
3311
3273
  columns: unknown;
3312
3274
  updatedAt: Date;
3313
3275
  createdAt: Date;
@@ -3317,11 +3279,16 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3317
3279
  documentId: string | null;
3318
3280
  description: string | null;
3319
3281
  category: string;
3282
+ scopeProfileIds: string[] | null;
3283
+ scopeMode: string | null;
3284
+ config: unknown;
3320
3285
  filter: unknown;
3321
3286
  sort: unknown;
3322
3287
  layoutConfig: unknown;
3323
3288
  yjsRoomId: string | null;
3324
3289
  thumbnailUrl: string | null;
3290
+ schemaSnapshot: unknown;
3291
+ snapshotUpdatedAt: Date | null;
3325
3292
  }[];
3326
3293
  meta: object;
3327
3294
  }>;
@@ -3335,6 +3302,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3335
3302
  userId: string;
3336
3303
  workspaceId: string | null;
3337
3304
  id: string;
3305
+ query: unknown;
3338
3306
  columns: unknown;
3339
3307
  updatedAt: Date;
3340
3308
  createdAt: Date;
@@ -3344,11 +3312,16 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3344
3312
  documentId: string | null;
3345
3313
  description: string | null;
3346
3314
  category: string;
3315
+ scopeProfileIds: string[] | null;
3316
+ scopeMode: string | null;
3317
+ config: unknown;
3347
3318
  filter: unknown;
3348
3319
  sort: unknown;
3349
3320
  layoutConfig: unknown;
3350
3321
  yjsRoomId: string | null;
3351
3322
  thumbnailUrl: string | null;
3323
+ schemaSnapshot: unknown;
3324
+ snapshotUpdatedAt: Date | null;
3352
3325
  };
3353
3326
  content: {};
3354
3327
  };
@@ -3364,6 +3337,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3364
3337
  userId: string;
3365
3338
  workspaceId: string | null;
3366
3339
  id: string;
3340
+ query: unknown;
3367
3341
  columns: unknown;
3368
3342
  updatedAt: Date;
3369
3343
  createdAt: Date;
@@ -3373,22 +3347,30 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3373
3347
  documentId: string | null;
3374
3348
  description: string | null;
3375
3349
  category: string;
3350
+ scopeProfileIds: string[] | null;
3351
+ scopeMode: string | null;
3352
+ config: unknown;
3376
3353
  filter: unknown;
3377
3354
  sort: unknown;
3378
3355
  layoutConfig: unknown;
3379
3356
  yjsRoomId: string | null;
3380
3357
  thumbnailUrl: string | null;
3358
+ schemaSnapshot: unknown;
3359
+ snapshotUpdatedAt: Date | null;
3381
3360
  };
3382
3361
  content: {};
3383
3362
  entities: never[];
3384
3363
  relations: never[];
3364
+ query?: undefined;
3385
3365
  config?: undefined;
3366
+ columns?: undefined;
3386
3367
  } | {
3387
3368
  view: {
3388
3369
  name: string;
3389
3370
  userId: string;
3390
3371
  workspaceId: string | null;
3391
3372
  id: string;
3373
+ query: unknown;
3392
3374
  columns: unknown;
3393
3375
  updatedAt: Date;
3394
3376
  createdAt: Date;
@@ -3398,38 +3380,19 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3398
3380
  documentId: string | null;
3399
3381
  description: string | null;
3400
3382
  category: string;
3383
+ scopeProfileIds: string[] | null;
3384
+ scopeMode: string | null;
3385
+ config: unknown;
3401
3386
  filter: unknown;
3402
3387
  sort: unknown;
3403
3388
  layoutConfig: unknown;
3404
3389
  yjsRoomId: string | null;
3405
3390
  thumbnailUrl: string | null;
3391
+ schemaSnapshot: unknown;
3392
+ snapshotUpdatedAt: Date | null;
3406
3393
  };
3407
- config: StructuredViewConfig | undefined;
3408
- entities: never[];
3409
- relations: never[];
3410
- content?: undefined;
3411
- } | {
3412
- view: {
3413
- name: string;
3414
- userId: string;
3415
- workspaceId: string | null;
3416
- id: string;
3417
- columns: unknown;
3418
- updatedAt: Date;
3419
- createdAt: Date;
3420
- type: string;
3421
- metadata: unknown;
3422
- projectIds: string[] | null;
3423
- documentId: string | null;
3424
- description: string | null;
3425
- category: string;
3426
- filter: unknown;
3427
- sort: unknown;
3428
- layoutConfig: unknown;
3429
- yjsRoomId: string | null;
3430
- thumbnailUrl: string | null;
3431
- };
3432
- config: StructuredViewConfig;
3394
+ query: EntityQuery;
3395
+ config: {};
3433
3396
  entities: {
3434
3397
  id: string;
3435
3398
  userId: string;
@@ -3456,6 +3419,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3456
3419
  type: string;
3457
3420
  createdAt: Date;
3458
3421
  }[];
3422
+ columns: ViewColumn[];
3459
3423
  content?: undefined;
3460
3424
  };
3461
3425
  meta: object;
@@ -3506,6 +3470,15 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3506
3470
  };
3507
3471
  meta: object;
3508
3472
  }>;
3473
+ getAvailableColumns: import("@trpc/server").TRPCQueryProcedure<{
3474
+ input: {
3475
+ id: string;
3476
+ };
3477
+ output: {
3478
+ columns: ViewColumn[];
3479
+ };
3480
+ meta: object;
3481
+ }>;
3509
3482
  }>>;
3510
3483
  preferences: import("@trpc/server").TRPCBuiltRouter<{
3511
3484
  ctx: Context;
@@ -3818,6 +3791,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3818
3791
  userId: string;
3819
3792
  workspaceId: string | null;
3820
3793
  id: string;
3794
+ query: unknown;
3821
3795
  columns: unknown;
3822
3796
  updatedAt: Date;
3823
3797
  createdAt: Date;
@@ -3827,11 +3801,16 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3827
3801
  documentId: string | null;
3828
3802
  description: string | null;
3829
3803
  category: string;
3804
+ scopeProfileIds: string[] | null;
3805
+ scopeMode: string | null;
3806
+ config: unknown;
3830
3807
  filter: unknown;
3831
3808
  sort: unknown;
3832
3809
  layoutConfig: unknown;
3833
3810
  yjsRoomId: string | null;
3834
3811
  thumbnailUrl: string | null;
3812
+ schemaSnapshot: unknown;
3813
+ snapshotUpdatedAt: Date | null;
3835
3814
  document: never;
3836
3815
  };
3837
3816
  permissions: unknown;
@@ -4162,9 +4141,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4162
4141
  version: number;
4163
4142
  entityType: string | null;
4164
4143
  description: string | null;
4144
+ config: unknown;
4165
4145
  targetType: string;
4166
4146
  inboxItemType: string | null;
4167
- config: unknown;
4168
4147
  schema: unknown;
4169
4148
  isDefault: boolean;
4170
4149
  isPublic: boolean;
@@ -4207,11 +4186,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4207
4186
  versions: {
4208
4187
  id: string;
4209
4188
  createdAt: Date;
4210
- type: string;
4211
4189
  documentId: string;
4212
4190
  version: number;
4213
4191
  content: string;
4214
- delta: unknown;
4215
4192
  author: string;
4216
4193
  authorId: string;
4217
4194
  message: string | null;
@@ -4238,11 +4215,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4238
4215
  version: {
4239
4216
  id: string;
4240
4217
  createdAt: Date;
4241
- type: string;
4242
4218
  documentId: string;
4243
4219
  version: number;
4244
4220
  content: string;
4245
- delta: unknown;
4246
4221
  author: string;
4247
4222
  authorId: string;
4248
4223
  message: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synap-core/api-types",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Type definitions for Synap API Router - tRPC types for frontend",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",