@arbidocs/sdk 0.3.106 → 0.3.108

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
@@ -4785,6 +4785,7 @@ __export(documents_exports, {
4785
4785
  downloadDocument: () => downloadDocument,
4786
4786
  getDocuments: () => getDocuments,
4787
4787
  getParsedContent: () => getParsedContent,
4788
+ getThumbnails: () => getThumbnails,
4788
4789
  listAll: () => listAll,
4789
4790
  listDocuments: () => listDocuments,
4790
4791
  listPaginated: () => listPaginated,
@@ -4959,6 +4960,18 @@ async function getParsedContent(auth, docId, stage) {
4959
4960
  });
4960
4961
  return res.json();
4961
4962
  }
4963
+ async function getThumbnails(auth, docIds) {
4964
+ if (docIds.length === 0) return {};
4965
+ const res = await authenticatedFetch({
4966
+ ...auth,
4967
+ path: `/v1/document/thumbnails`,
4968
+ method: "POST",
4969
+ headers: { "Content-Type": "application/json" },
4970
+ body: JSON.stringify({ document_ext_ids: docIds })
4971
+ });
4972
+ const json = await res.json();
4973
+ return json.thumbnails ?? {};
4974
+ }
4962
4975
  async function uploadFile(auth, fileData, fileName, options) {
4963
4976
  const formData = new FormData();
4964
4977
  formData.append("files", fileData, fileName);
@@ -6195,7 +6208,8 @@ var Arbi = class {
6195
6208
  );
6196
6209
  },
6197
6210
  download: (docId) => downloadDocument(this.getAuthHeaders(), docId),
6198
- getParsedContent: (docId, stage) => getParsedContent(this.getAuthHeaders(), docId, stage)
6211
+ getParsedContent: (docId, stage) => getParsedContent(this.getAuthHeaders(), docId, stage),
6212
+ getThumbnails: (docIds) => getThumbnails(this.getAuthHeaders(), docIds)
6199
6213
  };
6200
6214
  // ── Conversations ─────────────────────────────────────────────────────
6201
6215
  conversations = {