@arbidocs/client 0.3.48 → 0.3.50

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
@@ -2386,7 +2386,7 @@ interface components {
2386
2386
  * "MAX_NUMB_OF_CHUNKS": 30,
2387
2387
  * "MAX_CONCURRENT_REQUESTS": 256,
2388
2388
  * "MODEL_NAME": "Qwen/Qwen3-Reranker-0.6B",
2389
- * "API_TYPE": "remote",
2389
+ * "API_TYPE": "local",
2390
2390
  * "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
2391
  * }
2392
2392
  */
@@ -2407,7 +2407,7 @@ interface components {
2407
2407
  /**
2408
2408
  * @default {
2409
2409
  * "MODEL_NAME": "Qwen/Qwen3-Embedding-0.6B",
2410
- * "API_TYPE": "remote",
2410
+ * "API_TYPE": "local",
2411
2411
  * "BATCH_SIZE": 128,
2412
2412
  * "MAX_CONCURRENT_REQUESTS": 256,
2413
2413
  * "DOCUMENT_PREFIX": "",
@@ -3468,7 +3468,7 @@ interface components {
3468
3468
  shared?: boolean | null;
3469
3469
  doc_metadata?: components['schemas']['DocMetadata'] | null;
3470
3470
  /** Status */
3471
- status?: 'processing' | null;
3471
+ status?: ('processing' | 'reindex-sparse') | null;
3472
3472
  /** Content */
3473
3473
  content?: string | null;
3474
3474
  /**
@@ -3591,7 +3591,7 @@ interface components {
3591
3591
  /**
3592
3592
  * Api Type
3593
3593
  * @description The inference type (local or remote).
3594
- * @default remote
3594
+ * @default local
3595
3595
  * @enum {string}
3596
3596
  */
3597
3597
  API_TYPE: 'local' | 'remote';
@@ -3942,7 +3942,7 @@ interface components {
3942
3942
  * @default uploading
3943
3943
  * @enum {string}
3944
3944
  */
3945
- status: 'uploading' | 'duplicate' | 'quota_exceeded' | 'unsupported' | 'empty';
3945
+ status: 'uploading' | 'duplicate' | 'quota_exceeded' | 'unsupported' | 'empty' | 'low-content';
3946
3946
  /** Reason */
3947
3947
  reason?: string | null;
3948
3948
  };
@@ -5280,7 +5280,7 @@ interface components {
5280
5280
  /**
5281
5281
  * Api Type
5282
5282
  * @description The inference type (local or remote).
5283
- * @default remote
5283
+ * @default local
5284
5284
  * @enum {string}
5285
5285
  */
5286
5286
  API_TYPE: 'local' | 'remote';
@@ -6572,7 +6572,7 @@ interface components {
6572
6572
  * Status
6573
6573
  * @enum {string}
6574
6574
  */
6575
- status: 'uploading' | 'queued' | 'parsing' | 'encrypting' | 'indexing' | 'analysing' | 'completed' | 'failed' | 'skipped' | 'empty';
6575
+ status: 'uploading' | 'queued' | 'parsing' | 'encrypting' | 'indexing' | 'analysing' | 'completed' | 'failed' | 'skipped' | 'empty' | 'low-content';
6576
6576
  /** Progress */
6577
6577
  progress: number;
6578
6578
  };
@@ -10928,6 +10928,12 @@ interface ArbiClientOptions {
10928
10928
  * error as-is.
10929
10929
  */
10930
10930
  sessionStorage?: SessionStorageProvider;
10931
+ /**
10932
+ * Optional user email to seed the in-memory session at creation time.
10933
+ * Ensures the auto-relogin middleware can re-authenticate even when
10934
+ * the client is constructed from cached credentials (no login call).
10935
+ */
10936
+ userEmail?: string;
10931
10937
  }
10932
10938
  interface ArbiClient {
10933
10939
  /** Type-safe openapi-fetch client with middleware */
package/dist/index.d.ts CHANGED
@@ -2386,7 +2386,7 @@ interface components {
2386
2386
  * "MAX_NUMB_OF_CHUNKS": 30,
2387
2387
  * "MAX_CONCURRENT_REQUESTS": 256,
2388
2388
  * "MODEL_NAME": "Qwen/Qwen3-Reranker-0.6B",
2389
- * "API_TYPE": "remote",
2389
+ * "API_TYPE": "local",
2390
2390
  * "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
2391
  * }
2392
2392
  */
@@ -2407,7 +2407,7 @@ interface components {
2407
2407
  /**
2408
2408
  * @default {
2409
2409
  * "MODEL_NAME": "Qwen/Qwen3-Embedding-0.6B",
2410
- * "API_TYPE": "remote",
2410
+ * "API_TYPE": "local",
2411
2411
  * "BATCH_SIZE": 128,
2412
2412
  * "MAX_CONCURRENT_REQUESTS": 256,
2413
2413
  * "DOCUMENT_PREFIX": "",
@@ -3468,7 +3468,7 @@ interface components {
3468
3468
  shared?: boolean | null;
3469
3469
  doc_metadata?: components['schemas']['DocMetadata'] | null;
3470
3470
  /** Status */
3471
- status?: 'processing' | null;
3471
+ status?: ('processing' | 'reindex-sparse') | null;
3472
3472
  /** Content */
3473
3473
  content?: string | null;
3474
3474
  /**
@@ -3591,7 +3591,7 @@ interface components {
3591
3591
  /**
3592
3592
  * Api Type
3593
3593
  * @description The inference type (local or remote).
3594
- * @default remote
3594
+ * @default local
3595
3595
  * @enum {string}
3596
3596
  */
3597
3597
  API_TYPE: 'local' | 'remote';
@@ -3942,7 +3942,7 @@ interface components {
3942
3942
  * @default uploading
3943
3943
  * @enum {string}
3944
3944
  */
3945
- status: 'uploading' | 'duplicate' | 'quota_exceeded' | 'unsupported' | 'empty';
3945
+ status: 'uploading' | 'duplicate' | 'quota_exceeded' | 'unsupported' | 'empty' | 'low-content';
3946
3946
  /** Reason */
3947
3947
  reason?: string | null;
3948
3948
  };
@@ -5280,7 +5280,7 @@ interface components {
5280
5280
  /**
5281
5281
  * Api Type
5282
5282
  * @description The inference type (local or remote).
5283
- * @default remote
5283
+ * @default local
5284
5284
  * @enum {string}
5285
5285
  */
5286
5286
  API_TYPE: 'local' | 'remote';
@@ -6572,7 +6572,7 @@ interface components {
6572
6572
  * Status
6573
6573
  * @enum {string}
6574
6574
  */
6575
- status: 'uploading' | 'queued' | 'parsing' | 'encrypting' | 'indexing' | 'analysing' | 'completed' | 'failed' | 'skipped' | 'empty';
6575
+ status: 'uploading' | 'queued' | 'parsing' | 'encrypting' | 'indexing' | 'analysing' | 'completed' | 'failed' | 'skipped' | 'empty' | 'low-content';
6576
6576
  /** Progress */
6577
6577
  progress: number;
6578
6578
  };
@@ -10928,6 +10928,12 @@ interface ArbiClientOptions {
10928
10928
  * error as-is.
10929
10929
  */
10930
10930
  sessionStorage?: SessionStorageProvider;
10931
+ /**
10932
+ * Optional user email to seed the in-memory session at creation time.
10933
+ * Ensures the auto-relogin middleware can re-authenticate even when
10934
+ * the client is constructed from cached credentials (no login call).
10935
+ */
10936
+ userEmail?: string;
10931
10937
  }
10932
10938
  interface ArbiClient {
10933
10939
  /** Type-safe openapi-fetch client with middleware */
package/dist/index.js CHANGED
@@ -959,7 +959,8 @@ function createArbiClient(options) {
959
959
  credentials = "include",
960
960
  ssoTokenProvider = null,
961
961
  onReloginSuccess,
962
- sessionStorage: sessionStorageOverride
962
+ sessionStorage: sessionStorageOverride,
963
+ userEmail
963
964
  } = options;
964
965
  const sessionStorage = sessionStorageOverride ?? {
965
966
  getSession,
@@ -967,6 +968,7 @@ function createArbiClient(options) {
967
968
  };
968
969
  const retryFetch = createRetryFetch();
969
970
  const session = createSessionManager();
971
+ if (userEmail) session.setUser(userEmail);
970
972
  const tokenProvider = createTokenProvider(session);
971
973
  const authState = createAuthStateProvider(session);
972
974
  const cryptoProvider = {