busa-sdk 0.19.0 → 0.19.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.
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-DPyDyOdK.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;
@@ -14373,6 +14831,29 @@ declare const cloudContract: {
14373
14831
  error: z.ZodOptional<z.ZodString>;
14374
14832
  }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
14375
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
+ };
14376
14857
  changeRequests: {
14377
14858
  list: import("@orpc/contract").ContractProcedure<z.ZodDefault<z.ZodOptional<z.ZodObject<{
14378
14859
  limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
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-DPyDyOdK.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
@@ -1870,6 +1880,23 @@ const AssetVOSchema = z.object({
1870
1880
  textStatus: AssetTextStatusSchema,
1871
1881
  createdAt: z.string()
1872
1882
  });
1883
+ /**
1884
+ * Optional bounds on `GET /assets`.
1885
+ *
1886
+ * The route took no input at all, so it always returned EVERY asset in the
1887
+ * space — 6.16 MB for 10,025 assets on a real workspace, which is more than an
1888
+ * agent's whole context and more than a mobile client should ever download.
1889
+ *
1890
+ * Both fields are optional and the response shape is unchanged, so an existing
1891
+ * caller that passes nothing still gets the full array it always got. Pass
1892
+ * `limit` to page: assets come back newest-first, and `cursor` is the `id` of
1893
+ * the last asset from the previous page. A page shorter than `limit` (including
1894
+ * an empty one) means there are no more.
1895
+ */
1896
+ const ListAssetsInputSchema = z.object({
1897
+ limit: z.coerce.number().int().min(1).max(200).optional().describe("Page size, 1-200. Omit to return every asset (the historical behaviour)."),
1898
+ cursor: z.string().optional().describe("Asset id of the last row of the previous page. Requires `limit`.")
1899
+ }).optional();
1873
1900
  /** One place an asset is referenced — the row behind "Where Used". */
1874
1901
  const AssetUsageVOSchema = z.object({
1875
1902
  ownerType: z.enum([
@@ -2074,8 +2101,8 @@ const assetsContract = {
2074
2101
  path: "/assets",
2075
2102
  tags: ["Assets"],
2076
2103
  summary: "List assets",
2077
- successDescription: "Every asset in the space, with file metadata and usage counts."
2078
- }).output(z.array(AssetVOSchema)),
2104
+ 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."
2105
+ }).input(ListAssetsInputSchema).output(z.array(AssetVOSchema)),
2079
2106
  get: oc.route({
2080
2107
  method: "GET",
2081
2108
  path: "/assets/{assetId}",
@@ -2367,6 +2394,33 @@ const createBulkChangeRequestInputSchema = z.object({
2367
2394
  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
2395
  autoMerge: z.boolean().optional()
2369
2396
  });
2397
+ const bulkRecordUpdateSchema = z.object({
2398
+ recordId: z.string().min(1),
2399
+ fields: z.record(z.string(), z.unknown()).refine((fields) => Object.keys(fields).length > 0, "fields must contain at least one field"),
2400
+ baseCommitId: z.string().min(1).optional(),
2401
+ message: z.string().min(1).optional()
2402
+ });
2403
+ const createBulkUpdateChangeRequestInputSchema = z.object({
2404
+ updates: z.array(bulkRecordUpdateSchema).min(1).max(1e3),
2405
+ message: z.string().optional().default("Bulk update records"),
2406
+ submittedBy: z.string().optional().default("local-producer"),
2407
+ idempotencyKey: z.string().optional(),
2408
+ autoMerge: z.boolean().optional()
2409
+ }).superRefine(({ updates }, ctx) => {
2410
+ const seen = /* @__PURE__ */ new Set();
2411
+ for (const [index, update] of updates.entries()) {
2412
+ if (seen.has(update.recordId)) ctx.addIssue({
2413
+ code: "custom",
2414
+ path: [
2415
+ "updates",
2416
+ index,
2417
+ "recordId"
2418
+ ],
2419
+ message: `Duplicate recordId in batch: ${update.recordId}`
2420
+ });
2421
+ seen.add(update.recordId);
2422
+ }
2423
+ });
2370
2424
  const recordFieldFilterInputSchema = z.object({
2371
2425
  baseId: z.string().optional(),
2372
2426
  fieldSlug: z.string().min(1),
@@ -2476,6 +2530,13 @@ const baseContract = {
2476
2530
  summary: "Create bulk record Change Request in Base",
2477
2531
  successDescription: "Created one change request proposing many record creates."
2478
2532
  }).input(createBulkChangeRequestInputSchema.extend({ baseId: z.string() })).output(changeRequestSchema),
2533
+ createBulkUpdateChangeRequest: oc.route({
2534
+ method: "POST",
2535
+ path: "/bases/{baseId}/records/bulk-update-change-request",
2536
+ tags: ["Bases", "Change Requests"],
2537
+ summary: "Create bulk record update Change Request in Base",
2538
+ successDescription: "Created one change request proposing many record updates."
2539
+ }).input(createBulkUpdateChangeRequestInputSchema.extend({ baseId: z.string() })).output(changeRequestSchema),
2479
2540
  createField: oc.route({
2480
2541
  method: "POST",
2481
2542
  path: "/bases/{baseId}/fields",
@@ -2962,6 +3023,55 @@ const formContract = {
2962
3023
  }).input(SubmitFormInputSchema.extend({ nodeId: z.string() })).output(FormSubmitResultSchema)
2963
3024
  };
2964
3025
  //#endregion
3026
+ //#region ../../packages/busabase-contract/src/domains/guides/types.ts
3027
+ /**
3028
+ * Guides — the operating manual, as VOs.
3029
+ *
3030
+ * The manual existed only over MCP: `instructions`, `resources/*` and the
3031
+ * `busabase_guide` tool. Anything driving the REST API — busabase-cli, a script,
3032
+ * a CI step, an AirApp — was told nothing about the approval-first rules, the
3033
+ * field types, or the AirApp runtime contract, and was then judged on whether it
3034
+ * guessed the house rules. These routes publish the same documents, built from
3035
+ * the same source, so the two surfaces cannot drift.
3036
+ */
3037
+ const GuideKindSchema = z.enum(["reference", "walkthrough"]);
3038
+ /** One catalog entry — enough to choose a topic without fetching every document. */
3039
+ const GuideTopicVOSchema = z.object({
3040
+ topic: z.string(),
3041
+ title: z.string(),
3042
+ /** `reference` = read it and apply it. `walkthrough` = a workflow to run WITH the user. */
3043
+ kind: GuideKindSchema,
3044
+ summary: z.string()
3045
+ });
3046
+ const GuideVOSchema = z.object({
3047
+ topic: z.string(),
3048
+ title: z.string(),
3049
+ kind: GuideKindSchema,
3050
+ /** The document itself, markdown. */
3051
+ content: z.string(),
3052
+ /** The other topics this deployment serves, so one call is enough to keep going. */
3053
+ otherTopics: z.array(z.string())
3054
+ });
3055
+ const ReadGuideInputSchema = z.object({ topic: z.string().min(1).describe("Guide topic. Call `GET /guides` for the ones served here.") });
3056
+ //#endregion
3057
+ //#region ../../packages/busabase-contract/src/domains/guides/contract.ts
3058
+ const guidesContract = {
3059
+ list: oc.route({
3060
+ method: "GET",
3061
+ path: "/guides",
3062
+ tags: ["Guides"],
3063
+ summary: "List the guides this deployment serves",
3064
+ successDescription: "The guide catalog: topic, title, kind, and a one-line summary. Read one with `GET /guides/{topic}`."
3065
+ }).output(z.array(GuideTopicVOSchema)),
3066
+ read: oc.route({
3067
+ method: "GET",
3068
+ path: "/guides/{topic}",
3069
+ tags: ["Guides"],
3070
+ summary: "Read one guide",
3071
+ successDescription: "The full markdown document, plus the other topics served here. Read `workspace` before proposing changes and `airapp` before writing any AirApp file."
3072
+ }).input(ReadGuideInputSchema).output(GuideVOSchema)
3073
+ };
3074
+ //#endregion
2965
3075
  //#region ../../packages/busabase-contract/src/domains/install/types.ts
2966
3076
  /**
2967
3077
  * Install domain — DTO inputs and VO outputs for server-side "Install from
@@ -4310,6 +4420,7 @@ const busabaseContractRoutes = {
4310
4420
  dump: dumpContract,
4311
4421
  install: installContract,
4312
4422
  templates: templatesContract,
4423
+ guides: guidesContract,
4313
4424
  changeRequests: {
4314
4425
  list: oc.route({
4315
4426
  method: "GET",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "busa-sdk",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Typed TypeScript/JavaScript SDK for the Busabase OpenAPI REST API. Talks to a local or remote `busabase server` (or Busabase Cloud). Short-name alias for busabase-sdk.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/busabase/busabase/tree/main/apps/busabase-sdk",