@qaecy/cue-sdk 0.0.31 → 0.0.32

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/index.d.ts CHANGED
@@ -5,6 +5,8 @@ export type { StorageBucket } from './lib/storage';
5
5
  export type { GisBBox, GisCategoryDescriptor, GisFeature, GisFeaturesMap, FeatureCategory } from './lib/gis';
6
6
  export { CueAuth } from './lib/auth';
7
7
  export { CueApi } from './lib/api';
8
+ export { CueIndexApi } from './lib/index-api';
9
+ export type { IndexSearchRequest, IndexItem, IndexSearchResponse } from './lib/models';
8
10
  export { CueSyncApi, configureScanWasm } from './lib/sync';
9
11
  export { CueProjectSchema } from './lib/schema';
10
12
  export { CueProjectEntities } from './lib/entities';
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as s, a as u, b as C, c as t, d as i, e as o, f as c, g as r, h as n, i as l, j as P, k as j, l as m, m as S, n as g, o as h, p, q as E, R, r as f, s as d, t as x } from "./cue-VOCN5IEZ.js";
1
+ import { C as s, a as u, b as C, c as t, d as i, e as o, f as c, g as r, h as n, i as l, j as P, k as j, l as m, m as p, n as S, o as g, p as h, q as E, r as R, R as d, s as f, t as x, u as A } from "./cue-C7sbHLj4.js";
2
2
  export {
3
3
  s as Cue,
4
4
  u as CueApi,
@@ -7,19 +7,20 @@ export {
7
7
  i as CueContexts,
8
8
  o as CueExtraction,
9
9
  c as CueGis,
10
- r as CuePrivileges,
11
- n as CueProfile,
12
- l as CueProjectDocuments,
13
- P as CueProjectEntities,
14
- j as CueProjectSchema,
15
- m as CueProjectView,
10
+ r as CueIndexApi,
11
+ n as CuePrivileges,
12
+ l as CueProfile,
13
+ P as CueProjectDocuments,
14
+ j as CueProjectEntities,
15
+ m as CueProjectSchema,
16
+ p as CueProjectView,
16
17
  S as CueProjects,
17
18
  g as CueSignal,
18
19
  h as CueStorage,
19
- p as CueSyncApi,
20
- E as CueTables,
21
- R as REQUIRED_ROLES,
20
+ E as CueSyncApi,
21
+ R as CueTables,
22
+ d as REQUIRED_ROLES,
22
23
  f as configureScanWasm,
23
- d as cueComputed,
24
- x as staleWhileRevalidate
24
+ x as cueComputed,
25
+ A as staleWhileRevalidate
25
26
  };
package/lib/api.d.ts CHANGED
@@ -5,6 +5,7 @@ import { CueSyncApi } from './sync';
5
5
  import { CueTables } from './tables';
6
6
  import { CueExtraction } from './extraction';
7
7
  import { CueContexts } from './contexts';
8
+ import { CueIndexApi } from './index-api';
8
9
  export declare class CueApi {
9
10
  private readonly _auth;
10
11
  private readonly _gatewayUrl;
@@ -15,6 +16,8 @@ export declare class CueApi {
15
16
  readonly extraction: CueExtraction;
16
17
  /** Session context file client — fetch and decompress context documents. */
17
18
  readonly contexts: CueContexts;
19
+ /** Direct interface to the Cue Index accessor — search and lookup. */
20
+ readonly index: CueIndexApi;
18
21
  /** Active language used for language-sensitive SPARQL queries across all project classes. */
19
22
  language: string;
20
23
  /** Updates the active language. All project classes (`CueProjectSchema`, `CueProjectDocuments`, `CueProjectEntities`) read this at query time. */
@@ -0,0 +1,11 @@
1
+ import { CueAuth } from './auth';
2
+ import { IndexSearchRequest, IndexSearchResponse } from './models';
3
+ export declare class CueIndexApi {
4
+ private readonly _auth;
5
+ private readonly _gatewayUrl;
6
+ constructor(_auth: CueAuth, _gatewayUrl: string);
7
+ search(input: string, projectId: string, opts?: Omit<IndexSearchRequest, 'input'>): Promise<IndexSearchResponse>;
8
+ lookup(input: string, projectId: string, opts?: {
9
+ aggregate?: boolean;
10
+ }): Promise<IndexSearchResponse>;
11
+ }
package/lib/models.d.ts CHANGED
@@ -438,3 +438,23 @@ export interface ProjectDocumentsData {
438
438
  /** Content-category IRI → `{ size, count }` */
439
439
  documentsByContentCategory: Record<string, DocumentSummary>;
440
440
  }
441
+ export interface IndexSearchRequest {
442
+ input: string;
443
+ limit?: number;
444
+ aggregate?: boolean;
445
+ /** `'loose'` (default) allows partial matches; `'strict'` requires exact term presence. */
446
+ mode?: 'loose' | 'strict';
447
+ /** Pre-seed the context with these document UUIDs before running the search. */
448
+ identifiers?: string[];
449
+ }
450
+ export interface IndexItem {
451
+ id: string;
452
+ type: string;
453
+ relevance: number;
454
+ sub_items?: IndexItem[];
455
+ }
456
+ export interface IndexSearchResponse {
457
+ id?: string;
458
+ total?: number;
459
+ items: IndexItem[];
460
+ }
package/node.js CHANGED
@@ -1,16 +1,16 @@
1
- import { C as S, B as _, u as l, v as E, w as m, x as P, p as d, y as w, a as U } from "./cue-VOCN5IEZ.js";
2
- import { b as y, c as I, d as K, e as L, f as N, g as O, h as v, i as H, j as D, k as G, l as W, m as k, n as q, o as Q, q as V, R as z, r as F, s as J, t as M } from "./cue-VOCN5IEZ.js";
1
+ import { C as S, B as _, v as l, w as E, x as m, y as P, q as d, z as w, a as U } from "./cue-C7sbHLj4.js";
2
+ import { b as j, c as y, d as K, e as L, f as N, g as O, h as v, i as H, j as D, k as G, l as W, m as k, n as q, o as z, p as Q, r as V, R as F, s as J, t as M, u as X } from "./cue-C7sbHLj4.js";
3
3
  import { getStorage as s, connectStorageEmulator as b } from "firebase/storage";
4
4
  import "firebase/firestore";
5
- class A extends S {
6
- constructor(t) {
7
- super(t);
5
+ class f extends S {
6
+ constructor(e) {
7
+ super(e);
8
8
  }
9
- _buildApi(t) {
10
- const r = s(this._app, _), i = s(this._app, l), n = this._storageRaw, u = s(this._app, E), c = this._storageProcessed, e = s(this._app, m);
9
+ _buildApi(e) {
10
+ const r = s(this._app, _), i = s(this._app, l), n = this._storageRaw, u = s(this._app, E), c = this._storageProcessed, t = s(this._app, m);
11
11
  if (this._isEmulator) {
12
12
  const g = this._endpoints.storageEmulatorHost, h = this._endpoints.storageEmulatorPort;
13
- b(e, g, h);
13
+ b(t, g, h);
14
14
  }
15
15
  const C = s(this._app, P), p = new w({
16
16
  storageChatSessions: r,
@@ -18,17 +18,17 @@ class A extends S {
18
18
  storageRaw: n,
19
19
  storagePersistence: u,
20
20
  storageProcessed: c,
21
- storagePublic: e,
21
+ storagePublic: t,
22
22
  storageSessions: C
23
23
  }), a = new d(
24
24
  this.auth,
25
- t,
25
+ e,
26
26
  p,
27
27
  this._endpoints.gatewayUrl
28
28
  ), o = new U(
29
29
  this.auth,
30
30
  this._endpoints.gatewayUrl,
31
- t,
31
+ e,
32
32
  a
33
33
  );
34
34
  return a._bindApi(o), o;
@@ -37,25 +37,26 @@ class A extends S {
37
37
  export {
38
38
  S as Cue,
39
39
  U as CueApi,
40
- y as CueAuth,
41
- I as CueCache,
40
+ j as CueAuth,
41
+ y as CueCache,
42
42
  K as CueContexts,
43
43
  L as CueExtraction,
44
44
  N as CueGis,
45
- A as CueNode,
46
- O as CuePrivileges,
47
- v as CueProfile,
48
- H as CueProjectDocuments,
49
- D as CueProjectEntities,
50
- G as CueProjectSchema,
51
- W as CueProjectView,
52
- k as CueProjects,
53
- q as CueSignal,
45
+ O as CueIndexApi,
46
+ f as CueNode,
47
+ v as CuePrivileges,
48
+ H as CueProfile,
49
+ D as CueProjectDocuments,
50
+ G as CueProjectEntities,
51
+ W as CueProjectSchema,
52
+ k as CueProjectView,
53
+ q as CueProjects,
54
+ z as CueSignal,
54
55
  Q as CueStorage,
55
56
  d as CueSyncApi,
56
57
  V as CueTables,
57
- z as REQUIRED_ROLES,
58
- F as configureScanWasm,
59
- J as cueComputed,
60
- M as staleWhileRevalidate
58
+ F as REQUIRED_ROLES,
59
+ J as configureScanWasm,
60
+ M as cueComputed,
61
+ X as staleWhileRevalidate
61
62
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qaecy/cue-sdk",
3
- "version": "0.0.31",
3
+ "version": "0.0.32",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
package/variables.d.ts CHANGED
@@ -30,6 +30,8 @@ export declare const ENDPOINT_ORG_MEMBERS: (orgId: string) => string;
30
30
  export declare const ENDPOINT_CREATE_PROJECT = "/commands/admin/project";
31
31
  export declare const ENDPOINT_DELETE_PROJECT: (projectId: string) => string;
32
32
  export declare const ENDPOINT_SEARCH = "/assistant/search";
33
+ export declare const ENDPOINT_INDEX_SEARCH = "/index/search";
34
+ export declare const ENDPOINT_INDEX_LOOKUP = "/index/lookup";
33
35
  export declare const ENDPOINT_FUSEKI_QUERY = "/triplestore/query";
34
36
  export declare const ENDPOINT_FUSEKI_UPDATE = "/triplestore/update";
35
37
  export declare const ENDPOINT_FUSEKI_SHACL = "/triplestore/shacl";