@qaecy/cue-sdk 0.0.27 → 0.0.29
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/README.md +97 -0
- package/{cue-CzxsQ6aP.js → cue-CnZyGMRG.js} +913 -841
- package/index.js +1 -1
- package/lib/documents.d.ts +50 -0
- package/lib/entities.d.ts +19 -0
- package/node.js +2 -2
- package/package.json +1 -1
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 c, f as o, g as r, h as l, i as n, j as P, k as j, l as m, m as S, n as g, o as h, p, R as E, q as R, r as f, s as d } from "./cue-
|
|
1
|
+
import { C as s, a as u, b as C, c as t, d as i, e as c, f as o, g as r, h as l, i as n, j as P, k as j, l as m, m as S, n as g, o as h, p, R as E, q as R, r as f, s as d } from "./cue-CnZyGMRG.js";
|
|
2
2
|
export {
|
|
3
3
|
s as Cue,
|
|
4
4
|
u as CueApi,
|
package/lib/documents.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CueApi } from './api';
|
|
2
2
|
import { ReadonlySignal } from './signal';
|
|
3
|
+
import { FileType } from 'js/models';
|
|
3
4
|
import { DocumentInfo, ProjectDocumentsData, QueryCache } from './models';
|
|
4
5
|
/**
|
|
5
6
|
* Manages document data for a single project.
|
|
@@ -122,6 +123,55 @@ export declare class CueProjectDocuments {
|
|
|
122
123
|
* Useful for pre-filling path-based query inputs with a realistic example.
|
|
123
124
|
*/
|
|
124
125
|
randomFilePath(): Promise<string | null>;
|
|
126
|
+
/**
|
|
127
|
+
* Fetches all `qcy:FileContent` documents whose file suffix matches one of
|
|
128
|
+
* the given extensions (e.g. `'.ifc'`, `'.pdf'`).
|
|
129
|
+
*
|
|
130
|
+
* By default returns only `{ iri, uuid }` — pass `includeMetadata: true` to
|
|
131
|
+
* also get `path`, `suffix`, and `size`. Use the default form when you intend
|
|
132
|
+
* to lazy-load full details via `requestDocumentData`.
|
|
133
|
+
*
|
|
134
|
+
* Suffixes are matched case-insensitively and the leading dot is optional
|
|
135
|
+
* (both `'ifc'` and `'.ifc'` are accepted).
|
|
136
|
+
*/
|
|
137
|
+
documentsBySuffix(suffixes: string[], includeMetadata?: false): Promise<string[]>;
|
|
138
|
+
documentsBySuffix(suffixes: string[], includeMetadata: true): Promise<Array<{
|
|
139
|
+
iri: string;
|
|
140
|
+
uuid: string;
|
|
141
|
+
path: string;
|
|
142
|
+
suffix: string;
|
|
143
|
+
size: number;
|
|
144
|
+
}>>;
|
|
145
|
+
/**
|
|
146
|
+
* Fetches documents whose file suffix maps to one of the given `FileType`
|
|
147
|
+
* values (e.g. `FileType.BIM`, `FileType.CAD`).
|
|
148
|
+
*
|
|
149
|
+
* Resolves matching suffixes from `fileExtensionsInfo` and delegates to
|
|
150
|
+
* `documentsBySuffix`. Accepts the same `includeMetadata` flag.
|
|
151
|
+
*/
|
|
152
|
+
documentsByFileType(fileTypes: FileType[], includeMetadata?: false): Promise<string[]>;
|
|
153
|
+
documentsByFileType(fileTypes: FileType[], includeMetadata: true): Promise<Array<{
|
|
154
|
+
iri: string;
|
|
155
|
+
uuid: string;
|
|
156
|
+
path: string;
|
|
157
|
+
suffix: string;
|
|
158
|
+
size: number;
|
|
159
|
+
}>>;
|
|
160
|
+
/**
|
|
161
|
+
* Fetches documents whose MIME type matches one of the given strings
|
|
162
|
+
* (e.g. `'application/x-step'`, `'application/pdf'`).
|
|
163
|
+
*
|
|
164
|
+
* Resolves matching suffixes from `fileExtensionsInfo` and delegates to
|
|
165
|
+
* `documentsBySuffix`. Accepts the same `includeMetadata` flag.
|
|
166
|
+
*/
|
|
167
|
+
documentsByMime(mimeTypes: string[], includeMetadata?: false): Promise<string[]>;
|
|
168
|
+
documentsByMime(mimeTypes: string[], includeMetadata: true): Promise<Array<{
|
|
169
|
+
iri: string;
|
|
170
|
+
uuid: string;
|
|
171
|
+
path: string;
|
|
172
|
+
suffix: string;
|
|
173
|
+
size: number;
|
|
174
|
+
}>>;
|
|
125
175
|
/** Executes the document-info SPARQL query for the given UUIDs, merges results
|
|
126
176
|
* into `documentInfoMap`, and returns the newly fetched entries. */
|
|
127
177
|
private _fetchDocumentInfoBatch;
|
package/lib/entities.d.ts
CHANGED
|
@@ -106,6 +106,25 @@ export declare class CueProjectEntities {
|
|
|
106
106
|
iri: string;
|
|
107
107
|
label: string;
|
|
108
108
|
}[]>;
|
|
109
|
+
/**
|
|
110
|
+
* Fetches all `qcy:CanonicalEntity` instances that belong to at least one of
|
|
111
|
+
* the given category IRIs.
|
|
112
|
+
*
|
|
113
|
+
* Accepts both full HTTP IRIs and prefixed forms, e.g.:
|
|
114
|
+
* - `"qcy:Building"`
|
|
115
|
+
* - `"https://cue.qaecy.com/ontology#Building"`
|
|
116
|
+
*
|
|
117
|
+
* By default returns only UUIDs (`string[]`) — pass `includeMetadata: true` to
|
|
118
|
+
* also get `iri`, `value`, and `categories` (all categories, not just the filtered ones).
|
|
119
|
+
* Use the default form when you intend to lazy-load details via `requestEntityData`.
|
|
120
|
+
*/
|
|
121
|
+
entitiesByCategory(categoryIris: string[], includeMetadata?: false): Promise<string[]>;
|
|
122
|
+
entitiesByCategory(categoryIris: string[], includeMetadata: true): Promise<Array<{
|
|
123
|
+
iri: string;
|
|
124
|
+
uuid: string;
|
|
125
|
+
value: string;
|
|
126
|
+
categories: string[];
|
|
127
|
+
}>>;
|
|
109
128
|
/**
|
|
110
129
|
* Fetches a summary graph of entity category relationships for the project.
|
|
111
130
|
*
|
package/node.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as h, B as l, t as _, u as E, v as S, o as m, w as P, a as d } from "./cue-
|
|
2
|
-
import { b as j, c as x, d as y, e as I, f as K, g as L, h as v, i as H, j as N, k as O, l as D, m as G, n as W, p as k, R as q, q as Q, r as V, s as z } from "./cue-
|
|
1
|
+
import { C as h, B as l, t as _, u as E, v as S, o as m, w as P, a as d } from "./cue-CnZyGMRG.js";
|
|
2
|
+
import { b as j, c as x, d as y, e as I, f as K, g as L, h as v, i as H, j as N, k as O, l as D, m as G, n as W, p as k, R as q, q as Q, r as V, s as z } from "./cue-CnZyGMRG.js";
|
|
3
3
|
import { getStorage as t, connectStorageEmulator as w } from "firebase/storage";
|
|
4
4
|
import "firebase/firestore";
|
|
5
5
|
class A extends h {
|