@arbidocs/sdk 0.3.156 → 0.3.158

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.
@@ -5162,7 +5162,9 @@ declare function updateDocTag(arbi: ArbiClient, tagId: string, docId: string, up
5162
5162
  created_at: string;
5163
5163
  updated_at: string;
5164
5164
  }>;
5165
- declare function generateDocTags(arbi: ArbiClient, tagIds: string[], docIds: string[]): Promise<{
5165
+ declare function generateDocTags(arbi: ArbiClient, tagIds: string[], docIds: string[], options?: {
5166
+ overwrite?: boolean;
5167
+ }): Promise<{
5166
5168
  doc_ext_ids: string[];
5167
5169
  tag_ext_ids: string[];
5168
5170
  }>;
@@ -5162,7 +5162,9 @@ declare function updateDocTag(arbi: ArbiClient, tagId: string, docId: string, up
5162
5162
  created_at: string;
5163
5163
  updated_at: string;
5164
5164
  }>;
5165
- declare function generateDocTags(arbi: ArbiClient, tagIds: string[], docIds: string[]): Promise<{
5165
+ declare function generateDocTags(arbi: ArbiClient, tagIds: string[], docIds: string[], options?: {
5166
+ overwrite?: boolean;
5167
+ }): Promise<{
5166
5168
  doc_ext_ids: string[];
5167
5169
  tag_ext_ids: string[];
5168
5170
  }>;
package/dist/browser.cjs CHANGED
@@ -5073,10 +5073,12 @@ async function updateDocTag(arbi, tagId, docId, updates) {
5073
5073
  "Failed to update doctag"
5074
5074
  );
5075
5075
  }
5076
- async function generateDocTags(arbi, tagIds, docIds) {
5076
+ async function generateDocTags(arbi, tagIds, docIds, options) {
5077
5077
  return requireData(
5078
5078
  await arbi.fetch.POST("/v1/document/doctag/generate", {
5079
- body: { tag_ext_ids: tagIds, doc_ext_ids: docIds }
5079
+ // overwrite regenerates values for documents that already carry the tag;
5080
+ // the default skips them (the server's historical behaviour).
5081
+ body: { tag_ext_ids: tagIds, doc_ext_ids: docIds, overwrite: options?.overwrite ?? false }
5080
5082
  }),
5081
5083
  "Failed to generate doctags"
5082
5084
  );