busabase-sdk 0.19.0 → 0.19.2

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.
package/dist/airapp.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as BusabaseClient } from "./client-slzL_ils.js";
1
+ import { t as BusabaseClient } from "./client-kiUJSr_d.js";
2
2
  //#region src/airapp.d.ts
3
3
  type NodeChangeRequestInput = Parameters<BusabaseClient["nodes"]["createChangeRequest"]>[0];
4
4
  type NodeOperationInput = NodeChangeRequestInput["operations"][number];
@@ -276,8 +276,7 @@ type OperationKind = GenericOperationKind | RegisteredOperationKind;
276
276
  * when a node carries no `icon`, every host falls back to the type icon, same
277
277
  * as before this field existed.
278
278
  *
279
- * The `attachment` variant mirrors buda's `NodeLogo` shape (see
280
- * `apps/buda/src/domains/agent-controller/components/use-logo-crop-upload.tsx`):
279
+ * The `attachment` variant follows the shared avatar-cropping model:
281
280
  * `url`/`attachmentId` are the CROPPED display image actually rendered, while
282
281
  * `originalUrl`/`originalAttachmentId` + `crop` are kept so the crop dialog can
283
282
  * re-open non-destructively against the untouched source image instead of
@@ -9257,6 +9256,431 @@ declare const cloudContract: {
9257
9256
  createdAt: z.ZodString;
9258
9257
  }, z.core.$strip>>;
9259
9258
  }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
9259
+ createBulkUpdateChangeRequest: import("@orpc/contract").ContractProcedure<z.ZodObject<{
9260
+ updates: z.ZodArray<z.ZodObject<{
9261
+ recordId: z.ZodString;
9262
+ fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
9263
+ baseCommitId: z.ZodOptional<z.ZodString>;
9264
+ message: z.ZodOptional<z.ZodString>;
9265
+ }, z.core.$strip>>;
9266
+ message: z.ZodDefault<z.ZodOptional<z.ZodString>>;
9267
+ submittedBy: z.ZodDefault<z.ZodOptional<z.ZodString>>;
9268
+ idempotencyKey: z.ZodOptional<z.ZodString>;
9269
+ autoMerge: z.ZodOptional<z.ZodBoolean>;
9270
+ baseId: z.ZodString;
9271
+ }, z.core.$strip>, z.ZodObject<{
9272
+ id: z.ZodString;
9273
+ baseId: z.ZodNullable<z.ZodString>;
9274
+ targetType: z.ZodEnum<{
9275
+ base: "base";
9276
+ node: "node";
9277
+ }>;
9278
+ nodeId: z.ZodNullable<z.ZodString>;
9279
+ status: z.ZodEnum<{
9280
+ abandoned: "abandoned";
9281
+ approved: "approved";
9282
+ changes_requested: "changes_requested";
9283
+ conflict: "conflict";
9284
+ in_review: "in_review";
9285
+ merged: "merged";
9286
+ rejected: "rejected";
9287
+ }>;
9288
+ submittedBy: z.ZodString;
9289
+ submittedByUser: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
9290
+ id: z.ZodString;
9291
+ name: z.ZodNullable<z.ZodString>;
9292
+ email: z.ZodNullable<z.ZodString>;
9293
+ image: z.ZodNullable<z.ZodString>;
9294
+ role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9295
+ }, z.core.$strip>>>>;
9296
+ sourceMeta: z.ZodRecord<z.ZodString, z.ZodUnknown>;
9297
+ reviewPolicySnapshot: z.ZodRecord<z.ZodString, z.ZodUnknown>;
9298
+ mergeSummary: z.ZodRecord<z.ZodString, z.ZodUnknown>;
9299
+ rejectedReason: z.ZodNullable<z.ZodString>;
9300
+ reviewedAt: z.ZodNullable<z.ZodString>;
9301
+ mergedAt: z.ZodNullable<z.ZodString>;
9302
+ createdAt: z.ZodString;
9303
+ updatedAt: z.ZodString;
9304
+ base: z.ZodNullable<z.ZodObject<{
9305
+ id: z.ZodString;
9306
+ nodeId: z.ZodString;
9307
+ slug: z.ZodString;
9308
+ name: z.ZodString;
9309
+ description: z.ZodString;
9310
+ reviewPolicy: z.ZodObject<{
9311
+ kind: z.ZodLiteral<"single">;
9312
+ requiredApprovals: z.ZodNumber;
9313
+ }, z.core.$strip>;
9314
+ createdAt: z.ZodString;
9315
+ fields: z.ZodArray<z.ZodObject<{
9316
+ id: z.ZodString;
9317
+ baseId: z.ZodString;
9318
+ slug: z.ZodString;
9319
+ name: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<{
9320
+ de: "de";
9321
+ en: "en";
9322
+ es: "es";
9323
+ fr: "fr";
9324
+ ja: "ja";
9325
+ ko: "ko";
9326
+ pt: "pt";
9327
+ "zh-CN": "zh-CN";
9328
+ "zh-TW": "zh-TW";
9329
+ }> & z.core.$partial, z.ZodString>]>;
9330
+ type: z.ZodEnum<{
9331
+ ai_summary: "ai_summary";
9332
+ ai_tags: "ai_tags";
9333
+ attachment: "attachment";
9334
+ auto_number: "auto_number";
9335
+ checkbox: "checkbox";
9336
+ code: "code";
9337
+ created_by: "created_by";
9338
+ created_time: "created_time";
9339
+ date: "date";
9340
+ email: "email";
9341
+ embed: "embed";
9342
+ formula: "formula";
9343
+ html: "html";
9344
+ json: "json";
9345
+ longtext: "longtext";
9346
+ lookup: "lookup";
9347
+ markdown: "markdown";
9348
+ multiselect: "multiselect";
9349
+ number: "number";
9350
+ phone: "phone";
9351
+ relation: "relation";
9352
+ select: "select";
9353
+ text: "text";
9354
+ updated_by: "updated_by";
9355
+ updated_time: "updated_time";
9356
+ url: "url";
9357
+ whiteboard: "whiteboard";
9358
+ yaml: "yaml";
9359
+ }>;
9360
+ required: z.ZodBoolean;
9361
+ position: z.ZodNumber;
9362
+ options: z.ZodDefault<z.ZodObject<{
9363
+ ai: z.ZodOptional<z.ZodObject<{
9364
+ model: z.ZodOptional<z.ZodString>;
9365
+ prompt: z.ZodOptional<z.ZodString>;
9366
+ reviewRequired: z.ZodOptional<z.ZodBoolean>;
9367
+ sourceFieldIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
9368
+ }, z.core.$strip>>;
9369
+ attachment: z.ZodOptional<z.ZodObject<{
9370
+ maxFiles: z.ZodOptional<z.ZodNumber>;
9371
+ allowedMimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
9372
+ maxFileSize: z.ZodOptional<z.ZodNumber>;
9373
+ }, z.core.$strip>>;
9374
+ choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
9375
+ color: z.ZodOptional<z.ZodString>;
9376
+ id: z.ZodString;
9377
+ name: z.ZodString;
9378
+ }, z.core.$strip>>>;
9379
+ code: z.ZodOptional<z.ZodObject<{
9380
+ language: z.ZodOptional<z.ZodString>;
9381
+ }, z.core.$strip>>;
9382
+ embed: z.ZodOptional<z.ZodObject<{
9383
+ aspectRatio: z.ZodOptional<z.ZodEnum<{
9384
+ "16:9": "16:9";
9385
+ "1:1": "1:1";
9386
+ "4:3": "4:3";
9387
+ }>>;
9388
+ height: z.ZodOptional<z.ZodNumber>;
9389
+ providers: z.ZodOptional<z.ZodArray<z.ZodString>>;
9390
+ }, z.core.$strip>>;
9391
+ formula: z.ZodOptional<z.ZodObject<{
9392
+ expression: z.ZodString;
9393
+ }, z.core.$strip>>;
9394
+ inverseFieldId: z.ZodOptional<z.ZodString>;
9395
+ lookup: z.ZodOptional<z.ZodObject<{
9396
+ relationFieldSlug: z.ZodString;
9397
+ targetFieldSlug: z.ZodString;
9398
+ rollup: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
9399
+ average: "average";
9400
+ concatenate: "concatenate";
9401
+ count: "count";
9402
+ max: "max";
9403
+ min: "min";
9404
+ sum: "sum";
9405
+ values: "values";
9406
+ }>>>;
9407
+ limit: z.ZodOptional<z.ZodEnum<{
9408
+ all: "all";
9409
+ first: "first";
9410
+ }>>;
9411
+ }, z.core.$strip>>;
9412
+ multiple: z.ZodOptional<z.ZodBoolean>;
9413
+ number: z.ZodOptional<z.ZodObject<{
9414
+ format: z.ZodOptional<z.ZodEnum<{
9415
+ currency: "currency";
9416
+ plain: "plain";
9417
+ }>>;
9418
+ currency: z.ZodOptional<z.ZodString>;
9419
+ locale: z.ZodOptional<z.ZodString>;
9420
+ }, z.core.$strip>>;
9421
+ targetBaseId: z.ZodOptional<z.ZodString>;
9422
+ targetBaseSlug: z.ZodOptional<z.ZodString>;
9423
+ }, z.core.$strip>>;
9424
+ }, z.core.$strip>>;
9425
+ }, z.core.$strip>>;
9426
+ node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
9427
+ operations: z.ZodArray<z.ZodObject<{
9428
+ id: z.ZodString;
9429
+ changeRequestId: z.ZodString;
9430
+ baseId: z.ZodNullable<z.ZodString>;
9431
+ targetType: z.ZodEnum<{
9432
+ base: "base";
9433
+ node: "node";
9434
+ }>;
9435
+ nodeId: z.ZodNullable<z.ZodString>;
9436
+ operation: z.ZodEnum<{
9437
+ [x: `${string}_file_create`]: `${string}_file_create`;
9438
+ [x: `${string}_file_delete`]: `${string}_file_delete`;
9439
+ [x: `${string}_file_update`]: `${string}_file_update`;
9440
+ [x: `${string}_metadata_update`]: `${string}_metadata_update`;
9441
+ base_add_field: "base_add_field";
9442
+ base_archive: "base_archive";
9443
+ base_convert_field: "base_convert_field";
9444
+ base_delete_field: "base_delete_field";
9445
+ base_reorder_fields: "base_reorder_fields";
9446
+ base_restore: "base_restore";
9447
+ base_restore_field: "base_restore_field";
9448
+ base_update_field: "base_update_field";
9449
+ doc_update: "doc_update";
9450
+ html_document_update: "html_document_update";
9451
+ node_create: "node_create";
9452
+ node_delete: "node_delete";
9453
+ node_move: "node_move";
9454
+ node_rename: "node_rename";
9455
+ node_restore: "node_restore";
9456
+ record_create: "record_create";
9457
+ record_delete: "record_delete";
9458
+ record_restore: "record_restore";
9459
+ record_update: "record_update";
9460
+ record_variant: "record_variant";
9461
+ view_create: "view_create";
9462
+ view_delete: "view_delete";
9463
+ view_restore: "view_restore";
9464
+ view_update: "view_update";
9465
+ whiteboard_document_update: "whiteboard_document_update";
9466
+ workflow_document_update: "workflow_document_update";
9467
+ }>;
9468
+ status: z.ZodEnum<{
9469
+ archived: "archived";
9470
+ failed: "failed";
9471
+ merged: "merged";
9472
+ pending: "pending";
9473
+ }>;
9474
+ targetRecordId: z.ZodNullable<z.ZodString>;
9475
+ targetViewId: z.ZodNullable<z.ZodString>;
9476
+ filePath: z.ZodNullable<z.ZodString>;
9477
+ sourceRecordId: z.ZodNullable<z.ZodString>;
9478
+ sourceCommitId: z.ZodNullable<z.ZodString>;
9479
+ baseCommitId: z.ZodNullable<z.ZodString>;
9480
+ headCommitId: z.ZodString;
9481
+ deleteMode: z.ZodEnum<{
9482
+ archive: "archive";
9483
+ }>;
9484
+ mergedRecordId: z.ZodNullable<z.ZodString>;
9485
+ mergedViewId: z.ZodNullable<z.ZodString>;
9486
+ position: z.ZodNumber;
9487
+ createdAt: z.ZodString;
9488
+ updatedAt: z.ZodString;
9489
+ headCommit: z.ZodObject<{
9490
+ id: z.ZodString;
9491
+ baseId: z.ZodNullable<z.ZodString>;
9492
+ targetType: z.ZodEnum<{
9493
+ base: "base";
9494
+ node: "node";
9495
+ }>;
9496
+ nodeId: z.ZodNullable<z.ZodString>;
9497
+ operationId: z.ZodNullable<z.ZodString>;
9498
+ parentCommitId: z.ZodNullable<z.ZodString>;
9499
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
9500
+ operation: z.ZodEnum<{
9501
+ [x: `${string}_file_create`]: `${string}_file_create`;
9502
+ [x: `${string}_file_delete`]: `${string}_file_delete`;
9503
+ [x: `${string}_file_update`]: `${string}_file_update`;
9504
+ [x: `${string}_metadata_update`]: `${string}_metadata_update`;
9505
+ base_add_field: "base_add_field";
9506
+ base_archive: "base_archive";
9507
+ base_convert_field: "base_convert_field";
9508
+ base_delete_field: "base_delete_field";
9509
+ base_reorder_fields: "base_reorder_fields";
9510
+ base_restore: "base_restore";
9511
+ base_restore_field: "base_restore_field";
9512
+ base_update_field: "base_update_field";
9513
+ doc_update: "doc_update";
9514
+ html_document_update: "html_document_update";
9515
+ node_create: "node_create";
9516
+ node_delete: "node_delete";
9517
+ node_move: "node_move";
9518
+ node_rename: "node_rename";
9519
+ node_restore: "node_restore";
9520
+ record_create: "record_create";
9521
+ record_delete: "record_delete";
9522
+ record_restore: "record_restore";
9523
+ record_update: "record_update";
9524
+ record_variant: "record_variant";
9525
+ view_create: "view_create";
9526
+ view_delete: "view_delete";
9527
+ view_restore: "view_restore";
9528
+ view_update: "view_update";
9529
+ whiteboard_document_update: "whiteboard_document_update";
9530
+ workflow_document_update: "workflow_document_update";
9531
+ }>;
9532
+ message: z.ZodString;
9533
+ author: z.ZodString;
9534
+ authorUser: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
9535
+ id: z.ZodString;
9536
+ name: z.ZodNullable<z.ZodString>;
9537
+ email: z.ZodNullable<z.ZodString>;
9538
+ image: z.ZodNullable<z.ZodString>;
9539
+ role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9540
+ }, z.core.$strip>>>>;
9541
+ createdAt: z.ZodString;
9542
+ }, z.core.$strip>;
9543
+ baseFields: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9544
+ }, z.core.$strip>>;
9545
+ primaryOperation: z.ZodNullable<z.ZodObject<{
9546
+ id: z.ZodString;
9547
+ changeRequestId: z.ZodString;
9548
+ baseId: z.ZodNullable<z.ZodString>;
9549
+ targetType: z.ZodEnum<{
9550
+ base: "base";
9551
+ node: "node";
9552
+ }>;
9553
+ nodeId: z.ZodNullable<z.ZodString>;
9554
+ operation: z.ZodEnum<{
9555
+ [x: `${string}_file_create`]: `${string}_file_create`;
9556
+ [x: `${string}_file_delete`]: `${string}_file_delete`;
9557
+ [x: `${string}_file_update`]: `${string}_file_update`;
9558
+ [x: `${string}_metadata_update`]: `${string}_metadata_update`;
9559
+ base_add_field: "base_add_field";
9560
+ base_archive: "base_archive";
9561
+ base_convert_field: "base_convert_field";
9562
+ base_delete_field: "base_delete_field";
9563
+ base_reorder_fields: "base_reorder_fields";
9564
+ base_restore: "base_restore";
9565
+ base_restore_field: "base_restore_field";
9566
+ base_update_field: "base_update_field";
9567
+ doc_update: "doc_update";
9568
+ html_document_update: "html_document_update";
9569
+ node_create: "node_create";
9570
+ node_delete: "node_delete";
9571
+ node_move: "node_move";
9572
+ node_rename: "node_rename";
9573
+ node_restore: "node_restore";
9574
+ record_create: "record_create";
9575
+ record_delete: "record_delete";
9576
+ record_restore: "record_restore";
9577
+ record_update: "record_update";
9578
+ record_variant: "record_variant";
9579
+ view_create: "view_create";
9580
+ view_delete: "view_delete";
9581
+ view_restore: "view_restore";
9582
+ view_update: "view_update";
9583
+ whiteboard_document_update: "whiteboard_document_update";
9584
+ workflow_document_update: "workflow_document_update";
9585
+ }>;
9586
+ status: z.ZodEnum<{
9587
+ archived: "archived";
9588
+ failed: "failed";
9589
+ merged: "merged";
9590
+ pending: "pending";
9591
+ }>;
9592
+ targetRecordId: z.ZodNullable<z.ZodString>;
9593
+ targetViewId: z.ZodNullable<z.ZodString>;
9594
+ filePath: z.ZodNullable<z.ZodString>;
9595
+ sourceRecordId: z.ZodNullable<z.ZodString>;
9596
+ sourceCommitId: z.ZodNullable<z.ZodString>;
9597
+ baseCommitId: z.ZodNullable<z.ZodString>;
9598
+ headCommitId: z.ZodString;
9599
+ deleteMode: z.ZodEnum<{
9600
+ archive: "archive";
9601
+ }>;
9602
+ mergedRecordId: z.ZodNullable<z.ZodString>;
9603
+ mergedViewId: z.ZodNullable<z.ZodString>;
9604
+ position: z.ZodNumber;
9605
+ createdAt: z.ZodString;
9606
+ updatedAt: z.ZodString;
9607
+ headCommit: z.ZodObject<{
9608
+ id: z.ZodString;
9609
+ baseId: z.ZodNullable<z.ZodString>;
9610
+ targetType: z.ZodEnum<{
9611
+ base: "base";
9612
+ node: "node";
9613
+ }>;
9614
+ nodeId: z.ZodNullable<z.ZodString>;
9615
+ operationId: z.ZodNullable<z.ZodString>;
9616
+ parentCommitId: z.ZodNullable<z.ZodString>;
9617
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
9618
+ operation: z.ZodEnum<{
9619
+ [x: `${string}_file_create`]: `${string}_file_create`;
9620
+ [x: `${string}_file_delete`]: `${string}_file_delete`;
9621
+ [x: `${string}_file_update`]: `${string}_file_update`;
9622
+ [x: `${string}_metadata_update`]: `${string}_metadata_update`;
9623
+ base_add_field: "base_add_field";
9624
+ base_archive: "base_archive";
9625
+ base_convert_field: "base_convert_field";
9626
+ base_delete_field: "base_delete_field";
9627
+ base_reorder_fields: "base_reorder_fields";
9628
+ base_restore: "base_restore";
9629
+ base_restore_field: "base_restore_field";
9630
+ base_update_field: "base_update_field";
9631
+ doc_update: "doc_update";
9632
+ html_document_update: "html_document_update";
9633
+ node_create: "node_create";
9634
+ node_delete: "node_delete";
9635
+ node_move: "node_move";
9636
+ node_rename: "node_rename";
9637
+ node_restore: "node_restore";
9638
+ record_create: "record_create";
9639
+ record_delete: "record_delete";
9640
+ record_restore: "record_restore";
9641
+ record_update: "record_update";
9642
+ record_variant: "record_variant";
9643
+ view_create: "view_create";
9644
+ view_delete: "view_delete";
9645
+ view_restore: "view_restore";
9646
+ view_update: "view_update";
9647
+ whiteboard_document_update: "whiteboard_document_update";
9648
+ workflow_document_update: "workflow_document_update";
9649
+ }>;
9650
+ message: z.ZodString;
9651
+ author: z.ZodString;
9652
+ authorUser: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
9653
+ id: z.ZodString;
9654
+ name: z.ZodNullable<z.ZodString>;
9655
+ email: z.ZodNullable<z.ZodString>;
9656
+ image: z.ZodNullable<z.ZodString>;
9657
+ role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9658
+ }, z.core.$strip>>>>;
9659
+ createdAt: z.ZodString;
9660
+ }, z.core.$strip>;
9661
+ baseFields: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9662
+ }, z.core.$strip>>;
9663
+ operationCount: z.ZodNumber;
9664
+ reviews: z.ZodArray<z.ZodObject<{
9665
+ id: z.ZodString;
9666
+ changeRequestId: z.ZodString;
9667
+ reviewerId: z.ZodString;
9668
+ reviewer: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
9669
+ id: z.ZodString;
9670
+ name: z.ZodNullable<z.ZodString>;
9671
+ email: z.ZodNullable<z.ZodString>;
9672
+ image: z.ZodNullable<z.ZodString>;
9673
+ role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9674
+ }, z.core.$strip>>>>;
9675
+ verdict: z.ZodEnum<{
9676
+ approved: "approved";
9677
+ rejected: "rejected";
9678
+ }>;
9679
+ reason: z.ZodNullable<z.ZodString>;
9680
+ visibleOperationHeads: z.ZodRecord<z.ZodString, z.ZodString>;
9681
+ createdAt: z.ZodString;
9682
+ }, z.core.$strip>>;
9683
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
9260
9684
  createField: import("@orpc/contract").ContractProcedure<z.ZodObject<{
9261
9685
  name: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<{
9262
9686
  de: "de";
@@ -12958,7 +13382,10 @@ declare const cloudContract: {
12958
13382
  storageKey: z.ZodString;
12959
13383
  publicUrl: z.ZodString;
12960
13384
  }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
12961
- list: import("@orpc/contract").ContractProcedure<import("@orpc/contract").Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
13385
+ list: import("@orpc/contract").ContractProcedure<z.ZodOptional<z.ZodObject<{
13386
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
13387
+ cursor: z.ZodOptional<z.ZodString>;
13388
+ }, z.core.$strip>>, z.ZodArray<z.ZodObject<{
12962
13389
  id: z.ZodString;
12963
13390
  attachmentId: z.ZodString;
12964
13391
  name: z.ZodString;
@@ -13581,6 +14008,37 @@ declare const cloudContract: {
13581
14008
  ok: z.ZodBoolean;
13582
14009
  deletedSessionCount: z.ZodNumber;
13583
14010
  }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
14011
+ connections: {
14012
+ list: import("@orpc/contract").ContractProcedure<import("@orpc/contract").Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
14013
+ slug: z.ZodString;
14014
+ agentName: z.ZodString;
14015
+ transport: z.ZodEnum<{
14016
+ "local-subprocess": "local-subprocess";
14017
+ "remote-websocket": "remote-websocket";
14018
+ }>;
14019
+ sessionCount: z.ZodNumber;
14020
+ latest: z.ZodNullable<z.ZodObject<{
14021
+ id: z.ZodString;
14022
+ slug: z.ZodString;
14023
+ agentName: z.ZodString;
14024
+ transport: z.ZodEnum<{
14025
+ "local-subprocess": "local-subprocess";
14026
+ "remote-websocket": "remote-websocket";
14027
+ }>;
14028
+ status: z.ZodEnum<{
14029
+ busy: "busy";
14030
+ connecting: "connecting";
14031
+ ended: "ended";
14032
+ failed: "failed";
14033
+ idle: "idle";
14034
+ waiting_permission: "waiting_permission";
14035
+ }>;
14036
+ createdAt: z.ZodString;
14037
+ lastActivityAt: z.ZodString;
14038
+ error: z.ZodDefault<z.ZodNullable<z.ZodString>>;
14039
+ }, z.core.$strip>>;
14040
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
14041
+ };
13584
14042
  sessions: {
13585
14043
  list: import("@orpc/contract").ContractProcedure<import("@orpc/contract").Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
13586
14044
  id: z.ZodString;
@@ -14368,15 +14826,467 @@ declare const cloudContract: {
14368
14826
  }, z.core.$strip>;
14369
14827
  sourceUrl: z.ZodString;
14370
14828
  }, z.core.$strip>>;
14371
- repo: z.ZodString;
14372
- ref: z.ZodString;
14373
- error: z.ZodOptional<z.ZodString>;
14829
+ repo: z.ZodString;
14830
+ ref: z.ZodString;
14831
+ error: z.ZodOptional<z.ZodString>;
14832
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
14833
+ };
14834
+ guides: {
14835
+ list: import("@orpc/contract").ContractProcedure<import("@orpc/contract").Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
14836
+ topic: z.ZodString;
14837
+ title: z.ZodString;
14838
+ kind: z.ZodEnum<{
14839
+ reference: "reference";
14840
+ walkthrough: "walkthrough";
14841
+ }>;
14842
+ summary: z.ZodString;
14843
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
14844
+ read: import("@orpc/contract").ContractProcedure<z.ZodObject<{
14845
+ topic: z.ZodString;
14846
+ }, z.core.$strip>, z.ZodObject<{
14847
+ topic: z.ZodString;
14848
+ title: z.ZodString;
14849
+ kind: z.ZodEnum<{
14850
+ reference: "reference";
14851
+ walkthrough: "walkthrough";
14852
+ }>;
14853
+ content: z.ZodString;
14854
+ otherTopics: z.ZodArray<z.ZodString>;
14855
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
14856
+ };
14857
+ changeRequests: {
14858
+ list: import("@orpc/contract").ContractProcedure<z.ZodDefault<z.ZodOptional<z.ZodObject<{
14859
+ limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
14860
+ cursor: z.ZodOptional<z.ZodString>;
14861
+ status: z.ZodOptional<z.ZodArray<z.ZodEnum<{
14862
+ abandoned: "abandoned";
14863
+ approved: "approved";
14864
+ changes_requested: "changes_requested";
14865
+ conflict: "conflict";
14866
+ in_review: "in_review";
14867
+ merged: "merged";
14868
+ rejected: "rejected";
14869
+ }>>>;
14870
+ mine: z.ZodOptional<z.ZodBoolean>;
14871
+ }, z.core.$strip>>>, z.ZodObject<{
14872
+ changeRequests: z.ZodArray<z.ZodObject<{
14873
+ id: z.ZodString;
14874
+ baseId: z.ZodNullable<z.ZodString>;
14875
+ targetType: z.ZodEnum<{
14876
+ base: "base";
14877
+ node: "node";
14878
+ }>;
14879
+ nodeId: z.ZodNullable<z.ZodString>;
14880
+ status: z.ZodEnum<{
14881
+ abandoned: "abandoned";
14882
+ approved: "approved";
14883
+ changes_requested: "changes_requested";
14884
+ conflict: "conflict";
14885
+ in_review: "in_review";
14886
+ merged: "merged";
14887
+ rejected: "rejected";
14888
+ }>;
14889
+ submittedBy: z.ZodString;
14890
+ submittedByUser: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
14891
+ id: z.ZodString;
14892
+ name: z.ZodNullable<z.ZodString>;
14893
+ email: z.ZodNullable<z.ZodString>;
14894
+ image: z.ZodNullable<z.ZodString>;
14895
+ role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14896
+ }, z.core.$strip>>>>;
14897
+ sourceMeta: z.ZodRecord<z.ZodString, z.ZodUnknown>;
14898
+ reviewPolicySnapshot: z.ZodRecord<z.ZodString, z.ZodUnknown>;
14899
+ mergeSummary: z.ZodRecord<z.ZodString, z.ZodUnknown>;
14900
+ rejectedReason: z.ZodNullable<z.ZodString>;
14901
+ reviewedAt: z.ZodNullable<z.ZodString>;
14902
+ mergedAt: z.ZodNullable<z.ZodString>;
14903
+ createdAt: z.ZodString;
14904
+ updatedAt: z.ZodString;
14905
+ base: z.ZodNullable<z.ZodObject<{
14906
+ id: z.ZodString;
14907
+ nodeId: z.ZodString;
14908
+ slug: z.ZodString;
14909
+ name: z.ZodString;
14910
+ description: z.ZodString;
14911
+ reviewPolicy: z.ZodObject<{
14912
+ kind: z.ZodLiteral<"single">;
14913
+ requiredApprovals: z.ZodNumber;
14914
+ }, z.core.$strip>;
14915
+ createdAt: z.ZodString;
14916
+ fields: z.ZodArray<z.ZodObject<{
14917
+ id: z.ZodString;
14918
+ baseId: z.ZodString;
14919
+ slug: z.ZodString;
14920
+ name: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<{
14921
+ de: "de";
14922
+ en: "en";
14923
+ es: "es";
14924
+ fr: "fr";
14925
+ ja: "ja";
14926
+ ko: "ko";
14927
+ pt: "pt";
14928
+ "zh-CN": "zh-CN";
14929
+ "zh-TW": "zh-TW";
14930
+ }> & z.core.$partial, z.ZodString>]>;
14931
+ type: z.ZodEnum<{
14932
+ ai_summary: "ai_summary";
14933
+ ai_tags: "ai_tags";
14934
+ attachment: "attachment";
14935
+ auto_number: "auto_number";
14936
+ checkbox: "checkbox";
14937
+ code: "code";
14938
+ created_by: "created_by";
14939
+ created_time: "created_time";
14940
+ date: "date";
14941
+ email: "email";
14942
+ embed: "embed";
14943
+ formula: "formula";
14944
+ html: "html";
14945
+ json: "json";
14946
+ longtext: "longtext";
14947
+ lookup: "lookup";
14948
+ markdown: "markdown";
14949
+ multiselect: "multiselect";
14950
+ number: "number";
14951
+ phone: "phone";
14952
+ relation: "relation";
14953
+ select: "select";
14954
+ text: "text";
14955
+ updated_by: "updated_by";
14956
+ updated_time: "updated_time";
14957
+ url: "url";
14958
+ whiteboard: "whiteboard";
14959
+ yaml: "yaml";
14960
+ }>;
14961
+ required: z.ZodBoolean;
14962
+ position: z.ZodNumber;
14963
+ options: z.ZodDefault<z.ZodObject<{
14964
+ ai: z.ZodOptional<z.ZodObject<{
14965
+ model: z.ZodOptional<z.ZodString>;
14966
+ prompt: z.ZodOptional<z.ZodString>;
14967
+ reviewRequired: z.ZodOptional<z.ZodBoolean>;
14968
+ sourceFieldIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
14969
+ }, z.core.$strip>>;
14970
+ attachment: z.ZodOptional<z.ZodObject<{
14971
+ maxFiles: z.ZodOptional<z.ZodNumber>;
14972
+ allowedMimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
14973
+ maxFileSize: z.ZodOptional<z.ZodNumber>;
14974
+ }, z.core.$strip>>;
14975
+ choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
14976
+ color: z.ZodOptional<z.ZodString>;
14977
+ id: z.ZodString;
14978
+ name: z.ZodString;
14979
+ }, z.core.$strip>>>;
14980
+ code: z.ZodOptional<z.ZodObject<{
14981
+ language: z.ZodOptional<z.ZodString>;
14982
+ }, z.core.$strip>>;
14983
+ embed: z.ZodOptional<z.ZodObject<{
14984
+ aspectRatio: z.ZodOptional<z.ZodEnum<{
14985
+ "16:9": "16:9";
14986
+ "1:1": "1:1";
14987
+ "4:3": "4:3";
14988
+ }>>;
14989
+ height: z.ZodOptional<z.ZodNumber>;
14990
+ providers: z.ZodOptional<z.ZodArray<z.ZodString>>;
14991
+ }, z.core.$strip>>;
14992
+ formula: z.ZodOptional<z.ZodObject<{
14993
+ expression: z.ZodString;
14994
+ }, z.core.$strip>>;
14995
+ inverseFieldId: z.ZodOptional<z.ZodString>;
14996
+ lookup: z.ZodOptional<z.ZodObject<{
14997
+ relationFieldSlug: z.ZodString;
14998
+ targetFieldSlug: z.ZodString;
14999
+ rollup: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
15000
+ average: "average";
15001
+ concatenate: "concatenate";
15002
+ count: "count";
15003
+ max: "max";
15004
+ min: "min";
15005
+ sum: "sum";
15006
+ values: "values";
15007
+ }>>>;
15008
+ limit: z.ZodOptional<z.ZodEnum<{
15009
+ all: "all";
15010
+ first: "first";
15011
+ }>>;
15012
+ }, z.core.$strip>>;
15013
+ multiple: z.ZodOptional<z.ZodBoolean>;
15014
+ number: z.ZodOptional<z.ZodObject<{
15015
+ format: z.ZodOptional<z.ZodEnum<{
15016
+ currency: "currency";
15017
+ plain: "plain";
15018
+ }>>;
15019
+ currency: z.ZodOptional<z.ZodString>;
15020
+ locale: z.ZodOptional<z.ZodString>;
15021
+ }, z.core.$strip>>;
15022
+ targetBaseId: z.ZodOptional<z.ZodString>;
15023
+ targetBaseSlug: z.ZodOptional<z.ZodString>;
15024
+ }, z.core.$strip>>;
15025
+ }, z.core.$strip>>;
15026
+ }, z.core.$strip>>;
15027
+ node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
15028
+ operations: z.ZodArray<z.ZodObject<{
15029
+ id: z.ZodString;
15030
+ changeRequestId: z.ZodString;
15031
+ baseId: z.ZodNullable<z.ZodString>;
15032
+ targetType: z.ZodEnum<{
15033
+ base: "base";
15034
+ node: "node";
15035
+ }>;
15036
+ nodeId: z.ZodNullable<z.ZodString>;
15037
+ operation: z.ZodEnum<{
15038
+ [x: `${string}_file_create`]: `${string}_file_create`;
15039
+ [x: `${string}_file_delete`]: `${string}_file_delete`;
15040
+ [x: `${string}_file_update`]: `${string}_file_update`;
15041
+ [x: `${string}_metadata_update`]: `${string}_metadata_update`;
15042
+ base_add_field: "base_add_field";
15043
+ base_archive: "base_archive";
15044
+ base_convert_field: "base_convert_field";
15045
+ base_delete_field: "base_delete_field";
15046
+ base_reorder_fields: "base_reorder_fields";
15047
+ base_restore: "base_restore";
15048
+ base_restore_field: "base_restore_field";
15049
+ base_update_field: "base_update_field";
15050
+ doc_update: "doc_update";
15051
+ html_document_update: "html_document_update";
15052
+ node_create: "node_create";
15053
+ node_delete: "node_delete";
15054
+ node_move: "node_move";
15055
+ node_rename: "node_rename";
15056
+ node_restore: "node_restore";
15057
+ record_create: "record_create";
15058
+ record_delete: "record_delete";
15059
+ record_restore: "record_restore";
15060
+ record_update: "record_update";
15061
+ record_variant: "record_variant";
15062
+ view_create: "view_create";
15063
+ view_delete: "view_delete";
15064
+ view_restore: "view_restore";
15065
+ view_update: "view_update";
15066
+ whiteboard_document_update: "whiteboard_document_update";
15067
+ workflow_document_update: "workflow_document_update";
15068
+ }>;
15069
+ status: z.ZodEnum<{
15070
+ archived: "archived";
15071
+ failed: "failed";
15072
+ merged: "merged";
15073
+ pending: "pending";
15074
+ }>;
15075
+ targetRecordId: z.ZodNullable<z.ZodString>;
15076
+ targetViewId: z.ZodNullable<z.ZodString>;
15077
+ filePath: z.ZodNullable<z.ZodString>;
15078
+ sourceRecordId: z.ZodNullable<z.ZodString>;
15079
+ sourceCommitId: z.ZodNullable<z.ZodString>;
15080
+ baseCommitId: z.ZodNullable<z.ZodString>;
15081
+ headCommitId: z.ZodString;
15082
+ deleteMode: z.ZodEnum<{
15083
+ archive: "archive";
15084
+ }>;
15085
+ mergedRecordId: z.ZodNullable<z.ZodString>;
15086
+ mergedViewId: z.ZodNullable<z.ZodString>;
15087
+ position: z.ZodNumber;
15088
+ createdAt: z.ZodString;
15089
+ updatedAt: z.ZodString;
15090
+ headCommit: z.ZodObject<{
15091
+ id: z.ZodString;
15092
+ baseId: z.ZodNullable<z.ZodString>;
15093
+ targetType: z.ZodEnum<{
15094
+ base: "base";
15095
+ node: "node";
15096
+ }>;
15097
+ nodeId: z.ZodNullable<z.ZodString>;
15098
+ operationId: z.ZodNullable<z.ZodString>;
15099
+ parentCommitId: z.ZodNullable<z.ZodString>;
15100
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
15101
+ operation: z.ZodEnum<{
15102
+ [x: `${string}_file_create`]: `${string}_file_create`;
15103
+ [x: `${string}_file_delete`]: `${string}_file_delete`;
15104
+ [x: `${string}_file_update`]: `${string}_file_update`;
15105
+ [x: `${string}_metadata_update`]: `${string}_metadata_update`;
15106
+ base_add_field: "base_add_field";
15107
+ base_archive: "base_archive";
15108
+ base_convert_field: "base_convert_field";
15109
+ base_delete_field: "base_delete_field";
15110
+ base_reorder_fields: "base_reorder_fields";
15111
+ base_restore: "base_restore";
15112
+ base_restore_field: "base_restore_field";
15113
+ base_update_field: "base_update_field";
15114
+ doc_update: "doc_update";
15115
+ html_document_update: "html_document_update";
15116
+ node_create: "node_create";
15117
+ node_delete: "node_delete";
15118
+ node_move: "node_move";
15119
+ node_rename: "node_rename";
15120
+ node_restore: "node_restore";
15121
+ record_create: "record_create";
15122
+ record_delete: "record_delete";
15123
+ record_restore: "record_restore";
15124
+ record_update: "record_update";
15125
+ record_variant: "record_variant";
15126
+ view_create: "view_create";
15127
+ view_delete: "view_delete";
15128
+ view_restore: "view_restore";
15129
+ view_update: "view_update";
15130
+ whiteboard_document_update: "whiteboard_document_update";
15131
+ workflow_document_update: "workflow_document_update";
15132
+ }>;
15133
+ message: z.ZodString;
15134
+ author: z.ZodString;
15135
+ authorUser: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
15136
+ id: z.ZodString;
15137
+ name: z.ZodNullable<z.ZodString>;
15138
+ email: z.ZodNullable<z.ZodString>;
15139
+ image: z.ZodNullable<z.ZodString>;
15140
+ role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15141
+ }, z.core.$strip>>>>;
15142
+ createdAt: z.ZodString;
15143
+ }, z.core.$strip>;
15144
+ baseFields: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
15145
+ }, z.core.$strip>>;
15146
+ primaryOperation: z.ZodNullable<z.ZodObject<{
15147
+ id: z.ZodString;
15148
+ changeRequestId: z.ZodString;
15149
+ baseId: z.ZodNullable<z.ZodString>;
15150
+ targetType: z.ZodEnum<{
15151
+ base: "base";
15152
+ node: "node";
15153
+ }>;
15154
+ nodeId: z.ZodNullable<z.ZodString>;
15155
+ operation: z.ZodEnum<{
15156
+ [x: `${string}_file_create`]: `${string}_file_create`;
15157
+ [x: `${string}_file_delete`]: `${string}_file_delete`;
15158
+ [x: `${string}_file_update`]: `${string}_file_update`;
15159
+ [x: `${string}_metadata_update`]: `${string}_metadata_update`;
15160
+ base_add_field: "base_add_field";
15161
+ base_archive: "base_archive";
15162
+ base_convert_field: "base_convert_field";
15163
+ base_delete_field: "base_delete_field";
15164
+ base_reorder_fields: "base_reorder_fields";
15165
+ base_restore: "base_restore";
15166
+ base_restore_field: "base_restore_field";
15167
+ base_update_field: "base_update_field";
15168
+ doc_update: "doc_update";
15169
+ html_document_update: "html_document_update";
15170
+ node_create: "node_create";
15171
+ node_delete: "node_delete";
15172
+ node_move: "node_move";
15173
+ node_rename: "node_rename";
15174
+ node_restore: "node_restore";
15175
+ record_create: "record_create";
15176
+ record_delete: "record_delete";
15177
+ record_restore: "record_restore";
15178
+ record_update: "record_update";
15179
+ record_variant: "record_variant";
15180
+ view_create: "view_create";
15181
+ view_delete: "view_delete";
15182
+ view_restore: "view_restore";
15183
+ view_update: "view_update";
15184
+ whiteboard_document_update: "whiteboard_document_update";
15185
+ workflow_document_update: "workflow_document_update";
15186
+ }>;
15187
+ status: z.ZodEnum<{
15188
+ archived: "archived";
15189
+ failed: "failed";
15190
+ merged: "merged";
15191
+ pending: "pending";
15192
+ }>;
15193
+ targetRecordId: z.ZodNullable<z.ZodString>;
15194
+ targetViewId: z.ZodNullable<z.ZodString>;
15195
+ filePath: z.ZodNullable<z.ZodString>;
15196
+ sourceRecordId: z.ZodNullable<z.ZodString>;
15197
+ sourceCommitId: z.ZodNullable<z.ZodString>;
15198
+ baseCommitId: z.ZodNullable<z.ZodString>;
15199
+ headCommitId: z.ZodString;
15200
+ deleteMode: z.ZodEnum<{
15201
+ archive: "archive";
15202
+ }>;
15203
+ mergedRecordId: z.ZodNullable<z.ZodString>;
15204
+ mergedViewId: z.ZodNullable<z.ZodString>;
15205
+ position: z.ZodNumber;
15206
+ createdAt: z.ZodString;
15207
+ updatedAt: z.ZodString;
15208
+ headCommit: z.ZodObject<{
15209
+ id: z.ZodString;
15210
+ baseId: z.ZodNullable<z.ZodString>;
15211
+ targetType: z.ZodEnum<{
15212
+ base: "base";
15213
+ node: "node";
15214
+ }>;
15215
+ nodeId: z.ZodNullable<z.ZodString>;
15216
+ operationId: z.ZodNullable<z.ZodString>;
15217
+ parentCommitId: z.ZodNullable<z.ZodString>;
15218
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
15219
+ operation: z.ZodEnum<{
15220
+ [x: `${string}_file_create`]: `${string}_file_create`;
15221
+ [x: `${string}_file_delete`]: `${string}_file_delete`;
15222
+ [x: `${string}_file_update`]: `${string}_file_update`;
15223
+ [x: `${string}_metadata_update`]: `${string}_metadata_update`;
15224
+ base_add_field: "base_add_field";
15225
+ base_archive: "base_archive";
15226
+ base_convert_field: "base_convert_field";
15227
+ base_delete_field: "base_delete_field";
15228
+ base_reorder_fields: "base_reorder_fields";
15229
+ base_restore: "base_restore";
15230
+ base_restore_field: "base_restore_field";
15231
+ base_update_field: "base_update_field";
15232
+ doc_update: "doc_update";
15233
+ html_document_update: "html_document_update";
15234
+ node_create: "node_create";
15235
+ node_delete: "node_delete";
15236
+ node_move: "node_move";
15237
+ node_rename: "node_rename";
15238
+ node_restore: "node_restore";
15239
+ record_create: "record_create";
15240
+ record_delete: "record_delete";
15241
+ record_restore: "record_restore";
15242
+ record_update: "record_update";
15243
+ record_variant: "record_variant";
15244
+ view_create: "view_create";
15245
+ view_delete: "view_delete";
15246
+ view_restore: "view_restore";
15247
+ view_update: "view_update";
15248
+ whiteboard_document_update: "whiteboard_document_update";
15249
+ workflow_document_update: "workflow_document_update";
15250
+ }>;
15251
+ message: z.ZodString;
15252
+ author: z.ZodString;
15253
+ authorUser: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
15254
+ id: z.ZodString;
15255
+ name: z.ZodNullable<z.ZodString>;
15256
+ email: z.ZodNullable<z.ZodString>;
15257
+ image: z.ZodNullable<z.ZodString>;
15258
+ role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15259
+ }, z.core.$strip>>>>;
15260
+ createdAt: z.ZodString;
15261
+ }, z.core.$strip>;
15262
+ baseFields: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
15263
+ }, z.core.$strip>>;
15264
+ operationCount: z.ZodNumber;
15265
+ reviews: z.ZodArray<z.ZodObject<{
15266
+ id: z.ZodString;
15267
+ changeRequestId: z.ZodString;
15268
+ reviewerId: z.ZodString;
15269
+ reviewer: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
15270
+ id: z.ZodString;
15271
+ name: z.ZodNullable<z.ZodString>;
15272
+ email: z.ZodNullable<z.ZodString>;
15273
+ image: z.ZodNullable<z.ZodString>;
15274
+ role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15275
+ }, z.core.$strip>>>>;
15276
+ verdict: z.ZodEnum<{
15277
+ approved: "approved";
15278
+ rejected: "rejected";
15279
+ }>;
15280
+ reason: z.ZodNullable<z.ZodString>;
15281
+ visibleOperationHeads: z.ZodRecord<z.ZodString, z.ZodString>;
15282
+ createdAt: z.ZodString;
15283
+ }, z.core.$strip>>;
15284
+ }, z.core.$strip>>;
15285
+ nextCursor: z.ZodNullable<z.ZodString>;
14374
15286
  }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
14375
- };
14376
- changeRequests: {
14377
- list: import("@orpc/contract").ContractProcedure<z.ZodDefault<z.ZodOptional<z.ZodObject<{
14378
- limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
14379
- cursor: z.ZodOptional<z.ZodString>;
15287
+ listPage: import("@orpc/contract").ContractProcedure<z.ZodDefault<z.ZodOptional<z.ZodObject<{
15288
+ page: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
15289
+ pageSize: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
14380
15290
  status: z.ZodOptional<z.ZodArray<z.ZodEnum<{
14381
15291
  abandoned: "abandoned";
14382
15292
  approved: "approved";
@@ -14801,9 +15711,12 @@ declare const cloudContract: {
14801
15711
  createdAt: z.ZodString;
14802
15712
  }, z.core.$strip>>;
14803
15713
  }, z.core.$strip>>;
14804
- nextCursor: z.ZodNullable<z.ZodString>;
15714
+ total: z.ZodNumber;
15715
+ totalPages: z.ZodNumber;
15716
+ page: z.ZodNumber;
15717
+ pageSize: z.ZodNumber;
14805
15718
  }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
14806
- listPage: import("@orpc/contract").ContractProcedure<z.ZodDefault<z.ZodOptional<z.ZodObject<{
15719
+ inboxSnapshot: import("@orpc/contract").ContractProcedure<z.ZodDefault<z.ZodOptional<z.ZodObject<{
14807
15720
  page: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
14808
15721
  pageSize: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
14809
15722
  status: z.ZodOptional<z.ZodArray<z.ZodEnum<{
@@ -15234,6 +16147,14 @@ declare const cloudContract: {
15234
16147
  totalPages: z.ZodNumber;
15235
16148
  page: z.ZodNumber;
15236
16149
  pageSize: z.ZodNumber;
16150
+ counts: z.ZodObject<{
16151
+ review: z.ZodNumber;
16152
+ changes: z.ZodNumber;
16153
+ created: z.ZodNumber;
16154
+ approved: z.ZodNumber;
16155
+ merged: z.ZodNumber;
16156
+ rejected: z.ZodNumber;
16157
+ }, z.core.$strip>;
15237
16158
  }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
15238
16159
  counts: import("@orpc/contract").ContractProcedure<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
15239
16160
  review: z.ZodNumber;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as createBusabaseClient, c as cloudContract, d as NodeIconSchema, f as CREATABLE_NODE_TYPES, h as OperationKind, i as ResolvedConfig, l as NodeOutput, m as NodeType, n as BusabaseConfig, o as resolveConfig, p as CreatableNodeType, r as DEFAULT_BASE_URL, s as CloudContract, t as BusabaseClient, u as NodeIcon } from "./client-slzL_ils.js";
1
+ import { a as createBusabaseClient, c as cloudContract, d as NodeIconSchema, f as CREATABLE_NODE_TYPES, h as OperationKind, i as ResolvedConfig, l as NodeOutput, m as NodeType, n as BusabaseConfig, o as resolveConfig, p as CreatableNodeType, r as DEFAULT_BASE_URL, s as CloudContract, t as BusabaseClient, u as NodeIcon } from "./client-kiUJSr_d.js";
2
2
  import { z } from "zod";
3
3
  //#region src/url.d.ts
4
4
  /**
package/dist/index.js CHANGED
@@ -136,6 +136,14 @@ const AgentSessionVOSchema = z.object({
136
136
  /** Set when status is "failed"; surfaced verbatim to the user. */
137
137
  error: z.string().nullable().default(null)
138
138
  });
139
+ /** One connected agent backend in the current space and authenticated user's scope. */
140
+ const AgentConnectionVOSchema = z.object({
141
+ slug: z.string(),
142
+ agentName: z.string(),
143
+ transport: AgentTransportSchema,
144
+ sessionCount: z.number().int().nonnegative(),
145
+ latest: AgentSessionVOSchema.nullable()
146
+ });
139
147
  /**
140
148
  * One streamed event from a session.
141
149
  *
@@ -210,6 +218,9 @@ const agentsContract = {
210
218
  ok: z.boolean(),
211
219
  deletedSessionCount: z.number().int().nonnegative()
212
220
  })),
221
+ connections: {
222
+ /** Connected backends, scoped to the current space and authenticated user. */
223
+ list: oc.output(AgentConnectionVOSchema.array()) },
213
224
  sessions: {
214
225
  list: oc.output(AgentSessionVOSchema.array()),
215
226
  create: oc.input(CreateAgentSessionInputSchema).output(AgentSessionVOSchema),
@@ -1017,8 +1028,7 @@ Object.fromEntries(ALL_OPERATIONS.map((operation) => [operation.kind, {
1017
1028
  * when a node carries no `icon`, every host falls back to the type icon, same
1018
1029
  * as before this field existed.
1019
1030
  *
1020
- * The `attachment` variant mirrors buda's `NodeLogo` shape (see
1021
- * `apps/buda/src/domains/agent-controller/components/use-logo-crop-upload.tsx`):
1031
+ * The `attachment` variant follows the shared avatar-cropping model:
1022
1032
  * `url`/`attachmentId` are the CROPPED display image actually rendered, while
1023
1033
  * `originalUrl`/`originalAttachmentId` + `crop` are kept so the crop dialog can
1024
1034
  * re-open non-destructively against the untouched source image instead of
@@ -1481,6 +1491,7 @@ const changeRequestCountsSchema = z.object({
1481
1491
  merged: z.number().int().nonnegative(),
1482
1492
  rejected: z.number().int().nonnegative()
1483
1493
  });
1494
+ const inboxSnapshotResponseSchema = listChangeRequestsPageResponseSchema.extend({ counts: changeRequestCountsSchema });
1484
1495
  const SEARCH_SOURCES = [
1485
1496
  "records",
1486
1497
  "files",
@@ -1870,6 +1881,23 @@ const AssetVOSchema = z.object({
1870
1881
  textStatus: AssetTextStatusSchema,
1871
1882
  createdAt: z.string()
1872
1883
  });
1884
+ /**
1885
+ * Optional bounds on `GET /assets`.
1886
+ *
1887
+ * The route took no input at all, so it always returned EVERY asset in the
1888
+ * space — 6.16 MB for 10,025 assets on a real workspace, which is more than an
1889
+ * agent's whole context and more than a mobile client should ever download.
1890
+ *
1891
+ * Both fields are optional and the response shape is unchanged, so an existing
1892
+ * caller that passes nothing still gets the full array it always got. Pass
1893
+ * `limit` to page: assets come back newest-first, and `cursor` is the `id` of
1894
+ * the last asset from the previous page. A page shorter than `limit` (including
1895
+ * an empty one) means there are no more.
1896
+ */
1897
+ const ListAssetsInputSchema = z.object({
1898
+ limit: z.coerce.number().int().min(1).max(200).optional().describe("Page size, 1-200. Omit to return every asset (the historical behaviour)."),
1899
+ cursor: z.string().optional().describe("Asset id of the last row of the previous page. Requires `limit`.")
1900
+ }).optional();
1873
1901
  /** One place an asset is referenced — the row behind "Where Used". */
1874
1902
  const AssetUsageVOSchema = z.object({
1875
1903
  ownerType: z.enum([
@@ -2074,8 +2102,8 @@ const assetsContract = {
2074
2102
  path: "/assets",
2075
2103
  tags: ["Assets"],
2076
2104
  summary: "List assets",
2077
- successDescription: "Every asset in the space, with file metadata and usage counts."
2078
- }).output(z.array(AssetVOSchema)),
2105
+ successDescription: "Assets in the space, newest first, with file metadata and usage counts. Every asset when `limit` is omitted; otherwise one page, where `cursor` is the previous page's last asset id and a short page means the end."
2106
+ }).input(ListAssetsInputSchema).output(z.array(AssetVOSchema)),
2079
2107
  get: oc.route({
2080
2108
  method: "GET",
2081
2109
  path: "/assets/{assetId}",
@@ -2367,6 +2395,33 @@ const createBulkChangeRequestInputSchema = z.object({
2367
2395
  idempotencyKey: z.string().optional().describe("Optional client-supplied key that dedupes retries. Scoped per base + submitter: calling this endpoint again with the SAME idempotencyKey returns the bulk change request created by the first call instead of creating a duplicate. Omit for normal one-shot calls; only set it when you might retry."),
2368
2396
  autoMerge: z.boolean().optional()
2369
2397
  });
2398
+ const bulkRecordUpdateSchema = z.object({
2399
+ recordId: z.string().min(1),
2400
+ fields: z.record(z.string(), z.unknown()).refine((fields) => Object.keys(fields).length > 0, "fields must contain at least one field"),
2401
+ baseCommitId: z.string().min(1).optional(),
2402
+ message: z.string().min(1).optional()
2403
+ });
2404
+ const createBulkUpdateChangeRequestInputSchema = z.object({
2405
+ updates: z.array(bulkRecordUpdateSchema).min(1).max(1e3),
2406
+ message: z.string().optional().default("Bulk update records"),
2407
+ submittedBy: z.string().optional().default("local-producer"),
2408
+ idempotencyKey: z.string().optional(),
2409
+ autoMerge: z.boolean().optional()
2410
+ }).superRefine(({ updates }, ctx) => {
2411
+ const seen = /* @__PURE__ */ new Set();
2412
+ for (const [index, update] of updates.entries()) {
2413
+ if (seen.has(update.recordId)) ctx.addIssue({
2414
+ code: "custom",
2415
+ path: [
2416
+ "updates",
2417
+ index,
2418
+ "recordId"
2419
+ ],
2420
+ message: `Duplicate recordId in batch: ${update.recordId}`
2421
+ });
2422
+ seen.add(update.recordId);
2423
+ }
2424
+ });
2370
2425
  const recordFieldFilterInputSchema = z.object({
2371
2426
  baseId: z.string().optional(),
2372
2427
  fieldSlug: z.string().min(1),
@@ -2476,6 +2531,13 @@ const baseContract = {
2476
2531
  summary: "Create bulk record Change Request in Base",
2477
2532
  successDescription: "Created one change request proposing many record creates."
2478
2533
  }).input(createBulkChangeRequestInputSchema.extend({ baseId: z.string() })).output(changeRequestSchema),
2534
+ createBulkUpdateChangeRequest: oc.route({
2535
+ method: "POST",
2536
+ path: "/bases/{baseId}/records/bulk-update-change-request",
2537
+ tags: ["Bases", "Change Requests"],
2538
+ summary: "Create bulk record update Change Request in Base",
2539
+ successDescription: "Created one change request proposing many record updates."
2540
+ }).input(createBulkUpdateChangeRequestInputSchema.extend({ baseId: z.string() })).output(changeRequestSchema),
2479
2541
  createField: oc.route({
2480
2542
  method: "POST",
2481
2543
  path: "/bases/{baseId}/fields",
@@ -2962,6 +3024,55 @@ const formContract = {
2962
3024
  }).input(SubmitFormInputSchema.extend({ nodeId: z.string() })).output(FormSubmitResultSchema)
2963
3025
  };
2964
3026
  //#endregion
3027
+ //#region ../../packages/busabase-contract/src/domains/guides/types.ts
3028
+ /**
3029
+ * Guides — the operating manual, as VOs.
3030
+ *
3031
+ * The manual existed only over MCP: `instructions`, `resources/*` and the
3032
+ * `busabase_guide` tool. Anything driving the REST API — busabase-cli, a script,
3033
+ * a CI step, an AirApp — was told nothing about the approval-first rules, the
3034
+ * field types, or the AirApp runtime contract, and was then judged on whether it
3035
+ * guessed the house rules. These routes publish the same documents, built from
3036
+ * the same source, so the two surfaces cannot drift.
3037
+ */
3038
+ const GuideKindSchema = z.enum(["reference", "walkthrough"]);
3039
+ /** One catalog entry — enough to choose a topic without fetching every document. */
3040
+ const GuideTopicVOSchema = z.object({
3041
+ topic: z.string(),
3042
+ title: z.string(),
3043
+ /** `reference` = read it and apply it. `walkthrough` = a workflow to run WITH the user. */
3044
+ kind: GuideKindSchema,
3045
+ summary: z.string()
3046
+ });
3047
+ const GuideVOSchema = z.object({
3048
+ topic: z.string(),
3049
+ title: z.string(),
3050
+ kind: GuideKindSchema,
3051
+ /** The document itself, markdown. */
3052
+ content: z.string(),
3053
+ /** The other topics this deployment serves, so one call is enough to keep going. */
3054
+ otherTopics: z.array(z.string())
3055
+ });
3056
+ const ReadGuideInputSchema = z.object({ topic: z.string().min(1).describe("Guide topic. Call `GET /guides` for the ones served here.") });
3057
+ //#endregion
3058
+ //#region ../../packages/busabase-contract/src/domains/guides/contract.ts
3059
+ const guidesContract = {
3060
+ list: oc.route({
3061
+ method: "GET",
3062
+ path: "/guides",
3063
+ tags: ["Guides"],
3064
+ summary: "List the guides this deployment serves",
3065
+ successDescription: "The guide catalog: topic, title, kind, and a one-line summary. Read one with `GET /guides/{topic}`."
3066
+ }).output(z.array(GuideTopicVOSchema)),
3067
+ read: oc.route({
3068
+ method: "GET",
3069
+ path: "/guides/{topic}",
3070
+ tags: ["Guides"],
3071
+ summary: "Read one guide",
3072
+ successDescription: "The full markdown document, plus the other topics served here. Read `workspace` before proposing changes and `airapp` before writing any AirApp file."
3073
+ }).input(ReadGuideInputSchema).output(GuideVOSchema)
3074
+ };
3075
+ //#endregion
2965
3076
  //#region ../../packages/busabase-contract/src/domains/install/types.ts
2966
3077
  /**
2967
3078
  * Install domain — DTO inputs and VO outputs for server-side "Install from
@@ -3101,6 +3212,13 @@ const InstallResultVOSchema = z.object({
3101
3212
  pendingChangeRequests: z.number().int().min(0),
3102
3213
  warnings: z.array(z.string()).default([])
3103
3214
  });
3215
+ z.object({
3216
+ /** Which of the five passes stopped, e.g. `Pass 4/5 (sample records)`. */
3217
+ phase: z.string(),
3218
+ targetFolderSlug: z.string(),
3219
+ created: InstallCreatedCountsVOSchema,
3220
+ pendingChangeRequests: z.number().int().min(0)
3221
+ });
3104
3222
  const repoUrlField = z.string().min(1).describe("GitHub repo URL: https://github.com/<owner>/<repo>[/tree/<ref>[/<subdir>]]. Only GitHub hosts are accepted.");
3105
3223
  const intoFolderField = z.string().optional().describe("Slug of the folder to install into. Defaults to the package manifest's name.");
3106
3224
  const renameField = z.boolean().optional().describe("Resolve slug collisions by suffixing (-2, -3, …) instead of refusing. Never overwrites anything.");
@@ -4310,6 +4428,7 @@ const busabaseContractRoutes = {
4310
4428
  dump: dumpContract,
4311
4429
  install: installContract,
4312
4430
  templates: templatesContract,
4431
+ guides: guidesContract,
4313
4432
  changeRequests: {
4314
4433
  list: oc.route({
4315
4434
  method: "GET",
@@ -4325,6 +4444,7 @@ const busabaseContractRoutes = {
4325
4444
  summary: "List a numbered change request page",
4326
4445
  successDescription: "A random-access page of change requests plus the total across the whole filter. Same `status` / `mine` filters as the cursor listing."
4327
4446
  }).input(listChangeRequestsPageInputSchema).output(listChangeRequestsPageResponseSchema),
4447
+ inboxSnapshot: oc.input(listChangeRequestsPageInputSchema).output(inboxSnapshotResponseSchema),
4328
4448
  counts: oc.route({
4329
4449
  method: "GET",
4330
4450
  path: "/change-requests/counts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "busabase-sdk",
3
- "version": "0.19.0",
3
+ "version": "0.19.2",
4
4
  "description": "Typed TypeScript/JavaScript SDK for the Busabase OpenAPI REST API. Talks to a local or remote `busabase server` (or Busabase Cloud).",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/busabase/busabase/tree/main/apps/busabase-sdk",
@@ -62,8 +62,8 @@
62
62
  "tsdown": "^0.22.14",
63
63
  "tsx": "^4.20.5",
64
64
  "typescript": "^7.0.2",
65
- "vitest": "^2.1.8",
66
- "busabase-contract": "0.19.0",
65
+ "vitest": "^4.1.11",
66
+ "busabase-contract": "0.19.2",
67
67
  "openlib": "0.1.1",
68
68
  "open-domains": "0.0.2"
69
69
  },