busa-sdk 0.90.2 → 0.95.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 +1 -1
- package/dist/{client-tKN7nBHR.d.ts → client-BlHnsVv8.d.ts} +1802 -25
- package/dist/index.d.ts +1 -1
- package/dist/index.js +98 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as AssetTextStatus, $t as NodeType, A as NodeVO, At as GalleryCardSize, B as UpdatePreviewFileCredentialDTO, Bt as ViewSortVO, C as CommentVO, Ct as ListFormsDTO, D as MentionInboxItemVO, Dt as AssetAttachmentRef, E as LookupRollup, Et as UpdateFormDTO, F as SearchResponseVO, Ft as VIEW_FIELD_MAX_WIDTH, G as VaultItemKind, Gt as CloudContract, H as VaultAccessPolicy, Ht as ViewVO, I as SearchResultKind, It as VIEW_FIELD_MIN_WIDTH, J as VaultScopeType, Jt as NodeIconSchema, K as VaultItemVO, Kt as cloudContract, L as SearchResultVO, Lt as ViewConfigVO, M as OperationVO, Mt as GanttScale, N as ReviewVO, Nt as RecordLinkVO, O as MentionInboxPageVO, Ot as BaseFieldVO, P as ReviewVerdict, Pt as RecordVO, Q as AssetDetailVO, Qt as CreatableNodeType, R as SourceAttributionVO, Rt as ViewFilterOperator, S as CommentSubjectType, St as FormVO, T as FieldType, Tt as SubmitFormDTO, U as VaultEnvironment, Ut as AttachmentRef, V as UpdateVaultSettingsDTO, Vt as ViewType, W as VaultItemInput, Wt as PlaybookAttributionVO, X as FileNodeMetadata, Xt as resolveNodeIconSource, Y as VaultSettingsVO, Yt as NodeIconSource, Z as FileNodeVO, Zt as CREATABLE_NODE_TYPES, _ as ChangeRequestVO, _t as FormFieldBindingVO, a as createBusabaseClient, at as FilePreviewConfigurationStatus, b as CommentMentionTargetType, bt as FormSubmitResultVO, c as AuditAction, ct as FilePreviewUnavailableReason, d as ChangeRequestBatchFailureVO, dt as FileTreeNodeVO, en as OperationKind, et as AssetUsageVO, f as ChangeRequestCountsVO, ft as FileTreeReadFileVO, g as ChangeRequestTargetType, gt as FormBoundFieldVO, h as ChangeRequestStatus, ht as CreateFormDTO, i as ResolvedConfig, it as FilePreviewConfigVO, j as OperationStatus, jt as GalleryCoverFit, k as NodeSearchResultVO, kt as BaseVO, l as AuditEventVO, lt as FilePreviewVO, m as ChangeRequestReviewBatchResultVO, mt as ActivityItemVO, n as BusabaseConfig, nt as GrepInputDTO, o as resolveConfig, ot as FilePreviewCredentialSource, p as ChangeRequestMergeBatchResultVO, pt as NodeDetailVO, q as VaultRuntimeEnv, qt as NodeIcon, r as DEFAULT_BASE_URL, rt as GrepResultVO, s as AgentTaskVO, st as FilePreviewProvider, t as BusabaseClient, tt as AssetVO, u as BusabaseSourceChannel, ut as FileTreeFileVO, v as CommentMentionDispatchStatus, vt as FormPageSourceVO, w as CommitVO, wt as ListFormsVO, x as CommentMentionVO, xt as FormThemeVO, y as CommentMentionInputDTO, yt as FormShareVO, z as UserRefVO, zt as ViewFilterVO } from "./client-
|
|
1
|
+
import { $ as AssetTextStatus, $t as NodeType, A as NodeVO, At as GalleryCardSize, B as UpdatePreviewFileCredentialDTO, Bt as ViewSortVO, C as CommentVO, Ct as ListFormsDTO, D as MentionInboxItemVO, Dt as AssetAttachmentRef, E as LookupRollup, Et as UpdateFormDTO, F as SearchResponseVO, Ft as VIEW_FIELD_MAX_WIDTH, G as VaultItemKind, Gt as CloudContract, H as VaultAccessPolicy, Ht as ViewVO, I as SearchResultKind, It as VIEW_FIELD_MIN_WIDTH, J as VaultScopeType, Jt as NodeIconSchema, K as VaultItemVO, Kt as cloudContract, L as SearchResultVO, Lt as ViewConfigVO, M as OperationVO, Mt as GanttScale, N as ReviewVO, Nt as RecordLinkVO, O as MentionInboxPageVO, Ot as BaseFieldVO, P as ReviewVerdict, Pt as RecordVO, Q as AssetDetailVO, Qt as CreatableNodeType, R as SourceAttributionVO, Rt as ViewFilterOperator, S as CommentSubjectType, St as FormVO, T as FieldType, Tt as SubmitFormDTO, U as VaultEnvironment, Ut as AttachmentRef, V as UpdateVaultSettingsDTO, Vt as ViewType, W as VaultItemInput, Wt as PlaybookAttributionVO, X as FileNodeMetadata, Xt as resolveNodeIconSource, Y as VaultSettingsVO, Yt as NodeIconSource, Z as FileNodeVO, Zt as CREATABLE_NODE_TYPES, _ as ChangeRequestVO, _t as FormFieldBindingVO, a as createBusabaseClient, at as FilePreviewConfigurationStatus, b as CommentMentionTargetType, bt as FormSubmitResultVO, c as AuditAction, ct as FilePreviewUnavailableReason, d as ChangeRequestBatchFailureVO, dt as FileTreeNodeVO, en as OperationKind, et as AssetUsageVO, f as ChangeRequestCountsVO, ft as FileTreeReadFileVO, g as ChangeRequestTargetType, gt as FormBoundFieldVO, h as ChangeRequestStatus, ht as CreateFormDTO, i as ResolvedConfig, it as FilePreviewConfigVO, j as OperationStatus, jt as GalleryCoverFit, k as NodeSearchResultVO, kt as BaseVO, l as AuditEventVO, lt as FilePreviewVO, m as ChangeRequestReviewBatchResultVO, mt as ActivityItemVO, n as BusabaseConfig, nt as GrepInputDTO, o as resolveConfig, ot as FilePreviewCredentialSource, p as ChangeRequestMergeBatchResultVO, pt as NodeDetailVO, q as VaultRuntimeEnv, qt as NodeIcon, r as DEFAULT_BASE_URL, rt as GrepResultVO, s as AgentTaskVO, st as FilePreviewProvider, t as BusabaseClient, tt as AssetVO, u as BusabaseSourceChannel, ut as FileTreeFileVO, v as CommentMentionDispatchStatus, vt as FormPageSourceVO, w as CommitVO, wt as ListFormsVO, x as CommentMentionVO, xt as FormThemeVO, y as CommentMentionInputDTO, yt as FormShareVO, z as UserRefVO, zt as ViewFilterVO } from "./client-BlHnsVv8.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/url.d.ts
|
|
4
4
|
/**
|
package/dist/index.js
CHANGED
|
@@ -530,6 +530,10 @@ const fieldOptionsSchema = z.object({
|
|
|
530
530
|
name: z.string()
|
|
531
531
|
})).optional(),
|
|
532
532
|
code: z.object({ language: z.string().optional() }).optional(),
|
|
533
|
+
date: z.object({
|
|
534
|
+
includeTime: z.boolean().optional(),
|
|
535
|
+
timezone: z.string().optional().describe("IANA time zone, e.g. \"Asia/Shanghai\". Omit to show each reader their own local time.")
|
|
536
|
+
}).optional(),
|
|
533
537
|
embed: z.object({
|
|
534
538
|
aspectRatio: z.enum([
|
|
535
539
|
"16:9",
|
|
@@ -1517,7 +1521,8 @@ const nodeSchema = z.lazy(() => z.object({
|
|
|
1517
1521
|
baseId: z.string().nullable(),
|
|
1518
1522
|
children: z.array(nodeSchema),
|
|
1519
1523
|
hasChildren: z.boolean().optional(),
|
|
1520
|
-
shared: z.boolean().optional()
|
|
1524
|
+
shared: z.boolean().optional(),
|
|
1525
|
+
sharedViaAncestor: z.boolean().optional()
|
|
1521
1526
|
}));
|
|
1522
1527
|
const nodePrincipalSchema = z.object({
|
|
1523
1528
|
id: z.string(),
|
|
@@ -3109,8 +3114,15 @@ const createViewInputSchema = z.object({
|
|
|
3109
3114
|
submittedBy: z.string().optional().default("local-producer"),
|
|
3110
3115
|
autoMerge: autoMergeSchema
|
|
3111
3116
|
});
|
|
3117
|
+
const viewConfigPatchSchema = viewConfigSchema.omit({
|
|
3118
|
+
filters: true,
|
|
3119
|
+
sorts: true
|
|
3120
|
+
}).extend({
|
|
3121
|
+
filters: z.array(viewFilterSchema).optional(),
|
|
3122
|
+
sorts: z.array(viewSortSchema).optional()
|
|
3123
|
+
});
|
|
3112
3124
|
const updateViewInputSchema = z.object({
|
|
3113
|
-
config:
|
|
3125
|
+
config: viewConfigPatchSchema.optional().describe("Only supplied config keys change; empty arrays and null clear supported settings."),
|
|
3114
3126
|
description: z.string().optional(),
|
|
3115
3127
|
message: z.string().optional().default("Update view"),
|
|
3116
3128
|
name: z.string().min(1).optional(),
|
|
@@ -3706,8 +3718,11 @@ const recordContract = {
|
|
|
3706
3718
|
path: "/records/{recordId}/change-requests",
|
|
3707
3719
|
tags: ["Records", "Change Requests"],
|
|
3708
3720
|
summary: "List record change request history",
|
|
3709
|
-
successDescription: "Change requests
|
|
3710
|
-
}).input(z.object({
|
|
3721
|
+
successDescription: "Change requests connected to the canonical record, newest first. Omit limit for the full legacy history. With limit, returns recent summaries with up to five record-scoped operations per change request, capped field payloads, and no embedded reviews. Get the change request for its complete diff and reviews."
|
|
3722
|
+
}).input(z.object({
|
|
3723
|
+
recordId: z.string(),
|
|
3724
|
+
limit: z.coerce.number().int().min(1).max(100).optional().describe("Recent change request summaries to return. Omit to retain the full legacy history.")
|
|
3725
|
+
})).output(z.array(changeRequestSchema)),
|
|
3711
3726
|
listLinks: oc.route({
|
|
3712
3727
|
method: "GET",
|
|
3713
3728
|
path: "/records/{recordId}/links",
|
|
@@ -4033,7 +4048,12 @@ const FormBoundFieldSchema = z.object({
|
|
|
4033
4048
|
choices: z.array(z.object({
|
|
4034
4049
|
id: z.string(),
|
|
4035
4050
|
name: z.string()
|
|
4036
|
-
})).default([])
|
|
4051
|
+
})).default([]),
|
|
4052
|
+
/** A `date` field's time settings (see the Base field `options.date`). */
|
|
4053
|
+
date: z.object({
|
|
4054
|
+
includeTime: z.boolean().optional(),
|
|
4055
|
+
timezone: z.string().optional()
|
|
4056
|
+
}).optional()
|
|
4037
4057
|
});
|
|
4038
4058
|
/** Optional theme tokens layered over the agent-authored page. */
|
|
4039
4059
|
const FormThemeSchema = z.object({
|
|
@@ -4890,6 +4910,11 @@ const listRecordActivityInputSchema = z.object({
|
|
|
4890
4910
|
recordId: z.string().min(1).describe("Activity for this record's own history."),
|
|
4891
4911
|
limit: z.coerce.number().int().min(1).max(100).optional().default(50).describe("Most recent events to return, capped at 100. This stream has NO cursor — it is a recent window, not a pageable history; use `/api/v1/activity/paged` to walk further back.")
|
|
4892
4912
|
});
|
|
4913
|
+
const listRecordActivityPagedInputSchema = z.object({
|
|
4914
|
+
recordId: z.string().min(1).describe("Activity is scoped to this record's own history."),
|
|
4915
|
+
limit: z.coerce.number().int().min(1).max(100).optional().default(50).describe("Items per page. Defaults to 50 and is capped at 100."),
|
|
4916
|
+
cursor: z.string().optional().describe("Opaque page cursor: pass back the `nextCursor` from the previous response. Do not construct or parse it.")
|
|
4917
|
+
});
|
|
4893
4918
|
const EMBED_LINK_MAX_MINUTES = 1440;
|
|
4894
4919
|
const EmbedNodeTypeSchema = z.enum([
|
|
4895
4920
|
"base",
|
|
@@ -5532,6 +5557,49 @@ const NodeRouteStateVOSchema = z.discriminatedUnion("status", [
|
|
|
5532
5557
|
z.object({ status: z.literal("unavailable") })
|
|
5533
5558
|
]);
|
|
5534
5559
|
//#endregion
|
|
5560
|
+
//#region ../../packages/busabase-contract/src/contract/node-subscription-schemas.ts
|
|
5561
|
+
/**
|
|
5562
|
+
* The current actor's subscription to one node, as the node `[...]` menu shows it.
|
|
5563
|
+
*
|
|
5564
|
+
* - `subscribed` — a live row on THIS node (`source` says whether it was created
|
|
5565
|
+
* automatically by creating/submitting/commenting/voting, or by a manual
|
|
5566
|
+
* Subscribe).
|
|
5567
|
+
* - `inherited` — no row on this node, but the nearest ancestor with a row is
|
|
5568
|
+
* subscribed; `via` names that folder.
|
|
5569
|
+
* - `muted` — the nearest row is THIS node's, and it is muted (the actor
|
|
5570
|
+
* unsubscribed here). Auto triggers never undo this.
|
|
5571
|
+
* - `none` — no row on the node or any ancestor, or the nearest row is an
|
|
5572
|
+
* ancestor's mute.
|
|
5573
|
+
*/
|
|
5574
|
+
const NodeSubscriptionStateSchema = z.enum([
|
|
5575
|
+
"subscribed",
|
|
5576
|
+
"inherited",
|
|
5577
|
+
"muted",
|
|
5578
|
+
"none"
|
|
5579
|
+
]);
|
|
5580
|
+
const NodeSubscriptionViaSchema = z.object({
|
|
5581
|
+
id: z.string(),
|
|
5582
|
+
name: z.string(),
|
|
5583
|
+
type: z.enum(NODE_TYPES),
|
|
5584
|
+
slug: z.string()
|
|
5585
|
+
});
|
|
5586
|
+
const NodeSubscriptionVOSchema = z.object({
|
|
5587
|
+
nodeId: z.string(),
|
|
5588
|
+
state: NodeSubscriptionStateSchema,
|
|
5589
|
+
source: z.enum(["auto", "manual"]).nullable(),
|
|
5590
|
+
via: NodeSubscriptionViaSchema.nullable()
|
|
5591
|
+
});
|
|
5592
|
+
const GetNodeSubscriptionInputSchema = z.object({ nodeId: z.string() });
|
|
5593
|
+
const SetNodeSubscriptionInputSchema = z.object({
|
|
5594
|
+
nodeId: z.string(),
|
|
5595
|
+
/**
|
|
5596
|
+
* `true` subscribes (manual, clears any mute on this node); `false` mutes this
|
|
5597
|
+
* node for the actor — even when the subscription is inherited from a folder,
|
|
5598
|
+
* in which case only this node is muted and the folder subscription stays.
|
|
5599
|
+
*/
|
|
5600
|
+
subscribed: z.boolean()
|
|
5601
|
+
});
|
|
5602
|
+
//#endregion
|
|
5535
5603
|
//#region ../../packages/busabase-contract/src/contract/busabase.ts
|
|
5536
5604
|
const changeRequestBatchFailureSchema = z.object({
|
|
5537
5605
|
changeRequestId: z.string(),
|
|
@@ -5774,6 +5842,18 @@ const busabaseContractRoutes = {
|
|
|
5774
5842
|
summary: "List the current actor's favorited nodes",
|
|
5775
5843
|
successDescription: "The acting user's favorited nodes, newest-favorited first, filtered through the same archived/deleted/visibility rules as the main tree — a favorited node that's later archived, purged, or (cloud) hidden from this actor silently drops out rather than erroring."
|
|
5776
5844
|
}).output(z.array(nodeSchema)),
|
|
5845
|
+
/**
|
|
5846
|
+
* The acting user's notification subscription to one node — the node
|
|
5847
|
+
* `[...]` menu's Subscribe / Unsubscribe item. RPC-only by design (no
|
|
5848
|
+
* `.route(...)`): the actor comes from context, so on an agent's API key it
|
|
5849
|
+
* would resolve to the key's OWNER, and an agent toggling its owner's
|
|
5850
|
+
* notifications is exactly the silent-drop this feature exists to prevent.
|
|
5851
|
+
* Not in `/api/v1`, not in any MCP tool catalog.
|
|
5852
|
+
*/
|
|
5853
|
+
subscription: {
|
|
5854
|
+
get: oc.input(GetNodeSubscriptionInputSchema).output(NodeSubscriptionVOSchema),
|
|
5855
|
+
set: oc.input(SetNodeSubscriptionInputSchema).output(NodeSubscriptionVOSchema)
|
|
5856
|
+
},
|
|
5777
5857
|
get: oc.route({
|
|
5778
5858
|
method: "GET",
|
|
5779
5859
|
path: "/nodes/{nodeId}",
|
|
@@ -5888,6 +5968,13 @@ const busabaseContractRoutes = {
|
|
|
5888
5968
|
}).input(createAuditEventInputSchema).output(auditEventSchema)
|
|
5889
5969
|
},
|
|
5890
5970
|
activity: {
|
|
5971
|
+
listForRecordPaged: oc.route({
|
|
5972
|
+
method: "GET",
|
|
5973
|
+
path: "/activity/record/paged",
|
|
5974
|
+
tags: ["Activity"],
|
|
5975
|
+
summary: "List a record's activity with keyset pagination",
|
|
5976
|
+
successDescription: "Record-scoped operations and audit events, newest first, with an opaque nextCursor (null at the end). Embedded change requests include this page's operations with capped field payloads and no reviews. Embedded records are summaries with capped field payloads and Base identity, without Base fields, people cells, or lookups. Get the change request for the complete diff and reviews; get the record for all field values."
|
|
5977
|
+
}).input(listRecordActivityPagedInputSchema).output(listActivityResponseSchema),
|
|
5891
5978
|
listPaged: oc.route({
|
|
5892
5979
|
method: "GET",
|
|
5893
5980
|
path: "/activity/paged",
|
|
@@ -5982,6 +6069,12 @@ members: oc.output(z.array(userRefSchema)) },
|
|
|
5982
6069
|
templates: templatesContract,
|
|
5983
6070
|
guides: guidesContract,
|
|
5984
6071
|
changeRequests: {
|
|
6072
|
+
createPreviewLink: oc.route({
|
|
6073
|
+
method: "POST",
|
|
6074
|
+
path: "/change-requests/{changeRequestId}/preview-link",
|
|
6075
|
+
tags: ["Change Requests"],
|
|
6076
|
+
summary: "Create a short-lived preview link for a visible Change Request"
|
|
6077
|
+
}).input(z.object({ changeRequestId: z.string().min(1) }).strict()).output(CreatedEmbedLinkVOSchema),
|
|
5985
6078
|
list: oc.route({
|
|
5986
6079
|
method: "GET",
|
|
5987
6080
|
path: "/change-requests",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "busa-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.95.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",
|