@arbidocs/sdk 0.4.86 → 0.4.88
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-V51dp6kY.d.cts → browser-DqNDY_fc.d.cts} +717 -609
- package/dist/{browser-V51dp6kY.d.ts → browser-DqNDY_fc.d.ts} +717 -609
- package/dist/browser.cjs +55 -2
- 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 +55 -2
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +55 -2
- 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 +55 -2
- 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 ConversationUsageResponse, x as CreateFactRequest, y as CreateFactsRequest, z as CreateWorkRequest, B as CreateWorkflowRequest, E as DecryptedDmNotification, F as DeferredInterjectionEvent, G as DmAttachmentFile, H as DmAttachmentInput, K as DocumentAutomationAction, N as DocumentSelector, Q as FactResponse, R as FactSearchRequest, S as FactSearchResponse, U as IdentityErrorCode, V as IdentityPurchase, W as IdentityState, X as IdentityStatus, Y as LinkedRun, _ as ListFactsOptions, a2 as MessageMetadataPayload, a3 as MessageQueuedEvent, a4 as OutputTokensDetails, a5 as ParsedSlashCommand, a6 as PendingAuthResponse, a7 as PlanStepsError, a8 as PlanWorkRequest, a9 as ProbeAnswerEvent, aa as ProjectBudget, ab as ProjectConversationUsageResponse, ac as ProjectDetails, ad as ProjectEventKind, ae as ProjectEventResponse, af as ProjectInvoicesResponse, ag as ProjectResponse, ah as ProjectUpdateRequest, ai as ProjectUsageResponse, aj as QueryOptions, ak as RaisedSignal, al as ReconnectOptions, am as ReconnectableWsConnection, an as ResolvedCitation, ap as ResponseCompletedEvent, aq as ResponseContentPartAddedEvent, ar as ResponseCreatedEvent, as as ResponseFailedEvent, at as ResponseOutputItemAddedEvent, au as ResponseOutputItemDoneEvent, av as ResponseOutputTextDeltaEvent, aw as ResponseOutputTextDoneEvent, ax as ResponseUsage, ay as RunProgress, az as RunStep, aA as RunWaitingOn, aB as SSEEvent, aC as SSEStreamCallbacks, aD as SSEStreamResult, aE as SSEStreamStartData, aG as SendBack, aH as SkillSummary, aJ as StepActionRequest, aK as StepActivityEvent, aL as StepAssignee, aM as StepField, aN as StepKind, aO as StepPhase, aP as StepSignal, aQ as StepSignalWhen, aR as StepState, aS as StepStatus, aT as SubmitBackgroundQueryOptions, aU as TagChange, aV as TagFieldDefinition, aW as TagKind, aX as TagKindField, aY as TagKindSchema, aZ as TagLinks, a_ as TagListQuery, a$ as TagResponse, b0 as TaskPlan, b1 as TaskPlanStep, b2 as TokenBudgetContext, b3 as UpdateConversationRequest, b4 as UpdateFactRequest, b5 as UpdateWorkflowRequest, bb as UsageBreakdown, bc as UserDailyUsageResponse, bd as UserInfo, be as UserInputRequestEvent, bf as UserMessageEvent, bg as WebSocketAuthError, bh as WorkStatus, bi as WorkflowAuthMode, bj as WorkflowResponse, bk as WorkflowRunHistoryResponse, bl as WorkflowRunResponse, bm as WorkspaceContext, bn as WsConnection, bo as account, bp as agentconfig, br as assistant, bs as authenticatedFetch, bu as buildFactsContextTool, bv as buildRetrievalChunkTool, bw as buildRetrievalFullContextTool, bx as buildRetrievalTocTool, by as connectWebSocket, bz as connectWithReconnect, bA as consumeSSEStream, bB as contacts, bC as conversations, bD as countCitations, bE as createAuthenticatedClient, bG as dm, bH as doctags, bI as documents, bJ as facts, bK as files, bL as filterSkills, bM as formatAgentStepLabel, bN as formatFileSize, bO as formatItemLabel, bQ as formatUserName, bR as formatWorkspaceChoices, bW as getErrorMessage, bX as getRawWorkspaceKey, bY as health, b_ as identityErrorCode, bZ as identityVerification, b$ as mail, c0 as parseSSEEvents, c1 as parseSlashCommand, c2 as parseSlashTokenInProgress, c3 as performPasswordLogin, c6 as profile, c7 as projects, c8 as requireData, c9 as requireOk, ca as resolveAuth, cb as resolveCitations, cc as resolveWorkspace, cd as responses, ce as selectWorkspace, cf as selectWorkspaceById, cg as sessions, ch as settings, ci as streamSSE, cj as stripCitationMarkdown, ck as summarizeCitations, cl as tags, cm as work, cn as workflowSteps, co as workflows, cp 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 ConversationUsageResponse, x as CreateFactRequest, y as CreateFactsRequest, z as CreateWorkRequest, B as CreateWorkflowRequest, E as DecryptedDmNotification, F as DeferredInterjectionEvent, G as DmAttachmentFile, H as DmAttachmentInput, K as DocumentAutomationAction, N as DocumentSelector, Q as FactResponse, R as FactSearchRequest, S as FactSearchResponse, U as IdentityErrorCode, V as IdentityPurchase, W as IdentityState, X as IdentityStatus, Y as LinkedRun, _ as ListFactsOptions, a2 as MessageMetadataPayload, a3 as MessageQueuedEvent, a4 as OutputTokensDetails, a5 as ParsedSlashCommand, a6 as PendingAuthResponse, a7 as PlanStepsError, a8 as PlanWorkRequest, a9 as ProbeAnswerEvent, aa as ProjectBudget, ab as ProjectConversationUsageResponse, ac as ProjectDetails, ad as ProjectEventKind, ae as ProjectEventResponse, af as ProjectInvoicesResponse, ag as ProjectResponse, ah as ProjectUpdateRequest, ai as ProjectUsageResponse, aj as QueryOptions, ak as RaisedSignal, al as ReconnectOptions, am as ReconnectableWsConnection, an as ResolvedCitation, ap as ResponseCompletedEvent, aq as ResponseContentPartAddedEvent, ar as ResponseCreatedEvent, as as ResponseFailedEvent, at as ResponseOutputItemAddedEvent, au as ResponseOutputItemDoneEvent, av as ResponseOutputTextDeltaEvent, aw as ResponseOutputTextDoneEvent, ax as ResponseUsage, ay as RunProgress, az as RunStep, aA as RunWaitingOn, aB as SSEEvent, aC as SSEStreamCallbacks, aD as SSEStreamResult, aE as SSEStreamStartData, aG as SendBack, aH as SkillSummary, aJ as StepActionRequest, aK as StepActivityEvent, aL as StepAssignee, aM as StepField, aN as StepKind, aO as StepPhase, aP as StepSignal, aQ as StepSignalWhen, aR as StepState, aS as StepStatus, aT as SubmitBackgroundQueryOptions, aU as TagChange, aV as TagFieldDefinition, aW as TagKind, aX as TagKindField, aY as TagKindSchema, aZ as TagLinks, a_ as TagListQuery, a$ as TagResponse, b0 as TaskPlan, b1 as TaskPlanStep, b2 as TokenBudgetContext, b3 as UpdateConversationRequest, b4 as UpdateFactRequest, b5 as UpdateWorkflowRequest, bb as UsageBreakdown, bc as UserDailyUsageResponse, bd as UserInfo, be as UserInputRequestEvent, bf as UserMessageEvent, bg as WebSocketAuthError, bh as WorkStatus, bi as WorkflowAuthMode, bj as WorkflowResponse, bk as WorkflowRunHistoryResponse, bl as WorkflowRunResponse, bm as WorkspaceContext, bn as WsConnection, bo as account, bp as agentconfig, br as assistant, bs as authenticatedFetch, bu as buildFactsContextTool, bv as buildRetrievalChunkTool, bw as buildRetrievalFullContextTool, bx as buildRetrievalTocTool, by as connectWebSocket, bz as connectWithReconnect, bA as consumeSSEStream, bB as contacts, bC as conversations, bD as countCitations, bE as createAuthenticatedClient, bG as dm, bH as doctags, bI as documents, bJ as facts, bK as files, bL as filterSkills, bM as formatAgentStepLabel, bN as formatFileSize, bO as formatItemLabel, bQ as formatUserName, bR as formatWorkspaceChoices, bW as getErrorMessage, bX as getRawWorkspaceKey, bY as health, b_ as identityErrorCode, bZ as identityVerification, b$ as mail, c0 as parseSSEEvents, c1 as parseSlashCommand, c2 as parseSlashTokenInProgress, c3 as performPasswordLogin, c6 as profile, c7 as projects, c8 as requireData, c9 as requireOk, ca as resolveAuth, cb as resolveCitations, cc as resolveWorkspace, cd as responses, ce as selectWorkspace, cf as selectWorkspaceById, cg as sessions, ch as settings, ci as streamSSE, cj as stripCitationMarkdown, ck as summarizeCitations, cl as tags, cm as work, cn as workflowSteps, co as workflows, cp as workspaces } from './browser-DqNDY_fc.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 ConversationUsageResponse, x as CreateFactRequest, y as CreateFactsRequest, z as CreateWorkRequest, B as CreateWorkflowRequest, E as DecryptedDmNotification, F as DeferredInterjectionEvent, G as DmAttachmentFile, H as DmAttachmentInput, K as DocumentAutomationAction, N as DocumentSelector, Q as FactResponse, R as FactSearchRequest, S as FactSearchResponse, U as IdentityErrorCode, V as IdentityPurchase, W as IdentityState, X as IdentityStatus, Y as LinkedRun, _ as ListFactsOptions, a2 as MessageMetadataPayload, a3 as MessageQueuedEvent, a4 as OutputTokensDetails, a5 as ParsedSlashCommand, a6 as PendingAuthResponse, a7 as PlanStepsError, a8 as PlanWorkRequest, a9 as ProbeAnswerEvent, aa as ProjectBudget, ab as ProjectConversationUsageResponse, ac as ProjectDetails, ad as ProjectEventKind, ae as ProjectEventResponse, af as ProjectInvoicesResponse, ag as ProjectResponse, ah as ProjectUpdateRequest, ai as ProjectUsageResponse, aj as QueryOptions, ak as RaisedSignal, al as ReconnectOptions, am as ReconnectableWsConnection, an as ResolvedCitation, ap as ResponseCompletedEvent, aq as ResponseContentPartAddedEvent, ar as ResponseCreatedEvent, as as ResponseFailedEvent, at as ResponseOutputItemAddedEvent, au as ResponseOutputItemDoneEvent, av as ResponseOutputTextDeltaEvent, aw as ResponseOutputTextDoneEvent, ax as ResponseUsage, ay as RunProgress, az as RunStep, aA as RunWaitingOn, aB as SSEEvent, aC as SSEStreamCallbacks, aD as SSEStreamResult, aE as SSEStreamStartData, aG as SendBack, aH as SkillSummary, aJ as StepActionRequest, aK as StepActivityEvent, aL as StepAssignee, aM as StepField, aN as StepKind, aO as StepPhase, aP as StepSignal, aQ as StepSignalWhen, aR as StepState, aS as StepStatus, aT as SubmitBackgroundQueryOptions, aU as TagChange, aV as TagFieldDefinition, aW as TagKind, aX as TagKindField, aY as TagKindSchema, aZ as TagLinks, a_ as TagListQuery, a$ as TagResponse, b0 as TaskPlan, b1 as TaskPlanStep, b2 as TokenBudgetContext, b3 as UpdateConversationRequest, b4 as UpdateFactRequest, b5 as UpdateWorkflowRequest, bb as UsageBreakdown, bc as UserDailyUsageResponse, bd as UserInfo, be as UserInputRequestEvent, bf as UserMessageEvent, bg as WebSocketAuthError, bh as WorkStatus, bi as WorkflowAuthMode, bj as WorkflowResponse, bk as WorkflowRunHistoryResponse, bl as WorkflowRunResponse, bm as WorkspaceContext, bn as WsConnection, bo as account, bp as agentconfig, br as assistant, bs as authenticatedFetch, bu as buildFactsContextTool, bv as buildRetrievalChunkTool, bw as buildRetrievalFullContextTool, bx as buildRetrievalTocTool, by as connectWebSocket, bz as connectWithReconnect, bA as consumeSSEStream, bB as contacts, bC as conversations, bD as countCitations, bE as createAuthenticatedClient, bG as dm, bH as doctags, bI as documents, bJ as facts, bK as files, bL as filterSkills, bM as formatAgentStepLabel, bN as formatFileSize, bO as formatItemLabel, bQ as formatUserName, bR as formatWorkspaceChoices, bW as getErrorMessage, bX as getRawWorkspaceKey, bY as health, b_ as identityErrorCode, bZ as identityVerification, b$ as mail, c0 as parseSSEEvents, c1 as parseSlashCommand, c2 as parseSlashTokenInProgress, c3 as performPasswordLogin, c6 as profile, c7 as projects, c8 as requireData, c9 as requireOk, ca as resolveAuth, cb as resolveCitations, cc as resolveWorkspace, cd as responses, ce as selectWorkspace, cf as selectWorkspaceById, cg as sessions, ch as settings, ci as streamSSE, cj as stripCitationMarkdown, ck as summarizeCitations, cl as tags, cm as work, cn as workflowSteps, co as workflows, cp 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 ConversationUsageResponse, x as CreateFactRequest, y as CreateFactsRequest, z as CreateWorkRequest, B as CreateWorkflowRequest, E as DecryptedDmNotification, F as DeferredInterjectionEvent, G as DmAttachmentFile, H as DmAttachmentInput, K as DocumentAutomationAction, N as DocumentSelector, Q as FactResponse, R as FactSearchRequest, S as FactSearchResponse, U as IdentityErrorCode, V as IdentityPurchase, W as IdentityState, X as IdentityStatus, Y as LinkedRun, _ as ListFactsOptions, a2 as MessageMetadataPayload, a3 as MessageQueuedEvent, a4 as OutputTokensDetails, a5 as ParsedSlashCommand, a6 as PendingAuthResponse, a7 as PlanStepsError, a8 as PlanWorkRequest, a9 as ProbeAnswerEvent, aa as ProjectBudget, ab as ProjectConversationUsageResponse, ac as ProjectDetails, ad as ProjectEventKind, ae as ProjectEventResponse, af as ProjectInvoicesResponse, ag as ProjectResponse, ah as ProjectUpdateRequest, ai as ProjectUsageResponse, aj as QueryOptions, ak as RaisedSignal, al as ReconnectOptions, am as ReconnectableWsConnection, an as ResolvedCitation, ap as ResponseCompletedEvent, aq as ResponseContentPartAddedEvent, ar as ResponseCreatedEvent, as as ResponseFailedEvent, at as ResponseOutputItemAddedEvent, au as ResponseOutputItemDoneEvent, av as ResponseOutputTextDeltaEvent, aw as ResponseOutputTextDoneEvent, ax as ResponseUsage, ay as RunProgress, az as RunStep, aA as RunWaitingOn, aB as SSEEvent, aC as SSEStreamCallbacks, aD as SSEStreamResult, aE as SSEStreamStartData, aG as SendBack, aH as SkillSummary, aJ as StepActionRequest, aK as StepActivityEvent, aL as StepAssignee, aM as StepField, aN as StepKind, aO as StepPhase, aP as StepSignal, aQ as StepSignalWhen, aR as StepState, aS as StepStatus, aT as SubmitBackgroundQueryOptions, aU as TagChange, aV as TagFieldDefinition, aW as TagKind, aX as TagKindField, aY as TagKindSchema, aZ as TagLinks, a_ as TagListQuery, a$ as TagResponse, b0 as TaskPlan, b1 as TaskPlanStep, b2 as TokenBudgetContext, b3 as UpdateConversationRequest, b4 as UpdateFactRequest, b5 as UpdateWorkflowRequest, bb as UsageBreakdown, bc as UserDailyUsageResponse, bd as UserInfo, be as UserInputRequestEvent, bf as UserMessageEvent, bg as WebSocketAuthError, bh as WorkStatus, bi as WorkflowAuthMode, bj as WorkflowResponse, bk as WorkflowRunHistoryResponse, bl as WorkflowRunResponse, bm as WorkspaceContext, bn as WsConnection, bo as account, bp as agentconfig, br as assistant, bs as authenticatedFetch, bu as buildFactsContextTool, bv as buildRetrievalChunkTool, bw as buildRetrievalFullContextTool, bx as buildRetrievalTocTool, by as connectWebSocket, bz as connectWithReconnect, bA as consumeSSEStream, bB as contacts, bC as conversations, bD as countCitations, bE as createAuthenticatedClient, bG as dm, bH as doctags, bI as documents, bJ as facts, bK as files, bL as filterSkills, bM as formatAgentStepLabel, bN as formatFileSize, bO as formatItemLabel, bQ as formatUserName, bR as formatWorkspaceChoices, bW as getErrorMessage, bX as getRawWorkspaceKey, bY as health, b_ as identityErrorCode, bZ as identityVerification, b$ as mail, c0 as parseSSEEvents, c1 as parseSlashCommand, c2 as parseSlashTokenInProgress, c3 as performPasswordLogin, c6 as profile, c7 as projects, c8 as requireData, c9 as requireOk, ca as resolveAuth, cb as resolveCitations, cc as resolveWorkspace, cd as responses, ce as selectWorkspace, cf as selectWorkspaceById, cg as sessions, ch as settings, ci as streamSSE, cj as stripCitationMarkdown, ck as summarizeCitations, cl as tags, cm as work, cn as workflowSteps, co as workflows, cp as workspaces } from './browser-DqNDY_fc.js';
|
|
2
2
|
export { LoginProfile } from '@arbidocs/client';
|
package/dist/browser.js
CHANGED
|
@@ -4727,6 +4727,7 @@ __export(workspaces_exports, {
|
|
|
4727
4727
|
copyDocuments: () => copyDocuments,
|
|
4728
4728
|
createWorkspace: () => createWorkspace,
|
|
4729
4729
|
deleteWorkspaces: () => deleteWorkspaces,
|
|
4730
|
+
getWorkspaceActivity: () => getWorkspaceActivity,
|
|
4730
4731
|
grantTemporaryWorkspaceAccess: () => grantTemporaryWorkspaceAccess,
|
|
4731
4732
|
listWorkspaceUsers: () => listWorkspaceUsers,
|
|
4732
4733
|
listWorkspaces: () => listWorkspaces,
|
|
@@ -4823,6 +4824,17 @@ async function copyDocuments(arbi, targetWorkspaceId, docIds, targetWorkspaceKey
|
|
|
4823
4824
|
"Failed to copy documents"
|
|
4824
4825
|
);
|
|
4825
4826
|
}
|
|
4827
|
+
async function getWorkspaceActivity(arbi, workspaceExtId, options = {}) {
|
|
4828
|
+
return requireData(
|
|
4829
|
+
await arbi.fetch.GET("/v1/workspace/{workspace_ext_id}/activity", {
|
|
4830
|
+
params: {
|
|
4831
|
+
path: { workspace_ext_id: workspaceExtId },
|
|
4832
|
+
query: { cursor: options.cursor ?? void 0, limit: options.limit }
|
|
4833
|
+
}
|
|
4834
|
+
}),
|
|
4835
|
+
"Failed to fetch workspace activity"
|
|
4836
|
+
);
|
|
4837
|
+
}
|
|
4826
4838
|
|
|
4827
4839
|
// src/operations/conversations.ts
|
|
4828
4840
|
var conversations_exports = {};
|
|
@@ -5805,7 +5817,12 @@ async function deleteDMs(arbi, messageIds) {
|
|
|
5805
5817
|
var settings_exports = {};
|
|
5806
5818
|
__export(settings_exports, {
|
|
5807
5819
|
getSettings: () => getSettings,
|
|
5808
|
-
|
|
5820
|
+
setListMembership: () => setListMembership,
|
|
5821
|
+
setWorkspaceNotificationLevel: () => setWorkspaceNotificationLevel,
|
|
5822
|
+
updateSettings: () => updateSettings,
|
|
5823
|
+
withMembership: () => withMembership,
|
|
5824
|
+
workspaceLevelPatch: () => workspaceLevelPatch,
|
|
5825
|
+
workspaceNotificationLevel: () => workspaceNotificationLevel
|
|
5809
5826
|
});
|
|
5810
5827
|
async function getSettings(arbi) {
|
|
5811
5828
|
return requireData(await arbi.fetch.GET("/v1/user/settings"), "Failed to fetch settings");
|
|
@@ -5813,6 +5830,36 @@ async function getSettings(arbi) {
|
|
|
5813
5830
|
async function updateSettings(arbi, body) {
|
|
5814
5831
|
requireOk(await arbi.fetch.PATCH("/v1/user/settings", { body }), "Failed to update settings");
|
|
5815
5832
|
}
|
|
5833
|
+
function withMembership(list, id, on) {
|
|
5834
|
+
const rest = (list ?? []).filter((x2) => x2 !== id);
|
|
5835
|
+
return on ? [...rest, id] : rest;
|
|
5836
|
+
}
|
|
5837
|
+
async function setListMembership(arbi, list, id, on) {
|
|
5838
|
+
const settings = await getSettings(arbi);
|
|
5839
|
+
const next = withMembership(settings[list], id, on);
|
|
5840
|
+
await updateSettings(arbi, { [list]: next });
|
|
5841
|
+
return next;
|
|
5842
|
+
}
|
|
5843
|
+
function workspaceNotificationLevel(lists, workspaceId) {
|
|
5844
|
+
if (lists?.muted_workspaces?.includes(workspaceId)) return "muted";
|
|
5845
|
+
if (lists?.followed_workspaces?.includes(workspaceId)) return "following";
|
|
5846
|
+
return "default";
|
|
5847
|
+
}
|
|
5848
|
+
function workspaceLevelPatch(lists, workspaceId, level) {
|
|
5849
|
+
return {
|
|
5850
|
+
muted_workspaces: withMembership(lists?.muted_workspaces, workspaceId, level === "muted"),
|
|
5851
|
+
followed_workspaces: withMembership(
|
|
5852
|
+
lists?.followed_workspaces,
|
|
5853
|
+
workspaceId,
|
|
5854
|
+
level === "following"
|
|
5855
|
+
)
|
|
5856
|
+
};
|
|
5857
|
+
}
|
|
5858
|
+
async function setWorkspaceNotificationLevel(arbi, workspaceId, level) {
|
|
5859
|
+
const patch = workspaceLevelPatch(await getSettings(arbi), workspaceId, level);
|
|
5860
|
+
await updateSettings(arbi, patch);
|
|
5861
|
+
return patch;
|
|
5862
|
+
}
|
|
5816
5863
|
|
|
5817
5864
|
// src/operations/agentconfig.ts
|
|
5818
5865
|
var agentconfig_exports = {};
|
|
@@ -7667,6 +7714,8 @@ var Arbi = class {
|
|
|
7667
7714
|
},
|
|
7668
7715
|
update: (body) => updateWorkspace(this.requireClient(), body),
|
|
7669
7716
|
listUsers: () => listWorkspaceUsers(this.requireClient()),
|
|
7717
|
+
/** One page of a workspace's activity feed, newest first (see `getWorkspaceActivity`). */
|
|
7718
|
+
activity: (workspaceId, options) => getWorkspaceActivity(this.requireClient(), workspaceId, options),
|
|
7670
7719
|
addUsers: (emails, role) => addWorkspaceUsers(this.requireClient(), emails, role),
|
|
7671
7720
|
/**
|
|
7672
7721
|
* Grant users a temporary key scoped to ONE session (identified by its public key), for
|
|
@@ -8087,7 +8136,11 @@ var Arbi = class {
|
|
|
8087
8136
|
// ── Settings ──────────────────────────────────────────────────────────
|
|
8088
8137
|
settings = {
|
|
8089
8138
|
get: () => getSettings(this.requireClient()),
|
|
8090
|
-
update: (body) => updateSettings(this.requireClient(), body)
|
|
8139
|
+
update: (body) => updateSettings(this.requireClient(), body),
|
|
8140
|
+
/** Add or remove one id in a follow / mute list (the full list is sent). */
|
|
8141
|
+
setListMembership: (list, id, on) => setListMembership(this.requireClient(), list, id, on),
|
|
8142
|
+
/** A workspace's notification level: default, following or muted. */
|
|
8143
|
+
setWorkspaceNotificationLevel: (workspaceId, level) => setWorkspaceNotificationLevel(this.requireClient(), workspaceId, level)
|
|
8091
8144
|
};
|
|
8092
8145
|
// ── Agent Configuration ───────────────────────────────────────────────
|
|
8093
8146
|
agentConfig = {
|