@qaecy/cue-sdk 0.0.28 → 0.0.30

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 CHANGED
@@ -238,16 +238,15 @@ Entity data for a project is accessed via a `CueProjectView`. Create a view with
238
238
 
239
239
  Fetch all canonical entities that belong to at least one of the given category IRIs. Accepts both full HTTP IRIs and prefixed forms.
240
240
 
241
- By default returns only `{ iri, uuid }` — suitable for feeding directly into `requestEntityData()` for lazy detail loading. Pass `true` to also receive `value` and `categories`.
241
+ By default returns `{ iri, uuid }[]` — the IRI is built locally from the project base URL so no extra data is fetched from the endpoint. Pass `true` to also receive `value` and `categories`.
242
242
 
243
243
  ```typescript
244
- // Lean — just IRIs + UUIDs (default)
244
+ // Lean — iri + uuid, no extra SPARQL traffic (default)
245
245
  const entities = await view.entities.entitiesByCategory([
246
246
  'qcy:Building',
247
247
  'qcy:BuildingStorey',
248
248
  ]);
249
- const uuids = entities.map((e) => e.uuid);
250
- view.entities.requestEntityData(uuids); // lazy-loads labels + categories
249
+ view.entities.requestEntityData(entities.map((e) => e.uuid));
251
250
 
252
251
  // With metadata
253
252
  const entities = await view.entities.entitiesByCategory(
@@ -303,10 +302,10 @@ Document data for a project is accessed via `view.documents` (`CueProjectDocumen
303
302
 
304
303
  Fetch all documents whose file extension matches one of the given suffixes. The leading dot is optional — both `'ifc'` and `'.ifc'` are accepted.
305
304
 
306
- By default returns only `{ iri, uuid }` for pairing with `requestDocumentData()`. Pass `true` to also receive `path`, `suffix`, and `size`.
305
+ By default returns `{ iri, uuid }[]` the IRI is built locally from the project base URL, no extra data fetched. Pass `true` to also receive `path`, `suffix`, and `size`.
307
306
 
308
307
  ```typescript
309
- // Lean — just IRIs + UUIDs (default)
308
+ // Lean — iri + uuid, no extra SPARQL traffic (default)
310
309
  const docs = await view.documents.documentsBySuffix(['.ifc', '.rvt']);
311
310
  view.documents.requestDocumentData(docs.map((d) => d.uuid));
312
311
 
@@ -322,7 +321,7 @@ Fetch documents by semantic `FileType` category. Resolves all matching suffixes
322
321
  ```typescript
323
322
  import { FileType } from 'js/models';
324
323
 
325
- // All BIM and CAD files
324
+ // All BIM and CAD files — iri + uuid
326
325
  const docs = await view.documents.documentsByFileType([
327
326
  FileType.BIM,
328
327
  FileType.CAD,
@@ -337,6 +336,7 @@ const docs = await view.documents.documentsByFileType([FileType.IMAGE], true);
337
336
  Fetch documents whose MIME type matches one of the given strings:
338
337
 
339
338
  ```typescript
339
+ // Just iri + uuid
340
340
  const docs = await view.documents.documentsByMime([
341
341
  'application/x-step', // .ifc
342
342
  'application/pdf',
@@ -349,13 +349,11 @@ const docs = await view.documents.documentsByMime(
349
349
  );
350
350
  ```
351
351
 
352
- | Method | Filters by | Extra metadata (`true`) |
353
- |---|---|---|
354
- | `documentsBySuffix` | File extension string(s) | `path`, `suffix`, `size` |
355
- | `documentsByFileType` | `FileType` enum value(s) | `path`, `suffix`, `size` |
356
- | `documentsByMime` | MIME type string(s) | `path`, `suffix`, `size` |
357
-
358
- All three exclude alternative representations (e.g. derived `.fragments` tiles) from results.
352
+ | Method | Filters by | Default return | With `true` |
353
+ |---|---|---|---|
354
+ | `documentsBySuffix` | File extension string(s) | `{ iri, uuid }[]` | adds `path`, `suffix`, `size` |
355
+ | `documentsByFileType` | `FileType` enum value(s) | `{ iri, uuid }[]` | adds `path`, `suffix`, `size` |
356
+ | `documentsByMime` | MIME type string(s) | `{ iri, uuid }[]` | adds `path`, `suffix`, `size` |
359
357
 
360
358
  ## Node.js — file sync
361
359