@qaecy/cue-sdk 0.0.27 → 0.0.28

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.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-CzxsQ6aP.js";
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-BR7V1Nem.js";
2
2
  export {
3
3
  s as Cue,
4
4
  u as CueApi,
@@ -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,64 @@ 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<Array<{
138
+ iri: string;
139
+ uuid: string;
140
+ }>>;
141
+ documentsBySuffix(suffixes: string[], includeMetadata: true): Promise<Array<{
142
+ iri: string;
143
+ uuid: string;
144
+ path: string;
145
+ suffix: string;
146
+ size: number;
147
+ }>>;
148
+ /**
149
+ * Fetches documents whose file suffix maps to one of the given `FileType`
150
+ * values (e.g. `FileType.BIM`, `FileType.CAD`).
151
+ *
152
+ * Resolves matching suffixes from `fileExtensionsInfo` and delegates to
153
+ * `documentsBySuffix`. Accepts the same `includeMetadata` flag.
154
+ */
155
+ documentsByFileType(fileTypes: FileType[], includeMetadata?: false): Promise<Array<{
156
+ iri: string;
157
+ uuid: string;
158
+ }>>;
159
+ documentsByFileType(fileTypes: FileType[], includeMetadata: true): Promise<Array<{
160
+ iri: string;
161
+ uuid: string;
162
+ path: string;
163
+ suffix: string;
164
+ size: number;
165
+ }>>;
166
+ /**
167
+ * Fetches documents whose MIME type matches one of the given strings
168
+ * (e.g. `'application/x-step'`, `'application/pdf'`).
169
+ *
170
+ * Resolves matching suffixes from `fileExtensionsInfo` and delegates to
171
+ * `documentsBySuffix`. Accepts the same `includeMetadata` flag.
172
+ */
173
+ documentsByMime(mimeTypes: string[], includeMetadata?: false): Promise<Array<{
174
+ iri: string;
175
+ uuid: string;
176
+ }>>;
177
+ documentsByMime(mimeTypes: string[], includeMetadata: true): Promise<Array<{
178
+ iri: string;
179
+ uuid: string;
180
+ path: string;
181
+ suffix: string;
182
+ size: number;
183
+ }>>;
125
184
  /** Executes the document-info SPARQL query for the given UUIDs, merges results
126
185
  * into `documentInfoMap`, and returns the newly fetched entries. */
127
186
  private _fetchDocumentInfoBatch;
package/lib/entities.d.ts CHANGED
@@ -106,6 +106,28 @@ 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 `{ iri, uuid }` — pass `includeMetadata: true` to
118
+ * also get `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<Array<{
122
+ iri: string;
123
+ uuid: string;
124
+ }>>;
125
+ entitiesByCategory(categoryIris: string[], includeMetadata: true): Promise<Array<{
126
+ iri: string;
127
+ uuid: string;
128
+ value: string;
129
+ categories: string[];
130
+ }>>;
109
131
  /**
110
132
  * Fetches a summary graph of entity category relationships for the project.
111
133
  *
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-CzxsQ6aP.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-CzxsQ6aP.js";
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-BR7V1Nem.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-BR7V1Nem.js";
3
3
  import { getStorage as t, connectStorageEmulator as w } from "firebase/storage";
4
4
  import "firebase/firestore";
5
5
  class A extends h {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qaecy/cue-sdk",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",