@arbidocs/sdk 0.3.145 → 0.3.147

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.cjs CHANGED
@@ -5219,7 +5219,6 @@ __export(workspaces_exports, {
5219
5219
  copyDocuments: () => copyDocuments,
5220
5220
  createWorkspace: () => createWorkspace,
5221
5221
  deleteWorkspaces: () => deleteWorkspaces,
5222
- getWorkspaceChronology: () => getWorkspaceChronology,
5223
5222
  listWorkspaceUsers: () => listWorkspaceUsers,
5224
5223
  listWorkspaces: () => listWorkspaces,
5225
5224
  removeWorkspaceUsers: () => removeWorkspaceUsers,
@@ -5284,14 +5283,6 @@ async function setUserRole(arbi, userIds, role) {
5284
5283
  "Failed to update roles"
5285
5284
  );
5286
5285
  }
5287
- async function getWorkspaceChronology(arbi, workspaceId) {
5288
- return requireData(
5289
- await arbi.fetch.GET("/v1/workspace/{workspace_ext_id}/chronology", {
5290
- params: { path: { workspace_ext_id: workspaceId } }
5291
- }),
5292
- "Failed to fetch workspace chronology"
5293
- );
5294
- }
5295
5286
  async function copyDocuments(arbi, targetWorkspaceId, docIds, targetWorkspaceKey) {
5296
5287
  return requireData(
5297
5288
  await arbi.fetch.POST("/v1/workspace/copy", {
@@ -6130,22 +6121,22 @@ async function runTask(arbi, taskId) {
6130
6121
  );
6131
6122
  }
6132
6123
 
6133
- // src/operations/notes.ts
6134
- var notes_exports = {};
6135
- __export(notes_exports, {
6136
- createNote: () => createNote,
6137
- deleteNote: () => deleteNote,
6138
- listNotes: () => listNotes,
6139
- remindNote: () => remindNote,
6140
- searchNotes: () => searchNotes,
6141
- updateNote: () => updateNote
6124
+ // src/operations/facts.ts
6125
+ var facts_exports = {};
6126
+ __export(facts_exports, {
6127
+ createFact: () => createFact,
6128
+ deleteFact: () => deleteFact,
6129
+ listFacts: () => listFacts,
6130
+ remindFact: () => remindFact,
6131
+ searchFacts: () => searchFacts,
6132
+ updateFact: () => updateFact
6142
6133
  });
6143
- async function createNote(arbi, body) {
6144
- return requireData(await arbi.fetch.POST("/v1/notes/", { body }), "Failed to create note");
6134
+ async function createFact(arbi, body) {
6135
+ return requireData(await arbi.fetch.POST("/v1/facts/", { body }), "Failed to create note");
6145
6136
  }
6146
- async function listNotes(arbi, options) {
6137
+ async function listFacts(arbi, options) {
6147
6138
  return requireData(
6148
- await arbi.fetch.GET("/v1/notes/list", {
6139
+ await arbi.fetch.GET("/v1/facts/list", {
6149
6140
  params: {
6150
6141
  query: {
6151
6142
  pinned_only: options?.pinnedOnly ?? false,
@@ -6158,28 +6149,28 @@ async function listNotes(arbi, options) {
6158
6149
  "Failed to list notes"
6159
6150
  );
6160
6151
  }
6161
- async function searchNotes(arbi, body) {
6162
- return requireData(await arbi.fetch.POST("/v1/notes/search", { body }), "Failed to search notes");
6152
+ async function searchFacts(arbi, body) {
6153
+ return requireData(await arbi.fetch.POST("/v1/facts/search", { body }), "Failed to search notes");
6163
6154
  }
6164
- async function updateNote(arbi, memoryId, body) {
6155
+ async function updateFact(arbi, factId, body) {
6165
6156
  return requireData(
6166
- await arbi.fetch.PATCH("/v1/notes/{note_ext_id}", {
6167
- params: { path: { note_ext_id: memoryId } },
6157
+ await arbi.fetch.PATCH("/v1/facts/{fact_ext_id}", {
6158
+ params: { path: { fact_ext_id: factId } },
6168
6159
  body
6169
6160
  }),
6170
6161
  "Failed to update note"
6171
6162
  );
6172
6163
  }
6173
- async function deleteNote(arbi, memoryId) {
6174
- const { error } = await arbi.fetch.DELETE("/v1/notes/{note_ext_id}", {
6175
- params: { path: { note_ext_id: memoryId } }
6164
+ async function deleteFact(arbi, factId) {
6165
+ const { error } = await arbi.fetch.DELETE("/v1/facts/{fact_ext_id}", {
6166
+ params: { path: { fact_ext_id: factId } }
6176
6167
  });
6177
6168
  if (error) throw new Error("Failed to delete note");
6178
6169
  }
6179
- async function remindNote(arbi, noteId, options = {}) {
6170
+ async function remindFact(arbi, factId, options = {}) {
6180
6171
  return requireData(
6181
- await arbi.fetch.POST("/v1/notes/{note_ext_id}/remind", {
6182
- params: { path: { note_ext_id: noteId } },
6172
+ await arbi.fetch.POST("/v1/facts/{fact_ext_id}/remind", {
6173
+ params: { path: { fact_ext_id: factId } },
6183
6174
  body: {
6184
6175
  remind_at: options.remindAt ?? null,
6185
6176
  lead_minutes: options.leadMinutes ?? null
@@ -6402,14 +6393,6 @@ var Arbi = class {
6402
6393
  targetWorkspaceId,
6403
6394
  docIds,
6404
6395
  targetWorkspaceKey
6405
- ),
6406
- /**
6407
- * The last-generated document-derived chronology (key case events / dates).
6408
- * Defaults to the currently open workspace when no id is passed.
6409
- */
6410
- chronology: (workspaceId) => getWorkspaceChronology(
6411
- this.requireClient(),
6412
- workspaceId ?? this.requireWorkspace()
6413
6396
  )
6414
6397
  };
6415
6398
  // ── Documents ─────────────────────────────────────────────────────────
@@ -6665,18 +6648,18 @@ var Arbi = class {
6665
6648
  delete: (taskId) => deleteTask(this.requireClient(), taskId),
6666
6649
  run: (taskId) => runTask(this.requireClient(), taskId)
6667
6650
  };
6668
- // ── Workspace notes ─────────────────────────────────────────────────
6669
- notes = {
6670
- create: (body) => createNote(this.requireClient(), body),
6651
+ // ── Workspace facts ─────────────────────────────────────────────────
6652
+ facts = {
6653
+ create: (body) => createFact(this.requireClient(), body),
6671
6654
  /** Pass `from`/`to`/`datedOnly` for the timeline view — dated notes only,
6672
6655
  * ordered by when they happened. */
6673
- list: (options) => listNotes(this.requireClient(), options),
6674
- search: (body) => searchNotes(this.requireClient(), body),
6675
- update: (noteId, body) => updateNote(this.requireClient(), noteId, body),
6676
- delete: (noteId) => deleteNote(this.requireClient(), noteId),
6656
+ list: (options) => listFacts(this.requireClient(), options),
6657
+ search: (body) => searchFacts(this.requireClient(), body),
6658
+ update: (factId, body) => updateFact(this.requireClient(), factId, body),
6659
+ delete: (factId) => deleteFact(this.requireClient(), factId),
6677
6660
  /** One-off reminder on a dated note: an explicit `remindAt`, or
6678
6661
  * `leadMinutes` before its date. */
6679
- remind: (noteId, options = {}) => remindNote(this.requireClient(), noteId, options)
6662
+ remind: (factId, options = {}) => remindFact(this.requireClient(), factId, options)
6680
6663
  };
6681
6664
  // ── Sessions ────────────────────────────────────────────────────────
6682
6665
  sessions = {
@@ -7854,6 +7837,7 @@ exports.dm = dm_exports;
7854
7837
  exports.doctags = doctags_exports;
7855
7838
  exports.documents = documents_exports;
7856
7839
  exports.documentsNode = documents_node_exports;
7840
+ exports.facts = facts_exports;
7857
7841
  exports.files = files_exports;
7858
7842
  exports.filterSkills = filterSkills;
7859
7843
  exports.formatAgentStepLabel = formatAgentStepLabel;
@@ -7870,7 +7854,6 @@ exports.getErrorMessage = getErrorMessage;
7870
7854
  exports.getRawWorkspaceKey = getRawWorkspaceKey;
7871
7855
  exports.health = health_exports;
7872
7856
  exports.listen = listen_exports;
7873
- exports.notes = notes_exports;
7874
7857
  exports.parseSSEEvents = parseSSEEvents;
7875
7858
  exports.parseSlashCommand = parseSlashCommand;
7876
7859
  exports.parseSlashTokenInProgress = parseSlashTokenInProgress;