@arbidocs/client 0.4.63 → 0.4.64

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.d.cts CHANGED
@@ -1021,7 +1021,7 @@ interface paths {
1021
1021
  * @description The decrypted structured data of a scope, plus the document files to fetch for a download.
1022
1022
  *
1023
1023
  * One JSON array per entity type, a manifest, and ``files`` — each a document
1024
- * version to fetch through ``/v1/document/{doc_ext_id}/download`` and store at
1024
+ * version to fetch through ``/v1/document/{doc_ext_id}/download?version={version}`` and store at
1025
1025
  * ``path`` (current versions under ``documents/``, older ones under
1026
1026
  * ``documents/_versions/``).
1027
1027
  */
@@ -1298,7 +1298,10 @@ interface paths {
1298
1298
  path?: never;
1299
1299
  cookie?: never;
1300
1300
  };
1301
- /** Native Content */
1301
+ /**
1302
+ * Native Content
1303
+ * @description The document as DOCX — its current version, or ``version`` (a read-only snapshot).
1304
+ */
1302
1305
  get: operations['native_content_v1_editor__document_id__content_get'];
1303
1306
  put?: never;
1304
1307
  post?: never;
@@ -1319,10 +1322,11 @@ interface paths {
1319
1322
  put?: never;
1320
1323
  /**
1321
1324
  * Create Word Redline
1322
- * @description Compare two documents into a NEW redline document (base -> revised).
1325
+ * @description Compare two document versions into a NEW redline document (base -> revised).
1323
1326
  *
1324
- * Without ``base_ext_id`` the base is the revised document's previous version.
1325
- * The redline records both inputs as provenance and is shared only if both are.
1327
+ * Without ``base_ext_id`` the base is the revised document's version before the
1328
+ * one compared. The redline records both inputs (document and version) as
1329
+ * provenance and is shared only if both documents are.
1326
1330
  */
1327
1331
  post: operations['create_word_redline_v1_editor_redline_post'];
1328
1332
  delete?: never;
@@ -1443,10 +1447,11 @@ interface paths {
1443
1447
  };
1444
1448
  /**
1445
1449
  * List Document Versions
1446
- * @description Every version of the document ``document_ext_id`` belongs to (any version's id), oldest first.
1450
+ * @description Every version of the document, oldest first; ``is_current`` marks the current one.
1447
1451
  *
1448
- * ``is_current`` marks the current one. Lists and search show only current
1449
- * versions; this is how older ones are reached.
1452
+ * A document keeps one id for its whole life: an older version is opened with
1453
+ * ``?version=n`` on the view / download / parsed / signature endpoints, and
1454
+ * retrieval asks about it as ``doc-…@v{n}``.
1450
1455
  */
1451
1456
  get: operations['list_document_versions'];
1452
1457
  put?: never;
@@ -1619,7 +1624,7 @@ interface paths {
1619
1624
  };
1620
1625
  /**
1621
1626
  * Download Document
1622
- * @description Download a document by its external ID.
1627
+ * @description Download a document (its original file) by its external ID — ``version`` for an older version.
1623
1628
  * Retrieves and decrypts the document for downloading as an attachment.
1624
1629
  */
1625
1630
  get: operations['download_document'];
@@ -1784,7 +1789,8 @@ interface paths {
1784
1789
  put?: never;
1785
1790
  /**
1786
1791
  * Sign Document
1787
- * @description Sign a document: verify the signer's statement, seal a signed copy, save it as a new child document.
1792
+ * @description Sign a document: verify the signer's statement, seal a signed copy, save it as the document's next
1793
+ * version (reason ``signed``; the document keeps its id).
1788
1794
  */
1789
1795
  post: operations['sign_document'];
1790
1796
  delete?: never;
@@ -1802,7 +1808,7 @@ interface paths {
1802
1808
  };
1803
1809
  /**
1804
1810
  * Get Document Signature Status
1805
- * @description Is this document a signed copy, and is it unchanged since signing? Read from the PDF itself.
1811
+ * @description Is this document version a signed copy, and is it unchanged since signing? Read from the PDF itself.
1806
1812
  */
1807
1813
  get: operations['get_document_signature_status'];
1808
1814
  put?: never;
@@ -5398,7 +5404,7 @@ interface components {
5398
5404
  * @default {
5399
5405
  * "API_TYPE": "remote",
5400
5406
  * "ENABLE_THINKING": false,
5401
- * "MODEL_NAME": "dummy",
5407
+ * "MODEL_NAME": "Fast",
5402
5408
  * "SYSTEM_INSTRUCTION": "You are ARBI, an AI assistant created by ARBI CITY. Be proactive, helpful and professional.Be concise. Use markdown where it helps readability. Cross-check information across sources before answering. Never fabricate facts. Not all assertions in the sources are factual — some are arguments by a party. Attribute claims to their source, especially where parties disagree.",
5403
5409
  * "MAX_TOKEN_SIZE_TO_ANSWER": 200000,
5404
5410
  * "TEMPERATURE": 0.1,
@@ -5410,7 +5416,7 @@ interface components {
5410
5416
  * @default {
5411
5417
  * "API_TYPE": "remote",
5412
5418
  * "ENABLE_THINKING": false,
5413
- * "MODEL_NAME": "dummy",
5419
+ * "MODEL_NAME": "Wise",
5414
5420
  * "SYSTEM_INSTRUCTION": "You are reviewing a draft answer prepared by a research agent. The draft was written based on summaries, but you now have access to the full source material.\n\nYour task:\n1. Review the draft answer against the source material provided\n2. Verify claims are supported by the sources\n3. Correct any inaccuracies or unsupported statements\n4. Add any important details from the sources that were missed\n5. Maintain formal, objective tone appropriate for professional contexts\n\nIf information is not found in the sources but the draft answer is based on web search results or general knowledge, preserve it and ensure it is clearly labelled as such. Only flag missing source support for claims that purport to come from the documents.\nDo not add inline citation markers - the system handles citations automatically.",
5415
5421
  * "TEMPERATURE": 0.1,
5416
5422
  * "MAX_TOKENS": 0,
@@ -5422,7 +5428,7 @@ interface components {
5422
5428
  * @default {
5423
5429
  * "API_TYPE": "remote",
5424
5430
  * "ENABLE_THINKING": false,
5425
- * "MODEL_NAME": "dummy",
5431
+ * "MODEL_NAME": "Fast",
5426
5432
  * "SYSTEM_INSTRUCTION": "You are a chunk evaluator. Analyze retrieved chunks to determine which are relevant to the user's query and extract key learnings from the RELEVANT chunks only. You must return your response as valid JSON matching the provided schema.",
5427
5433
  * "TEMPERATURE": 0.1,
5428
5434
  * "MAX_TOKENS": 0,
@@ -5437,7 +5443,7 @@ interface components {
5437
5443
  * @default {
5438
5444
  * "API_TYPE": "remote",
5439
5445
  * "ENABLE_THINKING": false,
5440
- * "MODEL_NAME": "dummy",
5446
+ * "MODEL_NAME": "Fast",
5441
5447
  * "SYSTEM_INSTRUCTION": "You are a title generator that creates concise, descriptive titles.\n\nOutput the title as plain text only. Do not use Markdown or any other formatting. Specifically:\n- Do not bold, italicize, or otherwise emphasize any part of the title.\n- Do not include asterisks (*), underscores (_), backticks (`), or other Markdown markers.\n- Do not prefix the title with bullets, dashes (-), or numbered/lettered enumeration (e.g. \"1.\", \"a)\").\n- Do not wrap the title in quotes or brackets.",
5442
5448
  * "MAX_TOKEN_SIZE_TO_ANSWER": 20,
5443
5449
  * "TEMPERATURE": 0.3,
@@ -5449,7 +5455,7 @@ interface components {
5449
5455
  * @default {
5450
5456
  * "API_TYPE": "remote",
5451
5457
  * "ENABLE_THINKING": false,
5452
- * "MODEL_NAME": "dummy",
5458
+ * "MODEL_NAME": "Wise",
5453
5459
  * "SYSTEM_INSTRUCTION": "You are a conversation summariser. Condense the conversation history into a concise summary that preserves:\n- Key decisions and conclusions reached\n- Specific names, dates, numbers, and document references\n- Open questions and unresolved items\n- The user's goals and constraints\n\nWrite in past tense, third person. Be specific, not vague. Do not omit important details in favour of brevity.",
5454
5460
  * "TEMPERATURE": 0.1,
5455
5461
  * "MAX_TOKENS": 0,
@@ -5463,7 +5469,7 @@ interface components {
5463
5469
  * @default {
5464
5470
  * "API_TYPE": "remote",
5465
5471
  * "ENABLE_THINKING": false,
5466
- * "MODEL_NAME": "dummy",
5472
+ * "MODEL_NAME": "Fast",
5467
5473
  * "SYSTEM_INSTRUCTION": "You are a document analysis assistant. Answer questions based on the document content.\n\nYour answers are displayed directly as cell values in a table, so keep every answer as short as possible.\n\nGuidelines:\n- Answer with the value only — never a full sentence. Do not restate the question or add lead-ins such as \"This document is...\" or \"The document describes...\". Good: \"German\". Bad: \"This document is written in German.\"\n- When an answer has multiple values, put each value on its own line: separate values with a newline character. Do not separate them with commas, bullets, dashes, numbering, or by writing them as a sentence.\n- Answer from the document. Reasonable inferences are fine; if the document gives no basis for an answer, the value is null and sources is empty.\n- Follow the format instructions exactly for each answer.\n- Output answers as plain text only. Do not use Markdown or any other formatting: no bold, italics, asterisks (*), underscores (_), backticks (`), bullets, or numbered/lettered enumeration.\n- Passages may be preceded by markers like [p3.2]: not document content. Cite them in \"sources\", never in a value.",
5468
5474
  * "MAX_TOKEN_CONTEXT_TO_ANSWER": 200000,
5469
5475
  * "TEMPERATURE": 0.1,
@@ -5524,7 +5530,7 @@ interface components {
5524
5530
  * @default {
5525
5531
  * "API_TYPE": "remote",
5526
5532
  * "ENABLE_THINKING": false,
5527
- * "MODEL_NAME": "dummy",
5533
+ * "MODEL_NAME": "Wise",
5528
5534
  * "TEMPERATURE": 0.3,
5529
5535
  * "MAX_TOKENS": 0,
5530
5536
  * "MAX_TOKEN_CONTEXT": 200000,
@@ -5536,7 +5542,7 @@ interface components {
5536
5542
  * @default {
5537
5543
  * "API_TYPE": "remote",
5538
5544
  * "ENABLE_THINKING": true,
5539
- * "MODEL_NAME": "dummy",
5545
+ * "MODEL_NAME": "Wise",
5540
5546
  * "SYSTEM_INSTRUCTION": "You are a research planning assistant. Your job is to analyze a user query and produce a concise, numbered research plan.\n\nYou have access to a workspace of documents. The available tools for executing the plan are:\n- search_inside_documents: Search workspace documents for relevant passages (semantic, keyword, or hybrid). Use digest=true to extract learnings.\n- read_document: Read page ranges or entire documents. Use digest=true to extract learnings with citations.\n- get_table_of_contents: Get document headings with page references\n\nConsider:\n- What information is needed to answer the query\n- Which documents are likely relevant based on the document index\n- What search queries and document passages to examine\n- What order of operations will be most efficient\n- Whether parallel searches can be used for different aspects\n\nRespond with ONLY the plan (numbered steps). Do not execute any steps.",
5541
5547
  * "TEMPERATURE": 0.3,
5542
5548
  * "MAX_TOKENS": 0,
@@ -5549,7 +5555,7 @@ interface components {
5549
5555
  * @default {
5550
5556
  * "API_TYPE": "remote",
5551
5557
  * "ENABLE_THINKING": false,
5552
- * "MODEL_NAME": "dummy",
5558
+ * "MODEL_NAME": "Fast",
5553
5559
  * "SYSTEM_INSTRUCTION": "You are a context selector. Given a user's query, conversation history, and a table of available documents, determine the user's goal and select relevant context.\n\n## Instructions\n\n1. **goal**: 1-2 concise sentences describing the user's intent AND your filtering rationale. Explain what documents are needed and why. Examples:\n - \"The user is greeting the assistant. No documents are needed.\"\n - \"The user wants to find force majeure clauses. Only the three contracts are relevant, so I will keep only those.\"\n - \"The user wants a full timeline of the case. Most documents are relevant, so I will drop only the unrelated procedural orders.\"\n\n2. **doc_filter_mode** and **doc_ids**: Select which documents the agent needs.\n - `\"keep\"` mode: `doc_ids` lists the ONLY docs to keep. Everything else is dropped.\n - `\"drop\"` mode: `doc_ids` lists the ONLY docs to drop. Everything else is kept.\n - Pick whichever mode produces the **shorter `doc_ids` list**.\n - Doc IDs are in the **Id** column of the Available Documents table (e.g. `\"doc-abc12345\"`). Copy them **exactly** from the table — do not invent, guess, or modify IDs.\n\n | Scenario | doc_filter_mode | doc_ids |\n |----------|----------------|---------|\n | Need ALL docs | `\"drop\"` | `[]` |\n | Need NO docs | `\"keep\"` | `[]` |\n | Need 3 of 100 docs | `\"keep\"` | `[\"id1\",\"id2\",\"id3\"]` |\n | Drop 3 of 100 docs | `\"drop\"` | `[\"id1\",\"id2\",\"id3\"]` |\n\n3. **chat_range_start** and **chat_range_end**: 0-based inclusive range of earlier history messages that provide relevant context. The last 3 messages are always included automatically. Set both to -1 if no earlier history is needed.\n\n## Rules\n\n- **Never repeat a doc ID.** Each ID must appear at most once.\n- Before writing `doc_ids`, count how many you would keep vs drop, then pick the shorter list.\n- Greetings or meta-questions about the assistant (e.g. \"hello\", \"who are you?\", \"what can you do?\"): the agent does NOT need any documents → `\"keep\"` with `[]`.\n- Ambiguous references like \"the document\" or \"this contract\" without specifying which: keep all → `\"drop\"` with `[]`.\n- For follow-up questions, include history messages that establish the topic.\n- Always return valid JSON matching the schema.",
5554
5560
  * "TEMPERATURE": 0,
5555
5561
  * "MAX_TOKENS": 0
@@ -5560,7 +5566,7 @@ interface components {
5560
5566
  * @default {
5561
5567
  * "API_TYPE": "remote",
5562
5568
  * "ENABLE_THINKING": false,
5563
- * "MODEL_NAME": "dummy",
5569
+ * "MODEL_NAME": "Fast",
5564
5570
  * "TEMPERATURE": 0.1,
5565
5571
  * "MAX_TOKENS": 0,
5566
5572
  * "MAX_PAGES_PER_CALL": 5,
@@ -5581,7 +5587,7 @@ interface components {
5581
5587
  * @default {
5582
5588
  * "API_TYPE": "remote",
5583
5589
  * "ENABLE_THINKING": true,
5584
- * "MODEL_NAME": "",
5590
+ * "MODEL_NAME": "Premium",
5585
5591
  * "SYSTEM_INSTRUCTION": "You are a code execution agent. You write and run code to accomplish tasks.\n\nYou have access to an execute_code tool that runs code in a sandboxed Docker container.\n\nThe sandbox has:\n- Python 3.12 with numpy, pandas, matplotlib, requests, beautifulsoup4,\n httpx, pillow, sympy, pyyaml (plus uv for installing more)\n- Node.js 22 with TypeScript (ts-node) and npm\n- Bash with git, curl, wget, jq, sqlite3, build-essential\n- Network access (can pip/npm install additional packages)\n\nInstructions:\n1. Write clean, correct code to accomplish the user's task\n2. Always call execute_code to run your code — never guess the output\n3. If execution errors, analyze the traceback, fix the code, and retry\n4. Once you have the correct output, respond with ONLY the final result\n\nKeep code simple and direct. Prefer Python unless the task specifically requires another language.",
5586
5592
  * "TEMPERATURE": 0.2,
5587
5593
  * "MAX_TOKENS": 0
@@ -5651,7 +5657,7 @@ interface components {
5651
5657
  * },
5652
5658
  * "MAX_CONCURRENT_REQUESTS": 256,
5653
5659
  * "MODEL_NAME": "Qwen/Qwen3-Reranker-0.6B",
5654
- * "API_TYPE": "local",
5660
+ * "API_TYPE": "remote",
5655
5661
  * "RETRIEVAL_INSTRUCTION": "Judge whether the passage contains the specific facts, figures, names, or references mentioned in the query. Only answer yes if the passage directly contains these details"
5656
5662
  * }
5657
5663
  */
@@ -5672,7 +5678,7 @@ interface components {
5672
5678
  /**
5673
5679
  * @default {
5674
5680
  * "MODEL_NAME": "Qwen/Qwen3-Embedding-0.6B",
5675
- * "API_TYPE": "local",
5681
+ * "API_TYPE": "remote",
5676
5682
  * "BATCH_SIZE": 128,
5677
5683
  * "MAX_CONCURRENT_REQUESTS": 256,
5678
5684
  * "DOCUMENT_PREFIX": "",
@@ -5941,13 +5947,13 @@ interface components {
5941
5947
  is_complete: boolean;
5942
5948
  /**
5943
5949
  * Version
5944
- * @description Version number for tracking changes/redlines
5950
+ * @description The document version this artifact was saved as (1 for a new artifact)
5945
5951
  * @default 1
5946
5952
  */
5947
5953
  version: number;
5948
5954
  /**
5949
5955
  * Version Of
5950
- * @description Document this artifact updates; it is saved as the next version in that document's chain
5956
+ * @description Set when this artifact updates an existing document: that document (equal to doc_ext_id — the update is saved as its next version, same id)
5951
5957
  */
5952
5958
  version_of?: string | null;
5953
5959
  /**
@@ -6283,6 +6289,8 @@ interface components {
6283
6289
  workspace_ext_id?: string | null;
6284
6290
  /** Doc Ext Id */
6285
6291
  doc_ext_id?: string | null;
6292
+ /** Doc Version */
6293
+ doc_version?: number | null;
6286
6294
  /** Doc Title */
6287
6295
  doc_title?: string | null;
6288
6296
  /** Chunk Id */
@@ -6398,6 +6406,8 @@ interface components {
6398
6406
  CitedDocument: {
6399
6407
  /** Doc Ext Id */
6400
6408
  doc_ext_id: string;
6409
+ /** Version */
6410
+ version?: number | null;
6401
6411
  /** Chunks */
6402
6412
  chunks?: components['schemas']['CitedChunk'][];
6403
6413
  };
@@ -6422,7 +6432,7 @@ interface components {
6422
6432
  /**
6423
6433
  * Model Name
6424
6434
  * @description Model for code generation. Should be a strong coding model.
6425
- * @default
6435
+ * @default Premium
6426
6436
  */
6427
6437
  MODEL_NAME: string;
6428
6438
  /**
@@ -7595,12 +7605,16 @@ interface components {
7595
7605
  };
7596
7606
  /**
7597
7607
  * DerivedFrom
7598
- * @description One provenance link of a document: it was made from ``doc_ext_id`` as ``role``.
7608
+ * @description One provenance link of a document: it was made from version ``version`` of
7609
+ * ``doc_ext_id`` as ``role``. ``version`` is None only for links whose version was
7610
+ * never recorded.
7599
7611
  */
7600
7612
  DerivedFrom: {
7601
7613
  /** Doc Ext Id */
7602
7614
  doc_ext_id: string;
7603
7615
  role: components['schemas']['DocRelationRole'];
7616
+ /** Version */
7617
+ version?: number | null;
7604
7618
  };
7605
7619
  /**
7606
7620
  * DmAttachmentUploadResponse
@@ -7631,9 +7645,11 @@ interface components {
7631
7645
  /**
7632
7646
  * DocRelationRole
7633
7647
  * @description How ``from_doc`` was derived from ``to_doc`` (provenance only, no behaviour).
7648
+ *
7649
+ * Versions are not relations: they live inside their document (``docs.versions``).
7634
7650
  * @enum {string}
7635
7651
  */
7636
- DocRelationRole: 'edit' | 'sync' | 'crop' | 'redline_base' | 'redline_revised' | 'redaction' | 'annotated' | 'production';
7652
+ DocRelationRole: 'crop' | 'redline_base' | 'redline_revised' | 'redaction' | 'annotated' | 'production';
7637
7653
  /** DocResponse */
7638
7654
  DocResponse: {
7639
7655
  /** External Id */
@@ -7672,18 +7688,16 @@ interface components {
7672
7688
  config_ext_id?: string | null;
7673
7689
  /** Parent Ext Id */
7674
7690
  parent_ext_id?: string | null;
7675
- /** Lineage Id */
7676
- lineage_id?: string | null;
7677
7691
  /**
7678
- * Version Number
7692
+ * Current Version
7679
7693
  * @default 1
7680
7694
  */
7681
- version_number: number;
7695
+ current_version: number;
7682
7696
  /**
7683
- * Is Current
7684
- * @default true
7697
+ * Versions
7698
+ * @default []
7685
7699
  */
7686
- is_current: boolean;
7700
+ versions: components['schemas']['DocVersion'][];
7687
7701
  /** Thread Id */
7688
7702
  thread_id?: string | null;
7689
7703
  /**
@@ -7810,6 +7824,45 @@ interface components {
7810
7824
  */
7811
7825
  config_ext_id?: string | null;
7812
7826
  };
7827
+ /**
7828
+ * DocVersion
7829
+ * @description One version of a document (``GET /v1/document/{id}/versions`` and ``DocResponse.versions``).
7830
+ */
7831
+ DocVersion: {
7832
+ /** N */
7833
+ n: number;
7834
+ /** Created At */
7835
+ created_at?: string | null;
7836
+ /** Created By Ext Id */
7837
+ created_by_ext_id?: string | null;
7838
+ /**
7839
+ * Reason
7840
+ * @default upload
7841
+ * @enum {string}
7842
+ */
7843
+ reason: 'upload' | 'edit' | 'signed' | 'sync';
7844
+ /** File Name */
7845
+ file_name?: string | null;
7846
+ /** File Type */
7847
+ file_type?: string | null;
7848
+ /** File Size */
7849
+ file_size?: number | null;
7850
+ /** Content Hash */
7851
+ content_hash?: string | null;
7852
+ /** Status */
7853
+ status?: string | null;
7854
+ /** N Pages */
7855
+ n_pages?: number | null;
7856
+ /** N Chunks */
7857
+ n_chunks?: number | null;
7858
+ /** Made From */
7859
+ made_from?: number | null;
7860
+ /**
7861
+ * Is Current
7862
+ * @default false
7863
+ */
7864
+ is_current: boolean;
7865
+ };
7813
7866
  /**
7814
7867
  * DoctagLLMConfig
7815
7868
  * @description Configuration for DoctagLLM - extracts information from documents based on tag instructions.
@@ -7831,7 +7884,7 @@ interface components {
7831
7884
  /**
7832
7885
  * Model Name
7833
7886
  * @description The name of the non-reasoning model to be used.
7834
- * @default dummy
7887
+ * @default Fast
7835
7888
  */
7836
7889
  MODEL_NAME: string;
7837
7890
  /**
@@ -8129,7 +8182,7 @@ interface components {
8129
8182
  /**
8130
8183
  * Api Type
8131
8184
  * @description The inference type (local or remote).
8132
- * @default local
8185
+ * @default remote
8133
8186
  * @enum {string}
8134
8187
  */
8135
8188
  API_TYPE: 'local' | 'remote';
@@ -8274,7 +8327,7 @@ interface components {
8274
8327
  /**
8275
8328
  * Model Name
8276
8329
  * @description The name of the non-reasoning model to be used.
8277
- * @default dummy
8330
+ * @default Fast
8278
8331
  */
8279
8332
  MODEL_NAME: string;
8280
8333
  /**
@@ -8322,11 +8375,17 @@ interface components {
8322
8375
  };
8323
8376
  /**
8324
8377
  * ExportFile
8325
- * @description One file of a download: fetch ``/v1/document/{doc_ext_id}/download`` and store it at ``path``.
8378
+ * @description One file of a download: fetch ``/v1/document/{doc_ext_id}/download?version={version}`` and store
8379
+ * it at ``path``.
8326
8380
  */
8327
8381
  ExportFile: {
8328
8382
  /** Doc Ext Id */
8329
8383
  doc_ext_id: string;
8384
+ /**
8385
+ * Version
8386
+ * @default 1
8387
+ */
8388
+ version: number;
8330
8389
  /** Path */
8331
8390
  path: string;
8332
8391
  /**
@@ -8550,7 +8609,7 @@ interface components {
8550
8609
  /**
8551
8610
  * Model Name
8552
8611
  * @description The name of the non-reasoning model to be used.
8553
- * @default dummy
8612
+ * @default Fast
8554
8613
  */
8555
8614
  MODEL_NAME: string;
8556
8615
  /**
@@ -9440,7 +9499,7 @@ interface components {
9440
9499
  /**
9441
9500
  * Model Name
9442
9501
  * @description The model for note consolidation. Defaults to reasoning model.
9443
- * @default dummy
9502
+ * @default Wise
9444
9503
  */
9445
9504
  MODEL_NAME: string;
9446
9505
  /**
@@ -10173,6 +10232,8 @@ interface components {
10173
10232
  ParsedDocMetadata: {
10174
10233
  /** Doc Ext Id */
10175
10234
  doc_ext_id?: string | null;
10235
+ /** Doc Version */
10236
+ doc_version?: number | null;
10176
10237
  /** File Name */
10177
10238
  file_name?: string | null;
10178
10239
  /**
@@ -10332,7 +10393,7 @@ interface components {
10332
10393
  /**
10333
10394
  * Model Name
10334
10395
  * @description The model for plan generation. Defaults to reasoning model.
10335
- * @default dummy
10396
+ * @default Wise
10336
10397
  */
10337
10398
  MODEL_NAME: string;
10338
10399
  /**
@@ -10793,7 +10854,7 @@ interface components {
10793
10854
  /**
10794
10855
  * Model Name
10795
10856
  * @description The model for query answering.
10796
- * @default dummy
10857
+ * @default Fast
10797
10858
  */
10798
10859
  MODEL_NAME: string;
10799
10860
  /**
@@ -11124,7 +11185,7 @@ interface components {
11124
11185
  /**
11125
11186
  * Api Type
11126
11187
  * @description The inference type (local or remote).
11127
- * @default local
11188
+ * @default remote
11128
11189
  * @enum {string}
11129
11190
  */
11130
11191
  API_TYPE: 'local' | 'remote';
@@ -11909,7 +11970,7 @@ interface components {
11909
11970
  /**
11910
11971
  * Model Name
11911
11972
  * @description The model for reviewing agent draft answers. Defaults to reasoning model.
11912
- * @default dummy
11973
+ * @default Wise
11913
11974
  */
11914
11975
  MODEL_NAME: string;
11915
11976
  /**
@@ -12367,8 +12428,16 @@ interface components {
12367
12428
  };
12368
12429
  /** SignDocumentResponse */
12369
12430
  SignDocumentResponse: {
12370
- /** Signed Doc Ext Id */
12371
- signed_doc_ext_id: string;
12431
+ /**
12432
+ * Doc Ext Id
12433
+ * @description The signed document (it keeps its id)
12434
+ */
12435
+ doc_ext_id: string;
12436
+ /**
12437
+ * Version
12438
+ * @description The new version holding the signed, sealed PDF
12439
+ */
12440
+ version: number;
12372
12441
  signature: components['schemas']['SignatureRecord'];
12373
12442
  };
12374
12443
  /**
@@ -12724,7 +12793,7 @@ interface components {
12724
12793
  /**
12725
12794
  * Model Name
12726
12795
  * @description The model for conversation summarisation. Defaults to reasoning model.
12727
- * @default dummy
12796
+ * @default Wise
12728
12797
  */
12729
12798
  MODEL_NAME: string;
12730
12799
  /**
@@ -12999,6 +13068,11 @@ interface components {
12999
13068
  type: 'task_update';
13000
13069
  /** Doc Ext Id */
13001
13070
  doc_ext_id: string;
13071
+ /**
13072
+ * Version
13073
+ * @default 1
13074
+ */
13075
+ version: number;
13002
13076
  /** Workspace Ext Id */
13003
13077
  workspace_ext_id: string;
13004
13078
  /** File Name */
@@ -13068,7 +13142,7 @@ interface components {
13068
13142
  /**
13069
13143
  * Model Name
13070
13144
  * @description The name of the non-reasoning model to be used.
13071
- * @default dummy
13145
+ * @default Fast
13072
13146
  */
13073
13147
  MODEL_NAME: string;
13074
13148
  /**
@@ -13363,7 +13437,7 @@ interface components {
13363
13437
  kind: components['schemas']['TransferScopeKind'];
13364
13438
  /**
13365
13439
  * Items
13366
- * @description selection: external ids — documents (doc-), labels/fields (tag-), facts (fct-), conversations (con-) and automations (wfl-). A document brings all its versions and its attachments; an id of any version names the whole document.
13440
+ * @description selection: external ids — documents (doc-), labels/fields (tag-), facts (fct-), conversations (con-) and automations (wfl-). A document brings all its versions and its attachments.
13367
13441
  */
13368
13442
  items?: string[];
13369
13443
  /** Label Ext Id */
@@ -13646,6 +13720,8 @@ interface components {
13646
13720
  UploadDocumentsResponse: {
13647
13721
  /** Doc Ext Ids */
13648
13722
  doc_ext_ids?: string[];
13723
+ /** Version */
13724
+ version?: number | null;
13649
13725
  /**
13650
13726
  * Batch Id
13651
13727
  * @description Batch ID for tracking completion via WebSocket batch_complete events
@@ -13673,7 +13749,7 @@ interface components {
13673
13749
  config_ext_id?: string | null;
13674
13750
  /**
13675
13751
  * Version Of
13676
- * @description Upload as the next version of this document (any of its versions)
13752
+ * @description Upload as the next version of this document
13677
13753
  */
13678
13754
  version_of?: string | null;
13679
13755
  /** Wp Type */
@@ -14233,7 +14309,7 @@ interface components {
14233
14309
  /**
14234
14310
  * Model Name
14235
14311
  * @description The vision-capable model name (must support image inputs).
14236
- * @default dummy
14312
+ * @default Fast
14237
14313
  */
14238
14314
  MODEL_NAME: string;
14239
14315
  /**
@@ -16627,7 +16703,10 @@ interface operations {
16627
16703
  };
16628
16704
  native_content_v1_editor__document_id__content_get: {
16629
16705
  parameters: {
16630
- query?: never;
16706
+ query?: {
16707
+ /** @description Document version (default: the current one) */
16708
+ version?: number | null;
16709
+ };
16631
16710
  header?: never;
16632
16711
  path: {
16633
16712
  document_id: string;
@@ -16661,6 +16740,10 @@ interface operations {
16661
16740
  query: {
16662
16741
  revised_ext_id: string;
16663
16742
  base_ext_id?: string | null;
16743
+ /** @description Version of the revised document (default current) */
16744
+ revised_version?: number | null;
16745
+ /** @description Version of the base document (default current) */
16746
+ base_version?: number | null;
16664
16747
  };
16665
16748
  header?: never;
16666
16749
  path?: never;
@@ -16872,7 +16955,7 @@ interface operations {
16872
16955
  [name: string]: unknown;
16873
16956
  };
16874
16957
  content: {
16875
- 'application/json': components['schemas']['DocResponse'][];
16958
+ 'application/json': components['schemas']['DocVersion'][];
16876
16959
  };
16877
16960
  };
16878
16961
  /** @description Validation Error */
@@ -16990,7 +17073,7 @@ interface operations {
16990
17073
  shared?: boolean;
16991
17074
  /** @description Configuration to use for processing */
16992
17075
  config_ext_id?: string | null;
16993
- /** @description Upload a single file as the next version of this document (any of its versions). It becomes the current version and takes the document's sharing, folder and labels. */
17076
+ /** @description Upload a single file as the next version of this document. The document keeps its id, sharing, folder and labels; the new version becomes current (the response's `version`). */
16994
17077
  version_of?: string | null;
16995
17078
  /** @description A new, separate document made from this one (a crop, a redacted copy) or, repeated, from several (a production set); recorded as provenance only */
16996
17079
  derived_from?: string[] | null;
@@ -17142,7 +17225,10 @@ interface operations {
17142
17225
  };
17143
17226
  download_document: {
17144
17227
  parameters: {
17145
- query?: never;
17228
+ query?: {
17229
+ /** @description Document version (default: the current one) */
17230
+ version?: number | null;
17231
+ };
17146
17232
  header?: never;
17147
17233
  path: {
17148
17234
  document_ext_id: string;
@@ -17173,7 +17259,10 @@ interface operations {
17173
17259
  };
17174
17260
  view_document_inline: {
17175
17261
  parameters: {
17176
- query?: never;
17262
+ query?: {
17263
+ /** @description Document version (default: the current one) */
17264
+ version?: number | null;
17265
+ };
17177
17266
  header?: never;
17178
17267
  path: {
17179
17268
  document_ext_id: string;
@@ -17204,7 +17293,10 @@ interface operations {
17204
17293
  };
17205
17294
  get_document_thumbnail: {
17206
17295
  parameters: {
17207
- query?: never;
17296
+ query?: {
17297
+ /** @description Document version (default: the current one) */
17298
+ version?: number | null;
17299
+ };
17208
17300
  header?: never;
17209
17301
  path: {
17210
17302
  document_ext_id: string;
@@ -17268,7 +17360,10 @@ interface operations {
17268
17360
  };
17269
17361
  get_parsed_document: {
17270
17362
  parameters: {
17271
- query?: never;
17363
+ query?: {
17364
+ /** @description Document version (default: the current one) */
17365
+ version?: number | null;
17366
+ };
17272
17367
  header?: never;
17273
17368
  path: {
17274
17369
  document_ext_id: string;
@@ -17406,7 +17501,10 @@ interface operations {
17406
17501
  };
17407
17502
  get_document_signature_status: {
17408
17503
  parameters: {
17409
- query?: never;
17504
+ query?: {
17505
+ /** @description Document version (default: the current one) */
17506
+ version?: number | null;
17507
+ };
17410
17508
  header?: never;
17411
17509
  path: {
17412
17510
  document_ext_id: string;
package/dist/index.d.ts CHANGED
@@ -1021,7 +1021,7 @@ interface paths {
1021
1021
  * @description The decrypted structured data of a scope, plus the document files to fetch for a download.
1022
1022
  *
1023
1023
  * One JSON array per entity type, a manifest, and ``files`` — each a document
1024
- * version to fetch through ``/v1/document/{doc_ext_id}/download`` and store at
1024
+ * version to fetch through ``/v1/document/{doc_ext_id}/download?version={version}`` and store at
1025
1025
  * ``path`` (current versions under ``documents/``, older ones under
1026
1026
  * ``documents/_versions/``).
1027
1027
  */
@@ -1298,7 +1298,10 @@ interface paths {
1298
1298
  path?: never;
1299
1299
  cookie?: never;
1300
1300
  };
1301
- /** Native Content */
1301
+ /**
1302
+ * Native Content
1303
+ * @description The document as DOCX — its current version, or ``version`` (a read-only snapshot).
1304
+ */
1302
1305
  get: operations['native_content_v1_editor__document_id__content_get'];
1303
1306
  put?: never;
1304
1307
  post?: never;
@@ -1319,10 +1322,11 @@ interface paths {
1319
1322
  put?: never;
1320
1323
  /**
1321
1324
  * Create Word Redline
1322
- * @description Compare two documents into a NEW redline document (base -> revised).
1325
+ * @description Compare two document versions into a NEW redline document (base -> revised).
1323
1326
  *
1324
- * Without ``base_ext_id`` the base is the revised document's previous version.
1325
- * The redline records both inputs as provenance and is shared only if both are.
1327
+ * Without ``base_ext_id`` the base is the revised document's version before the
1328
+ * one compared. The redline records both inputs (document and version) as
1329
+ * provenance and is shared only if both documents are.
1326
1330
  */
1327
1331
  post: operations['create_word_redline_v1_editor_redline_post'];
1328
1332
  delete?: never;
@@ -1443,10 +1447,11 @@ interface paths {
1443
1447
  };
1444
1448
  /**
1445
1449
  * List Document Versions
1446
- * @description Every version of the document ``document_ext_id`` belongs to (any version's id), oldest first.
1450
+ * @description Every version of the document, oldest first; ``is_current`` marks the current one.
1447
1451
  *
1448
- * ``is_current`` marks the current one. Lists and search show only current
1449
- * versions; this is how older ones are reached.
1452
+ * A document keeps one id for its whole life: an older version is opened with
1453
+ * ``?version=n`` on the view / download / parsed / signature endpoints, and
1454
+ * retrieval asks about it as ``doc-…@v{n}``.
1450
1455
  */
1451
1456
  get: operations['list_document_versions'];
1452
1457
  put?: never;
@@ -1619,7 +1624,7 @@ interface paths {
1619
1624
  };
1620
1625
  /**
1621
1626
  * Download Document
1622
- * @description Download a document by its external ID.
1627
+ * @description Download a document (its original file) by its external ID — ``version`` for an older version.
1623
1628
  * Retrieves and decrypts the document for downloading as an attachment.
1624
1629
  */
1625
1630
  get: operations['download_document'];
@@ -1784,7 +1789,8 @@ interface paths {
1784
1789
  put?: never;
1785
1790
  /**
1786
1791
  * Sign Document
1787
- * @description Sign a document: verify the signer's statement, seal a signed copy, save it as a new child document.
1792
+ * @description Sign a document: verify the signer's statement, seal a signed copy, save it as the document's next
1793
+ * version (reason ``signed``; the document keeps its id).
1788
1794
  */
1789
1795
  post: operations['sign_document'];
1790
1796
  delete?: never;
@@ -1802,7 +1808,7 @@ interface paths {
1802
1808
  };
1803
1809
  /**
1804
1810
  * Get Document Signature Status
1805
- * @description Is this document a signed copy, and is it unchanged since signing? Read from the PDF itself.
1811
+ * @description Is this document version a signed copy, and is it unchanged since signing? Read from the PDF itself.
1806
1812
  */
1807
1813
  get: operations['get_document_signature_status'];
1808
1814
  put?: never;
@@ -5398,7 +5404,7 @@ interface components {
5398
5404
  * @default {
5399
5405
  * "API_TYPE": "remote",
5400
5406
  * "ENABLE_THINKING": false,
5401
- * "MODEL_NAME": "dummy",
5407
+ * "MODEL_NAME": "Fast",
5402
5408
  * "SYSTEM_INSTRUCTION": "You are ARBI, an AI assistant created by ARBI CITY. Be proactive, helpful and professional.Be concise. Use markdown where it helps readability. Cross-check information across sources before answering. Never fabricate facts. Not all assertions in the sources are factual — some are arguments by a party. Attribute claims to their source, especially where parties disagree.",
5403
5409
  * "MAX_TOKEN_SIZE_TO_ANSWER": 200000,
5404
5410
  * "TEMPERATURE": 0.1,
@@ -5410,7 +5416,7 @@ interface components {
5410
5416
  * @default {
5411
5417
  * "API_TYPE": "remote",
5412
5418
  * "ENABLE_THINKING": false,
5413
- * "MODEL_NAME": "dummy",
5419
+ * "MODEL_NAME": "Wise",
5414
5420
  * "SYSTEM_INSTRUCTION": "You are reviewing a draft answer prepared by a research agent. The draft was written based on summaries, but you now have access to the full source material.\n\nYour task:\n1. Review the draft answer against the source material provided\n2. Verify claims are supported by the sources\n3. Correct any inaccuracies or unsupported statements\n4. Add any important details from the sources that were missed\n5. Maintain formal, objective tone appropriate for professional contexts\n\nIf information is not found in the sources but the draft answer is based on web search results or general knowledge, preserve it and ensure it is clearly labelled as such. Only flag missing source support for claims that purport to come from the documents.\nDo not add inline citation markers - the system handles citations automatically.",
5415
5421
  * "TEMPERATURE": 0.1,
5416
5422
  * "MAX_TOKENS": 0,
@@ -5422,7 +5428,7 @@ interface components {
5422
5428
  * @default {
5423
5429
  * "API_TYPE": "remote",
5424
5430
  * "ENABLE_THINKING": false,
5425
- * "MODEL_NAME": "dummy",
5431
+ * "MODEL_NAME": "Fast",
5426
5432
  * "SYSTEM_INSTRUCTION": "You are a chunk evaluator. Analyze retrieved chunks to determine which are relevant to the user's query and extract key learnings from the RELEVANT chunks only. You must return your response as valid JSON matching the provided schema.",
5427
5433
  * "TEMPERATURE": 0.1,
5428
5434
  * "MAX_TOKENS": 0,
@@ -5437,7 +5443,7 @@ interface components {
5437
5443
  * @default {
5438
5444
  * "API_TYPE": "remote",
5439
5445
  * "ENABLE_THINKING": false,
5440
- * "MODEL_NAME": "dummy",
5446
+ * "MODEL_NAME": "Fast",
5441
5447
  * "SYSTEM_INSTRUCTION": "You are a title generator that creates concise, descriptive titles.\n\nOutput the title as plain text only. Do not use Markdown or any other formatting. Specifically:\n- Do not bold, italicize, or otherwise emphasize any part of the title.\n- Do not include asterisks (*), underscores (_), backticks (`), or other Markdown markers.\n- Do not prefix the title with bullets, dashes (-), or numbered/lettered enumeration (e.g. \"1.\", \"a)\").\n- Do not wrap the title in quotes or brackets.",
5442
5448
  * "MAX_TOKEN_SIZE_TO_ANSWER": 20,
5443
5449
  * "TEMPERATURE": 0.3,
@@ -5449,7 +5455,7 @@ interface components {
5449
5455
  * @default {
5450
5456
  * "API_TYPE": "remote",
5451
5457
  * "ENABLE_THINKING": false,
5452
- * "MODEL_NAME": "dummy",
5458
+ * "MODEL_NAME": "Wise",
5453
5459
  * "SYSTEM_INSTRUCTION": "You are a conversation summariser. Condense the conversation history into a concise summary that preserves:\n- Key decisions and conclusions reached\n- Specific names, dates, numbers, and document references\n- Open questions and unresolved items\n- The user's goals and constraints\n\nWrite in past tense, third person. Be specific, not vague. Do not omit important details in favour of brevity.",
5454
5460
  * "TEMPERATURE": 0.1,
5455
5461
  * "MAX_TOKENS": 0,
@@ -5463,7 +5469,7 @@ interface components {
5463
5469
  * @default {
5464
5470
  * "API_TYPE": "remote",
5465
5471
  * "ENABLE_THINKING": false,
5466
- * "MODEL_NAME": "dummy",
5472
+ * "MODEL_NAME": "Fast",
5467
5473
  * "SYSTEM_INSTRUCTION": "You are a document analysis assistant. Answer questions based on the document content.\n\nYour answers are displayed directly as cell values in a table, so keep every answer as short as possible.\n\nGuidelines:\n- Answer with the value only — never a full sentence. Do not restate the question or add lead-ins such as \"This document is...\" or \"The document describes...\". Good: \"German\". Bad: \"This document is written in German.\"\n- When an answer has multiple values, put each value on its own line: separate values with a newline character. Do not separate them with commas, bullets, dashes, numbering, or by writing them as a sentence.\n- Answer from the document. Reasonable inferences are fine; if the document gives no basis for an answer, the value is null and sources is empty.\n- Follow the format instructions exactly for each answer.\n- Output answers as plain text only. Do not use Markdown or any other formatting: no bold, italics, asterisks (*), underscores (_), backticks (`), bullets, or numbered/lettered enumeration.\n- Passages may be preceded by markers like [p3.2]: not document content. Cite them in \"sources\", never in a value.",
5468
5474
  * "MAX_TOKEN_CONTEXT_TO_ANSWER": 200000,
5469
5475
  * "TEMPERATURE": 0.1,
@@ -5524,7 +5530,7 @@ interface components {
5524
5530
  * @default {
5525
5531
  * "API_TYPE": "remote",
5526
5532
  * "ENABLE_THINKING": false,
5527
- * "MODEL_NAME": "dummy",
5533
+ * "MODEL_NAME": "Wise",
5528
5534
  * "TEMPERATURE": 0.3,
5529
5535
  * "MAX_TOKENS": 0,
5530
5536
  * "MAX_TOKEN_CONTEXT": 200000,
@@ -5536,7 +5542,7 @@ interface components {
5536
5542
  * @default {
5537
5543
  * "API_TYPE": "remote",
5538
5544
  * "ENABLE_THINKING": true,
5539
- * "MODEL_NAME": "dummy",
5545
+ * "MODEL_NAME": "Wise",
5540
5546
  * "SYSTEM_INSTRUCTION": "You are a research planning assistant. Your job is to analyze a user query and produce a concise, numbered research plan.\n\nYou have access to a workspace of documents. The available tools for executing the plan are:\n- search_inside_documents: Search workspace documents for relevant passages (semantic, keyword, or hybrid). Use digest=true to extract learnings.\n- read_document: Read page ranges or entire documents. Use digest=true to extract learnings with citations.\n- get_table_of_contents: Get document headings with page references\n\nConsider:\n- What information is needed to answer the query\n- Which documents are likely relevant based on the document index\n- What search queries and document passages to examine\n- What order of operations will be most efficient\n- Whether parallel searches can be used for different aspects\n\nRespond with ONLY the plan (numbered steps). Do not execute any steps.",
5541
5547
  * "TEMPERATURE": 0.3,
5542
5548
  * "MAX_TOKENS": 0,
@@ -5549,7 +5555,7 @@ interface components {
5549
5555
  * @default {
5550
5556
  * "API_TYPE": "remote",
5551
5557
  * "ENABLE_THINKING": false,
5552
- * "MODEL_NAME": "dummy",
5558
+ * "MODEL_NAME": "Fast",
5553
5559
  * "SYSTEM_INSTRUCTION": "You are a context selector. Given a user's query, conversation history, and a table of available documents, determine the user's goal and select relevant context.\n\n## Instructions\n\n1. **goal**: 1-2 concise sentences describing the user's intent AND your filtering rationale. Explain what documents are needed and why. Examples:\n - \"The user is greeting the assistant. No documents are needed.\"\n - \"The user wants to find force majeure clauses. Only the three contracts are relevant, so I will keep only those.\"\n - \"The user wants a full timeline of the case. Most documents are relevant, so I will drop only the unrelated procedural orders.\"\n\n2. **doc_filter_mode** and **doc_ids**: Select which documents the agent needs.\n - `\"keep\"` mode: `doc_ids` lists the ONLY docs to keep. Everything else is dropped.\n - `\"drop\"` mode: `doc_ids` lists the ONLY docs to drop. Everything else is kept.\n - Pick whichever mode produces the **shorter `doc_ids` list**.\n - Doc IDs are in the **Id** column of the Available Documents table (e.g. `\"doc-abc12345\"`). Copy them **exactly** from the table — do not invent, guess, or modify IDs.\n\n | Scenario | doc_filter_mode | doc_ids |\n |----------|----------------|---------|\n | Need ALL docs | `\"drop\"` | `[]` |\n | Need NO docs | `\"keep\"` | `[]` |\n | Need 3 of 100 docs | `\"keep\"` | `[\"id1\",\"id2\",\"id3\"]` |\n | Drop 3 of 100 docs | `\"drop\"` | `[\"id1\",\"id2\",\"id3\"]` |\n\n3. **chat_range_start** and **chat_range_end**: 0-based inclusive range of earlier history messages that provide relevant context. The last 3 messages are always included automatically. Set both to -1 if no earlier history is needed.\n\n## Rules\n\n- **Never repeat a doc ID.** Each ID must appear at most once.\n- Before writing `doc_ids`, count how many you would keep vs drop, then pick the shorter list.\n- Greetings or meta-questions about the assistant (e.g. \"hello\", \"who are you?\", \"what can you do?\"): the agent does NOT need any documents → `\"keep\"` with `[]`.\n- Ambiguous references like \"the document\" or \"this contract\" without specifying which: keep all → `\"drop\"` with `[]`.\n- For follow-up questions, include history messages that establish the topic.\n- Always return valid JSON matching the schema.",
5554
5560
  * "TEMPERATURE": 0,
5555
5561
  * "MAX_TOKENS": 0
@@ -5560,7 +5566,7 @@ interface components {
5560
5566
  * @default {
5561
5567
  * "API_TYPE": "remote",
5562
5568
  * "ENABLE_THINKING": false,
5563
- * "MODEL_NAME": "dummy",
5569
+ * "MODEL_NAME": "Fast",
5564
5570
  * "TEMPERATURE": 0.1,
5565
5571
  * "MAX_TOKENS": 0,
5566
5572
  * "MAX_PAGES_PER_CALL": 5,
@@ -5581,7 +5587,7 @@ interface components {
5581
5587
  * @default {
5582
5588
  * "API_TYPE": "remote",
5583
5589
  * "ENABLE_THINKING": true,
5584
- * "MODEL_NAME": "",
5590
+ * "MODEL_NAME": "Premium",
5585
5591
  * "SYSTEM_INSTRUCTION": "You are a code execution agent. You write and run code to accomplish tasks.\n\nYou have access to an execute_code tool that runs code in a sandboxed Docker container.\n\nThe sandbox has:\n- Python 3.12 with numpy, pandas, matplotlib, requests, beautifulsoup4,\n httpx, pillow, sympy, pyyaml (plus uv for installing more)\n- Node.js 22 with TypeScript (ts-node) and npm\n- Bash with git, curl, wget, jq, sqlite3, build-essential\n- Network access (can pip/npm install additional packages)\n\nInstructions:\n1. Write clean, correct code to accomplish the user's task\n2. Always call execute_code to run your code — never guess the output\n3. If execution errors, analyze the traceback, fix the code, and retry\n4. Once you have the correct output, respond with ONLY the final result\n\nKeep code simple and direct. Prefer Python unless the task specifically requires another language.",
5586
5592
  * "TEMPERATURE": 0.2,
5587
5593
  * "MAX_TOKENS": 0
@@ -5651,7 +5657,7 @@ interface components {
5651
5657
  * },
5652
5658
  * "MAX_CONCURRENT_REQUESTS": 256,
5653
5659
  * "MODEL_NAME": "Qwen/Qwen3-Reranker-0.6B",
5654
- * "API_TYPE": "local",
5660
+ * "API_TYPE": "remote",
5655
5661
  * "RETRIEVAL_INSTRUCTION": "Judge whether the passage contains the specific facts, figures, names, or references mentioned in the query. Only answer yes if the passage directly contains these details"
5656
5662
  * }
5657
5663
  */
@@ -5672,7 +5678,7 @@ interface components {
5672
5678
  /**
5673
5679
  * @default {
5674
5680
  * "MODEL_NAME": "Qwen/Qwen3-Embedding-0.6B",
5675
- * "API_TYPE": "local",
5681
+ * "API_TYPE": "remote",
5676
5682
  * "BATCH_SIZE": 128,
5677
5683
  * "MAX_CONCURRENT_REQUESTS": 256,
5678
5684
  * "DOCUMENT_PREFIX": "",
@@ -5941,13 +5947,13 @@ interface components {
5941
5947
  is_complete: boolean;
5942
5948
  /**
5943
5949
  * Version
5944
- * @description Version number for tracking changes/redlines
5950
+ * @description The document version this artifact was saved as (1 for a new artifact)
5945
5951
  * @default 1
5946
5952
  */
5947
5953
  version: number;
5948
5954
  /**
5949
5955
  * Version Of
5950
- * @description Document this artifact updates; it is saved as the next version in that document's chain
5956
+ * @description Set when this artifact updates an existing document: that document (equal to doc_ext_id — the update is saved as its next version, same id)
5951
5957
  */
5952
5958
  version_of?: string | null;
5953
5959
  /**
@@ -6283,6 +6289,8 @@ interface components {
6283
6289
  workspace_ext_id?: string | null;
6284
6290
  /** Doc Ext Id */
6285
6291
  doc_ext_id?: string | null;
6292
+ /** Doc Version */
6293
+ doc_version?: number | null;
6286
6294
  /** Doc Title */
6287
6295
  doc_title?: string | null;
6288
6296
  /** Chunk Id */
@@ -6398,6 +6406,8 @@ interface components {
6398
6406
  CitedDocument: {
6399
6407
  /** Doc Ext Id */
6400
6408
  doc_ext_id: string;
6409
+ /** Version */
6410
+ version?: number | null;
6401
6411
  /** Chunks */
6402
6412
  chunks?: components['schemas']['CitedChunk'][];
6403
6413
  };
@@ -6422,7 +6432,7 @@ interface components {
6422
6432
  /**
6423
6433
  * Model Name
6424
6434
  * @description Model for code generation. Should be a strong coding model.
6425
- * @default
6435
+ * @default Premium
6426
6436
  */
6427
6437
  MODEL_NAME: string;
6428
6438
  /**
@@ -7595,12 +7605,16 @@ interface components {
7595
7605
  };
7596
7606
  /**
7597
7607
  * DerivedFrom
7598
- * @description One provenance link of a document: it was made from ``doc_ext_id`` as ``role``.
7608
+ * @description One provenance link of a document: it was made from version ``version`` of
7609
+ * ``doc_ext_id`` as ``role``. ``version`` is None only for links whose version was
7610
+ * never recorded.
7599
7611
  */
7600
7612
  DerivedFrom: {
7601
7613
  /** Doc Ext Id */
7602
7614
  doc_ext_id: string;
7603
7615
  role: components['schemas']['DocRelationRole'];
7616
+ /** Version */
7617
+ version?: number | null;
7604
7618
  };
7605
7619
  /**
7606
7620
  * DmAttachmentUploadResponse
@@ -7631,9 +7645,11 @@ interface components {
7631
7645
  /**
7632
7646
  * DocRelationRole
7633
7647
  * @description How ``from_doc`` was derived from ``to_doc`` (provenance only, no behaviour).
7648
+ *
7649
+ * Versions are not relations: they live inside their document (``docs.versions``).
7634
7650
  * @enum {string}
7635
7651
  */
7636
- DocRelationRole: 'edit' | 'sync' | 'crop' | 'redline_base' | 'redline_revised' | 'redaction' | 'annotated' | 'production';
7652
+ DocRelationRole: 'crop' | 'redline_base' | 'redline_revised' | 'redaction' | 'annotated' | 'production';
7637
7653
  /** DocResponse */
7638
7654
  DocResponse: {
7639
7655
  /** External Id */
@@ -7672,18 +7688,16 @@ interface components {
7672
7688
  config_ext_id?: string | null;
7673
7689
  /** Parent Ext Id */
7674
7690
  parent_ext_id?: string | null;
7675
- /** Lineage Id */
7676
- lineage_id?: string | null;
7677
7691
  /**
7678
- * Version Number
7692
+ * Current Version
7679
7693
  * @default 1
7680
7694
  */
7681
- version_number: number;
7695
+ current_version: number;
7682
7696
  /**
7683
- * Is Current
7684
- * @default true
7697
+ * Versions
7698
+ * @default []
7685
7699
  */
7686
- is_current: boolean;
7700
+ versions: components['schemas']['DocVersion'][];
7687
7701
  /** Thread Id */
7688
7702
  thread_id?: string | null;
7689
7703
  /**
@@ -7810,6 +7824,45 @@ interface components {
7810
7824
  */
7811
7825
  config_ext_id?: string | null;
7812
7826
  };
7827
+ /**
7828
+ * DocVersion
7829
+ * @description One version of a document (``GET /v1/document/{id}/versions`` and ``DocResponse.versions``).
7830
+ */
7831
+ DocVersion: {
7832
+ /** N */
7833
+ n: number;
7834
+ /** Created At */
7835
+ created_at?: string | null;
7836
+ /** Created By Ext Id */
7837
+ created_by_ext_id?: string | null;
7838
+ /**
7839
+ * Reason
7840
+ * @default upload
7841
+ * @enum {string}
7842
+ */
7843
+ reason: 'upload' | 'edit' | 'signed' | 'sync';
7844
+ /** File Name */
7845
+ file_name?: string | null;
7846
+ /** File Type */
7847
+ file_type?: string | null;
7848
+ /** File Size */
7849
+ file_size?: number | null;
7850
+ /** Content Hash */
7851
+ content_hash?: string | null;
7852
+ /** Status */
7853
+ status?: string | null;
7854
+ /** N Pages */
7855
+ n_pages?: number | null;
7856
+ /** N Chunks */
7857
+ n_chunks?: number | null;
7858
+ /** Made From */
7859
+ made_from?: number | null;
7860
+ /**
7861
+ * Is Current
7862
+ * @default false
7863
+ */
7864
+ is_current: boolean;
7865
+ };
7813
7866
  /**
7814
7867
  * DoctagLLMConfig
7815
7868
  * @description Configuration for DoctagLLM - extracts information from documents based on tag instructions.
@@ -7831,7 +7884,7 @@ interface components {
7831
7884
  /**
7832
7885
  * Model Name
7833
7886
  * @description The name of the non-reasoning model to be used.
7834
- * @default dummy
7887
+ * @default Fast
7835
7888
  */
7836
7889
  MODEL_NAME: string;
7837
7890
  /**
@@ -8129,7 +8182,7 @@ interface components {
8129
8182
  /**
8130
8183
  * Api Type
8131
8184
  * @description The inference type (local or remote).
8132
- * @default local
8185
+ * @default remote
8133
8186
  * @enum {string}
8134
8187
  */
8135
8188
  API_TYPE: 'local' | 'remote';
@@ -8274,7 +8327,7 @@ interface components {
8274
8327
  /**
8275
8328
  * Model Name
8276
8329
  * @description The name of the non-reasoning model to be used.
8277
- * @default dummy
8330
+ * @default Fast
8278
8331
  */
8279
8332
  MODEL_NAME: string;
8280
8333
  /**
@@ -8322,11 +8375,17 @@ interface components {
8322
8375
  };
8323
8376
  /**
8324
8377
  * ExportFile
8325
- * @description One file of a download: fetch ``/v1/document/{doc_ext_id}/download`` and store it at ``path``.
8378
+ * @description One file of a download: fetch ``/v1/document/{doc_ext_id}/download?version={version}`` and store
8379
+ * it at ``path``.
8326
8380
  */
8327
8381
  ExportFile: {
8328
8382
  /** Doc Ext Id */
8329
8383
  doc_ext_id: string;
8384
+ /**
8385
+ * Version
8386
+ * @default 1
8387
+ */
8388
+ version: number;
8330
8389
  /** Path */
8331
8390
  path: string;
8332
8391
  /**
@@ -8550,7 +8609,7 @@ interface components {
8550
8609
  /**
8551
8610
  * Model Name
8552
8611
  * @description The name of the non-reasoning model to be used.
8553
- * @default dummy
8612
+ * @default Fast
8554
8613
  */
8555
8614
  MODEL_NAME: string;
8556
8615
  /**
@@ -9440,7 +9499,7 @@ interface components {
9440
9499
  /**
9441
9500
  * Model Name
9442
9501
  * @description The model for note consolidation. Defaults to reasoning model.
9443
- * @default dummy
9502
+ * @default Wise
9444
9503
  */
9445
9504
  MODEL_NAME: string;
9446
9505
  /**
@@ -10173,6 +10232,8 @@ interface components {
10173
10232
  ParsedDocMetadata: {
10174
10233
  /** Doc Ext Id */
10175
10234
  doc_ext_id?: string | null;
10235
+ /** Doc Version */
10236
+ doc_version?: number | null;
10176
10237
  /** File Name */
10177
10238
  file_name?: string | null;
10178
10239
  /**
@@ -10332,7 +10393,7 @@ interface components {
10332
10393
  /**
10333
10394
  * Model Name
10334
10395
  * @description The model for plan generation. Defaults to reasoning model.
10335
- * @default dummy
10396
+ * @default Wise
10336
10397
  */
10337
10398
  MODEL_NAME: string;
10338
10399
  /**
@@ -10793,7 +10854,7 @@ interface components {
10793
10854
  /**
10794
10855
  * Model Name
10795
10856
  * @description The model for query answering.
10796
- * @default dummy
10857
+ * @default Fast
10797
10858
  */
10798
10859
  MODEL_NAME: string;
10799
10860
  /**
@@ -11124,7 +11185,7 @@ interface components {
11124
11185
  /**
11125
11186
  * Api Type
11126
11187
  * @description The inference type (local or remote).
11127
- * @default local
11188
+ * @default remote
11128
11189
  * @enum {string}
11129
11190
  */
11130
11191
  API_TYPE: 'local' | 'remote';
@@ -11909,7 +11970,7 @@ interface components {
11909
11970
  /**
11910
11971
  * Model Name
11911
11972
  * @description The model for reviewing agent draft answers. Defaults to reasoning model.
11912
- * @default dummy
11973
+ * @default Wise
11913
11974
  */
11914
11975
  MODEL_NAME: string;
11915
11976
  /**
@@ -12367,8 +12428,16 @@ interface components {
12367
12428
  };
12368
12429
  /** SignDocumentResponse */
12369
12430
  SignDocumentResponse: {
12370
- /** Signed Doc Ext Id */
12371
- signed_doc_ext_id: string;
12431
+ /**
12432
+ * Doc Ext Id
12433
+ * @description The signed document (it keeps its id)
12434
+ */
12435
+ doc_ext_id: string;
12436
+ /**
12437
+ * Version
12438
+ * @description The new version holding the signed, sealed PDF
12439
+ */
12440
+ version: number;
12372
12441
  signature: components['schemas']['SignatureRecord'];
12373
12442
  };
12374
12443
  /**
@@ -12724,7 +12793,7 @@ interface components {
12724
12793
  /**
12725
12794
  * Model Name
12726
12795
  * @description The model for conversation summarisation. Defaults to reasoning model.
12727
- * @default dummy
12796
+ * @default Wise
12728
12797
  */
12729
12798
  MODEL_NAME: string;
12730
12799
  /**
@@ -12999,6 +13068,11 @@ interface components {
12999
13068
  type: 'task_update';
13000
13069
  /** Doc Ext Id */
13001
13070
  doc_ext_id: string;
13071
+ /**
13072
+ * Version
13073
+ * @default 1
13074
+ */
13075
+ version: number;
13002
13076
  /** Workspace Ext Id */
13003
13077
  workspace_ext_id: string;
13004
13078
  /** File Name */
@@ -13068,7 +13142,7 @@ interface components {
13068
13142
  /**
13069
13143
  * Model Name
13070
13144
  * @description The name of the non-reasoning model to be used.
13071
- * @default dummy
13145
+ * @default Fast
13072
13146
  */
13073
13147
  MODEL_NAME: string;
13074
13148
  /**
@@ -13363,7 +13437,7 @@ interface components {
13363
13437
  kind: components['schemas']['TransferScopeKind'];
13364
13438
  /**
13365
13439
  * Items
13366
- * @description selection: external ids — documents (doc-), labels/fields (tag-), facts (fct-), conversations (con-) and automations (wfl-). A document brings all its versions and its attachments; an id of any version names the whole document.
13440
+ * @description selection: external ids — documents (doc-), labels/fields (tag-), facts (fct-), conversations (con-) and automations (wfl-). A document brings all its versions and its attachments.
13367
13441
  */
13368
13442
  items?: string[];
13369
13443
  /** Label Ext Id */
@@ -13646,6 +13720,8 @@ interface components {
13646
13720
  UploadDocumentsResponse: {
13647
13721
  /** Doc Ext Ids */
13648
13722
  doc_ext_ids?: string[];
13723
+ /** Version */
13724
+ version?: number | null;
13649
13725
  /**
13650
13726
  * Batch Id
13651
13727
  * @description Batch ID for tracking completion via WebSocket batch_complete events
@@ -13673,7 +13749,7 @@ interface components {
13673
13749
  config_ext_id?: string | null;
13674
13750
  /**
13675
13751
  * Version Of
13676
- * @description Upload as the next version of this document (any of its versions)
13752
+ * @description Upload as the next version of this document
13677
13753
  */
13678
13754
  version_of?: string | null;
13679
13755
  /** Wp Type */
@@ -14233,7 +14309,7 @@ interface components {
14233
14309
  /**
14234
14310
  * Model Name
14235
14311
  * @description The vision-capable model name (must support image inputs).
14236
- * @default dummy
14312
+ * @default Fast
14237
14313
  */
14238
14314
  MODEL_NAME: string;
14239
14315
  /**
@@ -16627,7 +16703,10 @@ interface operations {
16627
16703
  };
16628
16704
  native_content_v1_editor__document_id__content_get: {
16629
16705
  parameters: {
16630
- query?: never;
16706
+ query?: {
16707
+ /** @description Document version (default: the current one) */
16708
+ version?: number | null;
16709
+ };
16631
16710
  header?: never;
16632
16711
  path: {
16633
16712
  document_id: string;
@@ -16661,6 +16740,10 @@ interface operations {
16661
16740
  query: {
16662
16741
  revised_ext_id: string;
16663
16742
  base_ext_id?: string | null;
16743
+ /** @description Version of the revised document (default current) */
16744
+ revised_version?: number | null;
16745
+ /** @description Version of the base document (default current) */
16746
+ base_version?: number | null;
16664
16747
  };
16665
16748
  header?: never;
16666
16749
  path?: never;
@@ -16872,7 +16955,7 @@ interface operations {
16872
16955
  [name: string]: unknown;
16873
16956
  };
16874
16957
  content: {
16875
- 'application/json': components['schemas']['DocResponse'][];
16958
+ 'application/json': components['schemas']['DocVersion'][];
16876
16959
  };
16877
16960
  };
16878
16961
  /** @description Validation Error */
@@ -16990,7 +17073,7 @@ interface operations {
16990
17073
  shared?: boolean;
16991
17074
  /** @description Configuration to use for processing */
16992
17075
  config_ext_id?: string | null;
16993
- /** @description Upload a single file as the next version of this document (any of its versions). It becomes the current version and takes the document's sharing, folder and labels. */
17076
+ /** @description Upload a single file as the next version of this document. The document keeps its id, sharing, folder and labels; the new version becomes current (the response's `version`). */
16994
17077
  version_of?: string | null;
16995
17078
  /** @description A new, separate document made from this one (a crop, a redacted copy) or, repeated, from several (a production set); recorded as provenance only */
16996
17079
  derived_from?: string[] | null;
@@ -17142,7 +17225,10 @@ interface operations {
17142
17225
  };
17143
17226
  download_document: {
17144
17227
  parameters: {
17145
- query?: never;
17228
+ query?: {
17229
+ /** @description Document version (default: the current one) */
17230
+ version?: number | null;
17231
+ };
17146
17232
  header?: never;
17147
17233
  path: {
17148
17234
  document_ext_id: string;
@@ -17173,7 +17259,10 @@ interface operations {
17173
17259
  };
17174
17260
  view_document_inline: {
17175
17261
  parameters: {
17176
- query?: never;
17262
+ query?: {
17263
+ /** @description Document version (default: the current one) */
17264
+ version?: number | null;
17265
+ };
17177
17266
  header?: never;
17178
17267
  path: {
17179
17268
  document_ext_id: string;
@@ -17204,7 +17293,10 @@ interface operations {
17204
17293
  };
17205
17294
  get_document_thumbnail: {
17206
17295
  parameters: {
17207
- query?: never;
17296
+ query?: {
17297
+ /** @description Document version (default: the current one) */
17298
+ version?: number | null;
17299
+ };
17208
17300
  header?: never;
17209
17301
  path: {
17210
17302
  document_ext_id: string;
@@ -17268,7 +17360,10 @@ interface operations {
17268
17360
  };
17269
17361
  get_parsed_document: {
17270
17362
  parameters: {
17271
- query?: never;
17363
+ query?: {
17364
+ /** @description Document version (default: the current one) */
17365
+ version?: number | null;
17366
+ };
17272
17367
  header?: never;
17273
17368
  path: {
17274
17369
  document_ext_id: string;
@@ -17406,7 +17501,10 @@ interface operations {
17406
17501
  };
17407
17502
  get_document_signature_status: {
17408
17503
  parameters: {
17409
- query?: never;
17504
+ query?: {
17505
+ /** @description Document version (default: the current one) */
17506
+ version?: number | null;
17507
+ };
17410
17508
  header?: never;
17411
17509
  path: {
17412
17510
  document_ext_id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbidocs/client",
3
- "version": "0.4.63",
3
+ "version": "0.4.64",
4
4
  "description": "TypeScript SDK for the ARBI API — zero-knowledge auth, E2E encryption, and type-safe REST client",
5
5
  "type": "module",
6
6
  "sideEffects": false,