@littlebigbrain/client 0.5.0 → 0.5.1

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/schema.d.ts CHANGED
@@ -3121,6 +3121,12 @@ export interface components {
3121
3121
  type: string;
3122
3122
  };
3123
3123
  EvidenceInput: string | {
3124
+ /**
3125
+ * @description Stable observation id used by full-fidelity export/import. Ordinary
3126
+ * callers omit it and receive the existing deterministic request id.
3127
+ */
3128
+ observation_id?: string | null;
3129
+ region?: null | components["schemas"]["RegionAnchorInput"];
3124
3130
  source_id?: string | null;
3125
3131
  text?: string | null;
3126
3132
  };
@@ -3705,6 +3711,8 @@ export interface components {
3705
3711
  * exact receipt and the original terminal commit sequence.
3706
3712
  */
3707
3713
  mutation_receipt_id: string;
3714
+ /** @description Exact observation records imported from a full-fidelity export. */
3715
+ observations?: number;
3708
3716
  properties: number;
3709
3717
  triplets: number;
3710
3718
  };
@@ -4198,6 +4206,8 @@ export interface components {
4198
4206
  message: string;
4199
4207
  param?: string | null;
4200
4208
  request_id: string | null;
4209
+ retry_after_seconds?: number;
4210
+ retryable?: boolean;
4201
4211
  /** @example invalid_request_error */
4202
4212
  type: string;
4203
4213
  };
@@ -5430,6 +5440,32 @@ export interface components {
5430
5440
  total_triples: number;
5431
5441
  truncated: boolean;
5432
5442
  };
5443
+ /**
5444
+ * @description A page-region provenance anchor on a fact's evidence (region provenance
5445
+ * §4.1/§6.4(b) BYO import): where the evidence appears in the source
5446
+ * document. Coordinates are **normalized to the page box** (`[0, 1]`, origin
5447
+ * top-left, y down) with `x0 <= x1` and `y0 <= y1`; `confidence` is the
5448
+ * extraction confidence in `[0, 1]`. The commit path validates and quantizes
5449
+ * (`round(v * 65535)` coords, `round(c * 255)` confidence) into the canonical
5450
+ * stored anchor; out-of-range, non-finite, or inverted boxes are rejected.
5451
+ */
5452
+ RegionAnchorInput: {
5453
+ /** Format: double */
5454
+ confidence: number;
5455
+ /**
5456
+ * Format: int32
5457
+ * @description 0-based page index within the source document.
5458
+ */
5459
+ page: number;
5460
+ /** Format: double */
5461
+ x0: number;
5462
+ /** Format: double */
5463
+ x1: number;
5464
+ /** Format: double */
5465
+ y0: number;
5466
+ /** Format: double */
5467
+ y1: number;
5468
+ };
5433
5469
  RelationSearchResult: {
5434
5470
  name: string;
5435
5471
  relation_id: components["schemas"]["RelationTypeId"];
@@ -30,6 +30,8 @@ export declare class LbbError extends Error {
30
30
  readonly param?: string | null;
31
31
  readonly requestId?: string | null;
32
32
  readonly docUrl?: string | null;
33
+ readonly retryable?: boolean;
34
+ readonly retryAfterSeconds?: number;
33
35
  constructor(status: number, body: string, error?: LbbErrorPayload | undefined);
34
36
  }
35
37
  export type QueryValue = string | number | boolean | undefined;
package/dist/transport.js CHANGED
@@ -8,6 +8,8 @@ export class LbbError extends Error {
8
8
  param;
9
9
  requestId;
10
10
  docUrl;
11
+ retryable;
12
+ retryAfterSeconds;
11
13
  constructor(status, body, error) {
12
14
  super(error?.message ?? `Little Big Brain ${status}: ${body}`);
13
15
  this.status = status;
@@ -19,6 +21,8 @@ export class LbbError extends Error {
19
21
  this.param = error?.param;
20
22
  this.requestId = error?.request_id;
21
23
  this.docUrl = error?.doc_url;
24
+ this.retryable = error?.retryable;
25
+ this.retryAfterSeconds = error?.retry_after_seconds;
22
26
  }
23
27
  }
24
28
  export function sleep(ms) {
package/dist/types.d.ts CHANGED
@@ -281,6 +281,8 @@ export interface LbbErrorPayload {
281
281
  param?: string | null;
282
282
  request_id?: string | null;
283
283
  doc_url?: string | null;
284
+ retryable?: boolean;
285
+ retry_after_seconds?: number;
284
286
  }
285
287
  export interface RawLbbResponse<T> {
286
288
  data: T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@littlebigbrain/client",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "TypeScript client for the little big brain graph + hybrid search HTTP API",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {