busabase-sdk 0.13.0 → 0.14.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/index.d.ts +439 -6
- package/dist/index.js +34 -5
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -234,7 +234,7 @@ declare const BUILTIN_NODE_TYPES: readonly [{
|
|
|
234
234
|
}, {
|
|
235
235
|
readonly type: "form";
|
|
236
236
|
readonly label: "Form";
|
|
237
|
-
readonly icon: "
|
|
237
|
+
readonly icon: "form";
|
|
238
238
|
readonly capabilities: {
|
|
239
239
|
readonly hasDetail: true;
|
|
240
240
|
readonly creatable: true;
|
|
@@ -285,7 +285,7 @@ type OperationKind = GenericOperationKind | RegisteredOperationKind;
|
|
|
285
285
|
* of truth). `schema/` is reserved for DB (PO); DTO/VO live here.
|
|
286
286
|
*
|
|
287
287
|
* Kernel-generic: `metadata` is an open record (apps layer their own typed
|
|
288
|
-
* metadata on top — e.g.
|
|
288
|
+
* metadata on top — e.g. Busabase Cloud's `AttachmentType` enum).
|
|
289
289
|
*/
|
|
290
290
|
|
|
291
291
|
/**
|
|
@@ -486,6 +486,59 @@ declare const FormFieldBindingSchema: z.ZodObject<{
|
|
|
486
486
|
help: z.ZodOptional<z.ZodString>;
|
|
487
487
|
}, z.core.$strip>;
|
|
488
488
|
type FormFieldBindingVO = z.infer<typeof FormFieldBindingSchema>;
|
|
489
|
+
/**
|
|
490
|
+
* Client-safe control metadata for one bound Base field. Public Forms expose
|
|
491
|
+
* only these curated fields, never the target Base or its records.
|
|
492
|
+
*/
|
|
493
|
+
declare const FormBoundFieldSchema: z.ZodObject<{
|
|
494
|
+
slug: z.ZodString;
|
|
495
|
+
name: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<{
|
|
496
|
+
en: "en";
|
|
497
|
+
"zh-CN": "zh-CN";
|
|
498
|
+
"zh-TW": "zh-TW";
|
|
499
|
+
ja: "ja";
|
|
500
|
+
ko: "ko";
|
|
501
|
+
de: "de";
|
|
502
|
+
fr: "fr";
|
|
503
|
+
es: "es";
|
|
504
|
+
pt: "pt";
|
|
505
|
+
}> & z.core.$partial, z.ZodString>]>;
|
|
506
|
+
type: z.ZodEnum<{
|
|
507
|
+
number: "number";
|
|
508
|
+
email: "email";
|
|
509
|
+
date: "date";
|
|
510
|
+
text: "text";
|
|
511
|
+
whiteboard: "whiteboard";
|
|
512
|
+
html: "html";
|
|
513
|
+
longtext: "longtext";
|
|
514
|
+
markdown: "markdown";
|
|
515
|
+
attachment: "attachment";
|
|
516
|
+
relation: "relation";
|
|
517
|
+
checkbox: "checkbox";
|
|
518
|
+
select: "select";
|
|
519
|
+
multiselect: "multiselect";
|
|
520
|
+
url: "url";
|
|
521
|
+
embed: "embed";
|
|
522
|
+
phone: "phone";
|
|
523
|
+
created_time: "created_time";
|
|
524
|
+
updated_time: "updated_time";
|
|
525
|
+
created_by: "created_by";
|
|
526
|
+
updated_by: "updated_by";
|
|
527
|
+
auto_number: "auto_number";
|
|
528
|
+
ai_summary: "ai_summary";
|
|
529
|
+
ai_tags: "ai_tags";
|
|
530
|
+
code: "code";
|
|
531
|
+
json: "json";
|
|
532
|
+
yaml: "yaml";
|
|
533
|
+
formula: "formula";
|
|
534
|
+
lookup: "lookup";
|
|
535
|
+
}>;
|
|
536
|
+
choices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
537
|
+
id: z.ZodString;
|
|
538
|
+
name: z.ZodString;
|
|
539
|
+
}, z.core.$strip>>>;
|
|
540
|
+
}, z.core.$strip>;
|
|
541
|
+
type FormBoundFieldVO = z.infer<typeof FormBoundFieldSchema>;
|
|
489
542
|
/** Optional theme tokens layered over the agent-authored page. */
|
|
490
543
|
declare const FormThemeSchema: z.ZodObject<{
|
|
491
544
|
logoUrl: z.ZodOptional<z.ZodString>;
|
|
@@ -536,6 +589,54 @@ declare const FormVOSchema: z.ZodObject<{
|
|
|
536
589
|
label: z.ZodOptional<z.ZodString>;
|
|
537
590
|
help: z.ZodOptional<z.ZodString>;
|
|
538
591
|
}, z.core.$strip>>;
|
|
592
|
+
boundFields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
593
|
+
slug: z.ZodString;
|
|
594
|
+
name: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<{
|
|
595
|
+
en: "en";
|
|
596
|
+
"zh-CN": "zh-CN";
|
|
597
|
+
"zh-TW": "zh-TW";
|
|
598
|
+
ja: "ja";
|
|
599
|
+
ko: "ko";
|
|
600
|
+
de: "de";
|
|
601
|
+
fr: "fr";
|
|
602
|
+
es: "es";
|
|
603
|
+
pt: "pt";
|
|
604
|
+
}> & z.core.$partial, z.ZodString>]>;
|
|
605
|
+
type: z.ZodEnum<{
|
|
606
|
+
number: "number";
|
|
607
|
+
email: "email";
|
|
608
|
+
date: "date";
|
|
609
|
+
text: "text";
|
|
610
|
+
whiteboard: "whiteboard";
|
|
611
|
+
html: "html";
|
|
612
|
+
longtext: "longtext";
|
|
613
|
+
markdown: "markdown";
|
|
614
|
+
attachment: "attachment";
|
|
615
|
+
relation: "relation";
|
|
616
|
+
checkbox: "checkbox";
|
|
617
|
+
select: "select";
|
|
618
|
+
multiselect: "multiselect";
|
|
619
|
+
url: "url";
|
|
620
|
+
embed: "embed";
|
|
621
|
+
phone: "phone";
|
|
622
|
+
created_time: "created_time";
|
|
623
|
+
updated_time: "updated_time";
|
|
624
|
+
created_by: "created_by";
|
|
625
|
+
updated_by: "updated_by";
|
|
626
|
+
auto_number: "auto_number";
|
|
627
|
+
ai_summary: "ai_summary";
|
|
628
|
+
ai_tags: "ai_tags";
|
|
629
|
+
code: "code";
|
|
630
|
+
json: "json";
|
|
631
|
+
yaml: "yaml";
|
|
632
|
+
formula: "formula";
|
|
633
|
+
lookup: "lookup";
|
|
634
|
+
}>;
|
|
635
|
+
choices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
636
|
+
id: z.ZodString;
|
|
637
|
+
name: z.ZodString;
|
|
638
|
+
}, z.core.$strip>>>;
|
|
639
|
+
}, z.core.$strip>>>;
|
|
539
640
|
page: z.ZodObject<{
|
|
540
641
|
code: z.ZodOptional<z.ZodString>;
|
|
541
642
|
theme: z.ZodOptional<z.ZodObject<{
|
|
@@ -561,6 +662,102 @@ declare const FormVOSchema: z.ZodObject<{
|
|
|
561
662
|
updatedAt: z.ZodString;
|
|
562
663
|
}, z.core.$strip>;
|
|
563
664
|
type FormVO = z.infer<typeof FormVOSchema>;
|
|
665
|
+
declare const ListFormsInputSchema: z.ZodObject<{
|
|
666
|
+
targetBaseId: z.ZodString;
|
|
667
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
668
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
669
|
+
}, z.core.$strip>;
|
|
670
|
+
type ListFormsDTO = z.infer<typeof ListFormsInputSchema>;
|
|
671
|
+
declare const ListFormsVOSchema: z.ZodObject<{
|
|
672
|
+
forms: z.ZodArray<z.ZodObject<{
|
|
673
|
+
id: z.ZodString;
|
|
674
|
+
nodeId: z.ZodString;
|
|
675
|
+
spaceId: z.ZodString;
|
|
676
|
+
targetBaseId: z.ZodString;
|
|
677
|
+
name: z.ZodString;
|
|
678
|
+
description: z.ZodString;
|
|
679
|
+
bindings: z.ZodArray<z.ZodObject<{
|
|
680
|
+
inputName: z.ZodString;
|
|
681
|
+
fieldSlug: z.ZodString;
|
|
682
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
683
|
+
label: z.ZodOptional<z.ZodString>;
|
|
684
|
+
help: z.ZodOptional<z.ZodString>;
|
|
685
|
+
}, z.core.$strip>>;
|
|
686
|
+
boundFields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
687
|
+
slug: z.ZodString;
|
|
688
|
+
name: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<{
|
|
689
|
+
en: "en";
|
|
690
|
+
"zh-CN": "zh-CN";
|
|
691
|
+
"zh-TW": "zh-TW";
|
|
692
|
+
ja: "ja";
|
|
693
|
+
ko: "ko";
|
|
694
|
+
de: "de";
|
|
695
|
+
fr: "fr";
|
|
696
|
+
es: "es";
|
|
697
|
+
pt: "pt";
|
|
698
|
+
}> & z.core.$partial, z.ZodString>]>;
|
|
699
|
+
type: z.ZodEnum<{
|
|
700
|
+
number: "number";
|
|
701
|
+
email: "email";
|
|
702
|
+
date: "date";
|
|
703
|
+
text: "text";
|
|
704
|
+
whiteboard: "whiteboard";
|
|
705
|
+
html: "html";
|
|
706
|
+
longtext: "longtext";
|
|
707
|
+
markdown: "markdown";
|
|
708
|
+
attachment: "attachment";
|
|
709
|
+
relation: "relation";
|
|
710
|
+
checkbox: "checkbox";
|
|
711
|
+
select: "select";
|
|
712
|
+
multiselect: "multiselect";
|
|
713
|
+
url: "url";
|
|
714
|
+
embed: "embed";
|
|
715
|
+
phone: "phone";
|
|
716
|
+
created_time: "created_time";
|
|
717
|
+
updated_time: "updated_time";
|
|
718
|
+
created_by: "created_by";
|
|
719
|
+
updated_by: "updated_by";
|
|
720
|
+
auto_number: "auto_number";
|
|
721
|
+
ai_summary: "ai_summary";
|
|
722
|
+
ai_tags: "ai_tags";
|
|
723
|
+
code: "code";
|
|
724
|
+
json: "json";
|
|
725
|
+
yaml: "yaml";
|
|
726
|
+
formula: "formula";
|
|
727
|
+
lookup: "lookup";
|
|
728
|
+
}>;
|
|
729
|
+
choices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
730
|
+
id: z.ZodString;
|
|
731
|
+
name: z.ZodString;
|
|
732
|
+
}, z.core.$strip>>>;
|
|
733
|
+
}, z.core.$strip>>>;
|
|
734
|
+
page: z.ZodObject<{
|
|
735
|
+
code: z.ZodOptional<z.ZodString>;
|
|
736
|
+
theme: z.ZodOptional<z.ZodObject<{
|
|
737
|
+
logoUrl: z.ZodOptional<z.ZodString>;
|
|
738
|
+
coverUrl: z.ZodOptional<z.ZodString>;
|
|
739
|
+
brandColor: z.ZodOptional<z.ZodString>;
|
|
740
|
+
hideBranding: z.ZodOptional<z.ZodBoolean>;
|
|
741
|
+
}, z.core.$strip>>;
|
|
742
|
+
}, z.core.$strip>;
|
|
743
|
+
share: z.ZodObject<{
|
|
744
|
+
isPublic: z.ZodDefault<z.ZodBoolean>;
|
|
745
|
+
anonymousSubmit: z.ZodDefault<z.ZodBoolean>;
|
|
746
|
+
submitLimit: z.ZodOptional<z.ZodNumber>;
|
|
747
|
+
requireCaptcha: z.ZodOptional<z.ZodBoolean>;
|
|
748
|
+
}, z.core.$strip>;
|
|
749
|
+
submissionCount: z.ZodDefault<z.ZodNumber>;
|
|
750
|
+
status: z.ZodEnum<{
|
|
751
|
+
active: "active";
|
|
752
|
+
archived: "archived";
|
|
753
|
+
}>;
|
|
754
|
+
createdBy: z.ZodString;
|
|
755
|
+
createdAt: z.ZodString;
|
|
756
|
+
updatedAt: z.ZodString;
|
|
757
|
+
}, z.core.$strip>>;
|
|
758
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
759
|
+
}, z.core.$strip>;
|
|
760
|
+
type ListFormsVO = z.infer<typeof ListFormsVOSchema>;
|
|
564
761
|
declare const CreateFormInputSchema: z.ZodObject<{
|
|
565
762
|
nodeId: z.ZodString;
|
|
566
763
|
targetBaseId: z.ZodString;
|
|
@@ -2428,8 +2625,7 @@ interface UserRefVO {
|
|
|
2428
2625
|
role?: string | null;
|
|
2429
2626
|
}
|
|
2430
2627
|
/**
|
|
2431
|
-
* Cheap, name/slug-only match from `nodes.searchByName`
|
|
2432
|
-
* `apps/busabase/content/spec/search-quick-jump.md`) — deliberately a much
|
|
2628
|
+
* Cheap, name/slug-only match from `nodes.searchByName` — deliberately a much
|
|
2433
2629
|
* smaller projection than `NodeVO` (no `description`/`metadata`/tree shape):
|
|
2434
2630
|
* this backs the dashboard's instant quick-jump palette, not the sidebar tree
|
|
2435
2631
|
* or a node's own detail view. `path` is the route this node navigates to
|
|
@@ -2628,7 +2824,7 @@ interface AuditEventVO {
|
|
|
2628
2824
|
|
|
2629
2825
|
/**
|
|
2630
2826
|
* Unified Grep (P2a files+docs, P2b records) — top-level, domain-agnostic
|
|
2631
|
-
* schemas for `POST /grep`.
|
|
2827
|
+
* schemas for `POST /grep`.
|
|
2632
2828
|
*
|
|
2633
2829
|
* Mirrors how `search`'s schemas live top-level in `contract/schemas.ts`
|
|
2634
2830
|
* rather than inside a single domain's contract: `grep` composes multiple
|
|
@@ -11969,6 +12165,99 @@ declare const cloudContract: {
|
|
|
11969
12165
|
}, z.core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
11970
12166
|
};
|
|
11971
12167
|
forms: {
|
|
12168
|
+
list: _orpc_contract.ContractProcedure<z.ZodObject<{
|
|
12169
|
+
targetBaseId: z.ZodString;
|
|
12170
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
12171
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
12172
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
12173
|
+
forms: z.ZodArray<z.ZodObject<{
|
|
12174
|
+
id: z.ZodString;
|
|
12175
|
+
nodeId: z.ZodString;
|
|
12176
|
+
spaceId: z.ZodString;
|
|
12177
|
+
targetBaseId: z.ZodString;
|
|
12178
|
+
name: z.ZodString;
|
|
12179
|
+
description: z.ZodString;
|
|
12180
|
+
bindings: z.ZodArray<z.ZodObject<{
|
|
12181
|
+
inputName: z.ZodString;
|
|
12182
|
+
fieldSlug: z.ZodString;
|
|
12183
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
12184
|
+
label: z.ZodOptional<z.ZodString>;
|
|
12185
|
+
help: z.ZodOptional<z.ZodString>;
|
|
12186
|
+
}, z.core.$strip>>;
|
|
12187
|
+
boundFields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
12188
|
+
slug: z.ZodString;
|
|
12189
|
+
name: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<{
|
|
12190
|
+
en: "en";
|
|
12191
|
+
"zh-CN": "zh-CN";
|
|
12192
|
+
"zh-TW": "zh-TW";
|
|
12193
|
+
ja: "ja";
|
|
12194
|
+
ko: "ko";
|
|
12195
|
+
de: "de";
|
|
12196
|
+
fr: "fr";
|
|
12197
|
+
es: "es";
|
|
12198
|
+
pt: "pt";
|
|
12199
|
+
}> & z.core.$partial, z.ZodString>]>;
|
|
12200
|
+
type: z.ZodEnum<{
|
|
12201
|
+
number: "number";
|
|
12202
|
+
email: "email";
|
|
12203
|
+
date: "date";
|
|
12204
|
+
text: "text";
|
|
12205
|
+
whiteboard: "whiteboard";
|
|
12206
|
+
html: "html";
|
|
12207
|
+
longtext: "longtext";
|
|
12208
|
+
markdown: "markdown";
|
|
12209
|
+
attachment: "attachment";
|
|
12210
|
+
relation: "relation";
|
|
12211
|
+
checkbox: "checkbox";
|
|
12212
|
+
select: "select";
|
|
12213
|
+
multiselect: "multiselect";
|
|
12214
|
+
url: "url";
|
|
12215
|
+
embed: "embed";
|
|
12216
|
+
phone: "phone";
|
|
12217
|
+
created_time: "created_time";
|
|
12218
|
+
updated_time: "updated_time";
|
|
12219
|
+
created_by: "created_by";
|
|
12220
|
+
updated_by: "updated_by";
|
|
12221
|
+
auto_number: "auto_number";
|
|
12222
|
+
ai_summary: "ai_summary";
|
|
12223
|
+
ai_tags: "ai_tags";
|
|
12224
|
+
code: "code";
|
|
12225
|
+
json: "json";
|
|
12226
|
+
yaml: "yaml";
|
|
12227
|
+
formula: "formula";
|
|
12228
|
+
lookup: "lookup";
|
|
12229
|
+
}>;
|
|
12230
|
+
choices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
12231
|
+
id: z.ZodString;
|
|
12232
|
+
name: z.ZodString;
|
|
12233
|
+
}, z.core.$strip>>>;
|
|
12234
|
+
}, z.core.$strip>>>;
|
|
12235
|
+
page: z.ZodObject<{
|
|
12236
|
+
code: z.ZodOptional<z.ZodString>;
|
|
12237
|
+
theme: z.ZodOptional<z.ZodObject<{
|
|
12238
|
+
logoUrl: z.ZodOptional<z.ZodString>;
|
|
12239
|
+
coverUrl: z.ZodOptional<z.ZodString>;
|
|
12240
|
+
brandColor: z.ZodOptional<z.ZodString>;
|
|
12241
|
+
hideBranding: z.ZodOptional<z.ZodBoolean>;
|
|
12242
|
+
}, z.core.$strip>>;
|
|
12243
|
+
}, z.core.$strip>;
|
|
12244
|
+
share: z.ZodObject<{
|
|
12245
|
+
isPublic: z.ZodDefault<z.ZodBoolean>;
|
|
12246
|
+
anonymousSubmit: z.ZodDefault<z.ZodBoolean>;
|
|
12247
|
+
submitLimit: z.ZodOptional<z.ZodNumber>;
|
|
12248
|
+
requireCaptcha: z.ZodOptional<z.ZodBoolean>;
|
|
12249
|
+
}, z.core.$strip>;
|
|
12250
|
+
submissionCount: z.ZodDefault<z.ZodNumber>;
|
|
12251
|
+
status: z.ZodEnum<{
|
|
12252
|
+
active: "active";
|
|
12253
|
+
archived: "archived";
|
|
12254
|
+
}>;
|
|
12255
|
+
createdBy: z.ZodString;
|
|
12256
|
+
createdAt: z.ZodString;
|
|
12257
|
+
updatedAt: z.ZodString;
|
|
12258
|
+
}, z.core.$strip>>;
|
|
12259
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
12260
|
+
}, z.core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
11972
12261
|
getByNode: _orpc_contract.ContractProcedure<z.ZodObject<{
|
|
11973
12262
|
nodeId: z.ZodString;
|
|
11974
12263
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -11985,6 +12274,54 @@ declare const cloudContract: {
|
|
|
11985
12274
|
label: z.ZodOptional<z.ZodString>;
|
|
11986
12275
|
help: z.ZodOptional<z.ZodString>;
|
|
11987
12276
|
}, z.core.$strip>>;
|
|
12277
|
+
boundFields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
12278
|
+
slug: z.ZodString;
|
|
12279
|
+
name: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<{
|
|
12280
|
+
en: "en";
|
|
12281
|
+
"zh-CN": "zh-CN";
|
|
12282
|
+
"zh-TW": "zh-TW";
|
|
12283
|
+
ja: "ja";
|
|
12284
|
+
ko: "ko";
|
|
12285
|
+
de: "de";
|
|
12286
|
+
fr: "fr";
|
|
12287
|
+
es: "es";
|
|
12288
|
+
pt: "pt";
|
|
12289
|
+
}> & z.core.$partial, z.ZodString>]>;
|
|
12290
|
+
type: z.ZodEnum<{
|
|
12291
|
+
number: "number";
|
|
12292
|
+
email: "email";
|
|
12293
|
+
date: "date";
|
|
12294
|
+
text: "text";
|
|
12295
|
+
whiteboard: "whiteboard";
|
|
12296
|
+
html: "html";
|
|
12297
|
+
longtext: "longtext";
|
|
12298
|
+
markdown: "markdown";
|
|
12299
|
+
attachment: "attachment";
|
|
12300
|
+
relation: "relation";
|
|
12301
|
+
checkbox: "checkbox";
|
|
12302
|
+
select: "select";
|
|
12303
|
+
multiselect: "multiselect";
|
|
12304
|
+
url: "url";
|
|
12305
|
+
embed: "embed";
|
|
12306
|
+
phone: "phone";
|
|
12307
|
+
created_time: "created_time";
|
|
12308
|
+
updated_time: "updated_time";
|
|
12309
|
+
created_by: "created_by";
|
|
12310
|
+
updated_by: "updated_by";
|
|
12311
|
+
auto_number: "auto_number";
|
|
12312
|
+
ai_summary: "ai_summary";
|
|
12313
|
+
ai_tags: "ai_tags";
|
|
12314
|
+
code: "code";
|
|
12315
|
+
json: "json";
|
|
12316
|
+
yaml: "yaml";
|
|
12317
|
+
formula: "formula";
|
|
12318
|
+
lookup: "lookup";
|
|
12319
|
+
}>;
|
|
12320
|
+
choices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
12321
|
+
id: z.ZodString;
|
|
12322
|
+
name: z.ZodString;
|
|
12323
|
+
}, z.core.$strip>>>;
|
|
12324
|
+
}, z.core.$strip>>>;
|
|
11988
12325
|
page: z.ZodObject<{
|
|
11989
12326
|
code: z.ZodOptional<z.ZodString>;
|
|
11990
12327
|
theme: z.ZodOptional<z.ZodObject<{
|
|
@@ -12050,6 +12387,54 @@ declare const cloudContract: {
|
|
|
12050
12387
|
label: z.ZodOptional<z.ZodString>;
|
|
12051
12388
|
help: z.ZodOptional<z.ZodString>;
|
|
12052
12389
|
}, z.core.$strip>>;
|
|
12390
|
+
boundFields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
12391
|
+
slug: z.ZodString;
|
|
12392
|
+
name: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<{
|
|
12393
|
+
en: "en";
|
|
12394
|
+
"zh-CN": "zh-CN";
|
|
12395
|
+
"zh-TW": "zh-TW";
|
|
12396
|
+
ja: "ja";
|
|
12397
|
+
ko: "ko";
|
|
12398
|
+
de: "de";
|
|
12399
|
+
fr: "fr";
|
|
12400
|
+
es: "es";
|
|
12401
|
+
pt: "pt";
|
|
12402
|
+
}> & z.core.$partial, z.ZodString>]>;
|
|
12403
|
+
type: z.ZodEnum<{
|
|
12404
|
+
number: "number";
|
|
12405
|
+
email: "email";
|
|
12406
|
+
date: "date";
|
|
12407
|
+
text: "text";
|
|
12408
|
+
whiteboard: "whiteboard";
|
|
12409
|
+
html: "html";
|
|
12410
|
+
longtext: "longtext";
|
|
12411
|
+
markdown: "markdown";
|
|
12412
|
+
attachment: "attachment";
|
|
12413
|
+
relation: "relation";
|
|
12414
|
+
checkbox: "checkbox";
|
|
12415
|
+
select: "select";
|
|
12416
|
+
multiselect: "multiselect";
|
|
12417
|
+
url: "url";
|
|
12418
|
+
embed: "embed";
|
|
12419
|
+
phone: "phone";
|
|
12420
|
+
created_time: "created_time";
|
|
12421
|
+
updated_time: "updated_time";
|
|
12422
|
+
created_by: "created_by";
|
|
12423
|
+
updated_by: "updated_by";
|
|
12424
|
+
auto_number: "auto_number";
|
|
12425
|
+
ai_summary: "ai_summary";
|
|
12426
|
+
ai_tags: "ai_tags";
|
|
12427
|
+
code: "code";
|
|
12428
|
+
json: "json";
|
|
12429
|
+
yaml: "yaml";
|
|
12430
|
+
formula: "formula";
|
|
12431
|
+
lookup: "lookup";
|
|
12432
|
+
}>;
|
|
12433
|
+
choices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
12434
|
+
id: z.ZodString;
|
|
12435
|
+
name: z.ZodString;
|
|
12436
|
+
}, z.core.$strip>>>;
|
|
12437
|
+
}, z.core.$strip>>>;
|
|
12053
12438
|
page: z.ZodObject<{
|
|
12054
12439
|
code: z.ZodOptional<z.ZodString>;
|
|
12055
12440
|
theme: z.ZodOptional<z.ZodObject<{
|
|
@@ -12114,6 +12499,54 @@ declare const cloudContract: {
|
|
|
12114
12499
|
label: z.ZodOptional<z.ZodString>;
|
|
12115
12500
|
help: z.ZodOptional<z.ZodString>;
|
|
12116
12501
|
}, z.core.$strip>>;
|
|
12502
|
+
boundFields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
12503
|
+
slug: z.ZodString;
|
|
12504
|
+
name: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<{
|
|
12505
|
+
en: "en";
|
|
12506
|
+
"zh-CN": "zh-CN";
|
|
12507
|
+
"zh-TW": "zh-TW";
|
|
12508
|
+
ja: "ja";
|
|
12509
|
+
ko: "ko";
|
|
12510
|
+
de: "de";
|
|
12511
|
+
fr: "fr";
|
|
12512
|
+
es: "es";
|
|
12513
|
+
pt: "pt";
|
|
12514
|
+
}> & z.core.$partial, z.ZodString>]>;
|
|
12515
|
+
type: z.ZodEnum<{
|
|
12516
|
+
number: "number";
|
|
12517
|
+
email: "email";
|
|
12518
|
+
date: "date";
|
|
12519
|
+
text: "text";
|
|
12520
|
+
whiteboard: "whiteboard";
|
|
12521
|
+
html: "html";
|
|
12522
|
+
longtext: "longtext";
|
|
12523
|
+
markdown: "markdown";
|
|
12524
|
+
attachment: "attachment";
|
|
12525
|
+
relation: "relation";
|
|
12526
|
+
checkbox: "checkbox";
|
|
12527
|
+
select: "select";
|
|
12528
|
+
multiselect: "multiselect";
|
|
12529
|
+
url: "url";
|
|
12530
|
+
embed: "embed";
|
|
12531
|
+
phone: "phone";
|
|
12532
|
+
created_time: "created_time";
|
|
12533
|
+
updated_time: "updated_time";
|
|
12534
|
+
created_by: "created_by";
|
|
12535
|
+
updated_by: "updated_by";
|
|
12536
|
+
auto_number: "auto_number";
|
|
12537
|
+
ai_summary: "ai_summary";
|
|
12538
|
+
ai_tags: "ai_tags";
|
|
12539
|
+
code: "code";
|
|
12540
|
+
json: "json";
|
|
12541
|
+
yaml: "yaml";
|
|
12542
|
+
formula: "formula";
|
|
12543
|
+
lookup: "lookup";
|
|
12544
|
+
}>;
|
|
12545
|
+
choices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
12546
|
+
id: z.ZodString;
|
|
12547
|
+
name: z.ZodString;
|
|
12548
|
+
}, z.core.$strip>>>;
|
|
12549
|
+
}, z.core.$strip>>>;
|
|
12117
12550
|
page: z.ZodObject<{
|
|
12118
12551
|
code: z.ZodOptional<z.ZodString>;
|
|
12119
12552
|
theme: z.ZodOptional<z.ZodObject<{
|
|
@@ -19408,4 +19841,4 @@ declare class Busabase {
|
|
|
19408
19841
|
}>>>>;
|
|
19409
19842
|
}
|
|
19410
19843
|
|
|
19411
|
-
export { type ActivityItemVO, type AgentTaskVO, type FileTreeFileVO as AirAppFileVO, type FileTreeReadFileVO as AirAppReadFileVO, type FileTreeNodeVO as AirAppVO, type AssetAttachmentRef, type AssetDetailVO, type AssetTextStatus, type AssetUsageVO, type AssetVO, type AttachmentRef, type AuditAction, type AuditEventVO, type BaseFieldVO, type BaseVO, Busabase, type BusabaseAssetsClient, type BusabaseChangeRequestsClient, type BusabaseClient, type BusabaseConfig, type BusabaseRecordsClient, CREATABLE_NODE_TYPES, type ChangeRequestBatchFailureVO, type ChangeRequestCountsVO, type ChangeRequestMergeBatchResultVO, type ChangeRequestReviewBatchResultVO, type ChangeRequestStatus, type ChangeRequestTargetType, type ChangeRequestVO, type CloudContract, type CommentSubjectType, type CommentVO, type CommitVO, type CreatableNodeType, type CreateFormDTO, DEFAULT_BASE_URL, type FileTreeFileVO as DriveFileVO, type FileTreeReadFileVO as DriveReadFileVO, type FileTreeNodeVO as DriveVO, type FieldType, type FileNodeMetadata, type FileNodeVO, type FileTreeFileVO, type FileTreeNodeVO, type FileTreeReadFileVO, type FormFieldBindingVO, type FormPageSourceVO, type FormShareVO, type FormSubmitResultVO, type FormThemeVO, type FormVO, type GalleryCardSize, type GalleryCoverFit, type GanttScale, type LookupRollup, type NodeDetailVO, type NodeSearchResultVO, type NodeType, type NodeVO, type OperationKind, type OperationStatus, type OperationVO, type RecordByFieldInput, type RecordLinkVO, type RecordVO, type ResolvedConfig, type ReviewVO, type ReviewVerdict, type SearchResponseVO, type SearchResultKind, type SearchResultVO, type FileTreeFileVO as SkillFileVO, type FileTreeReadFileVO as SkillReadFileVO, type FileTreeNodeVO as SkillVO, type SubmitFormDTO, type UpdateFormDTO, type UpdateVaultSettingsDTO, type UserRefVO, VIEW_FIELD_MAX_WIDTH, VIEW_FIELD_MIN_WIDTH, type VaultAccessPolicy, type VaultEnvironment, type VaultItemInput, type VaultItemKind, type VaultItemVO, type VaultRuntimeEnv, type VaultScopeType, type VaultSettingsVO, type ViewConfigVO, type ViewFilterOperator, type ViewFilterVO, type ViewSortVO, type ViewType, type ViewVO, cloudContract, createBusabaseClient, getRecordByField, grepAssets, normalizeBaseUrl, resolveConfig, toFilesOnlyGrepResult, toUnifiedFilesGrepInput };
|
|
19844
|
+
export { type ActivityItemVO, type AgentTaskVO, type FileTreeFileVO as AirAppFileVO, type FileTreeReadFileVO as AirAppReadFileVO, type FileTreeNodeVO as AirAppVO, type AssetAttachmentRef, type AssetDetailVO, type AssetTextStatus, type AssetUsageVO, type AssetVO, type AttachmentRef, type AuditAction, type AuditEventVO, type BaseFieldVO, type BaseVO, Busabase, type BusabaseAssetsClient, type BusabaseChangeRequestsClient, type BusabaseClient, type BusabaseConfig, type BusabaseRecordsClient, CREATABLE_NODE_TYPES, type ChangeRequestBatchFailureVO, type ChangeRequestCountsVO, type ChangeRequestMergeBatchResultVO, type ChangeRequestReviewBatchResultVO, type ChangeRequestStatus, type ChangeRequestTargetType, type ChangeRequestVO, type CloudContract, type CommentSubjectType, type CommentVO, type CommitVO, type CreatableNodeType, type CreateFormDTO, DEFAULT_BASE_URL, type FileTreeFileVO as DriveFileVO, type FileTreeReadFileVO as DriveReadFileVO, type FileTreeNodeVO as DriveVO, type FieldType, type FileNodeMetadata, type FileNodeVO, type FileTreeFileVO, type FileTreeNodeVO, type FileTreeReadFileVO, type FormBoundFieldVO, type FormFieldBindingVO, type FormPageSourceVO, type FormShareVO, type FormSubmitResultVO, type FormThemeVO, type FormVO, type GalleryCardSize, type GalleryCoverFit, type GanttScale, type ListFormsDTO, type ListFormsVO, type LookupRollup, type NodeDetailVO, type NodeSearchResultVO, type NodeType, type NodeVO, type OperationKind, type OperationStatus, type OperationVO, type RecordByFieldInput, type RecordLinkVO, type RecordVO, type ResolvedConfig, type ReviewVO, type ReviewVerdict, type SearchResponseVO, type SearchResultKind, type SearchResultVO, type FileTreeFileVO as SkillFileVO, type FileTreeReadFileVO as SkillReadFileVO, type FileTreeNodeVO as SkillVO, type SubmitFormDTO, type UpdateFormDTO, type UpdateVaultSettingsDTO, type UserRefVO, VIEW_FIELD_MAX_WIDTH, VIEW_FIELD_MIN_WIDTH, type VaultAccessPolicy, type VaultEnvironment, type VaultItemInput, type VaultItemKind, type VaultItemVO, type VaultRuntimeEnv, type VaultScopeType, type VaultSettingsVO, type ViewConfigVO, type ViewFilterOperator, type ViewFilterVO, type ViewSortVO, type ViewType, type ViewVO, cloudContract, createBusabaseClient, getRecordByField, grepAssets, normalizeBaseUrl, resolveConfig, toFilesOnlyGrepResult, toUnifiedFilesGrepInput };
|
package/dist/index.js
CHANGED
|
@@ -443,7 +443,7 @@ var folderNodeType = {
|
|
|
443
443
|
var formNodeType = {
|
|
444
444
|
type: "form",
|
|
445
445
|
label: "Form",
|
|
446
|
-
icon: "
|
|
446
|
+
icon: "form",
|
|
447
447
|
capabilities: { hasDetail: true, creatable: true },
|
|
448
448
|
operations: []
|
|
449
449
|
};
|
|
@@ -2283,6 +2283,17 @@ var FormFieldBindingSchema = z.object({
|
|
|
2283
2283
|
label: z.string().optional(),
|
|
2284
2284
|
help: z.string().optional()
|
|
2285
2285
|
});
|
|
2286
|
+
var FormBoundFieldSchema = z.object({
|
|
2287
|
+
slug: z.string(),
|
|
2288
|
+
name: fieldNameSchema,
|
|
2289
|
+
type: fieldTypeSchema,
|
|
2290
|
+
choices: z.array(
|
|
2291
|
+
z.object({
|
|
2292
|
+
id: z.string(),
|
|
2293
|
+
name: z.string()
|
|
2294
|
+
})
|
|
2295
|
+
).default([])
|
|
2296
|
+
});
|
|
2286
2297
|
var FormThemeSchema = z.object({
|
|
2287
2298
|
logoUrl: z.string().optional(),
|
|
2288
2299
|
coverUrl: z.string().optional(),
|
|
@@ -2307,6 +2318,7 @@ var FormVOSchema = z.object({
|
|
|
2307
2318
|
name: z.string(),
|
|
2308
2319
|
description: z.string(),
|
|
2309
2320
|
bindings: z.array(FormFieldBindingSchema),
|
|
2321
|
+
boundFields: z.array(FormBoundFieldSchema).default([]),
|
|
2310
2322
|
page: FormPageSourceSchema,
|
|
2311
2323
|
share: FormShareSchema,
|
|
2312
2324
|
/** Accepted submissions so far — backs server-side `share.submitLimit`. */
|
|
@@ -2316,6 +2328,16 @@ var FormVOSchema = z.object({
|
|
|
2316
2328
|
createdAt: z.string(),
|
|
2317
2329
|
updatedAt: z.string()
|
|
2318
2330
|
});
|
|
2331
|
+
var ListFormsInputSchema = z.object({
|
|
2332
|
+
targetBaseId: z.string().min(1),
|
|
2333
|
+
limit: z.coerce.number().int().min(1).max(100).optional().default(50),
|
|
2334
|
+
/** Opaque createdAt/id keyset cursor. */
|
|
2335
|
+
cursor: z.string().optional()
|
|
2336
|
+
});
|
|
2337
|
+
var ListFormsVOSchema = z.object({
|
|
2338
|
+
forms: z.array(FormVOSchema),
|
|
2339
|
+
nextCursor: z.string().nullable()
|
|
2340
|
+
});
|
|
2319
2341
|
var CreateFormInputSchema = z.object({
|
|
2320
2342
|
nodeId: z.string().min(1),
|
|
2321
2343
|
targetBaseId: z.string().min(1),
|
|
@@ -2343,6 +2365,13 @@ var FormSubmitResultSchema = z.object({
|
|
|
2343
2365
|
|
|
2344
2366
|
// ../../packages/busabase-contract/src/domains/form/contract.ts
|
|
2345
2367
|
var formContract = {
|
|
2368
|
+
list: oc.route({
|
|
2369
|
+
method: "GET",
|
|
2370
|
+
path: "/forms",
|
|
2371
|
+
tags: ["Forms"],
|
|
2372
|
+
summary: "List forms bound to a Base",
|
|
2373
|
+
successDescription: "A newest-first page of forms with a stable opaque cursor (null at the end)."
|
|
2374
|
+
}).input(ListFormsInputSchema).output(ListFormsVOSchema),
|
|
2346
2375
|
getByNode: oc.route({
|
|
2347
2376
|
method: "GET",
|
|
2348
2377
|
path: "/forms/{nodeId}",
|
|
@@ -3029,7 +3058,7 @@ var busabaseContractRoutes = {
|
|
|
3029
3058
|
path: "/nodes/search",
|
|
3030
3059
|
tags: ["Nodes", "Search"],
|
|
3031
3060
|
summary: "Search nodes by name/slug (cheap, name-only quick-jump)",
|
|
3032
|
-
successDescription: "Plain ilike match on name/slug across every registered node type, scoped by the same node-visibility ACL as `nodes.list`. No content scan and no full-text ranking \u2014 ordered exact-slug-match first, then by name. Backs the dashboard search dialog's 'Recent' tab cache-miss path
|
|
3061
|
+
successDescription: "Plain ilike match on name/slug across every registered node type, scoped by the same node-visibility ACL as `nodes.list`. No content scan and no full-text ranking \u2014 ordered exact-slug-match first, then by name. Backs the dashboard search dialog's 'Recent' tab cache-miss path; the heavier `search` endpoint remains the dedicated full-text content search."
|
|
3033
3062
|
}).input(searchNodesByNameInputSchema).output(z.array(nodeSearchResultSchema)),
|
|
3034
3063
|
isDescendant: oc.route({
|
|
3035
3064
|
method: "GET",
|
|
@@ -3544,9 +3573,9 @@ var cloudExtraRoutes = {
|
|
|
3544
3573
|
})
|
|
3545
3574
|
).output(AgentTaskDetailSchema)
|
|
3546
3575
|
},
|
|
3547
|
-
// Relative-path twin of `embedLinksContract`
|
|
3548
|
-
//
|
|
3549
|
-
//
|
|
3576
|
+
// Relative-path twin of the `embedLinksContract` the Busabase Cloud host
|
|
3577
|
+
// serves at the absolute `/api/v1/embed-links` paths — same schemas
|
|
3578
|
+
// imported from `./embed-link-schemas`, just
|
|
3550
3579
|
// routed relative here so the shared `/api/v1` prefix below lands on the identical real path.
|
|
3551
3580
|
embedLinks: {
|
|
3552
3581
|
create: oc.route({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "busabase-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.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).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/busabase/busabase/tree/main/apps/busabase-sdk",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"tsx": "^4.20.5",
|
|
50
50
|
"typescript": "^5.9.3",
|
|
51
51
|
"vitest": "^2.1.8",
|
|
52
|
-
"busabase-contract": "0.
|
|
52
|
+
"busabase-contract": "0.14.1",
|
|
53
53
|
"open-domains": "0.0.2",
|
|
54
54
|
"openlib": "0.1.1"
|
|
55
55
|
},
|