@arbidocs/client 0.3.43 → 0.3.45

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
@@ -744,6 +744,35 @@ interface paths {
744
744
  patch?: never;
745
745
  trace?: never;
746
746
  };
747
+ '/v1/document/columns': {
748
+ parameters: {
749
+ query?: never;
750
+ header?: never;
751
+ path?: never;
752
+ cookie?: never;
753
+ };
754
+ get?: never;
755
+ put?: never;
756
+ /**
757
+ * Fetch Document Columns Endpoint
758
+ * @description Fetch specific encrypted column groups for a batch of documents.
759
+ *
760
+ * Companion to ``GET /v1/document/list?fields=lite``: the list endpoint
761
+ * returns all rows fast with plain DB columns + decrypted ``file_name``,
762
+ * and this endpoint fills in the heavy encrypted fields (``doc_metadata``
763
+ * and ``doctags``) on demand when the frontend reveals the columns that
764
+ * need them.
765
+ *
766
+ * Only the column groups listed in ``fields`` trigger DB work and
767
+ * decryption, so the cost scales with what's actually asked for.
768
+ */
769
+ post: operations['fetch_document_columns'];
770
+ delete?: never;
771
+ options?: never;
772
+ head?: never;
773
+ patch?: never;
774
+ trace?: never;
775
+ };
747
776
  '/v1/document/similar': {
748
777
  parameters: {
749
778
  query?: never;
@@ -2350,7 +2379,7 @@ interface components {
2350
2379
  * @default {
2351
2380
  * "API_TYPE": "remote",
2352
2381
  * "ENABLE_THINKING": true,
2353
- * "MODEL_NAME": "GLM5@Fireworks",
2382
+ * "MODEL_NAME": "Premium",
2354
2383
  * "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.",
2355
2384
  * "TEMPERATURE": 0.2,
2356
2385
  * "MAX_TOKENS": 8000,
@@ -2386,7 +2415,7 @@ interface components {
2386
2415
  * "MAX_NUMB_OF_CHUNKS": 30,
2387
2416
  * "MAX_CONCURRENT_REQUESTS": 256,
2388
2417
  * "MODEL_NAME": "Qwen/Qwen3-Reranker-0.6B",
2389
- * "API_TYPE": "remote",
2418
+ * "API_TYPE": "local",
2390
2419
  * "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"
2391
2420
  * }
2392
2421
  */
@@ -2408,7 +2437,7 @@ interface components {
2408
2437
  /**
2409
2438
  * @default {
2410
2439
  * "MODEL_NAME": "Qwen/Qwen3-Embedding-0.6B",
2411
- * "API_TYPE": "remote",
2440
+ * "API_TYPE": "local",
2412
2441
  * "BATCH_SIZE": 128,
2413
2442
  * "MAX_CONCURRENT_REQUESTS": 256,
2414
2443
  * "DOCUMENT_PREFIX": "",
@@ -2820,7 +2849,7 @@ interface components {
2820
2849
  /**
2821
2850
  * Model Name
2822
2851
  * @description Model for code generation. Should be a strong coding model.
2823
- * @default GLM5@Fireworks
2852
+ * @default Premium
2824
2853
  */
2825
2854
  MODEL_NAME: string;
2826
2855
  /**
@@ -3328,6 +3357,45 @@ interface components {
3328
3357
  /** External Ids */
3329
3358
  external_ids: string[];
3330
3359
  };
3360
+ /**
3361
+ * DocColumnData
3362
+ * @description Per-document column data returned by POST /v1/document/columns.
3363
+ *
3364
+ * Fields are populated only when requested in the ``fields`` list. Unrequested
3365
+ * fields are omitted from the response. Used by the frontend's on-demand
3366
+ * column loader to fill in encrypted/joined fields after the skeleton load.
3367
+ */
3368
+ DocColumnData: {
3369
+ /** External Id */
3370
+ external_id: string;
3371
+ doc_metadata?: components['schemas']['DocMetadata'] | null;
3372
+ /** Doctags */
3373
+ doctags?: components['schemas']['DocTagResponse'][] | null;
3374
+ };
3375
+ /**
3376
+ * DocColumnsRequest
3377
+ * @description Request body for POST /v1/document/columns.
3378
+ */
3379
+ DocColumnsRequest: {
3380
+ /**
3381
+ * External Ids
3382
+ * @description Document external IDs to fetch columns for (max 10k per request).
3383
+ */
3384
+ external_ids: string[];
3385
+ /**
3386
+ * Fields
3387
+ * @description Column groups to decrypt and return for each document.
3388
+ */
3389
+ fields: ('doc_metadata' | 'doctags')[];
3390
+ };
3391
+ /**
3392
+ * DocColumnsResponse
3393
+ * @description Response for POST /v1/document/columns — batch column data for many docs.
3394
+ */
3395
+ DocColumnsResponse: {
3396
+ /** Docs */
3397
+ docs: components['schemas']['DocColumnData'][];
3398
+ };
3331
3399
  /**
3332
3400
  * DocMetadata
3333
3401
  * @description Structured model for document metadata stored in JSONB column.
@@ -3410,8 +3478,8 @@ interface components {
3410
3478
  * @description A pair of documents identified as near-duplicates by centroid similarity.
3411
3479
  */
3412
3480
  DocSimPair: {
3413
- doc_a: components['schemas']['DocResponse'];
3414
- doc_b: components['schemas']['DocResponse'];
3481
+ doc_a: components['schemas']['DocSimSummary'];
3482
+ doc_b: components['schemas']['DocSimSummary'];
3415
3483
  /** Similarity */
3416
3484
  similarity: number;
3417
3485
  };
@@ -3425,6 +3493,16 @@ interface components {
3425
3493
  /** Pairs */
3426
3494
  pairs: components['schemas']['DocSimPair'][];
3427
3495
  };
3496
+ /**
3497
+ * DocSimSummary
3498
+ * @description Lightweight document summary for the similar-documents endpoint.
3499
+ */
3500
+ DocSimSummary: {
3501
+ /** External Id */
3502
+ external_id: string;
3503
+ /** File Name */
3504
+ file_name?: string | null;
3505
+ };
3428
3506
  /**
3429
3507
  * DocTagResponse
3430
3508
  * @description Response for doctag operations - the link between a document and a tag.
@@ -3589,7 +3667,7 @@ interface components {
3589
3667
  /**
3590
3668
  * Api Type
3591
3669
  * @description The inference type (local or remote).
3592
- * @default remote
3670
+ * @default local
3593
3671
  * @enum {string}
3594
3672
  */
3595
3673
  API_TYPE: 'local' | 'remote';
@@ -5278,7 +5356,7 @@ interface components {
5278
5356
  /**
5279
5357
  * Api Type
5280
5358
  * @description The inference type (local or remote).
5281
- * @default remote
5359
+ * @default local
5282
5360
  * @enum {string}
5283
5361
  */
5284
5362
  API_TYPE: 'local' | 'remote';
@@ -8673,10 +8751,43 @@ interface operations {
8673
8751
  };
8674
8752
  };
8675
8753
  };
8754
+ fetch_document_columns: {
8755
+ parameters: {
8756
+ query?: never;
8757
+ header?: never;
8758
+ path?: never;
8759
+ cookie?: never;
8760
+ };
8761
+ requestBody: {
8762
+ content: {
8763
+ 'application/json': components['schemas']['DocColumnsRequest'];
8764
+ };
8765
+ };
8766
+ responses: {
8767
+ /** @description Successful Response */
8768
+ 200: {
8769
+ headers: {
8770
+ [name: string]: unknown;
8771
+ };
8772
+ content: {
8773
+ 'application/json': components['schemas']['DocColumnsResponse'];
8774
+ };
8775
+ };
8776
+ /** @description Validation Error */
8777
+ 422: {
8778
+ headers: {
8779
+ [name: string]: unknown;
8780
+ };
8781
+ content: {
8782
+ 'application/json': components['schemas']['HTTPValidationError'];
8783
+ };
8784
+ };
8785
+ };
8786
+ };
8676
8787
  get_similar_documents: {
8677
8788
  parameters: {
8678
8789
  query?: {
8679
- /** @description Minimum similarity score (default 0.92 for near-duplicates) */
8790
+ /** @description Minimum similarity score (default 0.95 for near-duplicates) */
8680
8791
  threshold?: number;
8681
8792
  /** @description Filter pairs involving a specific document */
8682
8793
  doc_ext_id?: string | null;
package/dist/index.d.ts CHANGED
@@ -744,6 +744,35 @@ interface paths {
744
744
  patch?: never;
745
745
  trace?: never;
746
746
  };
747
+ '/v1/document/columns': {
748
+ parameters: {
749
+ query?: never;
750
+ header?: never;
751
+ path?: never;
752
+ cookie?: never;
753
+ };
754
+ get?: never;
755
+ put?: never;
756
+ /**
757
+ * Fetch Document Columns Endpoint
758
+ * @description Fetch specific encrypted column groups for a batch of documents.
759
+ *
760
+ * Companion to ``GET /v1/document/list?fields=lite``: the list endpoint
761
+ * returns all rows fast with plain DB columns + decrypted ``file_name``,
762
+ * and this endpoint fills in the heavy encrypted fields (``doc_metadata``
763
+ * and ``doctags``) on demand when the frontend reveals the columns that
764
+ * need them.
765
+ *
766
+ * Only the column groups listed in ``fields`` trigger DB work and
767
+ * decryption, so the cost scales with what's actually asked for.
768
+ */
769
+ post: operations['fetch_document_columns'];
770
+ delete?: never;
771
+ options?: never;
772
+ head?: never;
773
+ patch?: never;
774
+ trace?: never;
775
+ };
747
776
  '/v1/document/similar': {
748
777
  parameters: {
749
778
  query?: never;
@@ -2350,7 +2379,7 @@ interface components {
2350
2379
  * @default {
2351
2380
  * "API_TYPE": "remote",
2352
2381
  * "ENABLE_THINKING": true,
2353
- * "MODEL_NAME": "GLM5@Fireworks",
2382
+ * "MODEL_NAME": "Premium",
2354
2383
  * "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.",
2355
2384
  * "TEMPERATURE": 0.2,
2356
2385
  * "MAX_TOKENS": 8000,
@@ -2386,7 +2415,7 @@ interface components {
2386
2415
  * "MAX_NUMB_OF_CHUNKS": 30,
2387
2416
  * "MAX_CONCURRENT_REQUESTS": 256,
2388
2417
  * "MODEL_NAME": "Qwen/Qwen3-Reranker-0.6B",
2389
- * "API_TYPE": "remote",
2418
+ * "API_TYPE": "local",
2390
2419
  * "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"
2391
2420
  * }
2392
2421
  */
@@ -2408,7 +2437,7 @@ interface components {
2408
2437
  /**
2409
2438
  * @default {
2410
2439
  * "MODEL_NAME": "Qwen/Qwen3-Embedding-0.6B",
2411
- * "API_TYPE": "remote",
2440
+ * "API_TYPE": "local",
2412
2441
  * "BATCH_SIZE": 128,
2413
2442
  * "MAX_CONCURRENT_REQUESTS": 256,
2414
2443
  * "DOCUMENT_PREFIX": "",
@@ -2820,7 +2849,7 @@ interface components {
2820
2849
  /**
2821
2850
  * Model Name
2822
2851
  * @description Model for code generation. Should be a strong coding model.
2823
- * @default GLM5@Fireworks
2852
+ * @default Premium
2824
2853
  */
2825
2854
  MODEL_NAME: string;
2826
2855
  /**
@@ -3328,6 +3357,45 @@ interface components {
3328
3357
  /** External Ids */
3329
3358
  external_ids: string[];
3330
3359
  };
3360
+ /**
3361
+ * DocColumnData
3362
+ * @description Per-document column data returned by POST /v1/document/columns.
3363
+ *
3364
+ * Fields are populated only when requested in the ``fields`` list. Unrequested
3365
+ * fields are omitted from the response. Used by the frontend's on-demand
3366
+ * column loader to fill in encrypted/joined fields after the skeleton load.
3367
+ */
3368
+ DocColumnData: {
3369
+ /** External Id */
3370
+ external_id: string;
3371
+ doc_metadata?: components['schemas']['DocMetadata'] | null;
3372
+ /** Doctags */
3373
+ doctags?: components['schemas']['DocTagResponse'][] | null;
3374
+ };
3375
+ /**
3376
+ * DocColumnsRequest
3377
+ * @description Request body for POST /v1/document/columns.
3378
+ */
3379
+ DocColumnsRequest: {
3380
+ /**
3381
+ * External Ids
3382
+ * @description Document external IDs to fetch columns for (max 10k per request).
3383
+ */
3384
+ external_ids: string[];
3385
+ /**
3386
+ * Fields
3387
+ * @description Column groups to decrypt and return for each document.
3388
+ */
3389
+ fields: ('doc_metadata' | 'doctags')[];
3390
+ };
3391
+ /**
3392
+ * DocColumnsResponse
3393
+ * @description Response for POST /v1/document/columns — batch column data for many docs.
3394
+ */
3395
+ DocColumnsResponse: {
3396
+ /** Docs */
3397
+ docs: components['schemas']['DocColumnData'][];
3398
+ };
3331
3399
  /**
3332
3400
  * DocMetadata
3333
3401
  * @description Structured model for document metadata stored in JSONB column.
@@ -3410,8 +3478,8 @@ interface components {
3410
3478
  * @description A pair of documents identified as near-duplicates by centroid similarity.
3411
3479
  */
3412
3480
  DocSimPair: {
3413
- doc_a: components['schemas']['DocResponse'];
3414
- doc_b: components['schemas']['DocResponse'];
3481
+ doc_a: components['schemas']['DocSimSummary'];
3482
+ doc_b: components['schemas']['DocSimSummary'];
3415
3483
  /** Similarity */
3416
3484
  similarity: number;
3417
3485
  };
@@ -3425,6 +3493,16 @@ interface components {
3425
3493
  /** Pairs */
3426
3494
  pairs: components['schemas']['DocSimPair'][];
3427
3495
  };
3496
+ /**
3497
+ * DocSimSummary
3498
+ * @description Lightweight document summary for the similar-documents endpoint.
3499
+ */
3500
+ DocSimSummary: {
3501
+ /** External Id */
3502
+ external_id: string;
3503
+ /** File Name */
3504
+ file_name?: string | null;
3505
+ };
3428
3506
  /**
3429
3507
  * DocTagResponse
3430
3508
  * @description Response for doctag operations - the link between a document and a tag.
@@ -3589,7 +3667,7 @@ interface components {
3589
3667
  /**
3590
3668
  * Api Type
3591
3669
  * @description The inference type (local or remote).
3592
- * @default remote
3670
+ * @default local
3593
3671
  * @enum {string}
3594
3672
  */
3595
3673
  API_TYPE: 'local' | 'remote';
@@ -5278,7 +5356,7 @@ interface components {
5278
5356
  /**
5279
5357
  * Api Type
5280
5358
  * @description The inference type (local or remote).
5281
- * @default remote
5359
+ * @default local
5282
5360
  * @enum {string}
5283
5361
  */
5284
5362
  API_TYPE: 'local' | 'remote';
@@ -8673,10 +8751,43 @@ interface operations {
8673
8751
  };
8674
8752
  };
8675
8753
  };
8754
+ fetch_document_columns: {
8755
+ parameters: {
8756
+ query?: never;
8757
+ header?: never;
8758
+ path?: never;
8759
+ cookie?: never;
8760
+ };
8761
+ requestBody: {
8762
+ content: {
8763
+ 'application/json': components['schemas']['DocColumnsRequest'];
8764
+ };
8765
+ };
8766
+ responses: {
8767
+ /** @description Successful Response */
8768
+ 200: {
8769
+ headers: {
8770
+ [name: string]: unknown;
8771
+ };
8772
+ content: {
8773
+ 'application/json': components['schemas']['DocColumnsResponse'];
8774
+ };
8775
+ };
8776
+ /** @description Validation Error */
8777
+ 422: {
8778
+ headers: {
8779
+ [name: string]: unknown;
8780
+ };
8781
+ content: {
8782
+ 'application/json': components['schemas']['HTTPValidationError'];
8783
+ };
8784
+ };
8785
+ };
8786
+ };
8676
8787
  get_similar_documents: {
8677
8788
  parameters: {
8678
8789
  query?: {
8679
- /** @description Minimum similarity score (default 0.92 for near-duplicates) */
8790
+ /** @description Minimum similarity score (default 0.95 for near-duplicates) */
8680
8791
  threshold?: number;
8681
8792
  /** @description Filter pairs involving a specific document */
8682
8793
  doc_ext_id?: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbidocs/client",
3
- "version": "0.3.43",
3
+ "version": "0.3.45",
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
  "main": "dist/index.cjs",