@arbidocs/sdk 0.4.147 → 0.4.148
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/{browser-DK6CvDoH.d.cts → browser-DtMlqla7.d.cts} +1684 -236
- package/dist/{browser-DK6CvDoH.d.ts → browser-DtMlqla7.d.ts} +1684 -236
- package/dist/browser.cjs +164 -54
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +163 -54
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +164 -54
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +163 -54
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/browser.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, d as AgentControlStateEvent, e as AgentStepDeltaEvent, f as AgentStepEvent, g as
|
|
1
|
+
export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, d as AgentControlStateEvent, e as AgentStepDeltaEvent, f as AgentStepEvent, g as Arbi, h as ArbiApiError, i as ArbiError, j as ArbiErrorEvent, k as ArbiHostSession, l as ArbiOptions, n as ArtifactEvent, o as AttendeeRead, p as AuthContext, q as AuthHeaders, r as AuthMode, s as AuthenticatedClient, B as BookingConfirmation, t as BookingPage, u as BookingPageWriteBody, v as BookingRequestBody, w as BridgeTokensOptions, C as CalDavConnectBody, x as CalDavProfile, y as CalendarAccount, z as CalendarAccountKind, D as CalendarCreateBody, E as CalendarEvent, F as CalendarKeys, G as CalendarRead, H as CalendarSettings, I as CalendarSettingsBody, J as CalendarUpdate, K as CalendarWindow, L as ChatAttachmentFile, M as ChatAttachmentInput, N as ChatCryptoContext, O as ChatKeyRing, P as ChatKind, Q as ChatMemberKey, R as ChatMemberResponse, S as ChatMessageResponse, T as ChatResponse, U as ChatSession, V as CitationSummary, W as CitationToolSources, X as CliConfig, Y as CliCredentials, Z as CommandDescriptor, _ as ConfigStore, $ as ConnectOptions, a0 as ConnectorCatalogEntry, a1 as ConnectorFolder, a2 as ConnectorSyncProgress, a3 as ConnectorSyncStatus, a4 as ConnectorVendorKey, a5 as ConnectorVisibilitySettings, a6 as ConversationResponse, a7 as ConversationUsageResponse, a8 as CreateFactRequest, a9 as CreateFactsRequest, aa as CreateWorkRequest, ab as CreateWorkflowRequest, ac as DEFAULT_AI_USD_PER_GBP, ae as DRIVE_SYNC_VENDORS, af as DateTimeSpec, ah as DecryptedChatMessage, ai as DeferredInterjectionEvent, aj as DeploymentHouseTemplate, al as DocumentAutomationAction, ao as DocumentSelector, ar as DriveSyncProgress, as as DriveSyncSummary, at as EditScope, au as EventCreateBody, av as EventPatchBody, aw as FLAT_TAG_KINDS, ax as FactResponse, ay as FactSearchRequest, az as FactSearchResponse, aA as FindTimeParams, aC as FreeBusyEntry, aD as GOOGLE_VENDORS, aE as HolidayCountry, aF as HouseTemplateCandidate, aG as IMANAGE_VENDORS, aH as IdentityErrorCode, aI as IdentityPurchase, aJ as IdentityState, aK as IdentityStatus, aL as ImportResult, aM as InvitationRead, aN as LinkedRun, aP as ListEventsParams, aQ as ListFactsOptions, aS as MAILBOX_SYNC_VENDORS, aT as MAX_RETRIEVE_DOC_IDS, aU as MICROSOFT_VENDORS, aW as MailDraftSSEEvent, aY as MessageMetadataPayload, aZ as MessageQueuedEvent, a_ as OAuthAccountKind, a$ as OutputTokensDetails, b0 as OverlayItem, b1 as OverlayLayerName, b2 as ParsedSlashCommand, b3 as PendingAuthResponse, b4 as PersonKey, b5 as PlanStepsError, b6 as PlanWorkRequest, b7 as ProbeAnswerEvent, b8 as ProductResponse, b9 as ProjectAddonKind, ba as ProjectAddonSettingsRequest, bb as ProjectBudget, bc as ProjectCheckoutRequest, bd as ProjectConversationUsageResponse, be as ProjectCreateOptions, bf as ProjectDetails, bg as ProjectEventKind, bh as ProjectEventResponse, bi as ProjectInvoicesResponse, bj as ProjectNextPeriodAddonsRequest, bk as ProjectPlanChangeRequest, bl as ProjectQuoteRequest, bm as ProjectResponse, bn as ProjectUpdateRequest, bo as ProjectUsageResponse, bp as PublicBookingError, bq as PublicBookingPage, br as QueryOptions, bs as RaisedSignal, bt as ReconnectOptions, bu as ReconnectableWsConnection, bv as ResolvedCitation, bx as RespondParams, by as RespondPartstat, bz as ResponseCompletedEvent, bA as ResponseContentPartAddedEvent, bB as ResponseCreatedEvent, bC as ResponseFailedEvent, bD as ResponseOutputItemAddedEvent, bE as ResponseOutputItemDoneEvent, bF as ResponseOutputTextDeltaEvent, bG as ResponseOutputTextDoneEvent, bH as ResponseUsage, bI as RoomCreateBody, bJ as RoomQuery, bK as RoomRead, bL as RunProgress, bM as RunStep, bN as RunWaitingOn, bO as SHAREPOINT_VENDORS, bP as SSEEvent, bQ as SSEStreamCallbacks, bR as SSEStreamResult, bS as SSEStreamStartData, bV as ScopedTarget, bW as SearchChunk, bX as SendBack, bY as ShareRead, bZ as ShareRole, b_ as SkillSummary, b$ as SkippedFile, c0 as SlackConnectionStatus, c1 as StepActionRequest, c2 as StepActivityEvent, c3 as StepAssignee, c4 as StepField, c7 as StepKind, c8 as StepPhase, c9 as StepSignal, ca as StepSignalWhen, cb as StepState, cc as StepStatus, cd as SubmitBackgroundQueryOptions, ce as SubscribeParams, cf as SyncTriggerResult, cg as TAG_KINDS, ch as TagChange, ci as TagFieldDefinition, cj as TagKind, ck as TagKindField, cl as TagKindSchema, cm as TagLinks, cn as TagListQuery, co as TagResponse, cp as TaskPlan, cq as TaskPlanStep, cr as TaxQuoteResponse, cs as TimeSuggestion, ct as TokenBudgetContext, cu as UpdateConversationRequest, cv as UpdateFactRequest, cw as UpdateWorkflowRequest, cA as UploadDocumentsOptions, cB as UploadOptions, cC as UploadResult, cD as UsageBreakdown, cE as UserConnectorEntry, cF as UserDailyUsageResponse, cG as UserInfo, cH as UserInputRequestEvent, cI as UserMessageEvent, cJ as WebSocketAuthError, cK as WeeklyHoursSpec, cL as WorkStatus, cM as WorkflowAuthMode, cN as WorkflowResponse, cO as WorkflowRunHistoryResponse, cP as WorkflowRunResponse, cQ as WorkspaceContext, cR as WsConnection, cS as account, cT as agentconfig, cV as assistant, cW as authenticatedFetch, cX as bookPublicSlot, cY as buildCitationChunkData, c_ as buildFactsContextTool, c$ as buildRetrievalChunkTool, d0 as buildRetrievalFullContextTool, d1 as buildRetrievalTocTool, d2 as calendar, d3 as cancelPublicBooking, d4 as chats, d5 as connectErrorMessage, d6 as connectWebSocket, d7 as connectWithReconnect, d8 as connectors, d9 as consumeSSEStream, da as contacts, db as conversations, dc as countCitations, dd as createAuthenticatedClient, df as doctags, dg as documents, dh as facts, di as files, dj as filterSkills, dk as formatAgentStepLabel, dl as formatFileSize, dm as formatGbp, dn as formatGbpPerMillionTokens, dp as formatItemLabel, dr as formatUserName, ds as formatWorkspaceChoices, dx as getErrorMessage, dy as getPublicBookingPage, dz as getRawWorkspaceKey, dA as health, dB as houseTemplates, dD as identityErrorCode, dC as identityVerification, dE as isConnectorVendorVisible, dF as isDriveSyncVendor, dG as isMailboxSyncVendor, dH as isSharePointVendor, dJ as mail, dK as notifications, dL as parseSSEEvents, dM as parseSlashCommand, dN as parseSlashTokenInProgress, dO as performPasswordLogin, dR as profile, dS as projects, dT as requireData, dU as requireOk, dV as resolveAuth, dW as resolveCitations, dX as resolveWorkspace, dY as responses, dZ as searchChunks, d_ as selectWorkspace, d$ as selectWorkspaceById, e0 as sessions, e1 as settings, e3 as streamSSE, e4 as stripCitationMarkdown, e5 as summarizeCitations, e6 as tags, e8 as usdToGbp, e9 as work, ea as workflowSteps, eb as workflows, ec as workspaces } from './browser-DtMlqla7.cjs';
|
|
2
2
|
export { LoginProfile } from '@arbidocs/client';
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, d as AgentControlStateEvent, e as AgentStepDeltaEvent, f as AgentStepEvent, g as
|
|
1
|
+
export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, d as AgentControlStateEvent, e as AgentStepDeltaEvent, f as AgentStepEvent, g as Arbi, h as ArbiApiError, i as ArbiError, j as ArbiErrorEvent, k as ArbiHostSession, l as ArbiOptions, n as ArtifactEvent, o as AttendeeRead, p as AuthContext, q as AuthHeaders, r as AuthMode, s as AuthenticatedClient, B as BookingConfirmation, t as BookingPage, u as BookingPageWriteBody, v as BookingRequestBody, w as BridgeTokensOptions, C as CalDavConnectBody, x as CalDavProfile, y as CalendarAccount, z as CalendarAccountKind, D as CalendarCreateBody, E as CalendarEvent, F as CalendarKeys, G as CalendarRead, H as CalendarSettings, I as CalendarSettingsBody, J as CalendarUpdate, K as CalendarWindow, L as ChatAttachmentFile, M as ChatAttachmentInput, N as ChatCryptoContext, O as ChatKeyRing, P as ChatKind, Q as ChatMemberKey, R as ChatMemberResponse, S as ChatMessageResponse, T as ChatResponse, U as ChatSession, V as CitationSummary, W as CitationToolSources, X as CliConfig, Y as CliCredentials, Z as CommandDescriptor, _ as ConfigStore, $ as ConnectOptions, a0 as ConnectorCatalogEntry, a1 as ConnectorFolder, a2 as ConnectorSyncProgress, a3 as ConnectorSyncStatus, a4 as ConnectorVendorKey, a5 as ConnectorVisibilitySettings, a6 as ConversationResponse, a7 as ConversationUsageResponse, a8 as CreateFactRequest, a9 as CreateFactsRequest, aa as CreateWorkRequest, ab as CreateWorkflowRequest, ac as DEFAULT_AI_USD_PER_GBP, ae as DRIVE_SYNC_VENDORS, af as DateTimeSpec, ah as DecryptedChatMessage, ai as DeferredInterjectionEvent, aj as DeploymentHouseTemplate, al as DocumentAutomationAction, ao as DocumentSelector, ar as DriveSyncProgress, as as DriveSyncSummary, at as EditScope, au as EventCreateBody, av as EventPatchBody, aw as FLAT_TAG_KINDS, ax as FactResponse, ay as FactSearchRequest, az as FactSearchResponse, aA as FindTimeParams, aC as FreeBusyEntry, aD as GOOGLE_VENDORS, aE as HolidayCountry, aF as HouseTemplateCandidate, aG as IMANAGE_VENDORS, aH as IdentityErrorCode, aI as IdentityPurchase, aJ as IdentityState, aK as IdentityStatus, aL as ImportResult, aM as InvitationRead, aN as LinkedRun, aP as ListEventsParams, aQ as ListFactsOptions, aS as MAILBOX_SYNC_VENDORS, aT as MAX_RETRIEVE_DOC_IDS, aU as MICROSOFT_VENDORS, aW as MailDraftSSEEvent, aY as MessageMetadataPayload, aZ as MessageQueuedEvent, a_ as OAuthAccountKind, a$ as OutputTokensDetails, b0 as OverlayItem, b1 as OverlayLayerName, b2 as ParsedSlashCommand, b3 as PendingAuthResponse, b4 as PersonKey, b5 as PlanStepsError, b6 as PlanWorkRequest, b7 as ProbeAnswerEvent, b8 as ProductResponse, b9 as ProjectAddonKind, ba as ProjectAddonSettingsRequest, bb as ProjectBudget, bc as ProjectCheckoutRequest, bd as ProjectConversationUsageResponse, be as ProjectCreateOptions, bf as ProjectDetails, bg as ProjectEventKind, bh as ProjectEventResponse, bi as ProjectInvoicesResponse, bj as ProjectNextPeriodAddonsRequest, bk as ProjectPlanChangeRequest, bl as ProjectQuoteRequest, bm as ProjectResponse, bn as ProjectUpdateRequest, bo as ProjectUsageResponse, bp as PublicBookingError, bq as PublicBookingPage, br as QueryOptions, bs as RaisedSignal, bt as ReconnectOptions, bu as ReconnectableWsConnection, bv as ResolvedCitation, bx as RespondParams, by as RespondPartstat, bz as ResponseCompletedEvent, bA as ResponseContentPartAddedEvent, bB as ResponseCreatedEvent, bC as ResponseFailedEvent, bD as ResponseOutputItemAddedEvent, bE as ResponseOutputItemDoneEvent, bF as ResponseOutputTextDeltaEvent, bG as ResponseOutputTextDoneEvent, bH as ResponseUsage, bI as RoomCreateBody, bJ as RoomQuery, bK as RoomRead, bL as RunProgress, bM as RunStep, bN as RunWaitingOn, bO as SHAREPOINT_VENDORS, bP as SSEEvent, bQ as SSEStreamCallbacks, bR as SSEStreamResult, bS as SSEStreamStartData, bV as ScopedTarget, bW as SearchChunk, bX as SendBack, bY as ShareRead, bZ as ShareRole, b_ as SkillSummary, b$ as SkippedFile, c0 as SlackConnectionStatus, c1 as StepActionRequest, c2 as StepActivityEvent, c3 as StepAssignee, c4 as StepField, c7 as StepKind, c8 as StepPhase, c9 as StepSignal, ca as StepSignalWhen, cb as StepState, cc as StepStatus, cd as SubmitBackgroundQueryOptions, ce as SubscribeParams, cf as SyncTriggerResult, cg as TAG_KINDS, ch as TagChange, ci as TagFieldDefinition, cj as TagKind, ck as TagKindField, cl as TagKindSchema, cm as TagLinks, cn as TagListQuery, co as TagResponse, cp as TaskPlan, cq as TaskPlanStep, cr as TaxQuoteResponse, cs as TimeSuggestion, ct as TokenBudgetContext, cu as UpdateConversationRequest, cv as UpdateFactRequest, cw as UpdateWorkflowRequest, cA as UploadDocumentsOptions, cB as UploadOptions, cC as UploadResult, cD as UsageBreakdown, cE as UserConnectorEntry, cF as UserDailyUsageResponse, cG as UserInfo, cH as UserInputRequestEvent, cI as UserMessageEvent, cJ as WebSocketAuthError, cK as WeeklyHoursSpec, cL as WorkStatus, cM as WorkflowAuthMode, cN as WorkflowResponse, cO as WorkflowRunHistoryResponse, cP as WorkflowRunResponse, cQ as WorkspaceContext, cR as WsConnection, cS as account, cT as agentconfig, cV as assistant, cW as authenticatedFetch, cX as bookPublicSlot, cY as buildCitationChunkData, c_ as buildFactsContextTool, c$ as buildRetrievalChunkTool, d0 as buildRetrievalFullContextTool, d1 as buildRetrievalTocTool, d2 as calendar, d3 as cancelPublicBooking, d4 as chats, d5 as connectErrorMessage, d6 as connectWebSocket, d7 as connectWithReconnect, d8 as connectors, d9 as consumeSSEStream, da as contacts, db as conversations, dc as countCitations, dd as createAuthenticatedClient, df as doctags, dg as documents, dh as facts, di as files, dj as filterSkills, dk as formatAgentStepLabel, dl as formatFileSize, dm as formatGbp, dn as formatGbpPerMillionTokens, dp as formatItemLabel, dr as formatUserName, ds as formatWorkspaceChoices, dx as getErrorMessage, dy as getPublicBookingPage, dz as getRawWorkspaceKey, dA as health, dB as houseTemplates, dD as identityErrorCode, dC as identityVerification, dE as isConnectorVendorVisible, dF as isDriveSyncVendor, dG as isMailboxSyncVendor, dH as isSharePointVendor, dJ as mail, dK as notifications, dL as parseSSEEvents, dM as parseSlashCommand, dN as parseSlashTokenInProgress, dO as performPasswordLogin, dR as profile, dS as projects, dT as requireData, dU as requireOk, dV as resolveAuth, dW as resolveCitations, dX as resolveWorkspace, dY as responses, dZ as searchChunks, d_ as selectWorkspace, d$ as selectWorkspaceById, e0 as sessions, e1 as settings, e3 as streamSSE, e4 as stripCitationMarkdown, e5 as summarizeCitations, e6 as tags, e8 as usdToGbp, e9 as work, ea as workflowSteps, eb as workflows, ec as workspaces } from './browser-DtMlqla7.js';
|
|
2
2
|
export { LoginProfile } from '@arbidocs/client';
|
package/dist/browser.js
CHANGED
|
@@ -5163,6 +5163,7 @@ async function updateConversationAssistantMode(arbi, conversationId, assistantMo
|
|
|
5163
5163
|
// src/operations/assistant.ts
|
|
5164
5164
|
var assistant_exports = {};
|
|
5165
5165
|
__export(assistant_exports, {
|
|
5166
|
+
MAX_RETRIEVE_DOC_IDS: () => MAX_RETRIEVE_DOC_IDS,
|
|
5166
5167
|
buildFactsContextTool: () => buildFactsContextTool,
|
|
5167
5168
|
buildRetrievalChunkTool: () => buildRetrievalChunkTool,
|
|
5168
5169
|
buildRetrievalFullContextTool: () => buildRetrievalFullContextTool,
|
|
@@ -5177,6 +5178,7 @@ __export(assistant_exports, {
|
|
|
5177
5178
|
queryAssistant: () => queryAssistant,
|
|
5178
5179
|
respondToAgent: () => respondToAgent,
|
|
5179
5180
|
retrieve: () => retrieve,
|
|
5181
|
+
searchChunks: () => searchChunks,
|
|
5180
5182
|
uploadSkill: () => uploadSkill
|
|
5181
5183
|
});
|
|
5182
5184
|
function buildRetrievalChunkTool(docIds, searchMode) {
|
|
@@ -5210,8 +5212,19 @@ function buildRetrievalTocTool(docIds) {
|
|
|
5210
5212
|
tool_responses: {}
|
|
5211
5213
|
};
|
|
5212
5214
|
}
|
|
5215
|
+
var MAX_RETRIEVE_DOC_IDS = 5e3;
|
|
5213
5216
|
async function retrieve(options) {
|
|
5214
|
-
const {
|
|
5217
|
+
const {
|
|
5218
|
+
arbi,
|
|
5219
|
+
workspaceId,
|
|
5220
|
+
query,
|
|
5221
|
+
docIds,
|
|
5222
|
+
searchMode,
|
|
5223
|
+
fullContextDocIds,
|
|
5224
|
+
tocDocIds,
|
|
5225
|
+
model,
|
|
5226
|
+
store = true
|
|
5227
|
+
} = options;
|
|
5215
5228
|
const tools = {
|
|
5216
5229
|
retrieval_chunk: buildRetrievalChunkTool(docIds, searchMode)
|
|
5217
5230
|
};
|
|
@@ -5226,7 +5239,7 @@ async function retrieve(options) {
|
|
|
5226
5239
|
workspace_ext_id: workspaceId,
|
|
5227
5240
|
stream: false,
|
|
5228
5241
|
background: false,
|
|
5229
|
-
store
|
|
5242
|
+
store,
|
|
5230
5243
|
tools,
|
|
5231
5244
|
...model ? { model } : {}
|
|
5232
5245
|
};
|
|
@@ -5246,6 +5259,34 @@ async function retrieve(options) {
|
|
|
5246
5259
|
}
|
|
5247
5260
|
return data;
|
|
5248
5261
|
}
|
|
5262
|
+
function isReadablePassage(content) {
|
|
5263
|
+
return content.length > 10 && content !== "-" && !/^[|\-\s]+$/.test(content);
|
|
5264
|
+
}
|
|
5265
|
+
function searchChunks(result) {
|
|
5266
|
+
const byId3 = /* @__PURE__ */ new Map();
|
|
5267
|
+
for (const [title, chunks] of Object.entries(result?.retrieval_chunk?.tool_responses ?? {})) {
|
|
5268
|
+
if (!Array.isArray(chunks)) continue;
|
|
5269
|
+
chunks.forEach((chunk, index) => {
|
|
5270
|
+
if (!chunk || typeof chunk !== "object") return;
|
|
5271
|
+
const content = chunk.content?.trim() ?? "";
|
|
5272
|
+
if (!isReadablePassage(content)) return;
|
|
5273
|
+
const meta = chunk.metadata ?? {};
|
|
5274
|
+
const docId = meta.doc_ext_id || title;
|
|
5275
|
+
const rerank = meta.rerank_score;
|
|
5276
|
+
byId3.set(meta.chunk_ext_id || `${docId}_${index}`, {
|
|
5277
|
+
id: meta.chunk_ext_id || `${docId}_${index}`,
|
|
5278
|
+
...meta.chunk_ext_id ? { chunkExtId: meta.chunk_ext_id } : {},
|
|
5279
|
+
docId,
|
|
5280
|
+
docTitle: meta.doc_title || title,
|
|
5281
|
+
...meta.page_number != null ? { page: meta.page_number } : {},
|
|
5282
|
+
score: rerank && rerank > 0 ? rerank : meta.score ?? 0,
|
|
5283
|
+
index,
|
|
5284
|
+
content
|
|
5285
|
+
});
|
|
5286
|
+
});
|
|
5287
|
+
}
|
|
5288
|
+
return Array.from(byId3.values()).sort((a2, b2) => b2.score - a2.score);
|
|
5289
|
+
}
|
|
5249
5290
|
async function queryAssistant(options) {
|
|
5250
5291
|
const {
|
|
5251
5292
|
workspaceId,
|
|
@@ -6916,6 +6957,11 @@ async function remove(arbi) {
|
|
|
6916
6957
|
// src/operations/projects.ts
|
|
6917
6958
|
var projects_exports = {};
|
|
6918
6959
|
__export(projects_exports, {
|
|
6960
|
+
addAddonBlock: () => addAddonBlock,
|
|
6961
|
+
billingPortal: () => billingPortal,
|
|
6962
|
+
cancelSubscription: () => cancelSubscription,
|
|
6963
|
+
changePlan: () => changePlan,
|
|
6964
|
+
createCheckout: () => createCheckout,
|
|
6919
6965
|
createProject: () => createProject,
|
|
6920
6966
|
deleteProject: () => deleteProject,
|
|
6921
6967
|
formatBudget: () => formatBudget,
|
|
@@ -6923,11 +6969,17 @@ __export(projects_exports, {
|
|
|
6923
6969
|
getProjectInvoices: () => getProjectInvoices,
|
|
6924
6970
|
getProjectUsage: () => getProjectUsage,
|
|
6925
6971
|
getUserUsageToday: () => getUserUsageToday,
|
|
6972
|
+
listProducts: () => listProducts,
|
|
6926
6973
|
listProjectEvents: () => listProjectEvents,
|
|
6927
6974
|
listProjects: () => listProjects,
|
|
6928
6975
|
parseBudget: () => parseBudget,
|
|
6976
|
+
previewPlanChange: () => previewPlanChange,
|
|
6977
|
+
quoteAddon: () => quoteAddon,
|
|
6978
|
+
quotePlan: () => quotePlan,
|
|
6929
6979
|
refreshProject: () => refreshProject,
|
|
6930
6980
|
renameProject: () => renameProject,
|
|
6981
|
+
setNextPeriodAddons: () => setNextPeriodAddons,
|
|
6982
|
+
updateAddonSettings: () => updateAddonSettings,
|
|
6931
6983
|
updateProject: () => updateProject
|
|
6932
6984
|
});
|
|
6933
6985
|
async function listProjects(arbi, filters = {}) {
|
|
@@ -7050,6 +7102,95 @@ async function getProjectInvoices(arbi, projectExtId) {
|
|
|
7050
7102
|
async function getUserUsageToday(arbi) {
|
|
7051
7103
|
return requireData(await arbi.fetch.GET("/v1/user/me/usage/today"), "Failed to fetch today usage");
|
|
7052
7104
|
}
|
|
7105
|
+
var projectPath = (projectExtId) => ({ path: { project_ext_id: projectExtId } });
|
|
7106
|
+
async function listProducts(arbi) {
|
|
7107
|
+
return requireData(await arbi.fetch.GET("/v1/user/products"), "Failed to load the plans");
|
|
7108
|
+
}
|
|
7109
|
+
async function quotePlan(arbi, projectExtId, body) {
|
|
7110
|
+
return requireData(
|
|
7111
|
+
projectExtId ? await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/checkout/quote", {
|
|
7112
|
+
params: projectPath(projectExtId),
|
|
7113
|
+
body
|
|
7114
|
+
}) : await arbi.fetch.POST("/v1/user/projects/quote", { body }),
|
|
7115
|
+
"Failed to price the plan"
|
|
7116
|
+
);
|
|
7117
|
+
}
|
|
7118
|
+
async function createCheckout(arbi, projectExtId, body) {
|
|
7119
|
+
return requireData(
|
|
7120
|
+
await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/checkout", {
|
|
7121
|
+
params: projectPath(projectExtId),
|
|
7122
|
+
body
|
|
7123
|
+
}),
|
|
7124
|
+
"Failed to start the checkout"
|
|
7125
|
+
);
|
|
7126
|
+
}
|
|
7127
|
+
async function changePlan(arbi, projectExtId, body) {
|
|
7128
|
+
return requireData(
|
|
7129
|
+
await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/change-plan", {
|
|
7130
|
+
params: projectPath(projectExtId),
|
|
7131
|
+
body
|
|
7132
|
+
}),
|
|
7133
|
+
"Failed to change the plan"
|
|
7134
|
+
);
|
|
7135
|
+
}
|
|
7136
|
+
async function previewPlanChange(arbi, projectExtId, body) {
|
|
7137
|
+
return requireData(
|
|
7138
|
+
await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/plan/preview", {
|
|
7139
|
+
params: projectPath(projectExtId),
|
|
7140
|
+
body
|
|
7141
|
+
}),
|
|
7142
|
+
"Failed to price the plan change"
|
|
7143
|
+
);
|
|
7144
|
+
}
|
|
7145
|
+
async function quoteAddon(arbi, projectExtId, kind) {
|
|
7146
|
+
return requireData(
|
|
7147
|
+
await arbi.fetch.GET("/v1/user/projects/{project_ext_id}/addons/quote", {
|
|
7148
|
+
params: { ...projectPath(projectExtId), query: { kind } }
|
|
7149
|
+
}),
|
|
7150
|
+
"Failed to price the add-on"
|
|
7151
|
+
);
|
|
7152
|
+
}
|
|
7153
|
+
async function billingPortal(arbi, projectExtId) {
|
|
7154
|
+
return requireData(
|
|
7155
|
+
await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/billing-portal", {
|
|
7156
|
+
params: projectPath(projectExtId)
|
|
7157
|
+
}),
|
|
7158
|
+
"Failed to open the billing portal"
|
|
7159
|
+
);
|
|
7160
|
+
}
|
|
7161
|
+
async function addAddonBlock(arbi, projectExtId, kind) {
|
|
7162
|
+
const params = projectPath(projectExtId);
|
|
7163
|
+
return requireData(
|
|
7164
|
+
kind === "ai_usage" ? await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/addons/ai-usage", { params }) : await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/addons/storage", { params }),
|
|
7165
|
+
"Failed to add the add-on"
|
|
7166
|
+
);
|
|
7167
|
+
}
|
|
7168
|
+
async function setNextPeriodAddons(arbi, projectExtId, body) {
|
|
7169
|
+
return requireData(
|
|
7170
|
+
await arbi.fetch.PUT("/v1/user/projects/{project_ext_id}/addons/next-period", {
|
|
7171
|
+
params: projectPath(projectExtId),
|
|
7172
|
+
body
|
|
7173
|
+
}),
|
|
7174
|
+
"Failed to change the add-ons"
|
|
7175
|
+
);
|
|
7176
|
+
}
|
|
7177
|
+
async function updateAddonSettings(arbi, projectExtId, body) {
|
|
7178
|
+
return requireData(
|
|
7179
|
+
await arbi.fetch.PUT("/v1/user/projects/{project_ext_id}/addons/settings", {
|
|
7180
|
+
params: projectPath(projectExtId),
|
|
7181
|
+
body
|
|
7182
|
+
}),
|
|
7183
|
+
"Failed to save the add-on settings"
|
|
7184
|
+
);
|
|
7185
|
+
}
|
|
7186
|
+
async function cancelSubscription(arbi, projectExtId) {
|
|
7187
|
+
return requireData(
|
|
7188
|
+
await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/cancel", {
|
|
7189
|
+
params: projectPath(projectExtId)
|
|
7190
|
+
}),
|
|
7191
|
+
"Failed to cancel the subscription"
|
|
7192
|
+
);
|
|
7193
|
+
}
|
|
7053
7194
|
|
|
7054
7195
|
// src/operations/work.ts
|
|
7055
7196
|
var work_exports = {};
|
|
@@ -8141,10 +8282,8 @@ __export(calendar_exports, {
|
|
|
8141
8282
|
cancelPublicBooking: () => cancelPublicBooking,
|
|
8142
8283
|
connectCalDavAccount: () => connectCalDavAccount,
|
|
8143
8284
|
connectOAuthAccount: () => connectOAuthAccount,
|
|
8144
|
-
createAppPassword: () => createAppPassword,
|
|
8145
8285
|
createCalendar: () => createCalendar,
|
|
8146
8286
|
createEvent: () => createEvent,
|
|
8147
|
-
createFeed: () => createFeed,
|
|
8148
8287
|
createRoom: () => createRoom,
|
|
8149
8288
|
decideCounter: () => decideCounter,
|
|
8150
8289
|
deleteBookingPage: () => deleteBookingPage,
|
|
@@ -8161,7 +8300,6 @@ __export(calendar_exports, {
|
|
|
8161
8300
|
getPublicBookingPage: () => getPublicBookingPage,
|
|
8162
8301
|
importCalendarIcs: () => importCalendarIcs,
|
|
8163
8302
|
listAccounts: () => listAccounts,
|
|
8164
|
-
listAppPasswords: () => listAppPasswords,
|
|
8165
8303
|
listBookingPages: () => listBookingPages,
|
|
8166
8304
|
listCalDavProfiles: () => listCalDavProfiles,
|
|
8167
8305
|
listCalendars: () => listCalendars,
|
|
@@ -8179,9 +8317,7 @@ __export(calendar_exports, {
|
|
|
8179
8317
|
putCalendarSettings: () => putCalendarSettings,
|
|
8180
8318
|
refreshCalendar: () => refreshCalendar,
|
|
8181
8319
|
respondToEvent: () => respondToEvent,
|
|
8182
|
-
revokeAppPassword: () => revokeAppPassword,
|
|
8183
8320
|
shareCalendar: () => shareCalendar,
|
|
8184
|
-
splitAppPasswords: () => splitAppPasswords,
|
|
8185
8321
|
subscribeCalendar: () => subscribeCalendar,
|
|
8186
8322
|
syncAccount: () => syncAccount,
|
|
8187
8323
|
unlockCalendarKeys: () => unlockCalendarKeys,
|
|
@@ -8569,46 +8705,6 @@ async function publishCalendarToAccount(client, accId, calendarId) {
|
|
|
8569
8705
|
"Publishing the calendar"
|
|
8570
8706
|
);
|
|
8571
8707
|
}
|
|
8572
|
-
async function listAppPasswords(client) {
|
|
8573
|
-
return take(await client.fetch.GET("/v1/calendar/app-passwords"), "Loading app passwords");
|
|
8574
|
-
}
|
|
8575
|
-
async function createAppPassword(client, body) {
|
|
8576
|
-
return take(
|
|
8577
|
-
await client.fetch.POST("/v1/calendar/app-passwords", {
|
|
8578
|
-
body: {
|
|
8579
|
-
label: body.label.trim(),
|
|
8580
|
-
calendar_ids: body.calendar_ids?.length ? body.calendar_ids : null
|
|
8581
|
-
}
|
|
8582
|
-
}),
|
|
8583
|
-
"Creating the app password"
|
|
8584
|
-
);
|
|
8585
|
-
}
|
|
8586
|
-
async function createFeed(client, body) {
|
|
8587
|
-
return take(
|
|
8588
|
-
await client.fetch.POST("/v1/calendar/feeds", {
|
|
8589
|
-
body: {
|
|
8590
|
-
calendar_id: body.calendar_id,
|
|
8591
|
-
level: body.level,
|
|
8592
|
-
label: body.label?.trim() || (body.level === "full" ? "Feed" : "Free/busy feed")
|
|
8593
|
-
}
|
|
8594
|
-
}),
|
|
8595
|
-
"Creating the feed"
|
|
8596
|
-
);
|
|
8597
|
-
}
|
|
8598
|
-
async function revokeAppPassword(client, apwId) {
|
|
8599
|
-
take(
|
|
8600
|
-
await client.fetch.DELETE("/v1/calendar/app-passwords/{apw_id}", {
|
|
8601
|
-
params: { path: { apw_id: apwId } }
|
|
8602
|
-
}),
|
|
8603
|
-
"Revoking"
|
|
8604
|
-
);
|
|
8605
|
-
}
|
|
8606
|
-
function splitAppPasswords(rows) {
|
|
8607
|
-
return {
|
|
8608
|
-
devices: rows.filter((r2) => r2.kind === "dav"),
|
|
8609
|
-
feeds: rows.filter((r2) => r2.kind === "feed" || r2.kind === "freebusy")
|
|
8610
|
-
};
|
|
8611
|
-
}
|
|
8612
8708
|
async function listBookingPages(client) {
|
|
8613
8709
|
return take(await client.fetch.GET("/v1/calendar/booking-pages"), "Loading booking pages");
|
|
8614
8710
|
}
|
|
@@ -8977,7 +9073,23 @@ var Arbi = class {
|
|
|
8977
9073
|
/** AI usage + spend breakdown for a project's billing period. */
|
|
8978
9074
|
usage: (projectExtId, monthsBack) => getProjectUsage(this.requireClient(), projectExtId, monthsBack),
|
|
8979
9075
|
/** Stripe invoices for a project's subscription. */
|
|
8980
|
-
invoices: (projectExtId) => getProjectInvoices(this.requireClient(), projectExtId)
|
|
9076
|
+
invoices: (projectExtId) => getProjectInvoices(this.requireClient(), projectExtId),
|
|
9077
|
+
/** Delete a project (only when empty: no workspaces, no subscription). */
|
|
9078
|
+
delete: (projectExtId) => deleteProject(this.requireClient(), projectExtId),
|
|
9079
|
+
/** The plans and add-ons on sale. */
|
|
9080
|
+
products: () => listProducts(this.requireClient()),
|
|
9081
|
+
/** The taxed total of a Pro purchase (a new project when `projectExtId` is null). */
|
|
9082
|
+
quotePlan: (projectExtId, body) => quotePlan(this.requireClient(), projectExtId, body),
|
|
9083
|
+
/** Start an embedded Stripe checkout; returns its `client_secret`. */
|
|
9084
|
+
checkout: (projectExtId, body) => createCheckout(this.requireClient(), projectExtId, body),
|
|
9085
|
+
changePlan: (projectExtId, body) => changePlan(this.requireClient(), projectExtId, body),
|
|
9086
|
+
previewPlanChange: (projectExtId, body) => previewPlanChange(this.requireClient(), projectExtId, body),
|
|
9087
|
+
quoteAddon: (projectExtId, kind) => quoteAddon(this.requireClient(), projectExtId, kind),
|
|
9088
|
+
billingPortal: (projectExtId) => billingPortal(this.requireClient(), projectExtId),
|
|
9089
|
+
addAddonBlock: (projectExtId, kind) => addAddonBlock(this.requireClient(), projectExtId, kind),
|
|
9090
|
+
setNextPeriodAddons: (projectExtId, body) => setNextPeriodAddons(this.requireClient(), projectExtId, body),
|
|
9091
|
+
updateAddonSettings: (projectExtId, body) => updateAddonSettings(this.requireClient(), projectExtId, body),
|
|
9092
|
+
cancelSubscription: (projectExtId) => cancelSubscription(this.requireClient(), projectExtId)
|
|
8981
9093
|
};
|
|
8982
9094
|
// ── User (account-scoped usage) ───────────────────────────────────────
|
|
8983
9095
|
user = {
|
|
@@ -9469,7 +9581,8 @@ var Arbi = class {
|
|
|
9469
9581
|
/** The skills the caller can run (own + shared marketplace), metadata only. */
|
|
9470
9582
|
listSkills: (options) => listSkills(this.requireClient(), options),
|
|
9471
9583
|
/**
|
|
9472
|
-
* Search documents without LLM generation (retrieval only).
|
|
9584
|
+
* Search documents without LLM generation (retrieval only). No `docIds` searches the whole
|
|
9585
|
+
* workspace; `searchChunks(result)` ranks the passages found.
|
|
9473
9586
|
*/
|
|
9474
9587
|
retrieve: (query, docIds, options) => retrieve({
|
|
9475
9588
|
arbi: this.requireClient(),
|
|
@@ -9599,10 +9712,6 @@ var Arbi = class {
|
|
|
9599
9712
|
syncAccount: (accId) => this.withCalendarKeys((c2) => syncAccount(c2, accId)),
|
|
9600
9713
|
disconnectAccount: (accId) => this.withCalendarKeys((c2) => disconnectAccount(c2, accId)),
|
|
9601
9714
|
publishToAccount: (accId, calendarId) => this.withCalendarKeys((c2) => publishCalendarToAccount(c2, accId, calendarId)),
|
|
9602
|
-
listAppPasswords: () => this.withCalendarKeys((c2) => listAppPasswords(c2)),
|
|
9603
|
-
createAppPassword: (body) => this.withCalendarKeys((c2) => createAppPassword(c2, body)),
|
|
9604
|
-
createFeed: (body) => this.withCalendarKeys((c2) => createFeed(c2, body)),
|
|
9605
|
-
revokeAppPassword: (apwId) => this.withCalendarKeys((c2) => revokeAppPassword(c2, apwId)),
|
|
9606
9715
|
listBookingPages: () => this.withCalendarKeys((c2) => listBookingPages(c2)),
|
|
9607
9716
|
putBookingPage: (body) => this.withCalendarKeys((c2) => putBookingPage(c2, body)),
|
|
9608
9717
|
deleteBookingPage: (slug) => this.withCalendarKeys((c2) => deleteBookingPage(c2, slug))
|
|
@@ -9917,6 +10026,6 @@ var Arbi = class {
|
|
|
9917
10026
|
}
|
|
9918
10027
|
};
|
|
9919
10028
|
|
|
9920
|
-
export { ACCOUNT_VENDOR, Arbi, ArbiApiError, ArbiError, DEFAULT_AI_USD_PER_GBP, DRIVE_SYNC_VENDORS, FLAT_TAG_KINDS, GOOGLE_VENDORS, IMANAGE_VENDORS, MAILBOX_SYNC_VENDORS, MICROSOFT_VENDORS, PlanStepsError, PublicBookingError, SHAREPOINT_VENDORS, TAG_KINDS, WebSocketAuthError, account_exports as account, agentconfig_exports as agentconfig, assistant_exports as assistant, authenticatedFetch, bookPublicSlot, buildCitationChunkData, buildFactsContextTool, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, calendar_exports as calendar, cancelPublicBooking, chats_exports as chats, connectErrorMessage, connectWebSocket, connectWithReconnect, connectors_exports as connectors, consumeSSEStream, contacts_exports as contacts, conversations_exports as conversations, countCitations, createAuthenticatedClient, doctags_exports as doctags, documents_exports as documents, facts_exports as facts, files_exports as files, filterSkills, formatAgentStepLabel, formatFileSize, formatGbp, formatGbpPerMillionTokens, formatItemLabel, formatUserName, formatWorkspaceChoices, getErrorMessage, getPublicBookingPage, getRawWorkspaceKey, health_exports as health, house_template_exports as houseTemplates, identityErrorCode, identity_exports as identityVerification, isConnectorVendorVisible, isDriveSyncVendor, isMailboxSyncVendor, isSharePointVendor, mail_exports as mail, notifications_exports as notifications, parseSSEEvents, parseSlashCommand, parseSlashTokenInProgress, performPasswordLogin, profile_exports as profile, projects_exports as projects, requireData, requireOk, resolveAuth, resolveCitations, resolveWorkspace, responses_exports as responses, selectWorkspace, selectWorkspaceById, sessions_exports as sessions, settings_exports as settings,
|
|
10029
|
+
export { ACCOUNT_VENDOR, Arbi, ArbiApiError, ArbiError, DEFAULT_AI_USD_PER_GBP, DRIVE_SYNC_VENDORS, FLAT_TAG_KINDS, GOOGLE_VENDORS, IMANAGE_VENDORS, MAILBOX_SYNC_VENDORS, MAX_RETRIEVE_DOC_IDS, MICROSOFT_VENDORS, PlanStepsError, PublicBookingError, SHAREPOINT_VENDORS, TAG_KINDS, WebSocketAuthError, account_exports as account, agentconfig_exports as agentconfig, assistant_exports as assistant, authenticatedFetch, bookPublicSlot, buildCitationChunkData, buildFactsContextTool, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, calendar_exports as calendar, cancelPublicBooking, chats_exports as chats, connectErrorMessage, connectWebSocket, connectWithReconnect, connectors_exports as connectors, consumeSSEStream, contacts_exports as contacts, conversations_exports as conversations, countCitations, createAuthenticatedClient, doctags_exports as doctags, documents_exports as documents, facts_exports as facts, files_exports as files, filterSkills, formatAgentStepLabel, formatFileSize, formatGbp, formatGbpPerMillionTokens, formatItemLabel, formatUserName, formatWorkspaceChoices, getErrorMessage, getPublicBookingPage, getRawWorkspaceKey, health_exports as health, house_template_exports as houseTemplates, identityErrorCode, identity_exports as identityVerification, isConnectorVendorVisible, isDriveSyncVendor, isMailboxSyncVendor, isSharePointVendor, mail_exports as mail, notifications_exports as notifications, parseSSEEvents, parseSlashCommand, parseSlashTokenInProgress, performPasswordLogin, profile_exports as profile, projects_exports as projects, requireData, requireOk, resolveAuth, resolveCitations, resolveWorkspace, responses_exports as responses, searchChunks, selectWorkspace, selectWorkspaceById, sessions_exports as sessions, settings_exports as settings, streamSSE, stripCitationMarkdown, summarizeCitations, tags_exports as tags, usdToGbp, work_exports as work, workflow_steps_exports as workflowSteps, workflows_exports as workflows, workspaces_exports as workspaces };
|
|
9921
10030
|
//# sourceMappingURL=browser.js.map
|
|
9922
10031
|
//# sourceMappingURL=browser.js.map
|