@qaecy/cue-sdk 0.0.53 → 0.0.54
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/browser.js +7840 -7577
- package/{document-filter-CBrY09DH.js → document-filter-BSiwWQ5L.js} +1184 -891
- package/index.js +1 -1
- package/lib/blob-storage.d.ts +12 -0
- package/lib/cache.d.ts +3 -3
- package/lib/cue.d.ts +5 -3
- package/lib/models.d.ts +21 -5
- package/lib/semantic-template.d.ts +7 -1
- package/node.js +2 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as C, C as u, a as i, b as r, c as o, d as t, e as S, f as n, g as c, h as E, i as m, j as p, k as A, l, m as P, n as R, o as _, p as I, q as d, r as g, s as T, t as D, u as O, v as N, w as U, x as G, y as h, z as f, A as j, D as v, E as x, F as M, G as y, H as B, I as F, J as L, K as H, L as b, M as K, N as q, O as w, P as Q, Q as V, R as W, S as X, T as Y, U as k, V as z, W as J, X as Z, Y as $, Z as ee, _ as ae, $ as se, a0 as Ce, a1 as ue, a2 as ie, a3 as re } from "./document-filter-
|
|
1
|
+
import { B as C, C as u, a as i, b as r, c as o, d as t, e as S, f as n, g as c, h as E, i as m, j as p, k as A, l, m as P, n as R, o as _, p as I, q as d, r as g, s as T, t as D, u as O, v as N, w as U, x as G, y as h, z as f, A as j, D as v, E as x, F as M, G as y, H as B, I as F, J as L, K as H, L as b, M as K, N as q, O as w, P as Q, Q as V, R as W, S as X, T as Y, U as k, V as z, W as J, X as Z, Y as $, Z as ee, _ as ae, $ as se, a0 as Ce, a1 as ue, a2 as ie, a3 as re } from "./document-filter-BSiwWQ5L.js";
|
|
2
2
|
import "uuid";
|
|
3
3
|
export {
|
|
4
4
|
C as BASE_CURRENCY,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FirebaseApp } from 'firebase/app';
|
|
2
|
+
import { CueBlobStorage } from '../../databases/src/index';
|
|
3
|
+
import { CueAuth } from './auth';
|
|
4
|
+
import { CueEndpoints, CueStorageConfig } from './models';
|
|
5
|
+
/**
|
|
6
|
+
* The SDK's one blob store, shared by `new Cue()` and `Cue.fromApp()`.
|
|
7
|
+
*
|
|
8
|
+
* A bucket on the `firebase` driver gets a `FirebaseStorage` for its bucket
|
|
9
|
+
* name; a bucket on the `gateway` driver gets none, so a deployment with no
|
|
10
|
+
* Firebase Storage at all never touches it.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createBlobStorage(app: FirebaseApp, auth: CueAuth, endpoints: CueEndpoints, config?: CueStorageConfig, connectEmulator?: boolean): CueBlobStorage;
|
package/lib/cache.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CueBlobStorage } from '../../databases/src/index';
|
|
2
2
|
/** Shape stored by the query cache. */
|
|
3
3
|
export interface QueryCacheEntry {
|
|
4
4
|
query: string;
|
|
@@ -13,8 +13,8 @@ export interface QueryCacheEntry {
|
|
|
13
13
|
* - User-project data: `portal/projects/{pid}/users/{uid}/{id}.json.gz`
|
|
14
14
|
*/
|
|
15
15
|
export declare class CueCache {
|
|
16
|
-
private readonly
|
|
17
|
-
constructor(
|
|
16
|
+
private readonly _blob;
|
|
17
|
+
constructor(_blob: CueBlobStorage);
|
|
18
18
|
getQueryCache(projectId: string, id: string): Promise<QueryCacheEntry | undefined>;
|
|
19
19
|
setQueryCache(projectId: string, id: string, payload: QueryCacheEntry): Promise<void>;
|
|
20
20
|
getAgentSessionCache(projectId: string, id: string): Promise<object | undefined>;
|
package/lib/cue.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FirebaseApp } from 'firebase/app';
|
|
2
|
-
import { FirebaseStorage } from 'firebase/storage';
|
|
3
2
|
import { CueBlobStorage } from '../../databases/src/index';
|
|
4
3
|
import { CueAuth } from './auth';
|
|
5
4
|
import { CueSignUp } from './signup';
|
|
@@ -42,8 +41,11 @@ export declare class Cue {
|
|
|
42
41
|
protected readonly _app: FirebaseApp;
|
|
43
42
|
protected readonly _endpoints: CueEndpoints;
|
|
44
43
|
protected readonly _isEmulator: boolean;
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Object storage, per bucket on Firebase Storage or the gateway (see
|
|
46
|
+
* `CueSdkConfig.storage`). What sync, data sources and the cache use.
|
|
47
|
+
*/
|
|
48
|
+
readonly blob: CueBlobStorage;
|
|
47
49
|
private _gis;
|
|
48
50
|
private readonly _projectDocuments;
|
|
49
51
|
private readonly _verbose;
|
package/lib/models.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SupportedCurrency } from './currency';
|
|
2
2
|
import { ComparisonResult } from '../../sync-tools/src/index';
|
|
3
|
+
import { BlobBucket, BlobDriverKind } from '../../databases/src/index';
|
|
3
4
|
export type CueEnvironment = 'production' | 'emulator';
|
|
4
5
|
export interface CueEndpoints {
|
|
5
6
|
/** API gateway base URL */
|
|
@@ -26,6 +27,18 @@ export interface CueSdkConfig {
|
|
|
26
27
|
endpoints?: Partial<CueEndpoints>;
|
|
27
28
|
/** Enable verbose debug logging for all entity/document store operations. */
|
|
28
29
|
verbose?: boolean;
|
|
30
|
+
/** How the SDK reaches object storage. Defaults to Firebase Storage for every bucket. */
|
|
31
|
+
storage?: CueStorageConfig;
|
|
32
|
+
}
|
|
33
|
+
export interface CueStorageConfig {
|
|
34
|
+
/**
|
|
35
|
+
* Per-bucket driver. `firebase` (the default) uses Firebase Storage and its
|
|
36
|
+
* security rules; `gateway` uses the gateway's `/commands/storage` endpoints,
|
|
37
|
+
* which work on any backend the deployment runs (GCS, MinIO, S3).
|
|
38
|
+
*/
|
|
39
|
+
drivers?: Partial<Record<BlobBucket, BlobDriverKind>>;
|
|
40
|
+
/** Firebase Storage bucket names, for buckets on the `firebase` driver. */
|
|
41
|
+
buckets?: Partial<Record<BlobBucket, string>>;
|
|
29
42
|
}
|
|
30
43
|
export type SsoProvider = 'google' | 'microsoft';
|
|
31
44
|
export interface PasswordCredentials {
|
|
@@ -748,15 +761,16 @@ export type ProcessingStage = 'idle' | 'processing' | 'writing' | 'loading' | 'e
|
|
|
748
761
|
*
|
|
749
762
|
* - `uploaded` — in storage, no processor output yet
|
|
750
763
|
* - `processing` — a processor has emitted artifacts (markdown, images, fragments)
|
|
751
|
-
* - `extracting` — RDF exists
|
|
752
|
-
* - `
|
|
764
|
+
* - `extracting` — RDF exists; processing or extraction is still outstanding
|
|
765
|
+
* - `ready` — done up to and including extraction; waiting to be bundled
|
|
766
|
+
* - `stored` — ready, and every `.ttl` produced so far is bundled
|
|
753
767
|
* - `failed` — processing errored
|
|
754
768
|
*
|
|
755
769
|
* `stored` is not strictly final: an enricher producing further RDF later moves
|
|
756
|
-
* the document back to `
|
|
757
|
-
* rather than a bug.
|
|
770
|
+
* the document back to `ready` until that RDF is bundled too, which is a
|
|
771
|
+
* faithful description of reality rather than a bug.
|
|
758
772
|
*/
|
|
759
|
-
export type DocumentProcessingStage = 'uploaded' | 'processing' | 'extracting' | 'stored' | 'failed';
|
|
773
|
+
export type DocumentProcessingStage = 'uploaded' | 'processing' | 'extracting' | 'ready' | 'stored' | 'failed';
|
|
760
774
|
/** Per-document pipeline progress for one uploaded file. */
|
|
761
775
|
export interface DocumentProgress {
|
|
762
776
|
documentUUID: string;
|
|
@@ -776,6 +790,8 @@ export interface DocumentProgress {
|
|
|
776
790
|
contributors: string[];
|
|
777
791
|
rdfCount: number;
|
|
778
792
|
rdfStoredCount: number;
|
|
793
|
+
/** What was missing when the document went ready, e.g. `extraction failed: 2`. */
|
|
794
|
+
gaps?: string[];
|
|
779
795
|
error?: string;
|
|
780
796
|
}
|
|
781
797
|
/** Counts-only per-project rollup, streamed by {@link CueProcessingApi.watchMyStatus}. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EntityCategory, ProjectSchema } from '../../models/src/index';
|
|
1
|
+
import { ContentCategory, EntityCategory, ProjectSchema } from '../../models/src/index';
|
|
2
2
|
import { CueAuth } from './auth';
|
|
3
3
|
export interface MutationResult {
|
|
4
4
|
message: string;
|
|
@@ -114,6 +114,12 @@ export declare class CueSemanticTemplate {
|
|
|
114
114
|
* starting point — the same list for every caller, nothing project-specific about it.
|
|
115
115
|
*/
|
|
116
116
|
getDefaultEntities(projectId: string): Promise<EntityCategory[]>;
|
|
117
|
+
/**
|
|
118
|
+
* The QAECY catalogues' content categories — the document types a term can be limited to —
|
|
119
|
+
* with pinned IRIs stripped, so each is referenced by its bare `key`. The same list for every
|
|
120
|
+
* caller.
|
|
121
|
+
*/
|
|
122
|
+
getDefaultContentCategories(projectId: string): Promise<ContentCategory[]>;
|
|
117
123
|
/** Re-pushes the project's currently stored template into its `databases-cue` schema graph, without mutating it. */
|
|
118
124
|
reloadSchema(projectId: string): Promise<MutationResult>;
|
|
119
125
|
private _get;
|
package/node.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as s } from "./document-filter-
|
|
2
|
-
import { B as t, C as c, a as n, b as S, d as E, e as m, f as p, g as l, h as A, i as P, j as R, k as d, l as _, m as I, n as g, o as T, p as D, q as N, r as O, s as U, t as G, u as h, v as x, w as f, x as j, y as v, z as M, A as y, D as B, E as F, F as L, G as H, H as b, I as K, J as q, K as w, L as Q, M as V, N as W, O as X, P as Y, Q as k, R as z, S as J, T as Z, U as $, V as ee, W as se, X as ae, Y as ue, Z as Ce, _ as re, $ as ie, a0 as oe, a1 as te, a2 as ce, a3 as ne } from "./document-filter-
|
|
1
|
+
import { c as s } from "./document-filter-BSiwWQ5L.js";
|
|
2
|
+
import { B as t, C as c, a as n, b as S, d as E, e as m, f as p, g as l, h as A, i as P, j as R, k as d, l as _, m as I, n as g, o as T, p as D, q as N, r as O, s as U, t as G, u as h, v as x, w as f, x as j, y as v, z as M, A as y, D as B, E as F, F as L, G as H, H as b, I as K, J as q, K as w, L as Q, M as V, N as W, O as X, P as Y, Q as k, R as z, S as J, T as Z, U as $, V as ee, W as se, X as ae, Y as ue, Z as Ce, _ as re, $ as ie, a0 as oe, a1 as te, a2 as ce, a3 as ne } from "./document-filter-BSiwWQ5L.js";
|
|
3
3
|
import "uuid";
|
|
4
4
|
class r extends s {
|
|
5
5
|
constructor(e) {
|