@arbidocs/sdk 0.4.58 → 0.4.59
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-BpU45eZn.d.cts → browser-BSrHUKoq.d.cts} +200 -4
- package/dist/{browser-BpU45eZn.d.ts → browser-BSrHUKoq.d.ts} +200 -4
- package/dist/browser.cjs +23 -3
- 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 +23 -3
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +23 -3
- 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 +23 -3
- 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 ActivityKind, a as ActivityResponse, b as AgentControlStateEvent, c as AgentStepDeltaEvent, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, h as ArbiErrorEvent, i as ArbiOptions, k as ArtifactEvent, l as AuthContext, m as AuthHeaders, n as AuthMode, o as AuthenticatedClient, C as ChatSession, p as CitationSummary, q as CliConfig, r as CliCredentials, s as CommandDescriptor, t as ConfigStore, u as ConnectOptions, v as ConversationResponse, w as CreateFactRequest, x as CreateFactsRequest, y as CreateWorkRequest, z as CreateWorkflowRequest, B as DecryptedDmNotification, E as DeferredInterjectionEvent, F as DmAttachmentFile, G as DmAttachmentInput, J as DocumentAutomationAction, M as DocumentSelector, P as FactResponse, Q as FactSearchRequest, R as FactSearchResponse, U as ListFactsOptions, Y as MessageMetadataPayload, Z as MessageQueuedEvent, _ as OutputTokensDetails, $ as ParsedSlashCommand, a0 as PendingAuthResponse, a1 as PlanWorkRequest, a2 as ProbeAnswerEvent, a3 as ProjectInvoicesResponse, a4 as ProjectUsageResponse, a5 as QueryOptions, a6 as ReconnectOptions, a7 as ReconnectableWsConnection, a8 as ResolvedCitation, aa as ResponseCompletedEvent, ab as ResponseContentPartAddedEvent, ac as ResponseCreatedEvent, ad as ResponseFailedEvent, ae as ResponseOutputItemAddedEvent, af as ResponseOutputItemDoneEvent, ag as ResponseOutputTextDeltaEvent, ah as ResponseOutputTextDoneEvent, ai as ResponseUsage, aj as SSEEvent, ak as SSEStreamCallbacks, al as SSEStreamResult, am as SSEStreamStartData, ao as SkillSummary, aq as SubmitBackgroundQueryOptions, ar as TaskPlan, as as TokenBudgetContext, at as UpdateConversationRequest, au as UpdateFactRequest, av as UpdateWorkflowRequest, aB as UserDailyUsageResponse, aC as UserInfo, aD as UserInputRequestEvent, aE as UserMessageEvent, aF as WebSocketAuthError, aG as WorkStatus, aH as WorkflowAuthMode, aI as WorkflowResponse, aJ as WorkflowRunHistoryResponse, aK as WorkflowRunResponse, aL as WorkspaceContext, aM as WsConnection, aN as account, aO as agentconfig, aQ as assistant, aR as authenticatedFetch, aT as buildRetrievalChunkTool, aU as buildRetrievalFullContextTool, aV as buildRetrievalTocTool, aW as connectWebSocket, aX as connectWithReconnect, aY as consumeSSEStream, aZ as contacts, a_ as conversations, a$ as countCitations, b0 as createAuthenticatedClient, b2 as dm, b3 as doctags, b4 as documents, b5 as facts, b6 as files, b7 as filterSkills, b8 as formatAgentStepLabel, b9 as formatFileSize, ba as formatItemLabel, bc as formatUserName, bd as formatWorkspaceChoices, bi as getErrorMessage, bj as getRawWorkspaceKey, bk as health, bl as mail, bm as parseSSEEvents, bn as parseSlashCommand, bo as parseSlashTokenInProgress, bp as performPasswordLogin, bs as profile, bt as projects, bu as requireData, bv as requireOk, bw as resolveAuth, bx as resolveCitations, by as resolveWorkspace, bz as responses, bA as selectWorkspace, bB as selectWorkspaceById, bC as sessions, bD as settings, bE as streamSSE, bF as stripCitationMarkdown, bG as summarizeCitations, bH as tags, bI as work, bJ as workflows, bK as workspaces } from './browser-
|
|
1
|
+
export { A as ActivityKind, a as ActivityResponse, b as AgentControlStateEvent, c as AgentStepDeltaEvent, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, h as ArbiErrorEvent, i as ArbiOptions, k as ArtifactEvent, l as AuthContext, m as AuthHeaders, n as AuthMode, o as AuthenticatedClient, C as ChatSession, p as CitationSummary, q as CliConfig, r as CliCredentials, s as CommandDescriptor, t as ConfigStore, u as ConnectOptions, v as ConversationResponse, w as CreateFactRequest, x as CreateFactsRequest, y as CreateWorkRequest, z as CreateWorkflowRequest, B as DecryptedDmNotification, E as DeferredInterjectionEvent, F as DmAttachmentFile, G as DmAttachmentInput, J as DocumentAutomationAction, M as DocumentSelector, P as FactResponse, Q as FactSearchRequest, R as FactSearchResponse, U as ListFactsOptions, Y as MessageMetadataPayload, Z as MessageQueuedEvent, _ as OutputTokensDetails, $ as ParsedSlashCommand, a0 as PendingAuthResponse, a1 as PlanWorkRequest, a2 as ProbeAnswerEvent, a3 as ProjectInvoicesResponse, a4 as ProjectUsageResponse, a5 as QueryOptions, a6 as ReconnectOptions, a7 as ReconnectableWsConnection, a8 as ResolvedCitation, aa as ResponseCompletedEvent, ab as ResponseContentPartAddedEvent, ac as ResponseCreatedEvent, ad as ResponseFailedEvent, ae as ResponseOutputItemAddedEvent, af as ResponseOutputItemDoneEvent, ag as ResponseOutputTextDeltaEvent, ah as ResponseOutputTextDoneEvent, ai as ResponseUsage, aj as SSEEvent, ak as SSEStreamCallbacks, al as SSEStreamResult, am as SSEStreamStartData, ao as SkillSummary, aq as SubmitBackgroundQueryOptions, ar as TaskPlan, as as TokenBudgetContext, at as UpdateConversationRequest, au as UpdateFactRequest, av as UpdateWorkflowRequest, aB as UserDailyUsageResponse, aC as UserInfo, aD as UserInputRequestEvent, aE as UserMessageEvent, aF as WebSocketAuthError, aG as WorkStatus, aH as WorkflowAuthMode, aI as WorkflowResponse, aJ as WorkflowRunHistoryResponse, aK as WorkflowRunResponse, aL as WorkspaceContext, aM as WsConnection, aN as account, aO as agentconfig, aQ as assistant, aR as authenticatedFetch, aT as buildRetrievalChunkTool, aU as buildRetrievalFullContextTool, aV as buildRetrievalTocTool, aW as connectWebSocket, aX as connectWithReconnect, aY as consumeSSEStream, aZ as contacts, a_ as conversations, a$ as countCitations, b0 as createAuthenticatedClient, b2 as dm, b3 as doctags, b4 as documents, b5 as facts, b6 as files, b7 as filterSkills, b8 as formatAgentStepLabel, b9 as formatFileSize, ba as formatItemLabel, bc as formatUserName, bd as formatWorkspaceChoices, bi as getErrorMessage, bj as getRawWorkspaceKey, bk as health, bl as mail, bm as parseSSEEvents, bn as parseSlashCommand, bo as parseSlashTokenInProgress, bp as performPasswordLogin, bs as profile, bt as projects, bu as requireData, bv as requireOk, bw as resolveAuth, bx as resolveCitations, by as resolveWorkspace, bz as responses, bA as selectWorkspace, bB as selectWorkspaceById, bC as sessions, bD as settings, bE as streamSSE, bF as stripCitationMarkdown, bG as summarizeCitations, bH as tags, bI as work, bJ as workflows, bK as workspaces } from './browser-BSrHUKoq.cjs';
|
|
2
2
|
export { LoginProfile } from '@arbidocs/client';
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as ActivityKind, a as ActivityResponse, b as AgentControlStateEvent, c as AgentStepDeltaEvent, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, h as ArbiErrorEvent, i as ArbiOptions, k as ArtifactEvent, l as AuthContext, m as AuthHeaders, n as AuthMode, o as AuthenticatedClient, C as ChatSession, p as CitationSummary, q as CliConfig, r as CliCredentials, s as CommandDescriptor, t as ConfigStore, u as ConnectOptions, v as ConversationResponse, w as CreateFactRequest, x as CreateFactsRequest, y as CreateWorkRequest, z as CreateWorkflowRequest, B as DecryptedDmNotification, E as DeferredInterjectionEvent, F as DmAttachmentFile, G as DmAttachmentInput, J as DocumentAutomationAction, M as DocumentSelector, P as FactResponse, Q as FactSearchRequest, R as FactSearchResponse, U as ListFactsOptions, Y as MessageMetadataPayload, Z as MessageQueuedEvent, _ as OutputTokensDetails, $ as ParsedSlashCommand, a0 as PendingAuthResponse, a1 as PlanWorkRequest, a2 as ProbeAnswerEvent, a3 as ProjectInvoicesResponse, a4 as ProjectUsageResponse, a5 as QueryOptions, a6 as ReconnectOptions, a7 as ReconnectableWsConnection, a8 as ResolvedCitation, aa as ResponseCompletedEvent, ab as ResponseContentPartAddedEvent, ac as ResponseCreatedEvent, ad as ResponseFailedEvent, ae as ResponseOutputItemAddedEvent, af as ResponseOutputItemDoneEvent, ag as ResponseOutputTextDeltaEvent, ah as ResponseOutputTextDoneEvent, ai as ResponseUsage, aj as SSEEvent, ak as SSEStreamCallbacks, al as SSEStreamResult, am as SSEStreamStartData, ao as SkillSummary, aq as SubmitBackgroundQueryOptions, ar as TaskPlan, as as TokenBudgetContext, at as UpdateConversationRequest, au as UpdateFactRequest, av as UpdateWorkflowRequest, aB as UserDailyUsageResponse, aC as UserInfo, aD as UserInputRequestEvent, aE as UserMessageEvent, aF as WebSocketAuthError, aG as WorkStatus, aH as WorkflowAuthMode, aI as WorkflowResponse, aJ as WorkflowRunHistoryResponse, aK as WorkflowRunResponse, aL as WorkspaceContext, aM as WsConnection, aN as account, aO as agentconfig, aQ as assistant, aR as authenticatedFetch, aT as buildRetrievalChunkTool, aU as buildRetrievalFullContextTool, aV as buildRetrievalTocTool, aW as connectWebSocket, aX as connectWithReconnect, aY as consumeSSEStream, aZ as contacts, a_ as conversations, a$ as countCitations, b0 as createAuthenticatedClient, b2 as dm, b3 as doctags, b4 as documents, b5 as facts, b6 as files, b7 as filterSkills, b8 as formatAgentStepLabel, b9 as formatFileSize, ba as formatItemLabel, bc as formatUserName, bd as formatWorkspaceChoices, bi as getErrorMessage, bj as getRawWorkspaceKey, bk as health, bl as mail, bm as parseSSEEvents, bn as parseSlashCommand, bo as parseSlashTokenInProgress, bp as performPasswordLogin, bs as profile, bt as projects, bu as requireData, bv as requireOk, bw as resolveAuth, bx as resolveCitations, by as resolveWorkspace, bz as responses, bA as selectWorkspace, bB as selectWorkspaceById, bC as sessions, bD as settings, bE as streamSSE, bF as stripCitationMarkdown, bG as summarizeCitations, bH as tags, bI as work, bJ as workflows, bK as workspaces } from './browser-
|
|
1
|
+
export { A as ActivityKind, a as ActivityResponse, b as AgentControlStateEvent, c as AgentStepDeltaEvent, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, h as ArbiErrorEvent, i as ArbiOptions, k as ArtifactEvent, l as AuthContext, m as AuthHeaders, n as AuthMode, o as AuthenticatedClient, C as ChatSession, p as CitationSummary, q as CliConfig, r as CliCredentials, s as CommandDescriptor, t as ConfigStore, u as ConnectOptions, v as ConversationResponse, w as CreateFactRequest, x as CreateFactsRequest, y as CreateWorkRequest, z as CreateWorkflowRequest, B as DecryptedDmNotification, E as DeferredInterjectionEvent, F as DmAttachmentFile, G as DmAttachmentInput, J as DocumentAutomationAction, M as DocumentSelector, P as FactResponse, Q as FactSearchRequest, R as FactSearchResponse, U as ListFactsOptions, Y as MessageMetadataPayload, Z as MessageQueuedEvent, _ as OutputTokensDetails, $ as ParsedSlashCommand, a0 as PendingAuthResponse, a1 as PlanWorkRequest, a2 as ProbeAnswerEvent, a3 as ProjectInvoicesResponse, a4 as ProjectUsageResponse, a5 as QueryOptions, a6 as ReconnectOptions, a7 as ReconnectableWsConnection, a8 as ResolvedCitation, aa as ResponseCompletedEvent, ab as ResponseContentPartAddedEvent, ac as ResponseCreatedEvent, ad as ResponseFailedEvent, ae as ResponseOutputItemAddedEvent, af as ResponseOutputItemDoneEvent, ag as ResponseOutputTextDeltaEvent, ah as ResponseOutputTextDoneEvent, ai as ResponseUsage, aj as SSEEvent, ak as SSEStreamCallbacks, al as SSEStreamResult, am as SSEStreamStartData, ao as SkillSummary, aq as SubmitBackgroundQueryOptions, ar as TaskPlan, as as TokenBudgetContext, at as UpdateConversationRequest, au as UpdateFactRequest, av as UpdateWorkflowRequest, aB as UserDailyUsageResponse, aC as UserInfo, aD as UserInputRequestEvent, aE as UserMessageEvent, aF as WebSocketAuthError, aG as WorkStatus, aH as WorkflowAuthMode, aI as WorkflowResponse, aJ as WorkflowRunHistoryResponse, aK as WorkflowRunResponse, aL as WorkspaceContext, aM as WsConnection, aN as account, aO as agentconfig, aQ as assistant, aR as authenticatedFetch, aT as buildRetrievalChunkTool, aU as buildRetrievalFullContextTool, aV as buildRetrievalTocTool, aW as connectWebSocket, aX as connectWithReconnect, aY as consumeSSEStream, aZ as contacts, a_ as conversations, a$ as countCitations, b0 as createAuthenticatedClient, b2 as dm, b3 as doctags, b4 as documents, b5 as facts, b6 as files, b7 as filterSkills, b8 as formatAgentStepLabel, b9 as formatFileSize, ba as formatItemLabel, bc as formatUserName, bd as formatWorkspaceChoices, bi as getErrorMessage, bj as getRawWorkspaceKey, bk as health, bl as mail, bm as parseSSEEvents, bn as parseSlashCommand, bo as parseSlashTokenInProgress, bp as performPasswordLogin, bs as profile, bt as projects, bu as requireData, bv as requireOk, bw as resolveAuth, bx as resolveCitations, by as resolveWorkspace, bz as responses, bA as selectWorkspace, bB as selectWorkspaceById, bC as sessions, bD as settings, bE as streamSSE, bF as stripCitationMarkdown, bG as summarizeCitations, bH as tags, bI as work, bJ as workflows, bK as workspaces } from './browser-BSrHUKoq.js';
|
|
2
2
|
export { LoginProfile } from '@arbidocs/client';
|
package/dist/browser.js
CHANGED
|
@@ -4306,6 +4306,7 @@ __export(documents_exports, {
|
|
|
4306
4306
|
listAll: () => listAll,
|
|
4307
4307
|
listDocuments: () => listDocuments,
|
|
4308
4308
|
listPaginated: () => listPaginated,
|
|
4309
|
+
listVersions: () => listVersions,
|
|
4309
4310
|
mimeFromName: () => mimeFromName,
|
|
4310
4311
|
sanitizeFolderPath: () => sanitizeFolderPath,
|
|
4311
4312
|
updateDocuments: () => updateDocuments,
|
|
@@ -4448,6 +4449,14 @@ async function getDocuments(arbi, externalIds) {
|
|
|
4448
4449
|
"Failed to fetch documents"
|
|
4449
4450
|
);
|
|
4450
4451
|
}
|
|
4452
|
+
async function listVersions(arbi, docId) {
|
|
4453
|
+
return requireData(
|
|
4454
|
+
await arbi.fetch.GET("/v1/document/{document_ext_id}/versions", {
|
|
4455
|
+
params: { path: { document_ext_id: docId } }
|
|
4456
|
+
}),
|
|
4457
|
+
"Failed to fetch document versions"
|
|
4458
|
+
);
|
|
4459
|
+
}
|
|
4451
4460
|
async function deleteDocuments(arbi, externalIds) {
|
|
4452
4461
|
requireOk(
|
|
4453
4462
|
await arbi.fetch.DELETE("/v1/document/", { body: { external_ids: externalIds } }),
|
|
@@ -4496,7 +4505,11 @@ async function uploadFile(auth, fileData, fileName, options) {
|
|
|
4496
4505
|
if (options?.folder) params.set("folder", sanitizeFolderPath(options.folder));
|
|
4497
4506
|
if (options?.configExtId) params.set("config_ext_id", options.configExtId);
|
|
4498
4507
|
if (options?.wpType) params.set("wp_type", options.wpType);
|
|
4499
|
-
if (options?.
|
|
4508
|
+
if (options?.versionOf) params.set("version_of", options.versionOf);
|
|
4509
|
+
if (options?.derivedFrom) {
|
|
4510
|
+
params.set("derived_from", options.derivedFrom.docId);
|
|
4511
|
+
params.set("derived_role", options.derivedFrom.role);
|
|
4512
|
+
}
|
|
4500
4513
|
const qs = params.toString();
|
|
4501
4514
|
const res = await authenticatedFetch({
|
|
4502
4515
|
...auth,
|
|
@@ -4513,7 +4526,11 @@ async function uploadFiles(auth, files, options) {
|
|
|
4513
4526
|
if (options?.folder) params.set("folder", sanitizeFolderPath(options.folder));
|
|
4514
4527
|
if (options?.configExtId) params.set("config_ext_id", options.configExtId);
|
|
4515
4528
|
if (options?.wpType) params.set("wp_type", options.wpType);
|
|
4516
|
-
if (options?.
|
|
4529
|
+
if (options?.versionOf) params.set("version_of", options.versionOf);
|
|
4530
|
+
if (options?.derivedFrom) {
|
|
4531
|
+
params.set("derived_from", options.derivedFrom.docId);
|
|
4532
|
+
params.set("derived_role", options.derivedFrom.role);
|
|
4533
|
+
}
|
|
4517
4534
|
const qs = params.toString();
|
|
4518
4535
|
const res = await authenticatedFetch({
|
|
4519
4536
|
...auth,
|
|
@@ -4608,7 +4625,8 @@ async function uploadDocumentsDirect(arbi, workspaceKey, files, options) {
|
|
|
4608
4625
|
files: declared,
|
|
4609
4626
|
shared: options?.shared !== false,
|
|
4610
4627
|
config_ext_id: options?.configExtId ?? null,
|
|
4611
|
-
|
|
4628
|
+
// Only sent when set, so a plain upload is accepted by any server version.
|
|
4629
|
+
...options?.versionOf ? { version_of: options.versionOf } : {},
|
|
4612
4630
|
wp_type: options?.wpType ?? null,
|
|
4613
4631
|
tag_ext_id: options?.tagExtId ?? null,
|
|
4614
4632
|
folder: options?.folder ? sanitizeFolderPath(options.folder) : null,
|
|
@@ -6564,6 +6582,8 @@ var Arbi = class {
|
|
|
6564
6582
|
*/
|
|
6565
6583
|
listAll: (options) => listAll(this.requireClient(), options),
|
|
6566
6584
|
get: (externalIds) => getDocuments(this.requireClient(), externalIds),
|
|
6585
|
+
/** Every version of a document (any version's id), oldest first; `is_current` marks the current one. */
|
|
6586
|
+
versions: (docId) => listVersions(this.requireClient(), docId),
|
|
6567
6587
|
delete: (externalIds) => deleteDocuments(this.requireClient(), externalIds),
|
|
6568
6588
|
update: (documents) => updateDocuments(this.requireClient(), documents),
|
|
6569
6589
|
uploadUrl: (urls, shared) => {
|