@arbidocs/sdk 0.4.63 → 0.4.64

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.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { t as ConfigStore, q as CliConfig, r as CliCredentials, C as ChatSession, ap as SkippedFile, aA as UploadResult, m as AuthHeaders, aw as UploadBatchResult, az as UploadOptions, ax as UploadDirectOptions, ay as UploadDirectResult, an as SUPPORTED_EXTENSIONS, W as MailAttachment, H as DmCryptoContext } from './browser-DbRaA0v7.cjs';
2
- export { A as ActivityKind, a as ActivityResponse, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, i as ArbiOptions, j as ArbiSessionExpiredError, k as ArtifactEvent, l as AuthContext, n as AuthMode, o as AuthenticatedClient, p as CitationSummary, s as CommandDescriptor, u as ConnectOptions, v as ConversationResponse, y as CreateWorkRequest, z as CreateWorkflowRequest, D as DOC_TERMINAL_STATUSES, B as DecryptedDmNotification, F as DmAttachmentFile, G as DmAttachmentInput, I as DocNameMap, J as DocumentAutomationAction, K as DocumentListFields, L as DocumentListOrder, M as DocumentSelector, N as DocumentWaiter, O as DocumentWaiterOptions, S as FormattedWsMessage, T as ListAllOptions, V as ListPaginatedOptions, X as MessageLevel, Y as MessageMetadataPayload, Z as MessageQueuedEvent, _ as OutputTokensDetails, $ as ParsedSlashCommand, a0 as PendingAuthResponse, a1 as PlanWorkRequest, a3 as ProjectInvoicesResponse, a4 as ProjectUsageResponse, a5 as QueryOptions, a6 as ReconnectOptions, a7 as ReconnectableWsConnection, a8 as ResolvedCitation, a9 as ResolvedRecipient, 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, 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, aP as agents, aQ as assistant, aR as authenticatedFetch, aS as buildDocNameMap, 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, b1 as createDocumentWaiter, 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, bb as formatStreamSummary, bc as formatUserName, bd as formatWorkspaceChoices, be as formatWsMessage, bf as generateEncryptedWorkspaceKey, bg as generateNewWorkspaceKey, bh as getErrorCode, bi as getErrorMessage, bj as getRawWorkspaceKey, bk as health, bl as mail, bm as parseSSEEvents, bn as parseSlashCommand, bo as parseSlashTokenInProgress, bp as performPasswordLogin, bq as performSigningKeyLogin, br as performSsoDeviceFlowLogin, 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-DbRaA0v7.cjs';
1
+ import { t as ConfigStore, q as CliConfig, r as CliCredentials, C as ChatSession, ap as SkippedFile, aA as UploadResult, m as AuthHeaders, aw as UploadBatchResult, az as UploadOptions, ax as UploadDirectOptions, ay as UploadDirectResult, an as SUPPORTED_EXTENSIONS, W as MailAttachment, H as DmCryptoContext } from './browser-DbSUZhdX.cjs';
2
+ export { A as ActivityKind, a as ActivityResponse, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, i as ArbiOptions, j as ArbiSessionExpiredError, k as ArtifactEvent, l as AuthContext, n as AuthMode, o as AuthenticatedClient, p as CitationSummary, s as CommandDescriptor, u as ConnectOptions, v as ConversationResponse, y as CreateWorkRequest, z as CreateWorkflowRequest, D as DOC_TERMINAL_STATUSES, B as DecryptedDmNotification, F as DmAttachmentFile, G as DmAttachmentInput, I as DocNameMap, J as DocumentAutomationAction, K as DocumentListFields, L as DocumentListOrder, M as DocumentSelector, N as DocumentWaiter, O as DocumentWaiterOptions, S as FormattedWsMessage, T as ListAllOptions, V as ListPaginatedOptions, X as MessageLevel, Y as MessageMetadataPayload, Z as MessageQueuedEvent, _ as OutputTokensDetails, $ as ParsedSlashCommand, a0 as PendingAuthResponse, a1 as PlanWorkRequest, a3 as ProjectInvoicesResponse, a4 as ProjectUsageResponse, a5 as QueryOptions, a6 as ReconnectOptions, a7 as ReconnectableWsConnection, a8 as ResolvedCitation, a9 as ResolvedRecipient, 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, 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, aP as agents, aQ as assistant, aR as authenticatedFetch, aS as buildDocNameMap, 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, b1 as createDocumentWaiter, 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, bb as formatStreamSummary, bc as formatUserName, bd as formatWorkspaceChoices, be as formatWsMessage, bf as generateEncryptedWorkspaceKey, bg as generateNewWorkspaceKey, bh as getErrorCode, bi as getErrorMessage, bj as getRawWorkspaceKey, bk as health, bl as mail, bm as parseSSEEvents, bn as parseSlashCommand, bo as parseSlashTokenInProgress, bp as performPasswordLogin, bq as performSigningKeyLogin, br as performSsoDeviceFlowLogin, 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-DbSUZhdX.cjs';
3
3
  import { SessionStorageProvider, ArbiClient } from '@arbidocs/client';
4
4
  export { LoginProfile } from '@arbidocs/client';
5
5
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { t as ConfigStore, q as CliConfig, r as CliCredentials, C as ChatSession, ap as SkippedFile, aA as UploadResult, m as AuthHeaders, aw as UploadBatchResult, az as UploadOptions, ax as UploadDirectOptions, ay as UploadDirectResult, an as SUPPORTED_EXTENSIONS, W as MailAttachment, H as DmCryptoContext } from './browser-DbRaA0v7.js';
2
- export { A as ActivityKind, a as ActivityResponse, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, i as ArbiOptions, j as ArbiSessionExpiredError, k as ArtifactEvent, l as AuthContext, n as AuthMode, o as AuthenticatedClient, p as CitationSummary, s as CommandDescriptor, u as ConnectOptions, v as ConversationResponse, y as CreateWorkRequest, z as CreateWorkflowRequest, D as DOC_TERMINAL_STATUSES, B as DecryptedDmNotification, F as DmAttachmentFile, G as DmAttachmentInput, I as DocNameMap, J as DocumentAutomationAction, K as DocumentListFields, L as DocumentListOrder, M as DocumentSelector, N as DocumentWaiter, O as DocumentWaiterOptions, S as FormattedWsMessage, T as ListAllOptions, V as ListPaginatedOptions, X as MessageLevel, Y as MessageMetadataPayload, Z as MessageQueuedEvent, _ as OutputTokensDetails, $ as ParsedSlashCommand, a0 as PendingAuthResponse, a1 as PlanWorkRequest, a3 as ProjectInvoicesResponse, a4 as ProjectUsageResponse, a5 as QueryOptions, a6 as ReconnectOptions, a7 as ReconnectableWsConnection, a8 as ResolvedCitation, a9 as ResolvedRecipient, 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, 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, aP as agents, aQ as assistant, aR as authenticatedFetch, aS as buildDocNameMap, 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, b1 as createDocumentWaiter, 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, bb as formatStreamSummary, bc as formatUserName, bd as formatWorkspaceChoices, be as formatWsMessage, bf as generateEncryptedWorkspaceKey, bg as generateNewWorkspaceKey, bh as getErrorCode, bi as getErrorMessage, bj as getRawWorkspaceKey, bk as health, bl as mail, bm as parseSSEEvents, bn as parseSlashCommand, bo as parseSlashTokenInProgress, bp as performPasswordLogin, bq as performSigningKeyLogin, br as performSsoDeviceFlowLogin, 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-DbRaA0v7.js';
1
+ import { t as ConfigStore, q as CliConfig, r as CliCredentials, C as ChatSession, ap as SkippedFile, aA as UploadResult, m as AuthHeaders, aw as UploadBatchResult, az as UploadOptions, ax as UploadDirectOptions, ay as UploadDirectResult, an as SUPPORTED_EXTENSIONS, W as MailAttachment, H as DmCryptoContext } from './browser-DbSUZhdX.js';
2
+ export { A as ActivityKind, a as ActivityResponse, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, i as ArbiOptions, j as ArbiSessionExpiredError, k as ArtifactEvent, l as AuthContext, n as AuthMode, o as AuthenticatedClient, p as CitationSummary, s as CommandDescriptor, u as ConnectOptions, v as ConversationResponse, y as CreateWorkRequest, z as CreateWorkflowRequest, D as DOC_TERMINAL_STATUSES, B as DecryptedDmNotification, F as DmAttachmentFile, G as DmAttachmentInput, I as DocNameMap, J as DocumentAutomationAction, K as DocumentListFields, L as DocumentListOrder, M as DocumentSelector, N as DocumentWaiter, O as DocumentWaiterOptions, S as FormattedWsMessage, T as ListAllOptions, V as ListPaginatedOptions, X as MessageLevel, Y as MessageMetadataPayload, Z as MessageQueuedEvent, _ as OutputTokensDetails, $ as ParsedSlashCommand, a0 as PendingAuthResponse, a1 as PlanWorkRequest, a3 as ProjectInvoicesResponse, a4 as ProjectUsageResponse, a5 as QueryOptions, a6 as ReconnectOptions, a7 as ReconnectableWsConnection, a8 as ResolvedCitation, a9 as ResolvedRecipient, 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, 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, aP as agents, aQ as assistant, aR as authenticatedFetch, aS as buildDocNameMap, 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, b1 as createDocumentWaiter, 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, bb as formatStreamSummary, bc as formatUserName, bd as formatWorkspaceChoices, be as formatWsMessage, bf as generateEncryptedWorkspaceKey, bg as generateNewWorkspaceKey, bh as getErrorCode, bi as getErrorMessage, bj as getRawWorkspaceKey, bk as health, bl as mail, bm as parseSSEEvents, bn as parseSlashCommand, bo as parseSlashTokenInProgress, bp as performPasswordLogin, bq as performSigningKeyLogin, br as performSsoDeviceFlowLogin, 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-DbSUZhdX.js';
3
3
  import { SessionStorageProvider, ArbiClient } from '@arbidocs/client';
4
4
  export { LoginProfile } from '@arbidocs/client';
5
5
 
package/dist/index.js CHANGED
@@ -5022,10 +5022,10 @@ async function uploadUrl(arbi, urls, shared = false) {
5022
5022
  "Failed to upload from URLs"
5023
5023
  );
5024
5024
  }
5025
- async function getParsedContent(auth, docId, stage) {
5025
+ async function getParsedContent(auth, docId, stage, version) {
5026
5026
  const res = await authenticatedFetch({
5027
5027
  ...auth,
5028
- path: `/v1/document/${docId}/parsed-${stage}`
5028
+ path: `/v1/document/${docId}/parsed-${stage}${version ? `?version=${version}` : ""}`
5029
5029
  });
5030
5030
  return res.json();
5031
5031
  }
@@ -5083,10 +5083,10 @@ async function uploadFiles(auth, files, options) {
5083
5083
  });
5084
5084
  return res.json();
5085
5085
  }
5086
- async function downloadDocument(auth, docId) {
5086
+ async function downloadDocument(auth, docId, version) {
5087
5087
  return authenticatedFetch({
5088
5088
  ...auth,
5089
- path: `/v1/document/${docId}/download`
5089
+ path: `/v1/document/${docId}/download${version ? `?version=${version}` : ""}`
5090
5090
  });
5091
5091
  }
5092
5092
  function mimeFromName(name) {
@@ -5245,6 +5245,7 @@ async function uploadDocumentsDirect(arbi, workspaceKey, files, options) {
5245
5245
  );
5246
5246
  return {
5247
5247
  doc_ext_ids: commitResult.doc_ext_ids ?? [],
5248
+ version: commitResult.version ?? null,
5248
5249
  skipped: [...skipped, ...commitResult.skipped ?? []]
5249
5250
  };
5250
5251
  }
@@ -7140,7 +7141,7 @@ var Arbi = class {
7140
7141
  */
7141
7142
  listAll: (options) => listAll(this.requireClient(), options),
7142
7143
  get: (externalIds) => getDocuments(this.requireClient(), externalIds),
7143
- /** Every version of a document (any version's id), oldest first; `is_current` marks the current one. */
7144
+ /** Every version of a document, oldest first; `is_current` marks the current one. */
7144
7145
  versions: (docId) => listVersions(this.requireClient(), docId),
7145
7146
  delete: (externalIds) => deleteDocuments(this.requireClient(), externalIds),
7146
7147
  update: (documents) => updateDocuments(this.requireClient(), documents),
@@ -7154,8 +7155,11 @@ var Arbi = class {
7154
7155
  () => uploadFile(this.getAuthHeaders(), fileData, fileName, options)
7155
7156
  );
7156
7157
  },
7157
- download: (docId) => this.recovering(() => downloadDocument(this.getAuthHeaders(), docId)),
7158
- getParsedContent: (docId, stage) => this.recovering(() => getParsedContent(this.getAuthHeaders(), docId, stage)),
7158
+ /** Download a document's original file — its current version, or `version`. */
7159
+ download: (docId, version) => this.recovering(() => downloadDocument(this.getAuthHeaders(), docId, version)),
7160
+ getParsedContent: (docId, stage, version) => this.recovering(
7161
+ () => getParsedContent(this.getAuthHeaders(), docId, stage, version)
7162
+ ),
7159
7163
  getThumbnails: (docIds) => this.recovering(() => getThumbnails(this.getAuthHeaders(), docIds))
7160
7164
  };
7161
7165
  // ── Conversations ─────────────────────────────────────────────────────