@arbidocs/sdk 0.4.58 → 0.4.60
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/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-
|
|
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-
|
|
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-BSrHUKoq.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-BSrHUKoq.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-
|
|
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-
|
|
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-BSrHUKoq.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-BSrHUKoq.js';
|
|
3
3
|
import { SessionStorageProvider, ArbiClient } from '@arbidocs/client';
|
|
4
4
|
export { LoginProfile } from '@arbidocs/client';
|
|
5
5
|
|
package/dist/index.js
CHANGED
|
@@ -4849,6 +4849,7 @@ __export(documents_exports, {
|
|
|
4849
4849
|
listAll: () => listAll,
|
|
4850
4850
|
listDocuments: () => listDocuments,
|
|
4851
4851
|
listPaginated: () => listPaginated,
|
|
4852
|
+
listVersions: () => listVersions,
|
|
4852
4853
|
mimeFromName: () => mimeFromName,
|
|
4853
4854
|
sanitizeFolderPath: () => sanitizeFolderPath,
|
|
4854
4855
|
updateDocuments: () => updateDocuments,
|
|
@@ -4991,6 +4992,14 @@ async function getDocuments(arbi, externalIds) {
|
|
|
4991
4992
|
"Failed to fetch documents"
|
|
4992
4993
|
);
|
|
4993
4994
|
}
|
|
4995
|
+
async function listVersions(arbi, docId) {
|
|
4996
|
+
return requireData(
|
|
4997
|
+
await arbi.fetch.GET("/v1/document/{document_ext_id}/versions", {
|
|
4998
|
+
params: { path: { document_ext_id: docId } }
|
|
4999
|
+
}),
|
|
5000
|
+
"Failed to fetch document versions"
|
|
5001
|
+
);
|
|
5002
|
+
}
|
|
4994
5003
|
async function deleteDocuments(arbi, externalIds) {
|
|
4995
5004
|
requireOk(
|
|
4996
5005
|
await arbi.fetch.DELETE("/v1/document/", { body: { external_ids: externalIds } }),
|
|
@@ -5039,7 +5048,11 @@ async function uploadFile(auth, fileData, fileName, options) {
|
|
|
5039
5048
|
if (options?.folder) params.set("folder", sanitizeFolderPath(options.folder));
|
|
5040
5049
|
if (options?.configExtId) params.set("config_ext_id", options.configExtId);
|
|
5041
5050
|
if (options?.wpType) params.set("wp_type", options.wpType);
|
|
5042
|
-
if (options?.
|
|
5051
|
+
if (options?.versionOf) params.set("version_of", options.versionOf);
|
|
5052
|
+
if (options?.derivedFrom) {
|
|
5053
|
+
params.set("derived_from", options.derivedFrom.docId);
|
|
5054
|
+
params.set("derived_role", options.derivedFrom.role);
|
|
5055
|
+
}
|
|
5043
5056
|
const qs = params.toString();
|
|
5044
5057
|
const res = await authenticatedFetch({
|
|
5045
5058
|
...auth,
|
|
@@ -5056,7 +5069,11 @@ async function uploadFiles(auth, files, options) {
|
|
|
5056
5069
|
if (options?.folder) params.set("folder", sanitizeFolderPath(options.folder));
|
|
5057
5070
|
if (options?.configExtId) params.set("config_ext_id", options.configExtId);
|
|
5058
5071
|
if (options?.wpType) params.set("wp_type", options.wpType);
|
|
5059
|
-
if (options?.
|
|
5072
|
+
if (options?.versionOf) params.set("version_of", options.versionOf);
|
|
5073
|
+
if (options?.derivedFrom) {
|
|
5074
|
+
params.set("derived_from", options.derivedFrom.docId);
|
|
5075
|
+
params.set("derived_role", options.derivedFrom.role);
|
|
5076
|
+
}
|
|
5060
5077
|
const qs = params.toString();
|
|
5061
5078
|
const res = await authenticatedFetch({
|
|
5062
5079
|
...auth,
|
|
@@ -5151,7 +5168,8 @@ async function uploadDocumentsDirect(arbi, workspaceKey, files, options) {
|
|
|
5151
5168
|
files: declared,
|
|
5152
5169
|
shared: options?.shared !== false,
|
|
5153
5170
|
config_ext_id: options?.configExtId ?? null,
|
|
5154
|
-
|
|
5171
|
+
// Only sent when set, so a plain upload is accepted by any server version.
|
|
5172
|
+
...options?.versionOf ? { version_of: options.versionOf } : {},
|
|
5155
5173
|
wp_type: options?.wpType ?? null,
|
|
5156
5174
|
tag_ext_id: options?.tagExtId ?? null,
|
|
5157
5175
|
folder: options?.folder ? sanitizeFolderPath(options.folder) : null,
|
|
@@ -7122,6 +7140,8 @@ var Arbi = class {
|
|
|
7122
7140
|
*/
|
|
7123
7141
|
listAll: (options) => listAll(this.requireClient(), options),
|
|
7124
7142
|
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
|
+
versions: (docId) => listVersions(this.requireClient(), docId),
|
|
7125
7145
|
delete: (externalIds) => deleteDocuments(this.requireClient(), externalIds),
|
|
7126
7146
|
update: (documents) => updateDocuments(this.requireClient(), documents),
|
|
7127
7147
|
uploadUrl: (urls, shared) => {
|