@kortexya/reasoninglayer 6.1.0 → 7.0.0

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/dist/index.cjs CHANGED
@@ -7,7 +7,7 @@ var __export = (target, all) => {
7
7
  };
8
8
 
9
9
  // src/config.ts
10
- var SDK_VERSION = "6.1.0";
10
+ var SDK_VERSION = "7.0.0";
11
11
  function resolveConfig(config) {
12
12
  if (!config.baseUrl) {
13
13
  throw new Error("ClientConfig.baseUrl is required");
@@ -1044,6 +1044,7 @@ var REQUEST_BUDGET_HEADER = "X-RL-Request-Budget";
1044
1044
  function toRequestParams(options, budgetOverrides) {
1045
1045
  if (options === void 0 && budgetOverrides === void 0) return {};
1046
1046
  const headers = {};
1047
+ if (options?.cacheControl !== void 0) headers["Cache-Control"] = options.cacheControl;
1047
1048
  if (options?.userId !== void 0) headers["X-User-Id"] = options.userId;
1048
1049
  if (options?.namespaceId !== void 0) headers["X-Namespace-Id"] = options.namespaceId;
1049
1050
  if (options?.causal !== void 0) Object.assign(headers, causalRequestHeaders(options.causal));
@@ -1501,6 +1502,22 @@ var Sorts = class {
1501
1502
  format: "json",
1502
1503
  ...params
1503
1504
  });
1505
+ /**
1506
+ * @description ⭐ `POST /api/v1/sorts/subsumption/get` answers one pair per request, and `/sorts/compare/batch` does not close the gap: it carries an operator and a `bool`, a crisp verdict, never a degree (`docs/OPEN_DEFECTS.md` #100). ⛔ A batch is N singles and nothing else, which is why a pair naming a sort outside the caller's view refuses the WHOLE request with 404, exactly as the single route would for that pair. One HTTP response cannot carry N statuses, and answering `0.0` where the single route answers 404 would make this a different question. A caller must therefore not mix views in one batch.
1507
+ *
1508
+ * @tags sorts
1509
+ * @name BatchGetSubsumptions
1510
+ * @summary Read many `⊑·` degrees in one request, aligned with the pairs asked.
1511
+ * @request POST:/api/v1/sorts/subsumption/get/batch
1512
+ */
1513
+ batchGetSubsumptions = (data, params = {}) => this.http.request({
1514
+ path: `/api/v1/sorts/subsumption/get/batch`,
1515
+ method: "POST",
1516
+ body: data,
1517
+ type: "application/json",
1518
+ format: "json",
1519
+ ...params
1520
+ });
1504
1521
  /**
1505
1522
  * @description POST /api/v1/sorts/bulk Creates multiple sorts in a single request, automatically resolving parent references by name. Sorts are topologically sorted to ensure parents are created before children. This is much faster than individual requests for large hierarchies. # Authorization Requires X-Tenant-Id header. The tenant_id field in the request body is ignored.
1506
1523
  *
@@ -1535,6 +1552,22 @@ var Sorts = class {
1535
1552
  format: "json",
1536
1553
  ...params
1537
1554
  });
1555
+ /**
1556
+ * @description ⭐ `POST /api/v1/sorts/subsumption` writes one pair per request. Measured on a 13 199-pair graded campaign: 52 796 requests, and a 500-pair slice spent 1 200 s without finishing its sort creations (`docs/OPEN_DEFECTS.md` #100). ⛔ **Per-entry outcomes, unlike `bulk_set_similarities`** — but the two kinds of refusal differ, and conflating them would be a false promise: * a **visibility** refusal is attributed to its entry and the rest of the declaration proceeds, because that rule is this handler's and is checked per entry; * a **relation-law** refusal (a degree out of range, a disjoint facet, a max–min transitivity or antisymmetry violation) rolls the WHOLE declaration back and marks every admitted entry with one shared reason, because the kernel validates the relation once and names the violation without naming the edge. `set_count` is then 0 and nothing was written. Either way every requested entry answers for itself in the order asked, so a caller never has to re-read the batch pair by pair to learn what the engine holds — which is what `AGENTS.md` means by keeping failed evidence distinct from absent evidence. ⚠️ The discipline of the similarity route is kept exactly: both endpoints of every entry must be writable by the caller, the whole accepted batch is validated on a staging fork **before** recovery is armed or any durable prefix is written, and every written edge is mirrored into the tenant lattice every graded route reads (#113) — a bulk write that skipped the mirror would be a quieter version of that same defect.
1557
+ *
1558
+ * @tags sorts
1559
+ * @name BulkSetSubsumptions
1560
+ * @summary Declare many `⊑·` degrees in one request, answering for EVERY entry.
1561
+ * @request POST:/api/v1/sorts/subsumption/bulk
1562
+ */
1563
+ bulkSetSubsumptions = (data, params = {}) => this.http.request({
1564
+ path: `/api/v1/sorts/subsumption/bulk`,
1565
+ method: "POST",
1566
+ body: data,
1567
+ type: "application/json",
1568
+ format: "json",
1569
+ ...params
1570
+ });
1538
1571
  /**
1539
1572
  * @description A unique declared minimal common supersort is answered as is. Otherwise the engine declares the synthetic join `⊔(…)` over the minimal upper bounds and places it above both operands.
1540
1573
  *
@@ -1599,6 +1632,22 @@ var Sorts = class {
1599
1632
  format: "json",
1600
1633
  ...params
1601
1634
  });
1635
+ /**
1636
+ * @description ⭐ One request where the pairwise route needs one per candidate: the graded relation carries a reverse adjacency, so this costs the in-degree of the concept rather than a scan of every pair. ⚠️ **Declared `⊑·` edges only** — the crisp order is not composed in, so this is not `/api/v1/sorts/subsumption/get` lifted to a set. `alpha` is a declared query parameter; the kernel refuses it outside `[0, 1]` and that refusal surfaces as `400`. ⛔ Every member is filtered against the caller's view before it is returned. The in-memory adapter already fails closed; the hot-lattice adapter cannot (absence there is not evidence of another tenant's ownership), so the filter here is what makes the route safe on both.
1637
+ *
1638
+ * @tags sorts
1639
+ * @name DeclaredAlphaCutBelow
1640
+ * @summary The α-cut of the declared graded cone below a concept, strongest first.
1641
+ * @request POST:/api/v1/sorts/subsumption/alpha-cut
1642
+ */
1643
+ declaredAlphaCutBelow = (data, params = {}) => this.http.request({
1644
+ path: `/api/v1/sorts/subsumption/alpha-cut`,
1645
+ method: "POST",
1646
+ body: data,
1647
+ type: "application/json",
1648
+ format: "json",
1649
+ ...params
1650
+ });
1602
1651
  /**
1603
1652
  * @description Computes the bit-vector intersection (GLB) and decodes it into a human-readable type disjunction. This is Life1.0's decode() function. A read (#522): a pair with no declared common subsort decodes to ⊥. # Returns - `sort_ids`: List of sort IDs in the disjunction - `sort_names`: List of sort names in the disjunction - `formatted`: Human-readable format (e.g., "int | real") - `is_bottom`: True if the GLB is empty (incompatible sorts)
1604
1653
  *
@@ -1669,11 +1718,11 @@ var Sorts = class {
1669
1718
  ...params
1670
1719
  });
1671
1720
  /**
1672
- * @description Formal Concept Analysis over sort × feature declaration, each declaration taken whole (name, range or type, constraint, requiredness, bound): every set of at least `min_sorts` sorts sharing at least two identical declarations is a candidate mixin. Deterministic; never writes. Accepting a proposal is creating the mixin (as a `proposed` sort) and re-parenting the members — the caller's decision: `POST /api/v1/scenarios/materialize` with the mixin and each member naming it as a parent does both, the moves going through the governed door of `POST /api/v1/sorts/{id}/parents`. A declaration a sort restates identically to an ancestor's is factored already and is never proposed again.
1721
+ * @description Never writes. Search exhaustion concerns the stated tenant/policy cohort; presentation can truncate independently. Accepting a candidate still requires the existing governed declaration and reparenting operations. Neither this report nor its digest is an admission seal.
1673
1722
  *
1674
1723
  * @tags sorts
1675
1724
  * @name FactorSortShapes
1676
- * @summary Propose mixin parents for shapes several sorts repeat unchanged
1725
+ * @summary Propose mixin parents using checked native FCA over whole declarations.
1677
1726
  * @request POST:/api/v1/sorts/discovery/factor
1678
1727
  * @secure
1679
1728
  */
@@ -8511,6 +8560,24 @@ var Constraints = class {
8511
8560
  format: "json",
8512
8561
  ...params
8513
8562
  });
8563
+ /**
8564
+ * @description Unlike `POST /api/v1/constraints/solve`, which propagates and suspends, this route **searches**: it branches over the declared domains with propagation at every node, so a satisfiable problem yields assignments rather than a list of suspended constraints. An unsatisfiable problem answers `200` with `satisfiable: false` and no solutions; that is an answer, not a bad request.
8565
+ *
8566
+ * @tags constraints
8567
+ * @name SolveCsp
8568
+ * @summary Label a finite-domain constraint problem, returning complete assignments.
8569
+ * @request POST:/api/v1/csp/solve
8570
+ * @secure
8571
+ */
8572
+ solveCsp = (data, params = {}) => this.http.request({
8573
+ path: `/api/v1/csp/solve`,
8574
+ method: "POST",
8575
+ body: data,
8576
+ secure: true,
8577
+ type: "application/json",
8578
+ format: "json",
8579
+ ...params
8580
+ });
8514
8581
  };
8515
8582
 
8516
8583
  // src/api-spec/generated/Reasoning.ts
@@ -9408,6 +9475,21 @@ var Namespaces = class {
9408
9475
  format: "json",
9409
9476
  ...params
9410
9477
  });
9478
+ /**
9479
+ * No description
9480
+ *
9481
+ * @tags namespaces
9482
+ * @name GetNamespaceAnswerCachePolicy
9483
+ * @request GET:/api/v1/namespaces/{id}/answer-cache-policy
9484
+ * @secure
9485
+ */
9486
+ getNamespaceAnswerCachePolicy = (id, params = {}) => this.http.request({
9487
+ path: `/api/v1/namespaces/${id}/answer-cache-policy`,
9488
+ method: "GET",
9489
+ secure: true,
9490
+ format: "json",
9491
+ ...params
9492
+ });
9411
9493
  /**
9412
9494
  * No description
9413
9495
  *
@@ -9456,6 +9538,23 @@ var Namespaces = class {
9456
9538
  format: "json",
9457
9539
  ...params
9458
9540
  });
9541
+ /**
9542
+ * No description
9543
+ *
9544
+ * @tags namespaces
9545
+ * @name UpdateNamespaceAnswerCachePolicy
9546
+ * @request PUT:/api/v1/namespaces/{id}/answer-cache-policy
9547
+ * @secure
9548
+ */
9549
+ updateNamespaceAnswerCachePolicy = (id, data, params = {}) => this.http.request({
9550
+ path: `/api/v1/namespaces/${id}/answer-cache-policy`,
9551
+ method: "PUT",
9552
+ body: data,
9553
+ secure: true,
9554
+ type: "application/json",
9555
+ format: "json",
9556
+ ...params
9557
+ });
9459
9558
  /**
9460
9559
  * No description
9461
9560
  *
@@ -9783,6 +9882,22 @@ var Analysis = class {
9783
9882
  format: "json",
9784
9883
  ...params
9785
9884
  });
9885
+ /**
9886
+ * @description Computes the concepts of the population's schema-presence context under the declared bounds and, when asked, its observed implication basis; the export carries the incidence, the bounds and each result's completeness so an importer can replay all of it.
9887
+ *
9888
+ * @tags analysis
9889
+ * @name ExportFca
9890
+ * @summary Export the FCA of an explicit population.
9891
+ * @request POST:/api/v1/analysis/fca-exports
9892
+ */
9893
+ exportFca = (data, params = {}) => this.http.request({
9894
+ path: `/api/v1/analysis/fca-exports`,
9895
+ method: "POST",
9896
+ body: data,
9897
+ type: "application/json",
9898
+ format: "json",
9899
+ ...params
9900
+ });
9786
9901
  /**
9787
9902
  * No description
9788
9903
  *
@@ -10017,6 +10132,21 @@ var Analysis = class {
10017
10132
  format: "json",
10018
10133
  ...params
10019
10134
  });
10135
+ /**
10136
+ * @description The first line names the objects (source term identities) and attributes (feature names); each concept line gives its extent and intent as indices into them; the last line gives the counters, whether the stream is complete and, when it stopped early, the continuation that resumes it.
10137
+ *
10138
+ * @tags analysis
10139
+ * @name StreamFcaConcepts
10140
+ * @summary Stream the formal concepts of a visible scope as NDJSON.
10141
+ * @request POST:/api/v1/analysis/fca-concepts/stream
10142
+ */
10143
+ streamFcaConcepts = (data, params = {}) => this.http.request({
10144
+ path: `/api/v1/analysis/fca-concepts/stream`,
10145
+ method: "POST",
10146
+ body: data,
10147
+ type: "application/json",
10148
+ ...params
10149
+ });
10020
10150
  /**
10021
10151
  * No description
10022
10152
  *
@@ -10032,6 +10162,22 @@ var Analysis = class {
10032
10162
  format: "json",
10033
10163
  ...params
10034
10164
  });
10165
+ /**
10166
+ * @description Replays the export natively: decodes its context, recomputes a graded incidence from its degrees and cut, recomputes its concepts and basis under its declared bounds, and requires each claim, completeness included, to equal its recomputation; every object must name a source term of the caller's tenant. A refusal accepts nothing and names its reason.
10167
+ *
10168
+ * @tags analysis
10169
+ * @name VerifyFcaExport
10170
+ * @summary Verify an FCA export for import into the caller's tenant.
10171
+ * @request POST:/api/v1/analysis/fca-exports/verify
10172
+ */
10173
+ verifyFcaExport = (data, params = {}) => this.http.request({
10174
+ path: `/api/v1/analysis/fca-exports/verify`,
10175
+ method: "POST",
10176
+ body: data,
10177
+ type: "application/json",
10178
+ format: "json",
10179
+ ...params
10180
+ });
10035
10181
  };
10036
10182
 
10037
10183
  // src/api-spec/generated/Functions.ts
@@ -11397,7 +11543,7 @@ var Ontology = class {
11397
11543
  ...params
11398
11544
  });
11399
11545
  /**
11400
- * @description Every metric is derived from the tenant's live lattice and term store. The state of a stage comes from a scoped assessment only; no stage is accepted because of its counts. The vocabulary stage's evidence is the governed vocabulary store. When that store cannot be read, the whole status is refused (`503`) rather than served with the stage degraded: reporting `not_assessed` for a tenant that may hold an active release would state something the engine does not know.
11546
+ * @description Every metric is derived from the tenant's live lattice and term store, or from the active governed vocabulary release when that release is the stage's basis. The state of a stage comes from a scoped assessment only; no stage is accepted because of its counts. The evidence of the vocabulary, taxonomy and thesaurus stages is the governed vocabulary store: the active release and the criteria results of the assessment it cites. When that store cannot be read, the whole status is refused (`503`) rather than served with the stages degraded: reporting `not_assessed` for a tenant that may hold an active release would state something the engine does not know.
11401
11547
  *
11402
11548
  * @tags ontology
11403
11549
  * @name OntologyPipelineStatus
@@ -16331,6 +16477,24 @@ var Vocabulary = class {
16331
16477
  format: "json",
16332
16478
  ...params
16333
16479
  });
16480
+ /**
16481
+ * No description
16482
+ *
16483
+ * @tags vocabulary
16484
+ * @name ApplyMigrationPlan
16485
+ * @summary `POST /api/v1/vocabulary/migration/plans/{plan_id}/apply` — apply a plan as a new candidate on the active release; `409 migration_plan_stale` when the legacy inventory changed since the plan.
16486
+ * @request POST:/api/v1/vocabulary/migration/plans/{plan_id}/apply
16487
+ * @secure
16488
+ */
16489
+ applyMigrationPlan = (planId, data, params = {}) => this.http.request({
16490
+ path: `/api/v1/vocabulary/migration/plans/${planId}/apply`,
16491
+ method: "POST",
16492
+ body: data,
16493
+ secure: true,
16494
+ type: "application/json",
16495
+ format: "json",
16496
+ ...params
16497
+ });
16334
16498
  /**
16335
16499
  * No description
16336
16500
  *
@@ -16367,6 +16531,41 @@ var Vocabulary = class {
16367
16531
  format: "json",
16368
16532
  ...params
16369
16533
  });
16534
+ /**
16535
+ * No description
16536
+ *
16537
+ * @tags vocabulary
16538
+ * @name CommitImport
16539
+ * @summary `POST /api/v1/vocabulary/imports/{import_id}/commit` — apply the reviewer's decisions and write one candidate revision: a new candidate, or revision n+1 of `candidate_id` (with `If-Match`).
16540
+ * @request POST:/api/v1/vocabulary/imports/{import_id}/commit
16541
+ * @secure
16542
+ */
16543
+ commitImport = (importId, data, params = {}) => this.http.request({
16544
+ path: `/api/v1/vocabulary/imports/${importId}/commit`,
16545
+ method: "POST",
16546
+ body: data,
16547
+ secure: true,
16548
+ type: "application/json",
16549
+ format: "json",
16550
+ ...params
16551
+ });
16552
+ /**
16553
+ * No description
16554
+ *
16555
+ * @tags vocabulary
16556
+ * @name ConceptExpansion
16557
+ * @summary `GET /api/v1/vocabulary/concepts/{concept_id}/expansion` — the concepts a query on one concept may be expanded to, each with its support.
16558
+ * @request GET:/api/v1/vocabulary/concepts/{concept_id}/expansion
16559
+ * @secure
16560
+ */
16561
+ conceptExpansion = (conceptId, query, params = {}) => this.http.request({
16562
+ path: `/api/v1/vocabulary/concepts/${conceptId}/expansion`,
16563
+ method: "GET",
16564
+ query,
16565
+ secure: true,
16566
+ format: "json",
16567
+ ...params
16568
+ });
16370
16569
  /**
16371
16570
  * No description
16372
16571
  *
@@ -16383,6 +16582,23 @@ var Vocabulary = class {
16383
16582
  format: "json",
16384
16583
  ...params
16385
16584
  });
16585
+ /**
16586
+ * No description
16587
+ *
16588
+ * @tags vocabulary
16589
+ * @name ConceptRelations
16590
+ * @summary `GET /api/v1/vocabulary/concepts/{concept_id}/relations` — the direct relations of one kind of a concept in one scheme, of every status.
16591
+ * @request GET:/api/v1/vocabulary/concepts/{concept_id}/relations
16592
+ * @secure
16593
+ */
16594
+ conceptRelations = (conceptId, query, params = {}) => this.http.request({
16595
+ path: `/api/v1/vocabulary/concepts/${conceptId}/relations`,
16596
+ method: "GET",
16597
+ query,
16598
+ secure: true,
16599
+ format: "json",
16600
+ ...params
16601
+ });
16386
16602
  /**
16387
16603
  * No description
16388
16604
  *
@@ -16401,6 +16617,76 @@ var Vocabulary = class {
16401
16617
  format: "json",
16402
16618
  ...params
16403
16619
  });
16620
+ /**
16621
+ * No description
16622
+ *
16623
+ * @tags vocabulary
16624
+ * @name CreateImport
16625
+ * @summary `POST /api/v1/vocabulary/imports` — parse an uploaded source file and store its proposal. Writes no vocabulary record.
16626
+ * @request POST:/api/v1/vocabulary/imports
16627
+ * @secure
16628
+ */
16629
+ createImport = (data, params = {}) => this.http.request({
16630
+ path: `/api/v1/vocabulary/imports`,
16631
+ method: "POST",
16632
+ body: data,
16633
+ secure: true,
16634
+ type: "application/json",
16635
+ format: "json",
16636
+ ...params
16637
+ });
16638
+ /**
16639
+ * No description
16640
+ *
16641
+ * @tags vocabulary
16642
+ * @name CreateMigrationPlan
16643
+ * @summary `POST /api/v1/vocabulary/migration/plans` — store the reviewer's dispositions of legacy sorts over the current legacy inventory.
16644
+ * @request POST:/api/v1/vocabulary/migration/plans
16645
+ * @secure
16646
+ */
16647
+ createMigrationPlan = (data, params = {}) => this.http.request({
16648
+ path: `/api/v1/vocabulary/migration/plans`,
16649
+ method: "POST",
16650
+ body: data,
16651
+ secure: true,
16652
+ type: "application/json",
16653
+ format: "json",
16654
+ ...params
16655
+ });
16656
+ /**
16657
+ * No description
16658
+ *
16659
+ * @tags vocabulary
16660
+ * @name ExportNative
16661
+ * @summary `GET /api/v1/vocabulary/exports/native` — the view's records as `kos-json/v1`.
16662
+ * @request GET:/api/v1/vocabulary/exports/native
16663
+ * @secure
16664
+ */
16665
+ exportNative = (query, params = {}) => this.http.request({
16666
+ path: `/api/v1/vocabulary/exports/native`,
16667
+ method: "GET",
16668
+ query,
16669
+ secure: true,
16670
+ format: "json",
16671
+ ...params
16672
+ });
16673
+ /**
16674
+ * No description
16675
+ *
16676
+ * @tags vocabulary
16677
+ * @name ExportSkos
16678
+ * @summary `GET /api/v1/vocabulary/exports/skos` — the SKOS projection of one scheme as Turtle or RDF/XML, with its manifest.
16679
+ * @request GET:/api/v1/vocabulary/exports/skos
16680
+ * @secure
16681
+ */
16682
+ exportSkos = (query, params = {}) => this.http.request({
16683
+ path: `/api/v1/vocabulary/exports/skos`,
16684
+ method: "GET",
16685
+ query,
16686
+ secure: true,
16687
+ format: "json",
16688
+ ...params
16689
+ });
16404
16690
  /**
16405
16691
  * No description
16406
16692
  *
@@ -16466,6 +16752,38 @@ var Vocabulary = class {
16466
16752
  format: "json",
16467
16753
  ...params
16468
16754
  });
16755
+ /**
16756
+ * No description
16757
+ *
16758
+ * @tags vocabulary
16759
+ * @name GetImport
16760
+ * @summary `GET /api/v1/vocabulary/imports/{import_id}` — an import.
16761
+ * @request GET:/api/v1/vocabulary/imports/{import_id}
16762
+ * @secure
16763
+ */
16764
+ getImport = (importId, params = {}) => this.http.request({
16765
+ path: `/api/v1/vocabulary/imports/${importId}`,
16766
+ method: "GET",
16767
+ secure: true,
16768
+ format: "json",
16769
+ ...params
16770
+ });
16771
+ /**
16772
+ * No description
16773
+ *
16774
+ * @tags vocabulary
16775
+ * @name GetMigrationPlan
16776
+ * @summary `GET /api/v1/vocabulary/migration/plans/{plan_id}` — a plan.
16777
+ * @request GET:/api/v1/vocabulary/migration/plans/{plan_id}
16778
+ * @secure
16779
+ */
16780
+ getMigrationPlan = (planId, params = {}) => this.http.request({
16781
+ path: `/api/v1/vocabulary/migration/plans/${planId}`,
16782
+ method: "GET",
16783
+ secure: true,
16784
+ format: "json",
16785
+ ...params
16786
+ });
16469
16787
  /**
16470
16788
  * No description
16471
16789
  *
@@ -16498,6 +16816,40 @@ var Vocabulary = class {
16498
16816
  format: "json",
16499
16817
  ...params
16500
16818
  });
16819
+ /**
16820
+ * No description
16821
+ *
16822
+ * @tags vocabulary
16823
+ * @name GetVocabularyCollection
16824
+ * @summary `GET /api/v1/vocabulary/collections/{collection_id}` — one collection with its labels, its member occurrences and its nested collections.
16825
+ * @request GET:/api/v1/vocabulary/collections/{collection_id}
16826
+ * @secure
16827
+ */
16828
+ getVocabularyCollection = (collectionId, query, params = {}) => this.http.request({
16829
+ path: `/api/v1/vocabulary/collections/${collectionId}`,
16830
+ method: "GET",
16831
+ query,
16832
+ secure: true,
16833
+ format: "json",
16834
+ ...params
16835
+ });
16836
+ /**
16837
+ * No description
16838
+ *
16839
+ * @tags vocabulary
16840
+ * @name ImportItems
16841
+ * @summary `GET /api/v1/vocabulary/imports/{import_id}/items` — the items of an import by ordinal, each with its coordinates, disposition, reason and target.
16842
+ * @request GET:/api/v1/vocabulary/imports/{import_id}/items
16843
+ * @secure
16844
+ */
16845
+ importItems = (importId, query, params = {}) => this.http.request({
16846
+ path: `/api/v1/vocabulary/imports/${importId}/items`,
16847
+ method: "GET",
16848
+ query,
16849
+ secure: true,
16850
+ format: "json",
16851
+ ...params
16852
+ });
16501
16853
  /**
16502
16854
  * No description
16503
16855
  *
@@ -16584,6 +16936,23 @@ var Vocabulary = class {
16584
16936
  format: "json",
16585
16937
  ...params
16586
16938
  });
16939
+ /**
16940
+ * No description
16941
+ *
16942
+ * @tags vocabulary
16943
+ * @name ListVocabularyCollections
16944
+ * @summary `GET /api/v1/vocabulary/collections` — the collections of one scheme.
16945
+ * @request GET:/api/v1/vocabulary/collections
16946
+ * @secure
16947
+ */
16948
+ listVocabularyCollections = (query, params = {}) => this.http.request({
16949
+ path: `/api/v1/vocabulary/collections`,
16950
+ method: "GET",
16951
+ query,
16952
+ secure: true,
16953
+ format: "json",
16954
+ ...params
16955
+ });
16587
16956
  /**
16588
16957
  * No description
16589
16958
  *
@@ -16740,6 +17109,91 @@ var Vocabulary = class {
16740
17109
  format: "json",
16741
17110
  ...params
16742
17111
  });
17112
+ /**
17113
+ * No description
17114
+ *
17115
+ * @tags vocabulary
17116
+ * @name SchemeHierarchy
17117
+ * @summary `GET /api/v1/vocabulary/schemes/{scheme_id}/hierarchy` — the `broader` links of one scheme around a concept, or below its top concepts.
17118
+ * @request GET:/api/v1/vocabulary/schemes/{scheme_id}/hierarchy
17119
+ * @secure
17120
+ */
17121
+ schemeHierarchy = (schemeId, query, params = {}) => this.http.request({
17122
+ path: `/api/v1/vocabulary/schemes/${schemeId}/hierarchy`,
17123
+ method: "GET",
17124
+ query,
17125
+ secure: true,
17126
+ format: "json",
17127
+ ...params
17128
+ });
17129
+ /**
17130
+ * No description
17131
+ *
17132
+ * @tags vocabulary
17133
+ * @name SchemePaths
17134
+ * @summary `GET /api/v1/vocabulary/schemes/{scheme_id}/paths` — the simple paths of accepted `broader` links from a narrower concept up to a broader one.
17135
+ * @request GET:/api/v1/vocabulary/schemes/{scheme_id}/paths
17136
+ * @secure
17137
+ */
17138
+ schemePaths = (schemeId, query, params = {}) => this.http.request({
17139
+ path: `/api/v1/vocabulary/schemes/${schemeId}/paths`,
17140
+ method: "GET",
17141
+ query,
17142
+ secure: true,
17143
+ format: "json",
17144
+ ...params
17145
+ });
17146
+ /**
17147
+ * No description
17148
+ *
17149
+ * @tags vocabulary
17150
+ * @name SchemePicklist
17151
+ * @summary `GET /api/v1/vocabulary/schemes/{scheme_id}/picklist` — the scheme's concepts depth first, for a form control.
17152
+ * @request GET:/api/v1/vocabulary/schemes/{scheme_id}/picklist
17153
+ * @secure
17154
+ */
17155
+ schemePicklist = (schemeId, query, params = {}) => this.http.request({
17156
+ path: `/api/v1/vocabulary/schemes/${schemeId}/picklist`,
17157
+ method: "GET",
17158
+ query,
17159
+ secure: true,
17160
+ format: "json",
17161
+ ...params
17162
+ });
17163
+ /**
17164
+ * No description
17165
+ *
17166
+ * @tags vocabulary
17167
+ * @name SchemePolicy
17168
+ * @summary `GET /api/v1/vocabulary/schemes/{scheme_id}/policy` — the scheme's taxonomy policy, or the `taxonomy-policy/v1` defaults (#611 P3-D04) with `declared: false`.
17169
+ * @request GET:/api/v1/vocabulary/schemes/{scheme_id}/policy
17170
+ * @secure
17171
+ */
17172
+ schemePolicy = (schemeId, query, params = {}) => this.http.request({
17173
+ path: `/api/v1/vocabulary/schemes/${schemeId}/policy`,
17174
+ method: "GET",
17175
+ query,
17176
+ secure: true,
17177
+ format: "json",
17178
+ ...params
17179
+ });
17180
+ /**
17181
+ * No description
17182
+ *
17183
+ * @tags vocabulary
17184
+ * @name SchemeTopConcepts
17185
+ * @summary `GET /api/v1/vocabulary/schemes/{scheme_id}/top-concepts` — the concepts with an accepted membership in the scheme marked `top_concept`.
17186
+ * @request GET:/api/v1/vocabulary/schemes/{scheme_id}/top-concepts
17187
+ * @secure
17188
+ */
17189
+ schemeTopConcepts = (schemeId, query, params = {}) => this.http.request({
17190
+ path: `/api/v1/vocabulary/schemes/${schemeId}/top-concepts`,
17191
+ method: "GET",
17192
+ query,
17193
+ secure: true,
17194
+ format: "json",
17195
+ ...params
17196
+ });
16743
17197
  /**
16744
17198
  * No description
16745
17199
  *
@@ -16757,6 +17211,24 @@ var Vocabulary = class {
16757
17211
  format: "json",
16758
17212
  ...params
16759
17213
  });
17214
+ /**
17215
+ * No description
17216
+ *
17217
+ * @tags vocabulary
17218
+ * @name SparqlQuery
17219
+ * @summary `POST /api/v1/vocabulary/sparql` — one read-only SPARQL query over the SKOS projection of one scheme of one view.
17220
+ * @request POST:/api/v1/vocabulary/sparql
17221
+ * @secure
17222
+ */
17223
+ sparqlQuery = (data, params = {}) => this.http.request({
17224
+ path: `/api/v1/vocabulary/sparql`,
17225
+ method: "POST",
17226
+ body: data,
17227
+ secure: true,
17228
+ type: "application/json",
17229
+ format: "json",
17230
+ ...params
17231
+ });
16760
17232
  /**
16761
17233
  * No description
16762
17234
  *
@@ -17542,7 +18014,8 @@ function SortListResponseFromApiToFront(dto) {
17542
18014
  sorts: dto.sorts.map(SortDtoFromApiToFront),
17543
18015
  count: dto.count,
17544
18016
  total: dto.total,
17545
- offset: dto.offset
18017
+ offset: dto.offset,
18018
+ ontologyRevision: dto.ontology_revision
17546
18019
  };
17547
18020
  }
17548
18021
  function ListSortsQueryFromFrontToApi(query) {
@@ -17889,27 +18362,150 @@ function DeprecateSortRequestFromFrontToApi(model) {
17889
18362
  if (model.replacement !== void 0) out.replacement = model.replacement;
17890
18363
  return out;
17891
18364
  }
18365
+ function FactorLimitsFromFrontToApi(model) {
18366
+ const out = {};
18367
+ if (model.maxSorts !== void 0) out.max_sorts = model.maxSorts;
18368
+ if (model.maxContextSorts !== void 0) out.max_context_sorts = model.maxContextSorts;
18369
+ if (model.maxParentEdges !== void 0) out.max_parent_edges = model.maxParentEdges;
18370
+ if (model.maxDeclarations !== void 0) out.max_declarations = model.maxDeclarations;
18371
+ if (model.maxAttributes !== void 0) out.max_attributes = model.maxAttributes;
18372
+ if (model.maxInputBytes !== void 0) out.max_input_bytes = model.maxInputBytes;
18373
+ if (model.maxConcepts !== void 0) out.max_concepts = model.maxConcepts;
18374
+ if (model.maxVisitedConcepts !== void 0) out.max_visited_concepts = model.maxVisitedConcepts;
18375
+ if (model.maxWork !== void 0) out.max_work = model.maxWork;
18376
+ if (model.maxProposals !== void 0) out.max_proposals = model.maxProposals;
18377
+ if (model.maxOutputBytes !== void 0) out.max_output_bytes = model.maxOutputBytes;
18378
+ return out;
18379
+ }
17892
18380
  function FactorSortsRequestFromFrontToApi(model) {
17893
18381
  const out = {};
17894
18382
  if (model.sortIds !== void 0) out.sort_ids = model.sortIds;
17895
18383
  if (model.minSorts !== void 0) out.min_sorts = model.minSorts;
18384
+ if (model.limits !== void 0) {
18385
+ out.limits = model.limits === null ? null : FactorLimitsFromFrontToApi(model.limits);
18386
+ }
17896
18387
  return out;
17897
18388
  }
17898
- function FactorSharedFeatureFromApiToFront(dto) {
17899
- const out = { name: dto.name, required: dto.required };
17900
- if (dto.expected_sort != null) out.expectedSort = dto.expected_sort;
17901
- if (dto.expected_type_hint != null) out.expectedTypeHint = dto.expected_type_hint;
17902
- if (dto.constraint != null) out.constraint = ConstraintDtoFromApiToFront(dto.constraint);
18389
+ function FactorLimitsFromApiToFront(dto) {
18390
+ const out = {};
18391
+ if (dto.max_sorts != null) out.maxSorts = dto.max_sorts;
18392
+ if (dto.max_context_sorts != null) out.maxContextSorts = dto.max_context_sorts;
18393
+ if (dto.max_parent_edges != null) out.maxParentEdges = dto.max_parent_edges;
18394
+ if (dto.max_declarations != null) out.maxDeclarations = dto.max_declarations;
18395
+ if (dto.max_attributes != null) out.maxAttributes = dto.max_attributes;
18396
+ if (dto.max_input_bytes != null) out.maxInputBytes = dto.max_input_bytes;
18397
+ if (dto.max_concepts != null) out.maxConcepts = dto.max_concepts;
18398
+ if (dto.max_visited_concepts != null) out.maxVisitedConcepts = dto.max_visited_concepts;
18399
+ if (dto.max_work != null) out.maxWork = dto.max_work;
18400
+ if (dto.max_proposals != null) out.maxProposals = dto.max_proposals;
18401
+ if (dto.max_output_bytes != null) out.maxOutputBytes = dto.max_output_bytes;
17903
18402
  return out;
17904
18403
  }
17905
- function FactorSortsResponseFromApiToFront(dto) {
18404
+ function FactorSharedFeatureFromApiToFront(dto) {
17906
18405
  return {
18406
+ ...FeatureDescriptorDtoFromApiToFront(dto),
18407
+ signature: dto.signature,
18408
+ declaredBy: dto.declared_by
18409
+ };
18410
+ }
18411
+ function isJsonValue2(value) {
18412
+ return typeof value === "string" || typeof value === "number" || typeof value === "boolean" || typeof value === "object";
18413
+ }
18414
+ function isFactorRecord(value) {
18415
+ return typeof value === "object" && value !== null && !Array.isArray(value);
18416
+ }
18417
+ function factorStringList(value, field) {
18418
+ if (!Array.isArray(value)) throw new TypeError(`factor context: ${field} is not an array`);
18419
+ const items = value;
18420
+ return items.map((item) => {
18421
+ if (typeof item !== "string")
18422
+ throw new TypeError(`factor context: ${field} holds a non-string`);
18423
+ return item;
18424
+ });
18425
+ }
18426
+ function factorNumberList(value, field) {
18427
+ if (!Array.isArray(value)) throw new TypeError(`factor context: ${field} is not an array`);
18428
+ const items = value;
18429
+ return items.map((item) => {
18430
+ if (typeof item !== "number")
18431
+ throw new TypeError(`factor context: ${field} holds a non-number`);
18432
+ return item;
18433
+ });
18434
+ }
18435
+ function factorString(record, key, field) {
18436
+ const value = Reflect.get(record, key);
18437
+ if (typeof value !== "string")
18438
+ throw new TypeError(`factor context: ${field}.${key} is not a string`);
18439
+ return value;
18440
+ }
18441
+ function FactorContextFromApiToFront(value) {
18442
+ if (!isFactorRecord(value)) throw new TypeError("factor context is not an object");
18443
+ const sorts = Reflect.get(value, "sorts");
18444
+ if (!Array.isArray(sorts)) throw new TypeError("factor context: sorts is not an array");
18445
+ const snapshot = Reflect.get(value, "incidence");
18446
+ if (!isFactorRecord(snapshot)) throw new TypeError("factor context: incidence is not an object");
18447
+ const version = Reflect.get(snapshot, "version");
18448
+ if (typeof version !== "number") {
18449
+ throw new TypeError("factor context: incidence.version is not a number");
18450
+ }
18451
+ const rows = Reflect.get(snapshot, "incidence");
18452
+ if (!Array.isArray(rows))
18453
+ throw new TypeError("factor context: incidence.incidence is not an array");
18454
+ const rowList = rows;
18455
+ const sortList = sorts;
18456
+ return {
18457
+ version: factorString(value, "version", "context"),
18458
+ tenant: factorString(value, "tenant", "context"),
18459
+ policySha256: factorString(value, "policy_sha256", "context"),
18460
+ sorts: sortList.map((sort) => {
18461
+ if (!isJsonValue2(sort)) throw new TypeError("factor context: sorts holds a non-JSON value");
18462
+ return sort;
18463
+ }),
18464
+ incidence: {
18465
+ version,
18466
+ objects: factorStringList(Reflect.get(snapshot, "objects"), "incidence.objects"),
18467
+ attributes: factorStringList(Reflect.get(snapshot, "attributes"), "incidence.attributes"),
18468
+ incidence: rowList.map((row) => factorNumberList(row, "incidence.incidence"))
18469
+ }
18470
+ };
18471
+ }
18472
+ function FactorSortsResponseFromApiToFront(dto) {
18473
+ const out = {
18474
+ version: dto.version,
17907
18475
  proposals: dto.proposals.map((p) => ({
17908
18476
  memberSorts: p.member_sorts.map((m) => ({ id: m.id, name: m.name })),
17909
18477
  sharedFeatures: p.shared_features.map(FactorSharedFeatureFromApiToFront),
17910
- suggestedName: p.suggested_name
17911
- }))
18478
+ suggestedName: p.suggested_name,
18479
+ extent: p.extent,
18480
+ intent: p.intent
18481
+ })),
18482
+ inputComplete: dto.input_complete,
18483
+ limits: FactorLimitsFromApiToFront(dto.limits),
18484
+ minSorts: dto.min_sorts,
18485
+ nativeAdmission: dto.native_admission
17912
18486
  };
18487
+ if (dto.input_stop != null) {
18488
+ out.inputStop = {
18489
+ reason: dto.input_stop.reason,
18490
+ resource: dto.input_stop.resource,
18491
+ limit: dto.input_stop.limit
18492
+ };
18493
+ }
18494
+ if (dto.search != null) {
18495
+ out.search = {
18496
+ complete: dto.search.complete,
18497
+ stopReason: dto.search.stop_reason,
18498
+ visitedConcepts: dto.search.visited_concepts,
18499
+ work: dto.search.work,
18500
+ emittedConcepts: dto.search.emitted_concepts
18501
+ };
18502
+ }
18503
+ if (dto.presentation_stop_reason != null) {
18504
+ out.presentationStopReason = dto.presentation_stop_reason;
18505
+ }
18506
+ if (dto.context_sha256 != null) out.contextSha256 = dto.context_sha256;
18507
+ if (dto.context != null) out.context = FactorContextFromApiToFront(dto.context);
18508
+ return out;
17913
18509
  }
17914
18510
  function PatchSortRequestFromFrontToApi(model) {
17915
18511
  const out = {};
@@ -18700,6 +19296,9 @@ var RESPONSE_COMPONENTS = {
18700
19296
  },
18701
19297
  BaselineDto: { object: { snapshot_hash: [1, 0], stale: [1, 0] } },
18702
19298
  BatchCopyResponse: { object: { copies: [1, { array: "CopyResultDto" }] } },
19299
+ BatchGetSubsumptionsResponse: {
19300
+ object: { degrees: [1, { array: "GetFuzzySubsumptionResponse" }] }
19301
+ },
18703
19302
  BatchOperationResultDto: { object: { duration_ms: [1, 0], index: [1, 0], success: [1, 0] } },
18704
19303
  BatchResponse: {
18705
19304
  object: {
@@ -18893,7 +19492,11 @@ var RESPONSE_COMPONENTS = {
18893
19492
  },
18894
19493
  BulkRowRefusalDto: { object: { index: [1, 0], message: [1, 0] } },
18895
19494
  BulkSetSimilaritiesResponse: { object: { errors: [0, { array: 0 }], set_count: [1, 0] } },
19495
+ BulkSetSubsumptionsResponse: {
19496
+ object: { outcomes: [1, { array: "BulkSubsumptionOutcome" }], set_count: [1, 0] }
19497
+ },
18896
19498
  BulkSortError: { object: { error: [1, 0], kind: [1, 0], name: [1, 0], sort_created: [1, 0] } },
19499
+ BulkSubsumptionOutcome: { object: { sub_sort_id: [1, 0], sup_sort_id: [1, 0], written: [1, 0] } },
18897
19500
  BundleBelief: {
18898
19501
  object: { confidence: [1, 0], features: [0, { object: {} }], sort: [1, 0], source: [1, 0] }
18899
19502
  },
@@ -19449,6 +20052,16 @@ var RESPONSE_COMPONENTS = {
19449
20052
  verdicts: [1, { array: 0 }]
19450
20053
  }
19451
20054
  },
20055
+ CollectionDetailResponse: {
20056
+ object: {
20057
+ collection: [1, "CollectionRecordDto"],
20058
+ context: [2, "ContextRefDto"],
20059
+ labels: [1, { array: "CollectionLabelViewDto" }],
20060
+ members: [1, { array: "CollectionMemberViewDto" }],
20061
+ nested_collections: [1, { array: 0 }],
20062
+ view: [1, "ViewRefDto"]
20063
+ }
20064
+ },
19452
20065
  CollectionDto: {
19453
20066
  object: {
19454
20067
  depth: [1, 0],
@@ -19458,10 +20071,42 @@ var RESPONSE_COMPONENTS = {
19458
20071
  tags: [1, { array: 0 }]
19459
20072
  }
19460
20073
  },
20074
+ CollectionLabelViewDto: {
20075
+ object: { collection_label_id: [1, 0], label_id: [1, 0], role: [1, 0] }
20076
+ },
19461
20077
  CollectionListResponse: {
19462
20078
  object: { collections: [1, { array: "CollectionDto" }], count: [1, 0] }
19463
20079
  },
20080
+ CollectionMemberViewDto: {
20081
+ object: { display_label: [2, "DisplayLabelDto"], occurrence_id: [1, 0] }
20082
+ },
20083
+ CollectionPageResponse: {
20084
+ object: {
20085
+ complete: [1, 0],
20086
+ context: [2, "ContextRefDto"],
20087
+ items: [1, { array: "CollectionSummaryDto" }],
20088
+ scheme_id: [1, 0],
20089
+ view: [1, "ViewRefDto"]
20090
+ }
20091
+ },
20092
+ CollectionRecordDto: {
20093
+ object: {
20094
+ change_reason: [1, 0],
20095
+ ordered: [1, 0],
20096
+ record_id: [1, 0],
20097
+ revision: [1, 0],
20098
+ scheme: [1, 0],
20099
+ status: [1, 0]
20100
+ }
20101
+ },
19464
20102
  CollectionResponse: { object: { collection: [1, "CollectionDto"] } },
20103
+ CollectionSummaryDto: {
20104
+ object: {
20105
+ collection: [1, "CollectionRecordDto"],
20106
+ labels: [1, { array: "CollectionLabelViewDto" }],
20107
+ member_count: [1, 0]
20108
+ }
20109
+ },
19465
20110
  CommunitiesResponseDto: {
19466
20111
  object: {
19467
20112
  communities: [1, { array: 0 }],
@@ -19603,6 +20248,16 @@ var RESPONSE_COMPONENTS = {
19603
20248
  term_versions: [1, { array: "TermVersionEntryDto" }]
19604
20249
  }
19605
20250
  },
20251
+ ConceptMappingRecordDto: {
20252
+ object: {
20253
+ change_reason: [1, 0],
20254
+ mapping_kind: [1, 0],
20255
+ record_id: [1, 0],
20256
+ revision: [1, 0],
20257
+ status: [1, 0],
20258
+ subject: [1, 0]
20259
+ }
20260
+ },
19606
20261
  ConceptMatchDto: {
19607
20262
  object: {
19608
20263
  canonical_name: [1, 0],
@@ -19625,6 +20280,37 @@ var RESPONSE_COMPONENTS = {
19625
20280
  ConceptRecordDto: {
19626
20281
  object: { change_reason: [1, 0], record_id: [1, 0], revision: [1, 0], status: [1, 0] }
19627
20282
  },
20283
+ ConceptRelationEntryDto: {
20284
+ object: {
20285
+ concept_id: [1, 0],
20286
+ display_label: [2, "DisplayLabelDto"],
20287
+ relation: [1, 0],
20288
+ relation_id: [1, 0],
20289
+ status: [1, 0]
20290
+ }
20291
+ },
20292
+ ConceptRelationRecordDto: {
20293
+ object: {
20294
+ change_reason: [1, 0],
20295
+ object: [1, 0],
20296
+ record_id: [1, 0],
20297
+ relation: [1, 0],
20298
+ revision: [1, 0],
20299
+ scheme: [1, 0],
20300
+ status: [1, 0],
20301
+ subject: [1, 0]
20302
+ }
20303
+ },
20304
+ ConceptRelationsResponse: {
20305
+ object: {
20306
+ concept_id: [1, 0],
20307
+ context: [2, "ContextRefDto"],
20308
+ relation: [1, 0],
20309
+ relations: [1, { array: "ConceptRelationEntryDto" }],
20310
+ scheme_id: [1, 0],
20311
+ view: [1, "ViewRefDto"]
20312
+ }
20313
+ },
19628
20314
  ConceptReleaseDto: {
19629
20315
  object: { record_etag: [1, 0], release_id: [1, 0], release_number: [1, 0] }
19630
20316
  },
@@ -19675,14 +20361,21 @@ var RESPONSE_COMPONENTS = {
19675
20361
  object: {
19676
20362
  aboutness: [1, { array: "AboutnessRecordDto" }],
19677
20363
  authority_references: [1, { array: "AuthorityReferenceRecordDto" }],
20364
+ collections: [1, { array: 0 }],
19678
20365
  concept: [1, "ConceptRecordDto"],
19679
20366
  definition_guidance: [1, "DefinitionGuidanceDto"],
19680
20367
  definitions: [1, { array: "DefinitionRecordDto" }],
19681
20368
  display_label: [2, "DisplayLabelDto"],
20369
+ documentation: [1, { array: "DocumentationRecordDto" }],
19682
20370
  evidence: [1, { array: "EvidenceViewDto" }],
19683
20371
  identity_decisions: [1, { array: "IdentityDecisionRecordDto" }],
19684
20372
  labels: [1, { array: "LabelUseViewDto" }],
19685
- memberships: [1, { array: "MembershipViewDto" }]
20373
+ mappings: [1, { array: "ConceptMappingRecordDto" }],
20374
+ memberships: [1, { array: "MembershipViewDto" }],
20375
+ notations: [1, { array: "NotationRecordDto" }],
20376
+ relations: [1, { array: "ConceptRelationRecordDto" }],
20377
+ source_associations: [1, { array: "SourceAssociationRecordDto" }],
20378
+ xl_labels: [1, { array: "XlLabelRecordDto" }]
19686
20379
  }
19687
20380
  },
19688
20381
  ConditionalIndependenceResponse: { object: { explanation: [1, 0], independent: [1, 0] } },
@@ -20058,6 +20751,19 @@ var RESPONSE_COMPONENTS = {
20058
20751
  CronJobRunDto: { object: { origin: [1, 0], run_id: [1, 0], started_at: [1, 0], status: [1, 0] } },
20059
20752
  CronScheduleDto: { object: { schedule_type: [1, 0], value: [1, 0] } },
20060
20753
  CrossCuttingResponseDto: { object: { items: [1, { array: 0 }], scope_truncated: [1, 0] } },
20754
+ CspSolveResponse: {
20755
+ object: {
20756
+ backtracks: [1, 0],
20757
+ nodes_explored: [1, 0],
20758
+ propagations: [1, 0],
20759
+ propagator_invocations: [1, 0],
20760
+ satisfiable: [1, 0],
20761
+ search_exhausted: [1, 0],
20762
+ solutions: [1, { array: { object: {} } }],
20763
+ solve_time_ms: [1, 0],
20764
+ total_found: [1, 0]
20765
+ }
20766
+ },
20061
20767
  CuriosityTargetDto: {
20062
20768
  object: { exploration_priority: [1, 0], novelty: [1, 0], target_id: [1, 0] }
20063
20769
  },
@@ -20100,6 +20806,7 @@ var RESPONSE_COMPONENTS = {
20100
20806
  object: {
20101
20807
  actions_executed: [1, { array: 0 }],
20102
20808
  goals_achieved: [1, { array: 0 }],
20809
+ goals_deferred: [0, { array: 0 }],
20103
20810
  goals_failed: [1, { array: 0 }],
20104
20811
  goals_pursued: [1, { array: 0 }],
20105
20812
  new_beliefs: [1, { array: 0 }],
@@ -20184,6 +20891,15 @@ var RESPONSE_COMPONENTS = {
20184
20891
  }
20185
20892
  },
20186
20893
  DeclareLatentVariableResponse: { object: { declared: [1, 0], variable: [1, 0] } },
20894
+ DeclaredAlphaCutMember: { object: { degree: [1, 0], sort_id: [1, 0] } },
20895
+ DeclaredAlphaCutResponse: {
20896
+ object: {
20897
+ alpha: [1, 0],
20898
+ concept_sort_id: [1, 0],
20899
+ members: [1, { array: "DeclaredAlphaCutMember" }],
20900
+ strict: [1, 0]
20901
+ }
20902
+ },
20187
20903
  DeclaredEgress: { object: { host: [1, 0], purpose: [1, 0] } },
20188
20904
  DecodeGlbResponse: {
20189
20905
  object: {
@@ -20707,6 +21423,7 @@ var RESPONSE_COMPONENTS = {
20707
21423
  document_id: [1, 0],
20708
21424
  entities_extracted: [1, 0],
20709
21425
  entities_refused: [1, { array: "RefusedEntityDto" }],
21426
+ fca_discovery: [2, "FcaIngestionReportDto"],
20710
21427
  processing_time_ms: [1, 0],
20711
21428
  relations_extracted: [1, 0],
20712
21429
  relations_integrated: [1, 0],
@@ -20749,6 +21466,9 @@ var RESPONSE_COMPONENTS = {
20749
21466
  DocumentVersionsResponse: {
20750
21467
  object: { family_id: [1, 0], versions: [1, { array: "DocumentDto" }] }
20751
21468
  },
21469
+ DocumentationRecordDto: {
21470
+ object: { change_reason: [1, 0], note_kind: [1, 0], record_id: [1, 0], revision: [1, 0] }
21471
+ },
20752
21472
  DonorWeightDto: { object: { name: [1, 0], weight: [1, 0] } },
20753
21473
  DoseResponseResponse: {
20754
21474
  object: {
@@ -21095,6 +21815,30 @@ var RESPONSE_COMPONENTS = {
21095
21815
  ExecutionSessionStatsResponse: {
21096
21816
  object: { curried_function_count: [1, 0], db_available: [1, 0], memory_session_count: [1, 0] }
21097
21817
  },
21818
+ ExpandedConceptDto: {
21819
+ object: {
21820
+ concept_id: [1, 0],
21821
+ display_label: [2, "DisplayLabelDto"],
21822
+ support: [1, { array: 0 }]
21823
+ }
21824
+ },
21825
+ ExpandedExternalDto: {
21826
+ object: { external_concept_id: [1, 0], iri: [1, 0], support: [1, { array: 0 }] }
21827
+ },
21828
+ ExpansionResponse: {
21829
+ object: {
21830
+ complete: [1, 0],
21831
+ concept_id: [1, 0],
21832
+ concepts: [1, { array: "ExpandedConceptDto" }],
21833
+ context: [2, "ContextRefDto"],
21834
+ direction: [1, 0],
21835
+ external_concepts: [1, { array: "ExpandedExternalDto" }],
21836
+ scheme_id: [1, 0],
21837
+ transitive: [1, 0],
21838
+ view: [1, "ViewRefDto"],
21839
+ withheld_relation_ids: [1, { array: 0 }]
21840
+ }
21841
+ },
21098
21842
  ExpireReviewsResponse: { object: { escalated: [1, { array: 0 }], timed_out: [1, { array: 0 }] } },
21099
21843
  ExplorationCompleteResponseDto: {
21100
21844
  object: {
@@ -21273,16 +22017,47 @@ var RESPONSE_COMPONENTS = {
21273
22017
  present: [1, 0]
21274
22018
  }
21275
22019
  },
22020
+ FactorInputStopDto: { object: { reason: [1, 0] } },
22021
+ FactorLimitsDto: { object: {} },
21276
22022
  FactorMemberSortDto: { object: { id: [1, 0], name: [1, 0] } },
21277
22023
  FactorProposalDto: {
21278
22024
  object: {
22025
+ extent: [1, { array: 0 }],
22026
+ intent: [1, { array: 0 }],
21279
22027
  member_sorts: [1, { array: "FactorMemberSortDto" }],
21280
22028
  shared_features: [1, { array: "FactorSharedFeatureDto" }],
21281
22029
  suggested_name: [1, 0]
21282
22030
  }
21283
22031
  },
21284
- FactorSharedFeatureDto: { object: { name: [1, 0], required: [1, 0] } },
21285
- FactorSortsResponse: { object: { proposals: [1, { array: "FactorProposalDto" }] } },
22032
+ FactorSearchDto: {
22033
+ object: {
22034
+ complete: [1, 0],
22035
+ emitted_concepts: [1, 0],
22036
+ stop_reason: [1, 0],
22037
+ visited_concepts: [1, 0],
22038
+ work: [1, 0]
22039
+ }
22040
+ },
22041
+ FactorSharedFeatureDto: {
22042
+ object: {
22043
+ annotations: [0, { object: {} }],
22044
+ name: [1, 0],
22045
+ declared_by: [1, { array: 0 }],
22046
+ signature: [1, 0]
22047
+ }
22048
+ },
22049
+ FactorSortsResponse: {
22050
+ object: {
22051
+ input_complete: [1, 0],
22052
+ input_stop: [2, "FactorInputStopDto"],
22053
+ limits: [1, "FactorLimitsDto"],
22054
+ min_sorts: [1, 0],
22055
+ native_admission: [1, 0],
22056
+ proposals: [1, { array: "FactorProposalDto" }],
22057
+ search: [2, "FactorSearchDto"],
22058
+ version: [1, 0]
22059
+ }
22060
+ },
21286
22061
  FactoryResetResponse: {
21287
22062
  object: {
21288
22063
  cache_cleared: [1, 0],
@@ -21297,6 +22072,50 @@ var RESPONSE_COMPONENTS = {
21297
22072
  }
21298
22073
  },
21299
22074
  FailedReviewDto: { object: { reason: [1, 0], review_id: [1, 0] } },
22075
+ FcaBasisClaimDto: {
22076
+ object: {
22077
+ complete: [1, 0],
22078
+ implications: [1, { array: "FcaImplicationRecordDto" }],
22079
+ max_candidates: [3, 0],
22080
+ max_work: [3, 0]
22081
+ }
22082
+ },
22083
+ FcaConceptClaimDto: {
22084
+ object: {
22085
+ complete: [1, 0],
22086
+ concepts: [1, { array: "FcaConceptRecordDto" }],
22087
+ max_concepts: [3, 0],
22088
+ max_visited_concepts: [3, 0],
22089
+ max_work: [3, 0],
22090
+ min_extent_size: [1, 0],
22091
+ min_intent_size: [1, 0]
22092
+ }
22093
+ },
22094
+ FcaConceptRecordDto: { object: { extent: [1, { array: 0 }], intent: [1, { array: 0 }] } },
22095
+ FcaContextDto: {
22096
+ object: {
22097
+ attributes: [1, { array: 0 }],
22098
+ incidence: [1, { array: { array: 0 } }],
22099
+ objects: [1, { array: 0 }],
22100
+ version: [1, 0]
22101
+ }
22102
+ },
22103
+ FcaExportDto: {
22104
+ object: {
22105
+ basis: [2, "FcaBasisClaimDto"],
22106
+ concepts: [1, "FcaConceptClaimDto"],
22107
+ context: [1, "FcaContextDto"],
22108
+ graded: [2, "FcaGradedIncidenceDto"],
22109
+ version: [1, 0]
22110
+ }
22111
+ },
22112
+ FcaGradedDegreeDto: { object: { attribute: [1, 0], degree: [1, 0] } },
22113
+ FcaGradedIncidenceDto: {
22114
+ object: { alpha: [1, 0], degrees: [1, { array: { array: "FcaGradedDegreeDto" } }] }
22115
+ },
22116
+ FcaImplicationRecordDto: {
22117
+ object: { conclusion: [1, { array: 0 }], premise: [1, { array: 0 }] }
22118
+ },
21300
22119
  FcaIngestionRecommendationDto: {
21301
22120
  object: {
21302
22121
  confidence: [1, 0],
@@ -21840,6 +22659,40 @@ var RESPONSE_COMPONENTS = {
21840
22659
  HiddenToolDto: {
21841
22660
  object: { name: [1, 0], quality: [1, 0], reason: [1, 0], required_quality: [1, 0] }
21842
22661
  },
22662
+ HierarchyEdgeDto: {
22663
+ object: { object: [1, 0], relation_id: [1, 0], status: [1, 0], subject: [1, 0] }
22664
+ },
22665
+ HierarchyNodeDto: {
22666
+ object: {
22667
+ concept_id: [1, 0],
22668
+ depth: [1, 0],
22669
+ display_label: [2, "DisplayLabelDto"],
22670
+ via: [1, { array: 0 }]
22671
+ }
22672
+ },
22673
+ HierarchyPathsResponse: {
22674
+ object: {
22675
+ complete: [1, 0],
22676
+ context: [2, "ContextRefDto"],
22677
+ from: [1, 0],
22678
+ paths: [1, { array: { array: 0 } }],
22679
+ scheme_id: [1, 0],
22680
+ to: [1, 0],
22681
+ view: [1, "ViewRefDto"]
22682
+ }
22683
+ },
22684
+ HierarchyResponse: {
22685
+ object: {
22686
+ complete: [1, 0],
22687
+ context: [2, "ContextRefDto"],
22688
+ direction: [1, 0],
22689
+ edges: [1, { array: "HierarchyEdgeDto" }],
22690
+ nodes: [1, { array: "HierarchyNodeDto" }],
22691
+ scheme_id: [1, 0],
22692
+ transitive: [1, 0],
22693
+ view: [1, "ViewRefDto"]
22694
+ }
22695
+ },
21843
22696
  HoldoutCertifiedDto: {
21844
22697
  object: {
21845
22698
  certified: [1, 0],
@@ -21988,6 +22841,7 @@ var RESPONSE_COMPONENTS = {
21988
22841
  sorts_created: [1, 0]
21989
22842
  }
21990
22843
  },
22844
+ ImportCellNoteDto: { object: { column: [1, 0], disposition: [1, 0], reason: [1, 0] } },
21991
22845
  ImportFoundryResponse: {
21992
22846
  object: {
21993
22847
  mapped_interface_types: [1, 0],
@@ -22006,9 +22860,11 @@ var RESPONSE_COMPONENTS = {
22006
22860
  object: {
22007
22861
  reified_sorts_created: [1, { array: 0 }],
22008
22862
  relations_discovered: [1, 0],
22009
- sorts_created: [1, { array: 0 }]
22863
+ sorts_created: [1, { array: 0 }],
22864
+ sorts_refused: [0, { array: "ImportRefusedSortDto" }]
22010
22865
  }
22011
22866
  },
22867
+ ImportRefusedSortDto: { object: { name: [1, 0], reason: [1, 0] } },
22012
22868
  InboxItemDto: {
22013
22869
  object: {
22014
22870
  body: [1, 0],
@@ -22382,6 +23238,15 @@ var RESPONSE_COMPONENTS = {
22382
23238
  term_id: [1, 0]
22383
23239
  }
22384
23240
  },
23241
+ IriChoiceDto: {
23242
+ object: {
23243
+ iri: [1, 0],
23244
+ kind: [1, 0],
23245
+ record_id: [1, 0],
23246
+ rule: [1, 0],
23247
+ source_associations: [1, { array: 0 }]
23248
+ }
23249
+ },
22385
23250
  IriRepairDto: { object: { original: [1, 0], repaired: [1, 0] } },
22386
23251
  IsSubtypeResponse: { object: { is_subtype: [1, 0] } },
22387
23252
  IterationMetricDto: {
@@ -22630,6 +23495,19 @@ var RESPONSE_COMPONENTS = {
22630
23495
  LedgerInfoDto: {
22631
23496
  object: { backend: [1, 0], durability: [1, 0], n_records: [1, 0], survives_restart: [1, 0] }
22632
23497
  },
23498
+ LegacySortInventoryDto: {
23499
+ object: {
23500
+ bound_constraint_count: [1, 0],
23501
+ classification: [1, 0],
23502
+ feature_count: [1, 0],
23503
+ features_ranging_over: [1, 0],
23504
+ instances: [1, 0],
23505
+ parents: [1, { array: 0 }],
23506
+ rules_referencing: [1, 0],
23507
+ sort_id: [1, 0],
23508
+ sort_name: [1, 0]
23509
+ }
23510
+ },
22633
23511
  LggClassResponseDto: {
22634
23512
  object: {
22635
23513
  absent_from_store: [1, 0],
@@ -23220,6 +24098,18 @@ var RESPONSE_COMPONENTS = {
23220
24098
  }
23221
24099
  },
23222
24100
  MeterDto: { object: { used: [1, 0] } },
24101
+ MigrationPlanResponse: {
24102
+ object: {
24103
+ byte_size: [1, 0],
24104
+ created_at: [1, 0],
24105
+ created_by: [1, 0],
24106
+ dispositions: [1, { array: "PlannedDispositionDto" }],
24107
+ fingerprint: [1, 0],
24108
+ inventory: [1, { array: "LegacySortInventoryDto" }],
24109
+ plan_id: [1, 0],
24110
+ replayed: [1, 0]
24111
+ }
24112
+ },
23223
24113
  MigrationPreviewEntryDto: {
23224
24114
  object: {
23225
24115
  classification: [1, 0],
@@ -23308,11 +24198,33 @@ var RESPONSE_COMPONENTS = {
23308
24198
  variable: [1, 0]
23309
24199
  }
23310
24200
  },
24201
+ NamespaceAnswerCachePolicyDto: {
24202
+ object: { enabled: [1, 0], revision: [1, 0], ttl_seconds: [1, 0] }
24203
+ },
23311
24204
  NamespaceDto: {
23312
24205
  object: { id: [1, 0], name: [1, 0], path: [1, 0], tags: [1, { array: 0 }], visibility: [1, 0] }
23313
24206
  },
23314
24207
  NamespaceListResponse: { object: { count: [1, 0], namespaces: [1, { array: "NamespaceDto" }] } },
23315
24208
  NamespaceResponse: { object: { namespace: [1, "NamespaceDto"] } },
24209
+ NativeExportManifestDto: {
24210
+ object: {
24211
+ context_manifest: [2, "ContextManifestDto"],
24212
+ counts_by_kind: [1, { object: {} }],
24213
+ record_count: [1, 0],
24214
+ records_sha256: [1, 0],
24215
+ unreadable: [1, { array: "UnreadableRecordDto" }]
24216
+ }
24217
+ },
24218
+ NativeExportResponse: {
24219
+ object: {
24220
+ artifacts: [1, { array: "SourceArtifactRecordDto" }],
24221
+ context: [2, "ContextRefDto"],
24222
+ format: [1, 0],
24223
+ manifest: [1, "NativeExportManifestDto"],
24224
+ records: [1, { array: 0 }],
24225
+ view: [1, "ViewRefDto"]
24226
+ }
24227
+ },
23316
24228
  NearMiss: {
23317
24229
  object: {
23318
24230
  byte_end: [1, 0],
@@ -23351,6 +24263,9 @@ var RESPONSE_COMPONENTS = {
23351
24263
  },
23352
24264
  NlQueryResultItem: { object: { features: [1, { object: {} }], id: [1, 0], sort_name: [1, 0] } },
23353
24265
  NodeScoreDto: { object: { node_id: [1, 0], score: [1, 0] } },
24266
+ NotationRecordDto: {
24267
+ object: { concept: [1, 0], record_id: [1, 0], scheme: [1, 0], value: [1, 0] }
24268
+ },
23354
24269
  NumberToStringResponse: { object: { result: [1, 0] } },
23355
24270
  OAuthStartResponse: { object: { auth_url: [1, 0] } },
23356
24271
  ObjectTypeDto: {
@@ -23844,6 +24759,25 @@ var RESPONSE_COMPONENTS = {
23844
24759
  }
23845
24760
  },
23846
24761
  PersonalityTrait: { object: { description: [1, 0], name: [1, 0], strength: [1, 0] } },
24762
+ PicklistEntryDto: {
24763
+ object: {
24764
+ concept_id: [1, 0],
24765
+ depth: [1, 0],
24766
+ display_label: [2, "DisplayLabelDto"],
24767
+ other_parent_relation_ids: [1, { array: 0 }]
24768
+ }
24769
+ },
24770
+ PicklistResponse: {
24771
+ object: {
24772
+ complete: [1, 0],
24773
+ context: [2, "ContextRefDto"],
24774
+ entries: [1, { array: "PicklistEntryDto" }],
24775
+ roots: [1, { array: 0 }],
24776
+ roots_from: [1, 0],
24777
+ scheme_id: [1, 0],
24778
+ view: [1, "ViewRefDto"]
24779
+ }
24780
+ },
23847
24781
  PipelineQualityStatsDto: {
23848
24782
  object: {
23849
24783
  axioms_deduplicated: [1, 0],
@@ -23897,6 +24831,7 @@ var RESPONSE_COMPONENTS = {
23897
24831
  total_requested: [1, 0]
23898
24832
  }
23899
24833
  },
24834
+ PlannedDispositionDto: { object: { disposition: [1, 0], rationale: [1, 0], sort_id: [1, 0] } },
23900
24835
  PlannedStrategyDto: { object: { allocated: [1, 0], name: [1, 0], weight: [1, 0] } },
23901
24836
  PluginBindingDto: {
23902
24837
  object: {
@@ -24027,6 +24962,7 @@ var RESPONSE_COMPONENTS = {
24027
24962
  total_profit: [1, 0]
24028
24963
  }
24029
24964
  },
24965
+ ProjectionLossDto: { object: { kind: [1, 0], reason: [1, 0], record_ids: [1, { array: 0 }] } },
24030
24966
  PromptTraceDto: { object: { llm_context: [1, "LlmContextTraceDto"], system_prompt: [1, 0] } },
24031
24967
  ProofConclusionDto: { object: { features: [1, { object: {} }], sort_id: [1, 0] } },
24032
24968
  ProofDto: {
@@ -24326,6 +25262,7 @@ var RESPONSE_COMPONENTS = {
24326
25262
  timestamp: [1, 0]
24327
25263
  }
24328
25264
  },
25265
+ ReconciliationEntryDto: { object: { kind: [1, 0], proposal: [1, 0], source_key: [1, 0] } },
24329
25266
  RecordChangeDto: {
24330
25267
  object: { feature_changes: [1, { array: "RecordFeatureChangeDto" }], record_id: [1, 0] }
24331
25268
  },
@@ -25233,6 +26170,26 @@ var RESPONSE_COMPONENTS = {
25233
26170
  }
25234
26171
  },
25235
26172
  SkippedWebPageDto: { object: { depth: [1, 0], message: [1, 0], reason: [1, 0], url: [1, 0] } },
26173
+ SkosExportResponse: {
26174
+ object: {
26175
+ content: [1, 0],
26176
+ manifest: [1, "SkosManifestDto"],
26177
+ media_type: [1, 0],
26178
+ sha256: [1, 0]
26179
+ }
26180
+ },
26181
+ SkosManifestDto: {
26182
+ object: {
26183
+ include_provenance: [1, 0],
26184
+ iri_policy: [1, 0],
26185
+ iris: [1, { array: "IriChoiceDto" }],
26186
+ losses: [1, { array: "ProjectionLossDto" }],
26187
+ projection: [1, 0],
26188
+ scheme_id: [1, 0],
26189
+ triple_count: [1, 0],
26190
+ view: [1, "ViewRefDto"]
26191
+ }
26192
+ },
25236
26193
  SmoothingParametersDto: { object: { alpha: [1, 0] } },
25237
26194
  SmtCheckResponse: { object: { assignments: [2, { object: {} }], result: [1, 0] } },
25238
26195
  SnapshotFilter: { object: { request_path_pattern: [1, 0] } },
@@ -25501,6 +26458,25 @@ var RESPONSE_COMPONENTS = {
25501
26458
  schema_rejected_missing_source_span: [1, 0]
25502
26459
  }
25503
26460
  },
26461
+ SourceArtifactRecordDto: {
26462
+ object: {
26463
+ byte_size: [1, 0],
26464
+ dataset: [1, 0],
26465
+ format: [1, 0],
26466
+ record_id: [1, 0],
26467
+ retained_locator: [1, 0],
26468
+ sha256: [1, 0]
26469
+ }
26470
+ },
26471
+ SourceAssociationRecordDto: {
26472
+ object: {
26473
+ artifact: [1, 0],
26474
+ change_reason: [1, 0],
26475
+ record_id: [1, 0],
26476
+ revision: [1, 0],
26477
+ source_key: [1, 0]
26478
+ }
26479
+ },
25504
26480
  SourceDetailResponse: {
25505
26481
  object: {
25506
26482
  available: [1, 0],
@@ -25546,6 +26522,14 @@ var RESPONSE_COMPONENTS = {
25546
26522
  }
25547
26523
  },
25548
26524
  SpaceResponse: { object: { constraint_count: [1, 0], id: [1, 0], status: [1, 0] } },
26525
+ SparqlDatasetDto: {
26526
+ object: {
26527
+ projection: [1, 0],
26528
+ scheme_id: [1, 0],
26529
+ triple_count: [1, 0],
26530
+ view: [1, "ViewRefDto"]
26531
+ }
26532
+ },
25549
26533
  SparqlExplainDto: {
25550
26534
  object: {
25551
26535
  complete: [1, 0],
@@ -25568,6 +26552,14 @@ var RESPONSE_COMPONENTS = {
25568
26552
  sorts: [0, { array: 0 }]
25569
26553
  }
25570
26554
  },
26555
+ SparqlResponse: {
26556
+ object: {
26557
+ complete: [1, 0],
26558
+ dataset: [1, "SparqlDatasetDto"],
26559
+ form: [1, 0],
26560
+ results: [1, { object: {} }]
26561
+ }
26562
+ },
25571
26563
  SparqlUpdateExplainDto: { object: { osfql: [1, { array: 0 }] } },
25572
26564
  SpeakerDetectionDto: {
25573
26565
  object: {
@@ -25830,6 +26822,18 @@ var RESPONSE_COMPONENTS = {
25830
26822
  }
25831
26823
  },
25832
26824
  TaskDto: { object: { is_primitive: [1, 0], subtasks: [1, { array: 0 }], task_id: [1, 0] } },
26825
+ TaxonomyPolicyResponse: {
26826
+ object: {
26827
+ acyclic: [1, 0],
26828
+ context: [2, "ContextRefDto"],
26829
+ declared: [1, 0],
26830
+ policy: [1, 0],
26831
+ require_placement: [1, 0],
26832
+ scheme_id: [1, 0],
26833
+ top_concepts: [1, 0],
26834
+ view: [1, "ViewRefDto"]
26835
+ }
26836
+ },
25833
26837
  TemporalModelCheckResponse: {
25834
26838
  object: {
25835
26839
  counterexample: [2, "CounterExampleDto"],
@@ -25973,6 +26977,14 @@ var RESPONSE_COMPONENTS = {
25973
26977
  }
25974
26978
  },
25975
26979
  ToolCallInfo: { object: { arguments: [1, 0], confidence: [1, 0], name: [1, 0] } },
26980
+ TopConceptsResponse: {
26981
+ object: {
26982
+ concepts: [1, { array: "ConceptSummaryDto" }],
26983
+ context: [2, "ContextRefDto"],
26984
+ scheme_id: [1, 0],
26985
+ view: [1, "ViewRefDto"]
26986
+ }
26987
+ },
25976
26988
  TraceStepDto: {
25977
26989
  object: {
25978
26990
  entropy: [1, 0],
@@ -26179,6 +27191,7 @@ var RESPONSE_COMPONENTS = {
26179
27191
  UnknownClusterDto: {
26180
27192
  object: { cluster: [1, 0], spans: [1, { array: "SpeechSpanDto" }], speech_secs: [1, 0] }
26181
27193
  },
27194
+ UnreadableRecordDto: { object: { reason: [1, 0], record_id: [1, 0] } },
26182
27195
  UnsatisfiableClassDto: { object: { class: [1, 0], disjoint_pair: [1, { array: 0 }] } },
26183
27196
  UnsatisfiableSortDto: { object: { disjoint_pair: [1, { array: 0 }], sort: [1, 0] } },
26184
27197
  UpdateAgentResponse: {
@@ -26312,6 +27325,9 @@ var RESPONSE_COMPONENTS = {
26312
27325
  }
26313
27326
  },
26314
27327
  VerificationStepDto: { object: { description: [1, 0], name: [1, 0], passed: [1, 0] } },
27328
+ VerifiedFcaImportDto: {
27329
+ object: { concepts: [1, 0], concepts_complete: [1, 0], sources: [1, { array: 0 }] }
27330
+ },
26315
27331
  VerifyClaimResponse: {
26316
27332
  object: {
26317
27333
  contradicting_count: [1, 0],
@@ -26412,6 +27428,40 @@ var RESPONSE_COMPONENTS = {
26412
27428
  subjects: [1, { array: 0 }]
26413
27429
  }
26414
27430
  },
27431
+ VocabularyImportArtifactDto: {
27432
+ object: { byte_size: [1, 0], format: [1, 0], sha256: [1, 0], source_file_id: [1, 0] }
27433
+ },
27434
+ VocabularyImportItemDto: {
27435
+ object: {
27436
+ coordinates: [1, { object: {} }],
27437
+ disposition: [1, 0],
27438
+ item: [1, { object: {} }],
27439
+ notes: [1, { array: "ImportCellNoteDto" }],
27440
+ ordinal: [1, 0],
27441
+ resource_keys: [1, { array: 0 }]
27442
+ }
27443
+ },
27444
+ VocabularyImportItemsResponse: {
27445
+ object: {
27446
+ complete: [1, 0],
27447
+ import_id: [1, 0],
27448
+ items: [1, { array: "VocabularyImportItemDto" }]
27449
+ }
27450
+ },
27451
+ VocabularyImportResponse: {
27452
+ object: {
27453
+ artifact: [1, "VocabularyImportArtifactDto"],
27454
+ complete: [1, 0],
27455
+ counts: [1, { object: {} }],
27456
+ created_at: [1, 0],
27457
+ created_by: [1, 0],
27458
+ dataset: [1, 0],
27459
+ import_id: [1, 0],
27460
+ proposed_record_counts: [1, { object: {} }],
27461
+ reconciliation: [1, { array: "ReconciliationEntryDto" }],
27462
+ replayed: [1, 0]
27463
+ }
27464
+ },
26415
27465
  VocabularyMatch: {
26416
27466
  object: {
26417
27467
  canonical: [1, 0],
@@ -26510,7 +27560,8 @@ var RESPONSE_COMPONENTS = {
26510
27560
  blocked_by: [1, { array: "WhyNotPremiseDto" }],
26511
27561
  head_sort: [1, 0],
26512
27562
  jointly_unsatisfied: [1, 0],
26513
- rule_id: [1, 0]
27563
+ rule_id: [1, 0],
27564
+ undetermined: [0, { array: "WhyNotPremiseDto" }]
26514
27565
  }
26515
27566
  },
26516
27567
  WithOriginals_AsyncBatchIngestionResponse: {
@@ -26591,6 +27642,18 @@ var RESPONSE_COMPONENTS = {
26591
27642
  }
26592
27643
  },
26593
27644
  WorldModelTransitionDto: { object: { probability: [1, 0] } },
27645
+ XlLabelRecordDto: {
27646
+ object: {
27647
+ change_reason: [1, 0],
27648
+ concept: [1, 0],
27649
+ label: [1, 0],
27650
+ record_id: [1, 0],
27651
+ resource_key: [1, 0],
27652
+ revision: [1, 0],
27653
+ role: [1, 0],
27654
+ scheme: [1, 0]
27655
+ }
27656
+ },
26594
27657
  YankResponse: { object: { plugin_id: [1, 0], yanked: [1, 0] } }
26595
27658
  };
26596
27659
  var RESPONSE_OPERATIONS = {
@@ -26780,6 +27843,11 @@ var RESPONSE_OPERATIONS = {
26780
27843
  path: "/api/v1/causal/intervention",
26781
27844
  responses: { 200: "InterventionResponse" }
26782
27845
  },
27846
+ applyMigrationPlan: {
27847
+ method: "POST",
27848
+ path: "/api/v1/vocabulary/migration/plans/{plan_id}/apply",
27849
+ responses: { 201: "CandidateRevisionResponse" }
27850
+ },
26783
27851
  applySnapshot: {
26784
27852
  method: "POST",
26785
27853
  path: "/api/v1/admin/snapshots/{snapshot_id}/apply/{target_tenant_id}",
@@ -26875,6 +27943,11 @@ var RESPONSE_OPERATIONS = {
26875
27943
  path: "/api/v1/copy/batch",
26876
27944
  responses: { 200: "BatchCopyResponse" }
26877
27945
  },
27946
+ batchGetSubsumptions: {
27947
+ method: "POST",
27948
+ path: "/api/v1/sorts/subsumption/get/batch",
27949
+ responses: { 200: "BatchGetSubsumptionsResponse" }
27950
+ },
26878
27951
  bayesianPredict: {
26879
27952
  method: "POST",
26880
27953
  path: "/api/v1/inference/bayesian-predict",
@@ -26990,6 +28063,11 @@ var RESPONSE_OPERATIONS = {
26990
28063
  path: "/api/v1/sorts/similarity/bulk",
26991
28064
  responses: { 200: "BulkSetSimilaritiesResponse" }
26992
28065
  },
28066
+ bulkSetSubsumptions: {
28067
+ method: "POST",
28068
+ path: "/api/v1/sorts/subsumption/bulk",
28069
+ responses: { 200: "BulkSetSubsumptionsResponse" }
28070
+ },
26993
28071
  calibrateConformal: {
26994
28072
  method: "POST",
26995
28073
  path: "/api/v1/conformal/calibrate",
@@ -27154,6 +28232,11 @@ var RESPONSE_OPERATIONS = {
27154
28232
  path: "/api/v1/flow-networks/{network_id}/commit",
27155
28233
  responses: { 200: "FlowNetworkResponse" }
27156
28234
  },
28235
+ commitImport: {
28236
+ method: "POST",
28237
+ path: "/api/v1/vocabulary/imports/{import_id}/commit",
28238
+ responses: { 201: "CandidateRevisionResponse" }
28239
+ },
27157
28240
  commitSpace: {
27158
28241
  method: "POST",
27159
28242
  path: "/api/v1/spaces/{space_id}/commit",
@@ -27238,11 +28321,21 @@ var RESPONSE_OPERATIONS = {
27238
28321
  path: "/api/v1/analysis/path",
27239
28322
  responses: { 200: "PathResponse" }
27240
28323
  },
28324
+ conceptExpansion: {
28325
+ method: "GET",
28326
+ path: "/api/v1/vocabulary/concepts/{concept_id}/expansion",
28327
+ responses: { 200: "ExpansionResponse" }
28328
+ },
27241
28329
  conceptHistory: {
27242
28330
  method: "GET",
27243
28331
  path: "/api/v1/vocabulary/concepts/{concept_id}/history",
27244
28332
  responses: { 200: "ConceptHistoryResponse" }
27245
28333
  },
28334
+ conceptRelations: {
28335
+ method: "GET",
28336
+ path: "/api/v1/vocabulary/concepts/{concept_id}/relations",
28337
+ responses: { 200: "ConceptRelationsResponse" }
28338
+ },
27246
28339
  configureOrchestrator: {
27247
28340
  method: "POST",
27248
28341
  path: "/api/v1/inference/orchestrator/configure",
@@ -27361,11 +28454,21 @@ var RESPONSE_OPERATIONS = {
27361
28454
  path: "/api/v1/inference/goals",
27362
28455
  responses: { 201: "CreateGoalResponse" }
27363
28456
  },
28457
+ createImport: {
28458
+ method: "POST",
28459
+ path: "/api/v1/vocabulary/imports",
28460
+ responses: { 201: "VocabularyImportResponse" }
28461
+ },
27364
28462
  createIngestSource: {
27365
28463
  method: "POST",
27366
28464
  path: "/api/v1/ingest/sources",
27367
28465
  responses: { 201: "SourceDto" }
27368
28466
  },
28467
+ createMigrationPlan: {
28468
+ method: "POST",
28469
+ path: "/api/v1/vocabulary/migration/plans",
28470
+ responses: { 201: "MigrationPlanResponse" }
28471
+ },
27369
28472
  createModule: {
27370
28473
  method: "POST",
27371
28474
  path: "/api/v1/modules",
@@ -27449,6 +28552,11 @@ var RESPONSE_OPERATIONS = {
27449
28552
  path: "/api/v1/causal/latent-variables",
27450
28553
  responses: { 201: "DeclareLatentVariableResponse" }
27451
28554
  },
28555
+ declaredAlphaCutBelow: {
28556
+ method: "POST",
28557
+ path: "/api/v1/sorts/subsumption/alpha-cut",
28558
+ responses: { 200: "DeclaredAlphaCutResponse" }
28559
+ },
27452
28560
  decodeGlb: {
27453
28561
  method: "POST",
27454
28562
  path: "/api/v1/sorts/glb/decode",
@@ -27862,11 +28970,21 @@ var RESPONSE_OPERATIONS = {
27862
28970
  path: "/api/v1/dsr/{id}/export",
27863
28971
  responses: { 200: "DsrExportResponse" }
27864
28972
  },
28973
+ exportFca: {
28974
+ method: "POST",
28975
+ path: "/api/v1/analysis/fca-exports",
28976
+ responses: { 200: "FcaExportDto" }
28977
+ },
27865
28978
  exportJsonl: {
27866
28979
  method: "POST",
27867
28980
  path: "/api/v1/synthetic/export-jsonl",
27868
28981
  responses: { 200: "ExportJsonlResponse" }
27869
28982
  },
28983
+ exportNative: {
28984
+ method: "GET",
28985
+ path: "/api/v1/vocabulary/exports/native",
28986
+ responses: { 200: "NativeExportResponse" }
28987
+ },
27870
28988
  exportPatternContext: {
27871
28989
  method: "POST",
27872
28990
  path: "/api/v1/analysis/pattern-proposals/context",
@@ -27877,6 +28995,11 @@ var RESPONSE_OPERATIONS = {
27877
28995
  path: "/api/v1/proof/export",
27878
28996
  responses: { 200: "ProofExportResponse" }
27879
28997
  },
28998
+ exportSkos: {
28999
+ method: "GET",
29000
+ path: "/api/v1/vocabulary/exports/skos",
29001
+ responses: { 200: "SkosExportResponse" }
29002
+ },
27880
29003
  extendDsr: {
27881
29004
  method: "POST",
27882
29005
  path: "/api/v1/dsr/{id}/extend",
@@ -28343,6 +29466,11 @@ var RESPONSE_OPERATIONS = {
28343
29466
  path: "/api/v1/visualization/hypergraph",
28344
29467
  responses: { 200: "HypergraphResponse" }
28345
29468
  },
29469
+ getImport: {
29470
+ method: "GET",
29471
+ path: "/api/v1/vocabulary/imports/{import_id}",
29472
+ responses: { 200: "VocabularyImportResponse" }
29473
+ },
28346
29474
  getInbox: { method: "GET", path: "/api/v1/inbox", responses: { 200: "InboxResponse" } },
28347
29475
  getInferenceJob: {
28348
29476
  method: "GET",
@@ -28399,6 +29527,11 @@ var RESPONSE_OPERATIONS = {
28399
29527
  path: "/api/v1/inference/meta-sorts",
28400
29528
  responses: { 200: "MetaSortsResponse" }
28401
29529
  },
29530
+ getMigrationPlan: {
29531
+ method: "GET",
29532
+ path: "/api/v1/vocabulary/migration/plans/{plan_id}",
29533
+ responses: { 200: "MigrationPlanResponse" }
29534
+ },
28402
29535
  getMyTenant: {
28403
29536
  method: "GET",
28404
29537
  path: "/api/v1/tenants/me",
@@ -28414,6 +29547,11 @@ var RESPONSE_OPERATIONS = {
28414
29547
  path: "/api/v1/namespaces/{id}/ancestors",
28415
29548
  responses: { 200: "NamespaceListResponse" }
28416
29549
  },
29550
+ getNamespaceAnswerCachePolicy: {
29551
+ method: "GET",
29552
+ path: "/api/v1/namespaces/{id}/answer-cache-policy",
29553
+ responses: { 200: "NamespaceAnswerCachePolicyDto" }
29554
+ },
28417
29555
  getNamespaceByPath: {
28418
29556
  method: "GET",
28419
29557
  path: "/api/v1/namespaces/path/{tenant_id}/{path}",
@@ -28637,6 +29775,11 @@ var RESPONSE_OPERATIONS = {
28637
29775
  path: "/api/v1/verification/certificates/{id}",
28638
29776
  responses: { 200: "VerificationCertificateResponse" }
28639
29777
  },
29778
+ getVocabularyCollection: {
29779
+ method: "GET",
29780
+ path: "/api/v1/vocabulary/collections/{collection_id}",
29781
+ responses: { 200: "CollectionDetailResponse" }
29782
+ },
28640
29783
  getWorkflow: { method: "GET", path: "/api/v1/workflows/{id}", responses: { 200: "WorkflowDto" } },
28641
29784
  getWorkflowRun: {
28642
29785
  method: "GET",
@@ -28709,6 +29852,11 @@ var RESPONSE_OPERATIONS = {
28709
29852
  path: "/api/v1/ontology/import-foundry",
28710
29853
  responses: { 201: "ImportFoundryResponse" }
28711
29854
  },
29855
+ importItems: {
29856
+ method: "GET",
29857
+ path: "/api/v1/vocabulary/imports/{import_id}/items",
29858
+ responses: { 200: "VocabularyImportItemsResponse" }
29859
+ },
28712
29860
  importKappa: {
28713
29861
  method: "POST",
28714
29862
  path: "/api/v1/injection/kappa",
@@ -29313,6 +30461,11 @@ var RESPONSE_OPERATIONS = {
29313
30461
  path: "/api/v1/namespaces/{namespace_id}/visible-terms",
29314
30462
  responses: { 200: "TermListResponse" }
29315
30463
  },
30464
+ listVocabularyCollections: {
30465
+ method: "GET",
30466
+ path: "/api/v1/vocabulary/collections",
30467
+ responses: { 200: "CollectionPageResponse" }
30468
+ },
29316
30469
  listVoices: {
29317
30470
  method: "GET",
29318
30471
  path: "/api/v1/speech/voices",
@@ -30127,6 +31280,31 @@ var RESPONSE_OPERATIONS = {
30127
31280
  path: "/api/v1/vocabulary/candidates/{candidate_id}/revisions",
30128
31281
  responses: { 201: "CandidateRevisionResponse" }
30129
31282
  },
31283
+ schemeHierarchy: {
31284
+ method: "GET",
31285
+ path: "/api/v1/vocabulary/schemes/{scheme_id}/hierarchy",
31286
+ responses: { 200: "HierarchyResponse" }
31287
+ },
31288
+ schemePaths: {
31289
+ method: "GET",
31290
+ path: "/api/v1/vocabulary/schemes/{scheme_id}/paths",
31291
+ responses: { 200: "HierarchyPathsResponse" }
31292
+ },
31293
+ schemePicklist: {
31294
+ method: "GET",
31295
+ path: "/api/v1/vocabulary/schemes/{scheme_id}/picklist",
31296
+ responses: { 200: "PicklistResponse" }
31297
+ },
31298
+ schemePolicy: {
31299
+ method: "GET",
31300
+ path: "/api/v1/vocabulary/schemes/{scheme_id}/policy",
31301
+ responses: { 200: "TaxonomyPolicyResponse" }
31302
+ },
31303
+ schemeTopConcepts: {
31304
+ method: "GET",
31305
+ path: "/api/v1/vocabulary/schemes/{scheme_id}/top-concepts",
31306
+ responses: { 200: "TopConceptsResponse" }
31307
+ },
30130
31308
  scmCounterfactual: {
30131
31309
  method: "POST",
30132
31310
  path: "/api/v1/causal/counterfactual/scm",
@@ -30267,6 +31445,7 @@ var RESPONSE_OPERATIONS = {
30267
31445
  path: "/api/v1/constraints/solve",
30268
31446
  responses: { 200: "SolveConstraintResponse" }
30269
31447
  },
31448
+ solveCsp: { method: "POST", path: "/api/v1/csp/solve", responses: { 200: "CspSolveResponse" } },
30270
31449
  solveFlowNetwork: {
30271
31450
  method: "POST",
30272
31451
  path: "/api/v1/flow-networks/{network_id}/solve",
@@ -30294,6 +31473,11 @@ var RESPONSE_OPERATIONS = {
30294
31473
  path: "/api/v1/sorts/index/status",
30295
31474
  responses: { 200: "SortIndexStatusResponse" }
30296
31475
  },
31476
+ sparqlQuery: {
31477
+ method: "POST",
31478
+ path: "/api/v1/vocabulary/sparql",
31479
+ responses: { 200: "SparqlResponse" }
31480
+ },
30297
31481
  startExploration: {
30298
31482
  method: "POST",
30299
31483
  path: "/api/v1/analysis/attribute-exploration/start",
@@ -30534,6 +31718,11 @@ var RESPONSE_OPERATIONS = {
30534
31718
  path: "/api/v1/cognitive/agents/{agent_id}",
30535
31719
  responses: { 200: "UpdateAgentResponse" }
30536
31720
  },
31721
+ updateNamespaceAnswerCachePolicy: {
31722
+ method: "PUT",
31723
+ path: "/api/v1/namespaces/{id}/answer-cache-policy",
31724
+ responses: { 200: "NamespaceAnswerCachePolicyDto" }
31725
+ },
30537
31726
  updatePlanStats: {
30538
31727
  method: "POST",
30539
31728
  path: "/api/v1/cognitive/agents/plans/stats",
@@ -30635,6 +31824,11 @@ var RESPONSE_OPERATIONS = {
30635
31824
  path: "/api/v1/synthetic/verify-faithfulness",
30636
31825
  responses: { 200: "VerifyFaithfulnessResponse" }
30637
31826
  },
31827
+ verifyFcaExport: {
31828
+ method: "POST",
31829
+ path: "/api/v1/analysis/fca-exports/verify",
31830
+ responses: { 200: "VerifiedFcaImportDto" }
31831
+ },
30638
31832
  verifyIntegrity: {
30639
31833
  method: "POST",
30640
31834
  path: "/api/v1/audit/verify-integrity",
@@ -30996,19 +32190,42 @@ var SortsClient = class {
30996
32190
  /**
30997
32191
  * Propose mixin parents for feature shapes several sorts repeat unchanged.
30998
32192
  *
30999
- * @param request - Which sorts to analyse (default: all), and the least
31000
- * number of sorts a proposal must cover (default and floor: 2).
31001
- * @returns Candidate parents, most shared declarations first.
31002
- * @throws {ApiError} If the request fails.
32193
+ * @param request - Which sorts to analyse (default: all), the least number of
32194
+ * sorts a proposal must cover (default and floor: 2), and optional lower
32195
+ * budgets in `limits`.
32196
+ * @returns Candidate parents, most shared declarations first, with the input,
32197
+ * search and presentation coverage of the run.
32198
+ * @throws {ApiError} If the request fails: `400` for an invalid selection or a
32199
+ * limit above the native ceiling, `403` when a source or ancestor schema is
32200
+ * not readable, `422` when a declaration cannot be represented losslessly.
31003
32201
  *
31004
32202
  * @remarks
31005
- * Deterministic and read-only: it groups sorts over identical feature +
31006
- * constraint declarations. `suggestedName` is a placeholder to rename
31007
- * before creating the parent.
32203
+ * Never writes. The analysis runs native formal concept analysis over whole
32204
+ * feature declarations and checks each concept. `suggestedName` is a
32205
+ * placeholder to rename before creating the parent.
32206
+ *
32207
+ * Coverage has three independent parts. Read all three before you claim
32208
+ * coverage. `inputComplete` says whether the whole cohort was read within the
32209
+ * limits; when it is `false`, `inputStop` names the stop and no search ran.
32210
+ * `search.complete` says whether the enumeration was exhausted. That
32211
+ * exhaustion concerns the stated tenant and policy cohort only. Presentation
32212
+ * can truncate independently: `presentationStopReason` is set when the list
32213
+ * is shorter than the search result.
32214
+ *
32215
+ * A proposal is a candidate, not an admission. `nativeAdmission` is always
32216
+ * `false`. Neither the report nor its digest `contextSha256` is an admission
32217
+ * seal. To accept a candidate, use the existing governed declaration and
32218
+ * reparenting operations.
32219
+ *
32220
+ * Serialization: the request `limits` keys are sent as snake_case `max_*`.
32221
+ * An absent budget is omitted, never sent as `null`.
31008
32222
  *
31009
32223
  * @example
31010
32224
  * ```typescript
31011
- * const { proposals } = await client.sorts.factorSorts({ minSorts: 3 });
32225
+ * const report = await client.sorts.factorSorts({ minSorts: 3, limits: { maxProposals: 50 } });
32226
+ * if (report.inputComplete && report.search?.complete && report.presentationStopReason == null) {
32227
+ * console.log(report.proposals.length);
32228
+ * }
31012
32229
  * ```
31013
32230
  */
31014
32231
  async factorSorts(request = {}, requestOptions) {
@@ -33169,6 +34386,17 @@ function SolutionDtoFromApiToFront(dto) {
33169
34386
  }
33170
34387
  return solution;
33171
34388
  }
34389
+ function WhyNotPremiseFromApiToFront(dto) {
34390
+ return {
34391
+ sort: dto.sort,
34392
+ // Premise feature names are user data: kept as written.
34393
+ features: Object.fromEntries(
34394
+ Object.entries(dto.features).filter(
34395
+ (entry) => entry[1] !== void 0
34396
+ )
34397
+ )
34398
+ };
34399
+ }
33172
34400
  function WhyNotFromApiToFront(dto) {
33173
34401
  return {
33174
34402
  goalSort: dto.goal_sort,
@@ -33186,14 +34414,9 @@ function WhyNotFromApiToFront(dto) {
33186
34414
  rules: dto.rules.map((r) => ({
33187
34415
  ruleId: r.rule_id,
33188
34416
  headSort: r.head_sort,
33189
- blockedBy: r.blocked_by.map((p) => ({
33190
- sort: p.sort,
33191
- features: Object.fromEntries(
33192
- Object.entries(p.features).filter(
33193
- (entry) => entry[1] !== void 0
33194
- )
33195
- )
33196
- })),
34417
+ blockedBy: r.blocked_by.map(WhyNotPremiseFromApiToFront),
34418
+ // Always sent by the engine; an engine that predates it sends none.
34419
+ undetermined: (r.undetermined ?? []).map(WhyNotPremiseFromApiToFront),
33197
34420
  jointlyUnsatisfied: r.jointly_unsatisfied
33198
34421
  }))
33199
34422
  };
@@ -34888,6 +36111,7 @@ function UnifiableQueryRequestFromFrontToApi(model) {
34888
36111
  }
34889
36112
  function FindBySortRequestFromFrontToApi(model) {
34890
36113
  return {
36114
+ fields: model.fields ?? void 0,
34891
36115
  sort_id: model.sortId ?? void 0,
34892
36116
  sort_name: model.sortName ?? void 0,
34893
36117
  filter: model.filter ?? void 0,
@@ -34986,6 +36210,7 @@ function ToolCallInfoFromApiToFront(dto) {
34986
36210
  function NlQueryRequestFromFrontToApi(model) {
34987
36211
  return {
34988
36212
  query: model.query,
36213
+ fresh: model.fresh,
34989
36214
  mode: model.mode,
34990
36215
  tenant_id: model.tenantId,
34991
36216
  conversation_history: model.conversationHistory ?? void 0,
@@ -35575,6 +36800,7 @@ function CycleOutcomeDtoFromApiToFront(dto) {
35575
36800
  goalsPursued: dto.goals_pursued,
35576
36801
  goalsAchieved: dto.goals_achieved,
35577
36802
  goalsFailed: dto.goals_failed,
36803
+ goalsDeferred: dto.goals_deferred ?? [],
35578
36804
  actionsExecuted: dto.actions_executed,
35579
36805
  newBeliefs: dto.new_beliefs,
35580
36806
  updatedBeliefs: dto.updated_beliefs,
@@ -37894,6 +39120,18 @@ function NamespaceListResponseFromApiToFront(dto) {
37894
39120
  count: dto.count
37895
39121
  };
37896
39122
  }
39123
+ function UpdateNamespaceAnswerCachePolicyRequestFromFrontToApi(model) {
39124
+ return { enabled: model.enabled, ttl_seconds: model.ttlSeconds };
39125
+ }
39126
+ function NamespaceAnswerCachePolicyDtoFromApiToFront(dto) {
39127
+ return {
39128
+ enabled: dto.enabled,
39129
+ ttlSeconds: dto.ttl_seconds,
39130
+ revision: dto.revision,
39131
+ updatedBy: dto.updated_by,
39132
+ updatedAt: dto.updated_at
39133
+ };
39134
+ }
37897
39135
 
37898
39136
  // src/resources/namespaces.ts
37899
39137
  var NamespacesClient = class {
@@ -37945,6 +39183,23 @@ var NamespacesClient = class {
37945
39183
  const response = await this.api.getNamespace(namespaceId, toRequestParams(requestOptions));
37946
39184
  return decodeResponse(response, (dto) => NamespaceDtoFromApiToFront(dto.namespace));
37947
39185
  }
39186
+ /** Read durable answer-cache settings. OSFKB checks the native namespace grant. */
39187
+ async getAnswerCachePolicy(namespaceId, requestOptions) {
39188
+ const response = await this.api.getNamespaceAnswerCachePolicy(
39189
+ namespaceId,
39190
+ toRequestParams(requestOptions)
39191
+ );
39192
+ return decodeResponse(response, NamespaceAnswerCachePolicyDtoFromApiToFront);
39193
+ }
39194
+ /** Save settings in OSFKB; policy validation and cache admission stay in the engine. */
39195
+ async updateAnswerCachePolicy(namespaceId, request, requestOptions) {
39196
+ const response = await this.api.updateNamespaceAnswerCachePolicy(
39197
+ namespaceId,
39198
+ UpdateNamespaceAnswerCachePolicyRequestFromFrontToApi(request),
39199
+ toRequestParams(requestOptions)
39200
+ );
39201
+ return decodeResponse(response, NamespaceAnswerCachePolicyDtoFromApiToFront);
39202
+ }
37948
39203
  /**
37949
39204
  * Delete a namespace.
37950
39205
  *
@@ -41146,6 +42401,7 @@ function TranslateRdfResponseFromApiToFront(dto) {
41146
42401
  prefixes: definedRecordOrNullish(dto.prefixes),
41147
42402
  repairedIriCount: dto.repaired_iri_count ?? 0,
41148
42403
  repairedIris: (dto.repaired_iris ?? []).map(IriRepairFromApiToFront),
42404
+ routedToVocabularyImport: dto.routed_to_vocabulary_import ?? 0,
41149
42405
  sortPreviews: (dto.sort_previews ?? []).map(SortPreviewFromApiToFront),
41150
42406
  sorts: dto.sorts,
41151
42407
  termCount: dto.term_count,
@@ -41200,6 +42456,7 @@ function IngestRdfResponseFromApiToFront(dto) {
41200
42456
  return {
41201
42457
  repairedIriCount: dto.repaired_iri_count ?? 0,
41202
42458
  repairedIris: (dto.repaired_iris ?? []).map(IriRepairFromApiToFront),
42459
+ routedToVocabularyImport: dto.routed_to_vocabulary_import ?? 0,
41203
42460
  shapesParsed: dto.shapes_parsed,
41204
42461
  sortNames: dto.sort_names,
41205
42462
  sortsCreated: dto.sorts_created,
@@ -41221,6 +42478,7 @@ function RdfImportReceiptFromApiToFront(dto) {
41221
42478
  return {
41222
42479
  repairedIriCount: dto.repaired_iri_count,
41223
42480
  repairedIris: dto.repaired_iris.map(IriRepairFromApiToFront),
42481
+ routedToVocabularyImport: dto.routed_to_vocabulary_import,
41224
42482
  shapesParsed: dto.shapes_parsed,
41225
42483
  sortsCreated: dto.sorts_created,
41226
42484
  termsCreated: dto.terms_created
@@ -41355,7 +42613,8 @@ function DocumentStatsDtoFromApiToFront(dto) {
41355
42613
  relationsIntegrated: dto.relations_integrated,
41356
42614
  sortNames: dto.sort_names,
41357
42615
  termIds: dto.term_ids,
41358
- totalTokens: dto.total_tokens
42616
+ totalTokens: dto.total_tokens,
42617
+ fcaDiscovery: dto.fca_discovery ? FcaIngestionReportFromApiToFront(dto.fca_discovery) : void 0
41359
42618
  };
41360
42619
  }
41361
42620
  function SessionStatsResponseFromApiToFront(dto) {
@@ -41737,6 +42996,7 @@ function RdfUploadFromApiToFront(dto) {
41737
42996
  prefixBindings: definedRecord(dto.prefix_bindings ?? {}),
41738
42997
  quadsCommitted: dto.quads_committed,
41739
42998
  batchesCommitted: dto.batches_committed,
42999
+ routedToVocabularyImport: dto.routed_to_vocabulary_import ?? 0,
41740
43000
  resourcesCreated: dto.resources_created,
41741
43001
  sortsCreated: dto.sorts_created,
41742
43002
  error: dto.error,
@@ -49782,6 +51042,28 @@ function SortLicenceResponseFromApiToFront(dto) {
49782
51042
  installedRules: dto.installed_rules
49783
51043
  };
49784
51044
  }
51045
+ function FcaExportRequestFromFrontToApi(model) {
51046
+ return {
51047
+ term_ids: model.termIds,
51048
+ max_concepts: model.maxConcepts,
51049
+ min_extent_size: model.minExtentSize,
51050
+ min_intent_size: model.minIntentSize,
51051
+ max_work: model.maxWork,
51052
+ max_visited_concepts: model.maxVisitedConcepts,
51053
+ include_basis: model.includeBasis,
51054
+ basis_max_work: model.basisMaxWork,
51055
+ basis_max_candidates: model.basisMaxCandidates
51056
+ };
51057
+ }
51058
+ function VerifiedFcaImportFromApiToFront(dto) {
51059
+ return {
51060
+ sources: dto.sources,
51061
+ concepts: dto.concepts,
51062
+ conceptsComplete: dto.concepts_complete,
51063
+ implications: dto.implications ?? null,
51064
+ basisComplete: dto.basis_complete ?? null
51065
+ };
51066
+ }
49785
51067
  function ConfluenceConflictDtoFromApiToFront(dto) {
49786
51068
  return {
49787
51069
  kind: dto.kind,
@@ -50097,6 +51379,59 @@ var AnalysisClient = class {
50097
51379
  );
50098
51380
  return decodeResponse(response, SortLicenceResponseFromApiToFront);
50099
51381
  }
51382
+ /**
51383
+ * Export the native FCA of an explicit population.
51384
+ *
51385
+ * @param request - The population and the enumeration (and basis) bounds.
51386
+ * @param requestOptions - Per-call request options.
51387
+ * @returns The replayable export, in its wire form.
51388
+ * @throws {BadRequestError} 400 for an invalid population or budgets beyond
51389
+ * the supported limits.
51390
+ *
51391
+ * @remarks
51392
+ * The engine computes the concepts of the population's schema-presence
51393
+ * context under the declared bounds and, when asked, its observed
51394
+ * implication basis; the export carries the incidence, the bounds and each
51395
+ * result's completeness so an importer can replay all of it with
51396
+ * {@link verifyFcaExport}.
51397
+ *
51398
+ * @example
51399
+ * ```typescript
51400
+ * const exported = await client.analysis.exportFca({ termIds, includeBasis: true });
51401
+ * const verified = await client.analysis.verifyFcaExport(exported);
51402
+ * console.log(verified.concepts, verified.conceptsComplete);
51403
+ * ```
51404
+ */
51405
+ async exportFca(request, requestOptions) {
51406
+ const response = await this.api.exportFca(
51407
+ FcaExportRequestFromFrontToApi(request),
51408
+ toRequestParams(requestOptions)
51409
+ );
51410
+ return decodeResponse(response, (dto) => dto);
51411
+ }
51412
+ /**
51413
+ * Verify an FCA export for import into the caller's tenant.
51414
+ *
51415
+ * @param fcaExport - The export, exactly as {@link exportFca} returned it.
51416
+ * @param requestOptions - Per-call request options.
51417
+ * @returns What native replay reproduced.
51418
+ * @throws {BadRequestError} 400 when the declared bounds or universe exceed
51419
+ * the supported limits.
51420
+ * @throws {ApiError} 422 (`status` 422, `errorCode` `fca_export_refused`) when
51421
+ * a claim, the incidence or the scope does not survive native replay;
51422
+ * nothing is accepted.
51423
+ *
51424
+ * @remarks
51425
+ * The engine decodes the export's context, recomputes a graded incidence
51426
+ * from its degrees and cut, recomputes its concepts and basis under its
51427
+ * declared bounds, and requires each claim, completeness included, to equal
51428
+ * its recomputation; every object must name a source term of the caller's
51429
+ * tenant.
51430
+ */
51431
+ async verifyFcaExport(fcaExport, requestOptions) {
51432
+ const response = await this.api.verifyFcaExport(fcaExport, toRequestParams(requestOptions));
51433
+ return decodeResponse(response, VerifiedFcaImportFromApiToFront);
51434
+ }
50100
51435
  /**
50101
51436
  * Invite a gateway human user to an exploration session.
50102
51437
  *
@@ -52951,7 +54286,23 @@ var VOCABULARY_REFUSAL_CODES = members({
52951
54286
  vocabulary_outcome_unconfirmed: true,
52952
54287
  no_committed_outcome: true,
52953
54288
  governed_sort_write_refused: true,
52954
- read_budget_exceeded: true
54289
+ read_budget_exceeded: true,
54290
+ cursor_mismatch: true,
54291
+ format_unsupported: true,
54292
+ source_too_large: true,
54293
+ source_file_not_found: true,
54294
+ import_incomplete: true,
54295
+ import_too_large: true,
54296
+ import_already_committed: true,
54297
+ import_baseline_stale: true,
54298
+ reconciliation_undecided: true,
54299
+ invalid_decision: true,
54300
+ migration_plan_stale: true,
54301
+ invalid_disposition: true,
54302
+ sparql_unsupported: true,
54303
+ vocabulary_sparql_unavailable: true,
54304
+ sparql_deadline: true,
54305
+ export_unrepresentable: true
52955
54306
  });
52956
54307
  var VOCABULARY_FINDING_CODES = members({
52957
54308
  declaration_violation: true,
@@ -52972,7 +54323,24 @@ var VOCABULARY_FINDING_CODES = members({
52972
54323
  evidence_provenance_unknown: true,
52973
54324
  stale_baseline: true,
52974
54325
  plugin_context_changed: true,
52975
- language_unknown: true
54326
+ language_unknown: true,
54327
+ hierarchy_self_link: true,
54328
+ hierarchy_cycle: true,
54329
+ hierarchy_depth_exceeded: true,
54330
+ partitive_interpretation_unresolved: true,
54331
+ relation_outside_scheme: true,
54332
+ related_also_hierarchical: true,
54333
+ top_concept_has_broader: true,
54334
+ missing_top_concept: true,
54335
+ unplaced_concept: true,
54336
+ mapping_conflict: true,
54337
+ mapping_target_unavailable: true,
54338
+ notation_duplicate: true,
54339
+ collection_member_dangling: true,
54340
+ collection_cycle: true,
54341
+ collection_position_duplicate: true,
54342
+ collection_position_missing: true,
54343
+ xl_label_without_label_use: true
52976
54344
  });
52977
54345
  var VOCABULARY_FINDING_SEVERITIES = members({
52978
54346
  blocking: true,
@@ -53020,7 +54388,11 @@ var VOCABULARY_OPERATIONS = members({
53020
54388
  reject: true,
53021
54389
  withdraw: true,
53022
54390
  release: true,
53023
- activate: true
54391
+ activate: true,
54392
+ create_import: true,
54393
+ commit_import: true,
54394
+ create_migration_plan: true,
54395
+ apply_migration_plan: true
53024
54396
  });
53025
54397
 
53026
54398
  // src/utils/vocabulary-refusal.ts
@@ -53166,7 +54538,9 @@ function readRefusal(body) {
53166
54538
  findingIds: optionalStrings(wire.finding_ids, "finding_ids"),
53167
54539
  conflicts: optionalList(wire.conflicts, "conflicts", readConflict),
53168
54540
  recordErrors: optionalList(wire.record_errors, "record_errors", readRecordError),
53169
- missingRelations: optionalStrings(wire.missing_relations, "missing_relations")
54541
+ missingRelations: optionalStrings(wire.missing_relations, "missing_relations"),
54542
+ undecidedSourceKeys: optionalStrings(wire.undecided_source_keys, "undecided_source_keys"),
54543
+ changedSorts: optionalStrings(wire.changed_sorts, "changed_sorts")
53170
54544
  };
53171
54545
  if (!isAbsent(wire.current)) out.current = readCurrent(wire.current, "current");
53172
54546
  if (!isAbsent(wire.authority)) out.authority = readAuthority(wire.authority, "authority");
@@ -61510,7 +62884,11 @@ function ImportOwlResponseFromApiToFront(dto) {
61510
62884
  return {
61511
62885
  reifiedSortsCreated: dto.reified_sorts_created,
61512
62886
  relationsDiscovered: dto.relations_discovered,
61513
- sortsCreated: dto.sorts_created
62887
+ sortsCreated: dto.sorts_created,
62888
+ sortsRefused: (dto.sorts_refused ?? []).map((sort) => ({
62889
+ name: sort.name,
62890
+ reason: sort.reason
62891
+ }))
61514
62892
  };
61515
62893
  }
61516
62894
  function ExecuteTranspiledRequestFromFrontToApi(model) {
@@ -69129,6 +70507,99 @@ function AboutnessInputFromFrontToApi(record) {
69129
70507
  }
69130
70508
  return out;
69131
70509
  }
70510
+ function ConceptRelationInputFromFrontToApi(record) {
70511
+ const out = {
70512
+ scheme: VocabularyRecordRefFromFrontToApi(record.scheme),
70513
+ subject: VocabularyRecordRefFromFrontToApi(record.subject),
70514
+ object: VocabularyRecordRefFromFrontToApi(record.object),
70515
+ relation: record.relation,
70516
+ status: record.status
70517
+ };
70518
+ if (record.hierarchyKind !== void 0) out.hierarchy_kind = record.hierarchyKind;
70519
+ if (record.evidence !== void 0) {
70520
+ out.evidence = VocabularyRecordRefFromFrontToApi(record.evidence);
70521
+ }
70522
+ return out;
70523
+ }
70524
+ function TaxonomyPolicyInputFromFrontToApi(record) {
70525
+ const out = {
70526
+ scheme: VocabularyRecordRefFromFrontToApi(record.scheme),
70527
+ acyclic: record.acyclic,
70528
+ require_placement: record.requirePlacement,
70529
+ top_concepts: record.topConcepts
70530
+ };
70531
+ if (record.maxDepth !== void 0) out.max_depth = record.maxDepth;
70532
+ if (record.partitiveTransitive !== void 0) {
70533
+ out.partitive_transitive = record.partitiveTransitive;
70534
+ }
70535
+ return out;
70536
+ }
70537
+ function ExternalConceptInputFromFrontToApi(record) {
70538
+ const out = {
70539
+ authority: record.authority,
70540
+ dataset_version: record.datasetVersion,
70541
+ iri: record.iri,
70542
+ resolution: record.resolution
70543
+ };
70544
+ if (record.recordId !== void 0) out.record_id = record.recordId;
70545
+ if (record.clientRef !== void 0) out.client_ref = record.clientRef;
70546
+ if (record.labelText !== void 0) out.label_text = record.labelText;
70547
+ if (record.labelLanguage !== void 0) out.label_language = record.labelLanguage;
70548
+ if (record.evidence !== void 0) {
70549
+ out.evidence = VocabularyRecordRefFromFrontToApi(record.evidence);
70550
+ }
70551
+ return out;
70552
+ }
70553
+ function MappingTargetFromFrontToApi(target) {
70554
+ return "concept" in target ? { concept: VocabularyRecordRefFromFrontToApi(target.concept) } : { external: VocabularyRecordRefFromFrontToApi(target.external) };
70555
+ }
70556
+ function ConceptMappingInputFromFrontToApi(record) {
70557
+ const out = {
70558
+ subject: VocabularyRecordRefFromFrontToApi(record.subject),
70559
+ target: MappingTargetFromFrontToApi(record.target),
70560
+ mapping_kind: record.mappingKind,
70561
+ status: record.status
70562
+ };
70563
+ if (record.evidence !== void 0) {
70564
+ out.evidence = VocabularyRecordRefFromFrontToApi(record.evidence);
70565
+ }
70566
+ return out;
70567
+ }
70568
+ function DocumentationInputFromFrontToApi(record) {
70569
+ const out = {
70570
+ subject: VocabularyRecordRefFromFrontToApi(record.subject),
70571
+ note_kind: record.noteKind
70572
+ };
70573
+ if (record.recordId !== void 0) out.record_id = record.recordId;
70574
+ if (record.clientRef !== void 0) out.client_ref = record.clientRef;
70575
+ if (record.text !== void 0) out.text = record.text;
70576
+ if (record.resourceLocator !== void 0) out.resource_locator = record.resourceLocator;
70577
+ if (record.language !== void 0) out.language = record.language;
70578
+ if (record.evidence !== void 0) {
70579
+ out.evidence = VocabularyRecordRefFromFrontToApi(record.evidence);
70580
+ }
70581
+ return out;
70582
+ }
70583
+ function CollectionInputFromFrontToApi(record) {
70584
+ const out = {
70585
+ scheme: VocabularyRecordRefFromFrontToApi(record.scheme),
70586
+ ordered: record.ordered,
70587
+ status: record.status
70588
+ };
70589
+ if (record.recordId !== void 0) out.record_id = record.recordId;
70590
+ if (record.clientRef !== void 0) out.client_ref = record.clientRef;
70591
+ return out;
70592
+ }
70593
+ function CollectionMemberInputFromFrontToApi(record) {
70594
+ const out = {
70595
+ collection: VocabularyRecordRefFromFrontToApi(record.collection),
70596
+ member: VocabularyRecordRefFromFrontToApi(record.member)
70597
+ };
70598
+ if (record.recordId !== void 0) out.record_id = record.recordId;
70599
+ if (record.clientRef !== void 0) out.client_ref = record.clientRef;
70600
+ if (record.position !== void 0) out.position = record.position;
70601
+ return out;
70602
+ }
69132
70603
  function VocabularyRecordInputFromFrontToApi(record) {
69133
70604
  switch (record.kind) {
69134
70605
  case "scheme":
@@ -69172,6 +70643,55 @@ function VocabularyRecordInputFromFrontToApi(record) {
69172
70643
  return { kind: "identity_decision", ...IdentityDecisionInputFromFrontToApi(record) };
69173
70644
  case "aboutness":
69174
70645
  return { kind: "aboutness", ...AboutnessInputFromFrontToApi(record) };
70646
+ case "concept_relation":
70647
+ return { kind: "concept_relation", ...ConceptRelationInputFromFrontToApi(record) };
70648
+ case "taxonomy_policy":
70649
+ return { kind: "taxonomy_policy", ...TaxonomyPolicyInputFromFrontToApi(record) };
70650
+ case "external_concept":
70651
+ return { kind: "external_concept", ...ExternalConceptInputFromFrontToApi(record) };
70652
+ case "concept_mapping":
70653
+ return { kind: "concept_mapping", ...ConceptMappingInputFromFrontToApi(record) };
70654
+ case "documentation":
70655
+ return { kind: "documentation", ...DocumentationInputFromFrontToApi(record) };
70656
+ case "notation": {
70657
+ const out = {
70658
+ kind: "notation",
70659
+ concept: VocabularyRecordRefFromFrontToApi(record.concept),
70660
+ scheme: VocabularyRecordRefFromFrontToApi(record.scheme),
70661
+ value: record.value
70662
+ };
70663
+ if (record.datatype !== void 0) out.datatype = record.datatype;
70664
+ return out;
70665
+ }
70666
+ case "xl_label":
70667
+ return {
70668
+ kind: "xl_label",
70669
+ concept: VocabularyRecordRefFromFrontToApi(record.concept),
70670
+ scheme: VocabularyRecordRefFromFrontToApi(record.scheme),
70671
+ resource_key: record.resourceKey,
70672
+ text: record.text,
70673
+ language: record.language,
70674
+ role: record.role
70675
+ };
70676
+ case "label_relation":
70677
+ return {
70678
+ kind: "label_relation",
70679
+ subject: VocabularyRecordRefFromFrontToApi(record.subject),
70680
+ object: VocabularyRecordRefFromFrontToApi(record.object),
70681
+ relation: record.relation
70682
+ };
70683
+ case "collection":
70684
+ return { kind: "collection", ...CollectionInputFromFrontToApi(record) };
70685
+ case "collection_label":
70686
+ return {
70687
+ kind: "collection_label",
70688
+ collection: VocabularyRecordRefFromFrontToApi(record.collection),
70689
+ text: record.text,
70690
+ language: record.language,
70691
+ role: record.role
70692
+ };
70693
+ case "collection_member":
70694
+ return { kind: "collection_member", ...CollectionMemberInputFromFrontToApi(record) };
69175
70695
  }
69176
70696
  }
69177
70697
  function VocabularyRecordOperationFromFrontToApi(operation) {
@@ -69279,6 +70799,79 @@ function ActivateVocabularyReleaseRequestFromFrontToApi(request) {
69279
70799
  if (request.rationale !== void 0) out.rationale = request.rationale;
69280
70800
  return out;
69281
70801
  }
70802
+ function VocabularyImportTargetSchemeFromFrontToApi(target) {
70803
+ return "existing" in target ? { existing: { scheme_id: target.existing.schemeId } } : { new: { scheme: SchemeInputFromFrontToApi(target.new.scheme) } };
70804
+ }
70805
+ function ExternalAuthorityFromFrontToApi(authority) {
70806
+ return {
70807
+ iri_prefix: authority.iriPrefix,
70808
+ authority: authority.authority,
70809
+ dataset_version: authority.datasetVersion
70810
+ };
70811
+ }
70812
+ function CreateVocabularyImportRequestFromFrontToApi(request) {
70813
+ const out = {
70814
+ source_file_id: request.sourceFileId,
70815
+ format: request.format,
70816
+ dataset: request.dataset,
70817
+ target_scheme: VocabularyImportTargetSchemeFromFrontToApi(request.targetScheme)
70818
+ };
70819
+ if (request.schemeMap !== void 0) out.scheme_map = request.schemeMap;
70820
+ if (request.defaultLanguage !== void 0) out.default_language = request.defaultLanguage;
70821
+ if (request.externalAuthorities !== void 0) {
70822
+ out.external_authorities = request.externalAuthorities.map(ExternalAuthorityFromFrontToApi);
70823
+ }
70824
+ if (request.attribution !== void 0) out.attribution = request.attribution;
70825
+ if (request.license !== void 0) out.license = request.license;
70826
+ return out;
70827
+ }
70828
+ function ResourceDecisionFromFrontToApi(decision) {
70829
+ const out = {
70830
+ source_key: decision.sourceKey,
70831
+ decision: decision.decision
70832
+ };
70833
+ if (decision.conceptId !== void 0) out.concept_id = decision.conceptId;
70834
+ if (decision.rationale !== void 0) out.rationale = decision.rationale;
70835
+ return out;
70836
+ }
70837
+ function CommitVocabularyImportRequestFromFrontToApi(request) {
70838
+ const out = { change_reason: request.changeReason };
70839
+ if (request.title !== void 0) out.title = request.title;
70840
+ if (request.candidateId !== void 0) out.candidate_id = request.candidateId;
70841
+ if (request.decisions !== void 0) {
70842
+ out.decisions = request.decisions.map(ResourceDecisionFromFrontToApi);
70843
+ }
70844
+ return out;
70845
+ }
70846
+ function PlannedDispositionFromFrontToApi(disposition) {
70847
+ return {
70848
+ sort_id: disposition.sortId,
70849
+ disposition: disposition.disposition,
70850
+ rationale: disposition.rationale
70851
+ };
70852
+ }
70853
+ function CreateVocabularyMigrationPlanRequestFromFrontToApi(request) {
70854
+ return { dispositions: request.dispositions.map(PlannedDispositionFromFrontToApi) };
70855
+ }
70856
+ function ApplyVocabularyMigrationPlanRequestFromFrontToApi(request) {
70857
+ const out = {
70858
+ title: request.title,
70859
+ change_reason: request.changeReason,
70860
+ scheme: VocabularyImportTargetSchemeFromFrontToApi(request.scheme)
70861
+ };
70862
+ if (request.defaultLanguage !== void 0) out.default_language = request.defaultLanguage;
70863
+ return out;
70864
+ }
70865
+ function VocabularySparqlRequestFromFrontToApi(request) {
70866
+ const out = { query: request.query, scheme_id: request.schemeId };
70867
+ if (request.view !== void 0) {
70868
+ out.view = request.view.view;
70869
+ if (request.view.view === "release") out.release_id = request.view.releaseId;
70870
+ if (request.view.view === "candidate") out.revision_id = request.view.revisionId;
70871
+ }
70872
+ if (request.maxResults !== void 0) out.max_results = request.maxResults;
70873
+ return out;
70874
+ }
69282
70875
  function VocabularySchemeRecordFromApiToFront(dto) {
69283
70876
  const out = {
69284
70877
  recordId: dto.record_id,
@@ -69434,6 +71027,186 @@ function VocabularyAboutnessRecordFromApiToFront(dto) {
69434
71027
  if (present(dto.evidence)) out.evidence = dto.evidence;
69435
71028
  return out;
69436
71029
  }
71030
+ function VocabularyConceptRelationRecordFromApiToFront(dto) {
71031
+ const out = {
71032
+ recordId: dto.record_id,
71033
+ revision: dto.revision,
71034
+ changeReason: dto.change_reason,
71035
+ scheme: dto.scheme,
71036
+ subject: dto.subject,
71037
+ object: dto.object,
71038
+ relation: dto.relation,
71039
+ status: dto.status
71040
+ };
71041
+ if (present(dto.hierarchy_kind)) out.hierarchyKind = dto.hierarchy_kind;
71042
+ if (present(dto.evidence)) out.evidence = dto.evidence;
71043
+ return out;
71044
+ }
71045
+ function VocabularyTaxonomyPolicyRecordFromApiToFront(dto) {
71046
+ const out = {
71047
+ recordId: dto.record_id,
71048
+ revision: dto.revision,
71049
+ changeReason: dto.change_reason,
71050
+ scheme: dto.scheme,
71051
+ policy: dto.policy,
71052
+ acyclic: dto.acyclic,
71053
+ requirePlacement: dto.require_placement,
71054
+ topConcepts: dto.top_concepts
71055
+ };
71056
+ if (present(dto.max_depth)) out.maxDepth = dto.max_depth;
71057
+ if (present(dto.partitive_transitive)) out.partitiveTransitive = dto.partitive_transitive;
71058
+ return out;
71059
+ }
71060
+ function VocabularyExternalConceptRecordFromApiToFront(dto) {
71061
+ const out = {
71062
+ recordId: dto.record_id,
71063
+ revision: dto.revision,
71064
+ changeReason: dto.change_reason,
71065
+ authority: dto.authority,
71066
+ datasetVersion: dto.dataset_version,
71067
+ iri: dto.iri,
71068
+ resolution: dto.resolution
71069
+ };
71070
+ if (present(dto.label_text)) out.labelText = dto.label_text;
71071
+ if (present(dto.label_language)) out.labelLanguage = dto.label_language;
71072
+ if (present(dto.evidence)) out.evidence = dto.evidence;
71073
+ return out;
71074
+ }
71075
+ function VocabularyConceptMappingRecordFromApiToFront(dto) {
71076
+ const out = {
71077
+ recordId: dto.record_id,
71078
+ revision: dto.revision,
71079
+ changeReason: dto.change_reason,
71080
+ subject: dto.subject,
71081
+ mappingKind: dto.mapping_kind,
71082
+ status: dto.status
71083
+ };
71084
+ if (present(dto.target_concept)) out.targetConcept = dto.target_concept;
71085
+ if (present(dto.target_external)) out.targetExternal = dto.target_external;
71086
+ if (present(dto.evidence)) out.evidence = dto.evidence;
71087
+ return out;
71088
+ }
71089
+ function VocabularyDocumentationRecordFromApiToFront(dto) {
71090
+ const out = {
71091
+ recordId: dto.record_id,
71092
+ revision: dto.revision,
71093
+ changeReason: dto.change_reason,
71094
+ noteKind: dto.note_kind
71095
+ };
71096
+ if (present(dto.concept)) out.concept = dto.concept;
71097
+ if (present(dto.scheme)) out.scheme = dto.scheme;
71098
+ if (present(dto.collection)) out.collection = dto.collection;
71099
+ if (present(dto.text)) out.text = dto.text;
71100
+ if (present(dto.resource_locator)) out.resourceLocator = dto.resource_locator;
71101
+ if (present(dto.language)) out.language = dto.language;
71102
+ if (present(dto.language_as_submitted)) out.languageAsSubmitted = dto.language_as_submitted;
71103
+ if (present(dto.evidence)) out.evidence = dto.evidence;
71104
+ return out;
71105
+ }
71106
+ function VocabularyNotationRecordFromApiToFront(dto) {
71107
+ const out = {
71108
+ recordId: dto.record_id,
71109
+ concept: dto.concept,
71110
+ scheme: dto.scheme,
71111
+ value: dto.value
71112
+ };
71113
+ if (present(dto.datatype)) out.datatype = dto.datatype;
71114
+ return out;
71115
+ }
71116
+ function VocabularyXlLabelRecordFromApiToFront(dto) {
71117
+ return {
71118
+ recordId: dto.record_id,
71119
+ revision: dto.revision,
71120
+ changeReason: dto.change_reason,
71121
+ concept: dto.concept,
71122
+ scheme: dto.scheme,
71123
+ resourceKey: dto.resource_key,
71124
+ label: dto.label,
71125
+ role: dto.role
71126
+ };
71127
+ }
71128
+ function VocabularyLabelRelationRecordFromApiToFront(dto) {
71129
+ return {
71130
+ recordId: dto.record_id,
71131
+ subject: dto.subject,
71132
+ object: dto.object,
71133
+ relation: dto.relation
71134
+ };
71135
+ }
71136
+ function VocabularyCollectionRecordFromApiToFront(dto) {
71137
+ return {
71138
+ recordId: dto.record_id,
71139
+ revision: dto.revision,
71140
+ changeReason: dto.change_reason,
71141
+ scheme: dto.scheme,
71142
+ ordered: dto.ordered,
71143
+ status: dto.status
71144
+ };
71145
+ }
71146
+ function VocabularyCollectionLabelRecordFromApiToFront(dto) {
71147
+ return {
71148
+ recordId: dto.record_id,
71149
+ collection: dto.collection,
71150
+ label: dto.label,
71151
+ role: dto.role
71152
+ };
71153
+ }
71154
+ function VocabularyCollectionMemberRecordFromApiToFront(dto) {
71155
+ const out = {
71156
+ recordId: dto.record_id,
71157
+ revision: dto.revision,
71158
+ changeReason: dto.change_reason,
71159
+ collection: dto.collection
71160
+ };
71161
+ if (present(dto.member_concept)) out.memberConcept = dto.member_concept;
71162
+ if (present(dto.member_collection)) out.memberCollection = dto.member_collection;
71163
+ if (present(dto.position)) out.position = dto.position;
71164
+ return out;
71165
+ }
71166
+ function VocabularySourceArtifactRecordFromApiToFront(dto) {
71167
+ const out = {
71168
+ recordId: dto.record_id,
71169
+ sha256: dto.sha256,
71170
+ byteSize: dto.byte_size,
71171
+ format: dto.format,
71172
+ dataset: dto.dataset,
71173
+ retainedLocator: dto.retained_locator
71174
+ };
71175
+ if (present(dto.file_name)) out.fileName = dto.file_name;
71176
+ if (present(dto.media_type)) out.mediaType = dto.media_type;
71177
+ if (present(dto.attribution)) out.attribution = dto.attribution;
71178
+ if (present(dto.license)) out.license = dto.license;
71179
+ if (present(dto.retrieval_context)) out.retrievalContext = dto.retrieval_context;
71180
+ return out;
71181
+ }
71182
+ function VocabularySourceAssociationRecordFromApiToFront(dto) {
71183
+ const out = {
71184
+ recordId: dto.record_id,
71185
+ revision: dto.revision,
71186
+ changeReason: dto.change_reason,
71187
+ artifact: dto.artifact,
71188
+ sourceKey: dto.source_key
71189
+ };
71190
+ if (present(dto.concept)) out.concept = dto.concept;
71191
+ if (present(dto.collection)) out.collection = dto.collection;
71192
+ if (present(dto.external_concept)) out.externalConcept = dto.external_concept;
71193
+ return out;
71194
+ }
71195
+ function VocabularyMigrationDecisionRecordFromApiToFront(dto) {
71196
+ const out = {
71197
+ recordId: dto.record_id,
71198
+ revision: dto.revision,
71199
+ changeReason: dto.change_reason,
71200
+ plan: dto.plan,
71201
+ legacySort: dto.legacy_sort,
71202
+ legacySortName: dto.legacy_sort_name,
71203
+ fingerprint: dto.fingerprint,
71204
+ disposition: dto.disposition,
71205
+ rationale: dto.rationale
71206
+ };
71207
+ if (present(dto.concept)) out.concept = dto.concept;
71208
+ return out;
71209
+ }
69437
71210
  function VocabularyRecordViewFromApiToFront(dto) {
69438
71211
  switch (dto.kind) {
69439
71212
  case "scheme":
@@ -69468,6 +71241,40 @@ function VocabularyRecordViewFromApiToFront(dto) {
69468
71241
  };
69469
71242
  case "aboutness":
69470
71243
  return { kind: "aboutness", ...VocabularyAboutnessRecordFromApiToFront(dto) };
71244
+ case "concept_relation":
71245
+ return { kind: "concept_relation", ...VocabularyConceptRelationRecordFromApiToFront(dto) };
71246
+ case "taxonomy_policy":
71247
+ return { kind: "taxonomy_policy", ...VocabularyTaxonomyPolicyRecordFromApiToFront(dto) };
71248
+ case "external_concept":
71249
+ return { kind: "external_concept", ...VocabularyExternalConceptRecordFromApiToFront(dto) };
71250
+ case "concept_mapping":
71251
+ return { kind: "concept_mapping", ...VocabularyConceptMappingRecordFromApiToFront(dto) };
71252
+ case "documentation":
71253
+ return { kind: "documentation", ...VocabularyDocumentationRecordFromApiToFront(dto) };
71254
+ case "notation":
71255
+ return { kind: "notation", ...VocabularyNotationRecordFromApiToFront(dto) };
71256
+ case "xl_label":
71257
+ return { kind: "xl_label", ...VocabularyXlLabelRecordFromApiToFront(dto) };
71258
+ case "label_relation":
71259
+ return { kind: "label_relation", ...VocabularyLabelRelationRecordFromApiToFront(dto) };
71260
+ case "collection":
71261
+ return { kind: "collection", ...VocabularyCollectionRecordFromApiToFront(dto) };
71262
+ case "collection_label":
71263
+ return { kind: "collection_label", ...VocabularyCollectionLabelRecordFromApiToFront(dto) };
71264
+ case "collection_member":
71265
+ return { kind: "collection_member", ...VocabularyCollectionMemberRecordFromApiToFront(dto) };
71266
+ case "source_artifact":
71267
+ return { kind: "source_artifact", ...VocabularySourceArtifactRecordFromApiToFront(dto) };
71268
+ case "source_association":
71269
+ return {
71270
+ kind: "source_association",
71271
+ ...VocabularySourceAssociationRecordFromApiToFront(dto)
71272
+ };
71273
+ case "migration_decision":
71274
+ return {
71275
+ kind: "migration_decision",
71276
+ ...VocabularyMigrationDecisionRecordFromApiToFront(dto)
71277
+ };
69471
71278
  }
69472
71279
  }
69473
71280
  function FindingContextFromApiToFront(dto) {
@@ -69696,7 +71503,16 @@ function ConceptViewFromApiToFront(dto) {
69696
71503
  authorityReferences: dto.authority_references.map(
69697
71504
  VocabularyAuthorityReferenceRecordFromApiToFront
69698
71505
  ),
69699
- aboutness: dto.aboutness.map(VocabularyAboutnessRecordFromApiToFront)
71506
+ aboutness: dto.aboutness.map(VocabularyAboutnessRecordFromApiToFront),
71507
+ relations: dto.relations.map(VocabularyConceptRelationRecordFromApiToFront),
71508
+ mappings: dto.mappings.map(VocabularyConceptMappingRecordFromApiToFront),
71509
+ documentation: dto.documentation.map(VocabularyDocumentationRecordFromApiToFront),
71510
+ notations: dto.notations.map(VocabularyNotationRecordFromApiToFront),
71511
+ xlLabels: dto.xl_labels.map(VocabularyXlLabelRecordFromApiToFront),
71512
+ collections: dto.collections,
71513
+ sourceAssociations: dto.source_associations.map(
71514
+ VocabularySourceAssociationRecordFromApiToFront
71515
+ )
69700
71516
  };
69701
71517
  if (present(dto.display_label)) {
69702
71518
  out.displayLabel = VocabularyDisplayLabelFromApiToFront(dto.display_label);
@@ -70004,6 +71820,12 @@ function isReleaseBody(value) {
70004
71820
  function isActivationBody(value) {
70005
71821
  return componentFault(value, "ActivationResponse", "body") === void 0;
70006
71822
  }
71823
+ function isImportBody(value) {
71824
+ return componentFault(value, "VocabularyImportResponse", "body") === void 0;
71825
+ }
71826
+ function isMigrationPlanBody(value) {
71827
+ return componentFault(value, "MigrationPlanResponse", "body") === void 0;
71828
+ }
70007
71829
  var COMMITTED_COMPONENT = {
70008
71830
  create_candidate: "CandidateRevisionResponse",
70009
71831
  save_revision: "CandidateRevisionResponse",
@@ -70015,13 +71837,19 @@ var COMMITTED_COMPONENT = {
70015
71837
  reject: "DecisionResponse",
70016
71838
  withdraw: "DecisionResponse",
70017
71839
  release: "ReleaseResponse",
70018
- activate: "ActivationResponse"
71840
+ activate: "ActivationResponse",
71841
+ create_import: "VocabularyImportResponse",
71842
+ commit_import: "CandidateRevisionResponse",
71843
+ create_migration_plan: "MigrationPlanResponse",
71844
+ apply_migration_plan: "CandidateRevisionResponse"
70019
71845
  };
70020
71846
  function CommittedResultFromApiToFront(operation, body) {
70021
71847
  switch (operation) {
70022
71848
  case "create_candidate":
70023
71849
  case "save_revision":
70024
71850
  case "rebase":
71851
+ case "commit_import":
71852
+ case "apply_migration_plan":
70025
71853
  if (isCandidateRevisionBody(body)) {
70026
71854
  return { operation, body: VocabularyCandidateRevisionFromApiToFront(body) };
70027
71855
  }
@@ -70050,6 +71878,16 @@ function CommittedResultFromApiToFront(operation, body) {
70050
71878
  return { operation, body: VocabularyActivationResultFromApiToFront(body) };
70051
71879
  }
70052
71880
  break;
71881
+ case "create_import":
71882
+ if (isImportBody(body)) {
71883
+ return { operation, body: VocabularyImportFromApiToFront(body) };
71884
+ }
71885
+ break;
71886
+ case "create_migration_plan":
71887
+ if (isMigrationPlanBody(body)) {
71888
+ return { operation, body: VocabularyMigrationPlanFromApiToFront(body) };
71889
+ }
71890
+ break;
70053
71891
  }
70054
71892
  throw new TypeError(
70055
71893
  componentFault(body, COMMITTED_COMPONENT[operation], "body") ?? `body is not a ${COMMITTED_COMPONENT[operation]}`
@@ -70132,6 +71970,567 @@ function VocabularyMigrationPreviewFromApiToFront(dto) {
70132
71970
  if (present(dto.next_cursor)) out.nextCursor = dto.next_cursor;
70133
71971
  return out;
70134
71972
  }
71973
+ function HierarchyNodeFromApiToFront(dto) {
71974
+ const out = {
71975
+ conceptId: dto.concept_id,
71976
+ depth: dto.depth,
71977
+ via: dto.via
71978
+ };
71979
+ if (present(dto.display_label)) {
71980
+ out.displayLabel = VocabularyDisplayLabelFromApiToFront(dto.display_label);
71981
+ }
71982
+ return out;
71983
+ }
71984
+ function HierarchyEdgeFromApiToFront(dto) {
71985
+ const out = {
71986
+ relationId: dto.relation_id,
71987
+ subject: dto.subject,
71988
+ object: dto.object,
71989
+ status: dto.status
71990
+ };
71991
+ if (present(dto.hierarchy_kind)) out.hierarchyKind = dto.hierarchy_kind;
71992
+ return out;
71993
+ }
71994
+ function VocabularyHierarchyFromApiToFront(dto) {
71995
+ const out = {
71996
+ view: ViewRefFromApiToFront(dto.view),
71997
+ schemeId: dto.scheme_id,
71998
+ direction: dto.direction,
71999
+ transitive: dto.transitive,
72000
+ nodes: dto.nodes.map(HierarchyNodeFromApiToFront),
72001
+ edges: dto.edges.map(HierarchyEdgeFromApiToFront),
72002
+ complete: dto.complete
72003
+ };
72004
+ if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
72005
+ if (present(dto.root)) out.root = dto.root;
72006
+ if (present(dto.stop_reason)) out.stopReason = dto.stop_reason;
72007
+ return out;
72008
+ }
72009
+ function VocabularyHierarchyPathsFromApiToFront(dto) {
72010
+ const out = {
72011
+ view: ViewRefFromApiToFront(dto.view),
72012
+ schemeId: dto.scheme_id,
72013
+ from: dto.from,
72014
+ to: dto.to,
72015
+ paths: dto.paths,
72016
+ complete: dto.complete
72017
+ };
72018
+ if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
72019
+ if (present(dto.stop_reason)) out.stopReason = dto.stop_reason;
72020
+ return out;
72021
+ }
72022
+ function VocabularyTopConceptsFromApiToFront(dto) {
72023
+ const out = {
72024
+ view: ViewRefFromApiToFront(dto.view),
72025
+ schemeId: dto.scheme_id,
72026
+ concepts: dto.concepts.map(ConceptSummaryFromApiToFront)
72027
+ };
72028
+ if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
72029
+ return out;
72030
+ }
72031
+ function VocabularyTaxonomyPolicyFromApiToFront(dto) {
72032
+ const out = {
72033
+ view: ViewRefFromApiToFront(dto.view),
72034
+ schemeId: dto.scheme_id,
72035
+ declared: dto.declared,
72036
+ policy: dto.policy,
72037
+ acyclic: dto.acyclic,
72038
+ requirePlacement: dto.require_placement,
72039
+ topConcepts: dto.top_concepts
72040
+ };
72041
+ if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
72042
+ if (present(dto.record_id)) out.recordId = dto.record_id;
72043
+ if (present(dto.revision)) out.revision = dto.revision;
72044
+ if (present(dto.change_reason)) out.changeReason = dto.change_reason;
72045
+ if (present(dto.max_depth)) out.maxDepth = dto.max_depth;
72046
+ if (present(dto.partitive_transitive)) out.partitiveTransitive = dto.partitive_transitive;
72047
+ return out;
72048
+ }
72049
+ function ConceptRelationEntryFromApiToFront(dto) {
72050
+ const out = {
72051
+ relationId: dto.relation_id,
72052
+ relation: dto.relation,
72053
+ conceptId: dto.concept_id,
72054
+ status: dto.status
72055
+ };
72056
+ if (present(dto.display_label)) {
72057
+ out.displayLabel = VocabularyDisplayLabelFromApiToFront(dto.display_label);
72058
+ }
72059
+ if (present(dto.hierarchy_kind)) out.hierarchyKind = dto.hierarchy_kind;
72060
+ if (present(dto.evidence)) out.evidence = dto.evidence;
72061
+ return out;
72062
+ }
72063
+ function VocabularyConceptRelationsFromApiToFront(dto) {
72064
+ const out = {
72065
+ view: ViewRefFromApiToFront(dto.view),
72066
+ conceptId: dto.concept_id,
72067
+ schemeId: dto.scheme_id,
72068
+ relation: dto.relation,
72069
+ relations: dto.relations.map(ConceptRelationEntryFromApiToFront)
72070
+ };
72071
+ if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
72072
+ return out;
72073
+ }
72074
+ function CollectionLabelViewFromApiToFront(dto) {
72075
+ const out = {
72076
+ collectionLabelId: dto.collection_label_id,
72077
+ labelId: dto.label_id,
72078
+ role: dto.role
72079
+ };
72080
+ if (present(dto.text)) out.text = dto.text;
72081
+ if (present(dto.language)) out.language = dto.language;
72082
+ return out;
72083
+ }
72084
+ function CollectionSummaryFromApiToFront(dto) {
72085
+ return {
72086
+ collection: VocabularyCollectionRecordFromApiToFront(dto.collection),
72087
+ labels: dto.labels.map(CollectionLabelViewFromApiToFront),
72088
+ memberCount: dto.member_count
72089
+ };
72090
+ }
72091
+ function VocabularyCollectionPageFromApiToFront(dto) {
72092
+ const out = {
72093
+ view: ViewRefFromApiToFront(dto.view),
72094
+ schemeId: dto.scheme_id,
72095
+ items: dto.items.map(CollectionSummaryFromApiToFront),
72096
+ complete: dto.complete
72097
+ };
72098
+ if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
72099
+ if (present(dto.next_cursor)) out.nextCursor = dto.next_cursor;
72100
+ return out;
72101
+ }
72102
+ function CollectionMemberViewFromApiToFront(dto) {
72103
+ const out = { occurrenceId: dto.occurrence_id };
72104
+ if (present(dto.member_concept)) out.memberConcept = dto.member_concept;
72105
+ if (present(dto.member_collection)) out.memberCollection = dto.member_collection;
72106
+ if (present(dto.position)) out.position = dto.position;
72107
+ if (present(dto.display_label)) {
72108
+ out.displayLabel = VocabularyDisplayLabelFromApiToFront(dto.display_label);
72109
+ }
72110
+ return out;
72111
+ }
72112
+ function VocabularyCollectionDetailFromApiToFront(dto) {
72113
+ const out = {
72114
+ view: ViewRefFromApiToFront(dto.view),
72115
+ collection: VocabularyCollectionRecordFromApiToFront(dto.collection),
72116
+ labels: dto.labels.map(CollectionLabelViewFromApiToFront),
72117
+ members: dto.members.map(CollectionMemberViewFromApiToFront),
72118
+ nestedCollections: dto.nested_collections
72119
+ };
72120
+ if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
72121
+ return out;
72122
+ }
72123
+ function PicklistEntryFromApiToFront(dto) {
72124
+ const out = {
72125
+ conceptId: dto.concept_id,
72126
+ depth: dto.depth,
72127
+ otherParentRelationIds: dto.other_parent_relation_ids
72128
+ };
72129
+ if (present(dto.display_label)) {
72130
+ out.displayLabel = VocabularyDisplayLabelFromApiToFront(dto.display_label);
72131
+ }
72132
+ if (present(dto.parent_relation_id)) out.parentRelationId = dto.parent_relation_id;
72133
+ return out;
72134
+ }
72135
+ function VocabularyPicklistFromApiToFront(dto) {
72136
+ const out = {
72137
+ view: ViewRefFromApiToFront(dto.view),
72138
+ schemeId: dto.scheme_id,
72139
+ rootsFrom: dto.roots_from,
72140
+ roots: dto.roots,
72141
+ entries: dto.entries.map(PicklistEntryFromApiToFront),
72142
+ complete: dto.complete
72143
+ };
72144
+ if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
72145
+ if (present(dto.root)) out.root = dto.root;
72146
+ if (present(dto.next_cursor)) out.nextCursor = dto.next_cursor;
72147
+ if (present(dto.stop_reason)) out.stopReason = dto.stop_reason;
72148
+ return out;
72149
+ }
72150
+ function ExpandedConceptFromApiToFront(dto) {
72151
+ const out = { conceptId: dto.concept_id, support: dto.support };
72152
+ if (present(dto.depth)) out.depth = dto.depth;
72153
+ if (present(dto.display_label)) {
72154
+ out.displayLabel = VocabularyDisplayLabelFromApiToFront(dto.display_label);
72155
+ }
72156
+ return out;
72157
+ }
72158
+ function VocabularyExpansionFromApiToFront(dto) {
72159
+ const out = {
72160
+ view: ViewRefFromApiToFront(dto.view),
72161
+ conceptId: dto.concept_id,
72162
+ schemeId: dto.scheme_id,
72163
+ direction: dto.direction,
72164
+ transitive: dto.transitive,
72165
+ concepts: dto.concepts.map(ExpandedConceptFromApiToFront),
72166
+ externalConcepts: dto.external_concepts.map(
72167
+ (external) => ({
72168
+ externalConceptId: external.external_concept_id,
72169
+ iri: external.iri,
72170
+ support: external.support
72171
+ })
72172
+ ),
72173
+ withheldRelationIds: dto.withheld_relation_ids,
72174
+ complete: dto.complete
72175
+ };
72176
+ if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
72177
+ if (present(dto.stop_reason)) out.stopReason = dto.stop_reason;
72178
+ return out;
72179
+ }
72180
+ function ReconciliationProposalFromApiToFront(dto) {
72181
+ switch (dto.proposal) {
72182
+ case "exact_source_match":
72183
+ return { proposal: "exact_source_match", target: dto.target };
72184
+ case "ambiguous":
72185
+ return { proposal: "ambiguous", candidates: dto.candidates };
72186
+ case "new":
72187
+ return { proposal: "new" };
72188
+ }
72189
+ }
72190
+ function ReconciliationEntryFromApiToFront(dto) {
72191
+ return {
72192
+ sourceKey: dto.source_key,
72193
+ kind: dto.kind,
72194
+ proposal: ReconciliationProposalFromApiToFront(dto.proposal)
72195
+ };
72196
+ }
72197
+ function VocabularyImportFromApiToFront(dto) {
72198
+ const out = {
72199
+ importId: dto.import_id,
72200
+ artifact: {
72201
+ sourceFileId: dto.artifact.source_file_id,
72202
+ sha256: dto.artifact.sha256,
72203
+ byteSize: dto.artifact.byte_size,
72204
+ format: dto.artifact.format
72205
+ },
72206
+ dataset: dto.dataset,
72207
+ complete: dto.complete,
72208
+ counts: dataMap(dto.counts),
72209
+ proposedRecordCounts: dataMap(dto.proposed_record_counts),
72210
+ reconciliation: dto.reconciliation.map(ReconciliationEntryFromApiToFront),
72211
+ createdBy: dto.created_by,
72212
+ createdAt: dto.created_at,
72213
+ replayed: dto.replayed
72214
+ };
72215
+ if (present(dto.stop_reason)) out.stopReason = dto.stop_reason;
72216
+ if (present(dto.baseline_release_id)) out.baselineReleaseId = dto.baseline_release_id;
72217
+ if (present(dto.committed_revision_id)) out.committedRevisionId = dto.committed_revision_id;
72218
+ if (present(dto.committed_at)) out.committedAt = dto.committed_at;
72219
+ return out;
72220
+ }
72221
+ function externalVariant(value, path) {
72222
+ const wire = wireObject(value, path);
72223
+ const entries = Object.entries(wire);
72224
+ const first = entries[0];
72225
+ if (entries.length !== 1 || first === void 0) {
72226
+ throw new TypeError(`${path} is not a single-variant object`);
72227
+ }
72228
+ return first;
72229
+ }
72230
+ function ImportCoordinatesFromWire(value, path) {
72231
+ const [variant, body] = externalVariant(value, path);
72232
+ const at = `${path}.${variant}`;
72233
+ switch (variant) {
72234
+ case "triple": {
72235
+ const wire = wireObject(body, at);
72236
+ return { triple: { index: wireNumber(wire.index, `${at}.index`) } };
72237
+ }
72238
+ case "text": {
72239
+ const wire = wireObject(body, at);
72240
+ return {
72241
+ text: {
72242
+ line: wireNumber(wire.line, `${at}.line`),
72243
+ column: wireNumber(wire.column, `${at}.column`),
72244
+ offset: wireNumber(wire.offset, `${at}.offset`)
72245
+ }
72246
+ };
72247
+ }
72248
+ case "row": {
72249
+ const wire = wireObject(body, at);
72250
+ const row = { row: wireNumber(wire.row, `${at}.row`) };
72251
+ if (present(wire.sheet)) row.sheet = wireString(wire.sheet, `${at}.sheet`);
72252
+ return { row };
72253
+ }
72254
+ case "cell": {
72255
+ const wire = wireObject(body, at);
72256
+ return {
72257
+ cell: {
72258
+ sheet: wireString(wire.sheet, `${at}.sheet`),
72259
+ cell: wireString(wire.cell, `${at}.cell`)
72260
+ }
72261
+ };
72262
+ }
72263
+ case "part": {
72264
+ const wire = wireObject(body, at);
72265
+ return { part: { name: wireString(wire.name, `${at}.name`) } };
72266
+ }
72267
+ case "legacy_sort": {
72268
+ const wire = wireObject(body, at);
72269
+ return { legacySort: { sortId: wireString(wire.sort_id, `${at}.sort_id`) } };
72270
+ }
72271
+ case "json_pointer": {
72272
+ const wire = wireObject(body, at);
72273
+ return { jsonPointer: { pointer: wireString(wire.pointer, `${at}.pointer`) } };
72274
+ }
72275
+ }
72276
+ throw new TypeError(`${path} has the unknown variant ${variant}`);
72277
+ }
72278
+ function SourceTermFromWire(value, path) {
72279
+ const [variant, body] = externalVariant(value, path);
72280
+ const at = `${path}.${variant}`;
72281
+ switch (variant) {
72282
+ case "iri":
72283
+ return { iri: wireString(body, at) };
72284
+ case "blank":
72285
+ return { blank: wireString(body, at) };
72286
+ case "literal": {
72287
+ const wire = wireObject(body, at);
72288
+ const literal = {
72289
+ value: wireString(wire.value, `${at}.value`),
72290
+ datatype: wireString(wire.datatype, `${at}.datatype`)
72291
+ };
72292
+ if (present(wire.language)) literal.language = wireString(wire.language, `${at}.language`);
72293
+ return { literal };
72294
+ }
72295
+ }
72296
+ throw new TypeError(`${path} has the unknown variant ${variant}`);
72297
+ }
72298
+ var SOURCE_ITEM_KINDS = ["statement", "row", "record", "rejected"];
72299
+ function SourceItemFromWire(value, path) {
72300
+ const wire = wireObject(value, path);
72301
+ const coordinates = ImportCoordinatesFromWire(wire.coordinates, `${path}.coordinates`);
72302
+ const kind = wireLiteral(wire.item, SOURCE_ITEM_KINDS, `${path}.item`);
72303
+ switch (kind) {
72304
+ case "statement":
72305
+ return {
72306
+ item: "statement",
72307
+ coordinates,
72308
+ subject: SourceTermFromWire(wire.subject, `${path}.subject`),
72309
+ predicate: wireString(wire.predicate, `${path}.predicate`),
72310
+ object: SourceTermFromWire(wire.object, `${path}.object`)
72311
+ };
72312
+ case "row": {
72313
+ const cells = {};
72314
+ for (const [column, text] of Object.entries(wireObject(wire.cells, `${path}.cells`))) {
72315
+ cells[column] = wireString(text, `${path}.cells.${column}`);
72316
+ }
72317
+ return {
72318
+ item: "row",
72319
+ coordinates,
72320
+ cells,
72321
+ formulas: wireStringArray(wire.formulas, `${path}.formulas`)
72322
+ };
72323
+ }
72324
+ case "record": {
72325
+ const record = wire.record;
72326
+ if (!isJsonValue(record)) throw new TypeError(`${path}.record is missing`);
72327
+ return { item: "record", coordinates, record };
72328
+ }
72329
+ case "rejected":
72330
+ return {
72331
+ item: "rejected",
72332
+ coordinates,
72333
+ reason: wireString(wire.reason, `${path}.reason`),
72334
+ message: wireString(wire.message, `${path}.message`)
72335
+ };
72336
+ }
72337
+ }
72338
+ function ImportCellNoteFromApiToFront(dto) {
72339
+ const out = {
72340
+ column: dto.column,
72341
+ disposition: dto.disposition,
72342
+ reason: dto.reason
72343
+ };
72344
+ if (present(dto.resource_key)) out.resourceKey = dto.resource_key;
72345
+ return out;
72346
+ }
72347
+ function ImportItemFromApiToFront(dto) {
72348
+ const out = {
72349
+ ordinal: dto.ordinal,
72350
+ coordinates: ImportCoordinatesFromWire(dto.coordinates, "coordinates"),
72351
+ item: SourceItemFromWire(dto.item, "item"),
72352
+ disposition: dto.disposition,
72353
+ resourceKeys: dto.resource_keys,
72354
+ notes: dto.notes.map(ImportCellNoteFromApiToFront)
72355
+ };
72356
+ if (present(dto.reason)) out.reason = dto.reason;
72357
+ if (present(dto.target_record_id)) out.targetRecordId = dto.target_record_id;
72358
+ return out;
72359
+ }
72360
+ function VocabularyImportItemPageFromApiToFront(dto) {
72361
+ const out = {
72362
+ importId: dto.import_id,
72363
+ items: dto.items.map(ImportItemFromApiToFront),
72364
+ complete: dto.complete
72365
+ };
72366
+ if (present(dto.next_cursor)) out.nextCursor = dto.next_cursor;
72367
+ return out;
72368
+ }
72369
+ function LegacySortInventoryFromApiToFront(dto) {
72370
+ return {
72371
+ sortId: dto.sort_id,
72372
+ sortName: dto.sort_name,
72373
+ classification: dto.classification,
72374
+ parents: dto.parents,
72375
+ featureCount: dto.feature_count,
72376
+ boundConstraintCount: dto.bound_constraint_count,
72377
+ instances: dto.instances,
72378
+ rulesReferencing: dto.rules_referencing,
72379
+ featuresRangingOver: dto.features_ranging_over
72380
+ };
72381
+ }
72382
+ function VocabularyMigrationPlanFromApiToFront(dto) {
72383
+ return {
72384
+ planId: dto.plan_id,
72385
+ fingerprint: dto.fingerprint,
72386
+ byteSize: dto.byte_size,
72387
+ inventory: dto.inventory.map(LegacySortInventoryFromApiToFront),
72388
+ dispositions: dto.dispositions.map(
72389
+ (planned) => ({
72390
+ sortId: planned.sort_id,
72391
+ disposition: planned.disposition,
72392
+ rationale: planned.rationale
72393
+ })
72394
+ ),
72395
+ createdBy: dto.created_by,
72396
+ createdAt: dto.created_at,
72397
+ replayed: dto.replayed
72398
+ };
72399
+ }
72400
+ function NativeExportManifestFromApiToFront(dto) {
72401
+ const out = {
72402
+ recordCount: dto.record_count,
72403
+ countsByKind: dataMap(dto.counts_by_kind),
72404
+ recordsSha256: dto.records_sha256,
72405
+ unreadable: dto.unreadable.map((record) => ({
72406
+ recordId: record.record_id,
72407
+ reason: record.reason
72408
+ }))
72409
+ };
72410
+ if (present(dto.context_manifest)) {
72411
+ out.contextManifest = ContextManifestFromApiToFront(dto.context_manifest);
72412
+ }
72413
+ return out;
72414
+ }
72415
+ function VocabularyNativeExportFromApiToFront(dto) {
72416
+ const out = {
72417
+ format: dto.format,
72418
+ view: ViewRefFromApiToFront(dto.view),
72419
+ records: dto.records.map(VocabularyRecordViewFromApiToFront),
72420
+ artifacts: dto.artifacts.map(VocabularySourceArtifactRecordFromApiToFront),
72421
+ manifest: NativeExportManifestFromApiToFront(dto.manifest)
72422
+ };
72423
+ if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
72424
+ return out;
72425
+ }
72426
+ function IriChoiceFromApiToFront(dto) {
72427
+ return {
72428
+ recordId: dto.record_id,
72429
+ kind: dto.kind,
72430
+ iri: dto.iri,
72431
+ rule: dto.rule,
72432
+ sourceAssociations: dto.source_associations
72433
+ };
72434
+ }
72435
+ function ProjectionLossFromApiToFront(dto) {
72436
+ return { kind: dto.kind, reason: dto.reason, recordIds: dto.record_ids };
72437
+ }
72438
+ function SkosManifestFromApiToFront(dto) {
72439
+ const out = {
72440
+ projection: dto.projection,
72441
+ iriPolicy: dto.iri_policy,
72442
+ view: ViewRefFromApiToFront(dto.view),
72443
+ schemeId: dto.scheme_id,
72444
+ includeProvenance: dto.include_provenance,
72445
+ tripleCount: dto.triple_count,
72446
+ iris: dto.iris.map(IriChoiceFromApiToFront),
72447
+ losses: dto.losses.map(ProjectionLossFromApiToFront)
72448
+ };
72449
+ if (present(dto.context_id)) out.contextId = dto.context_id;
72450
+ return out;
72451
+ }
72452
+ function VocabularySkosExportFromApiToFront(dto) {
72453
+ return {
72454
+ mediaType: dto.media_type,
72455
+ content: dto.content,
72456
+ sha256: dto.sha256,
72457
+ manifest: SkosManifestFromApiToFront(dto.manifest)
72458
+ };
72459
+ }
72460
+ function SparqlDatasetFromApiToFront(dto) {
72461
+ const out = {
72462
+ view: ViewRefFromApiToFront(dto.view),
72463
+ schemeId: dto.scheme_id,
72464
+ projection: dto.projection,
72465
+ tripleCount: dto.triple_count
72466
+ };
72467
+ if (present(dto.context_id)) out.contextId = dto.context_id;
72468
+ return out;
72469
+ }
72470
+ var SPARQL_TERM_TYPES = ["uri", "bnode", "literal"];
72471
+ function SparqlTermFromWire(value, path) {
72472
+ const wire = wireObject(value, path);
72473
+ const type = wireLiteral(wire.type, SPARQL_TERM_TYPES, `${path}.type`);
72474
+ const lexical = wireString(wire.value, `${path}.value`);
72475
+ switch (type) {
72476
+ case "uri":
72477
+ return { type: "uri", value: lexical };
72478
+ case "bnode":
72479
+ return { type: "bnode", value: lexical };
72480
+ case "literal": {
72481
+ const term = {
72482
+ type: "literal",
72483
+ value: lexical
72484
+ };
72485
+ const language = wire["xml:lang"];
72486
+ if (present(language)) term["xml:lang"] = wireString(language, `${path}.xml:lang`);
72487
+ if (present(wire.datatype)) term.datatype = wireString(wire.datatype, `${path}.datatype`);
72488
+ return term;
72489
+ }
72490
+ }
72491
+ }
72492
+ function SparqlSelectDocumentFromWire(value) {
72493
+ const wire = wireObject(value, "results");
72494
+ const head = wireObject(wire.head, "results.head");
72495
+ const results = wireObject(wire.results, "results.results");
72496
+ return {
72497
+ head: { vars: wireStringArray(head.vars, "results.head.vars") },
72498
+ results: {
72499
+ bindings: wireArray(results.bindings, "results.results.bindings").map((solution, index) => {
72500
+ const path = `results.results.bindings[${index}]`;
72501
+ const binding = {};
72502
+ for (const [variable, term] of Object.entries(wireObject(solution, path))) {
72503
+ binding[variable] = SparqlTermFromWire(term, `${path}.${variable}`);
72504
+ }
72505
+ return binding;
72506
+ })
72507
+ }
72508
+ };
72509
+ }
72510
+ function SparqlAskDocumentFromWire(value) {
72511
+ const wire = wireObject(value, "results");
72512
+ wireObject(wire.head, "results.head");
72513
+ return { head: {}, boolean: wireBoolean(wire.boolean, "results.boolean") };
72514
+ }
72515
+ function VocabularySparqlResultFromApiToFront(dto) {
72516
+ const base = {
72517
+ dataset: SparqlDatasetFromApiToFront(dto.dataset),
72518
+ complete: dto.complete
72519
+ };
72520
+ if (present(dto.stop_reason)) base.stopReason = dto.stop_reason;
72521
+ switch (dto.form) {
72522
+ case "select":
72523
+ return { ...base, form: "select", results: SparqlSelectDocumentFromWire(dto.results) };
72524
+ case "ask":
72525
+ return { ...base, form: "ask", results: SparqlAskDocumentFromWire(dto.results) };
72526
+ case "construct":
72527
+ case "describe": {
72528
+ const nTriples = dto.n_triples;
72529
+ if (!present(nTriples)) throw new TypeError("n_triples is missing from a graph answer");
72530
+ return { ...base, form: dto.form, nTriples };
72531
+ }
72532
+ }
72533
+ }
70135
72534
 
70136
72535
  // src/resources/vocabulary.ts
70137
72536
  function viewQuery(selector) {
@@ -71102,6 +73501,681 @@ var VocabularyClient = class {
71102
73501
  const response = await this.api.migrationPreview(pageQuery(query), toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
71103
73502
  return decodeResponse(response, VocabularyMigrationPreviewFromApiToFront);
71104
73503
  }
73504
+ // ---------------------------------------------------------------------------
73505
+ // Taxonomy and thesaurus reads
73506
+ // ---------------------------------------------------------------------------
73507
+ /**
73508
+ * The `broader` links of one scheme around a concept, or below its top
73509
+ * concepts: a DAG of concepts and the stored relations that witness them.
73510
+ *
73511
+ * @param schemeId - The scheme (UUID); only its relations are followed.
73512
+ * @param query - The view, a start concept, the direction, transitivity,
73513
+ * hierarchy kinds, a status, `maxNodes` (1 to 100000) and a display language.
73514
+ * @param requestOptions - Per-call options (timeout, retries, signal, headers).
73515
+ * @returns The nodes (each once, with every relation that reaches it in
73516
+ * `via`), the edges, and `complete` / `stopReason`.
73517
+ * @throws {@link NotFoundError} 404 for an unknown scheme, concept, release or revision.
73518
+ * @throws {@link VocabularyRefusedError} 400 `invalid_request`; 409
73519
+ * `vocabulary_plugin_unavailable`.
73520
+ *
73521
+ * @remarks
73522
+ * `GET /api/v1/vocabulary/schemes/{scheme_id}/hierarchy`. `hierarchyKinds`
73523
+ * is sent as one comma-separated parameter. A traversal that reaches
73524
+ * `maxNodes` or the deadline answers `complete: false` with its
73525
+ * `stopReason`: a partial answer, not an error. Read `complete` before
73526
+ * concluding that a concept is absent. Mappings are never followed.
73527
+ *
73528
+ * @example
73529
+ * ```typescript
73530
+ * const tree = await client.vocabulary.schemeHierarchy(schemeId, { transitive: true });
73531
+ * if (!tree.complete) console.log('partial:', tree.stopReason);
73532
+ * for (const node of tree.nodes) console.log(node.depth, node.displayLabel?.text, node.via);
73533
+ * ```
73534
+ */
73535
+ async schemeHierarchy(schemeId, query, requestOptions) {
73536
+ const wire = viewQuery(query?.view);
73537
+ if (query?.conceptId !== void 0) wire.concept_id = query.conceptId;
73538
+ if (query?.direction !== void 0) wire.direction = query.direction;
73539
+ if (query?.transitive !== void 0) wire.transitive = query.transitive;
73540
+ if (query?.hierarchyKinds !== void 0) wire.hierarchy_kinds = query.hierarchyKinds.join(",");
73541
+ if (query?.status !== void 0) wire.status = query.status;
73542
+ if (query?.maxNodes !== void 0) wire.max_nodes = query.maxNodes;
73543
+ if (query?.language !== void 0) wire.language = query.language;
73544
+ const response = await this.api.schemeHierarchy(schemeId, wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
73545
+ return decodeResponse(response, VocabularyHierarchyFromApiToFront);
73546
+ }
73547
+ /**
73548
+ * The simple paths of accepted `broader` links from a narrower concept up
73549
+ * to a broader one.
73550
+ *
73551
+ * @param schemeId - The scheme (UUID).
73552
+ * @param query - The view, `from` and `to` (UUIDs), hierarchy kinds,
73553
+ * `maxNodes` (1 to 100000) and `maxPaths` (1 to 1024).
73554
+ * @param requestOptions - Per-call options (timeout, retries, signal, headers).
73555
+ * @returns Each path as a sequence of relation ids, shortest first, and
73556
+ * `complete` / `stopReason`.
73557
+ * @throws {@link NotFoundError} 404 for an unknown scheme, concept, release or revision.
73558
+ * @throws {@link VocabularyRefusedError} 400 `invalid_request`; 409
73559
+ * `vocabulary_plugin_unavailable`.
73560
+ *
73561
+ * @remarks
73562
+ * `GET /api/v1/vocabulary/schemes/{scheme_id}/paths`. An empty `paths`
73563
+ * with `complete: true` means no path exists; with `complete: false` it
73564
+ * means the search stopped (`path_limit`, `node_limit` or `deadline`).
73565
+ *
73566
+ * @example
73567
+ * ```typescript
73568
+ * const { paths, complete } = await client.vocabulary.schemePaths(schemeId, {
73569
+ * from: narrowerId,
73570
+ * to: broaderId,
73571
+ * });
73572
+ * ```
73573
+ */
73574
+ async schemePaths(schemeId, query, requestOptions) {
73575
+ const wire = {
73576
+ ...viewQuery(query.view),
73577
+ from: query.from,
73578
+ to: query.to
73579
+ };
73580
+ if (query.hierarchyKinds !== void 0) wire.hierarchy_kinds = query.hierarchyKinds.join(",");
73581
+ if (query.maxNodes !== void 0) wire.max_nodes = query.maxNodes;
73582
+ if (query.maxPaths !== void 0) wire.max_paths = query.maxPaths;
73583
+ const response = await this.api.schemePaths(schemeId, wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
73584
+ return decodeResponse(response, VocabularyHierarchyPathsFromApiToFront);
73585
+ }
73586
+ /**
73587
+ * The top concepts of a scheme: the concepts with an accepted membership
73588
+ * marked `topConcept`.
73589
+ *
73590
+ * @param schemeId - The scheme (UUID).
73591
+ * @param query - The view and a display language.
73592
+ * @param requestOptions - Per-call options (timeout, retries, signal, headers).
73593
+ * @returns The concepts, by id.
73594
+ * @throws {@link NotFoundError} 404 for an unknown scheme, release or revision.
73595
+ * @throws {@link VocabularyRefusedError} 400 `invalid_request`; 409
73596
+ * `vocabulary_plugin_unavailable`.
73597
+ *
73598
+ * @remarks
73599
+ * `GET /api/v1/vocabulary/schemes/{scheme_id}/top-concepts`.
73600
+ *
73601
+ * @example
73602
+ * ```typescript
73603
+ * const { concepts } = await client.vocabulary.topConcepts(schemeId, { language: 'en' });
73604
+ * ```
73605
+ */
73606
+ async topConcepts(schemeId, query, requestOptions) {
73607
+ const wire = viewQuery(query?.view);
73608
+ if (query?.language !== void 0) wire.language = query.language;
73609
+ const response = await this.api.schemeTopConcepts(schemeId, wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
73610
+ return decodeResponse(response, VocabularyTopConceptsFromApiToFront);
73611
+ }
73612
+ /**
73613
+ * The taxonomy policy of a scheme, or the `taxonomy-policy/v1` defaults
73614
+ * with `declared: false`.
73615
+ *
73616
+ * @param schemeId - The scheme (UUID).
73617
+ * @param query - The view.
73618
+ * @param requestOptions - Per-call options (timeout, retries, signal, headers).
73619
+ * @returns The policy in force for the scheme in that view.
73620
+ * @throws {@link NotFoundError} 404 for an unknown scheme, release or revision.
73621
+ * @throws {@link VocabularyRefusedError} 400 `invalid_request`; 409
73622
+ * `vocabulary_plugin_unavailable`.
73623
+ *
73624
+ * @remarks
73625
+ * `GET /api/v1/vocabulary/schemes/{scheme_id}/policy`. An absent
73626
+ * `partitiveTransitive` is unstated: a partitive path of two or more links
73627
+ * is reported, never derived.
73628
+ *
73629
+ * @example
73630
+ * ```typescript
73631
+ * const policy = await client.vocabulary.schemePolicy(schemeId);
73632
+ * if (!policy.declared) console.log('defaults', policy.policy);
73633
+ * ```
73634
+ */
73635
+ async schemePolicy(schemeId, query, requestOptions) {
73636
+ const response = await this.api.schemePolicy(schemeId, viewQuery(query?.view), toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
73637
+ return decodeResponse(response, VocabularyTaxonomyPolicyFromApiToFront);
73638
+ }
73639
+ /**
73640
+ * The direct relations of one kind of a concept in one scheme, of every
73641
+ * status.
73642
+ *
73643
+ * @param conceptId - The concept (UUID).
73644
+ * @param query - The view, the scheme, `relation` (`related`, `broader` or
73645
+ * `narrower`) and a display language.
73646
+ * @param requestOptions - Per-call options (timeout, retries, signal, headers).
73647
+ * @returns The relations, by relation id, each with the concept at the other end.
73648
+ * @throws {@link NotFoundError} 404 for an unknown concept, scheme, release or revision.
73649
+ * @throws {@link VocabularyRefusedError} 400 `invalid_request`; 409
73650
+ * `vocabulary_plugin_unavailable`.
73651
+ *
73652
+ * @remarks
73653
+ * `GET /api/v1/vocabulary/concepts/{concept_id}/relations`. `narrower` is
73654
+ * the inverse read of the stored `broader` links; nothing derived is listed.
73655
+ *
73656
+ * @example
73657
+ * ```typescript
73658
+ * const { relations } = await client.vocabulary.conceptRelations(conceptId, {
73659
+ * schemeId,
73660
+ * relation: 'narrower',
73661
+ * });
73662
+ * ```
73663
+ */
73664
+ async conceptRelations(conceptId, query, requestOptions) {
73665
+ const wire = {
73666
+ ...viewQuery(query.view),
73667
+ scheme_id: query.schemeId,
73668
+ relation: query.relation
73669
+ };
73670
+ if (query.language !== void 0) wire.language = query.language;
73671
+ const response = await this.api.conceptRelations(conceptId, wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
73672
+ return decodeResponse(response, VocabularyConceptRelationsFromApiToFront);
73673
+ }
73674
+ /**
73675
+ * One page of the collections of one scheme.
73676
+ *
73677
+ * @param query - The view, the scheme and cursor paging (`limit` 1 to 200).
73678
+ * @param requestOptions - Per-call options (timeout, retries, signal, headers).
73679
+ * @returns The collections with their labels and member counts, the next
73680
+ * cursor and `complete`.
73681
+ * @throws {@link NotFoundError} 404 for an unknown scheme, release or revision.
73682
+ * @throws {@link VocabularyRefusedError} 400 `invalid_request`,
73683
+ * `cursor_mismatch` (a cursor read with another view or scheme); 409
73684
+ * `vocabulary_plugin_unavailable`.
73685
+ *
73686
+ * @remarks
73687
+ * `GET /api/v1/vocabulary/collections?scheme_id&cursor&limit`. A cursor is
73688
+ * bound to the tenant, the view and the scheme.
73689
+ *
73690
+ * @example
73691
+ * ```typescript
73692
+ * const page = await client.vocabulary.listCollections({ schemeId, limit: 50 });
73693
+ * ```
73694
+ */
73695
+ async listCollections(query, requestOptions) {
73696
+ const wire = {
73697
+ ...viewQuery(query.view),
73698
+ ...pageQuery(query),
73699
+ scheme_id: query.schemeId
73700
+ };
73701
+ const response = await this.api.listVocabularyCollections(wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
73702
+ return decodeResponse(response, VocabularyCollectionPageFromApiToFront);
73703
+ }
73704
+ /**
73705
+ * One collection with its labels, its member occurrences and its nested
73706
+ * collections.
73707
+ *
73708
+ * @param collectionId - The collection (UUID).
73709
+ * @param query - The view and a display language for member concepts.
73710
+ * @param requestOptions - Per-call options (timeout, retries, signal, headers).
73711
+ * @returns The collection detail. Member occurrences keep their positions.
73712
+ * @throws {@link NotFoundError} 404 when the view does not hold the collection.
73713
+ * @throws {@link VocabularyRefusedError} 400 `invalid_request`; 409
73714
+ * `vocabulary_plugin_unavailable`.
73715
+ *
73716
+ * @remarks
73717
+ * `GET /api/v1/vocabulary/collections/{collection_id}`. Members are listed
73718
+ * by position (absent first), then by occurrence id; a member that occurs
73719
+ * twice is listed twice.
73720
+ *
73721
+ * @example
73722
+ * ```typescript
73723
+ * const detail = await client.vocabulary.getCollection(collectionId, { language: 'en' });
73724
+ * for (const member of detail.members) console.log(member.position, member.memberConcept);
73725
+ * ```
73726
+ */
73727
+ async getCollection(collectionId, query, requestOptions) {
73728
+ const wire = viewQuery(
73729
+ query?.view
73730
+ );
73731
+ if (query?.language !== void 0) wire.language = query.language;
73732
+ const response = await this.api.getVocabularyCollection(collectionId, wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
73733
+ return decodeResponse(response, VocabularyCollectionDetailFromApiToFront);
73734
+ }
73735
+ /**
73736
+ * One page of the depth-first list of a scheme's concepts, for a form
73737
+ * control. A concept with several parents is listed once.
73738
+ *
73739
+ * @param schemeId - The scheme (UUID).
73740
+ * @param query - The view, a root, `maxDepth`, `maxNodes` (1 to 100000),
73741
+ * a display language and cursor paging (`limit` 1 to 500).
73742
+ * @param requestOptions - Per-call options (timeout, retries, signal, headers).
73743
+ * @returns The entries of this page, the roots, the next cursor,
73744
+ * `complete` and `stopReason`.
73745
+ * @throws {@link NotFoundError} 404 for an unknown scheme, root, release or revision.
73746
+ * @throws {@link VocabularyRefusedError} 400 `invalid_request`,
73747
+ * `cursor_mismatch`; 409 `vocabulary_plugin_unavailable`.
73748
+ *
73749
+ * @remarks
73750
+ * `GET /api/v1/vocabulary/schemes/{scheme_id}/picklist`. Only accepted
73751
+ * `broader` relations are followed. `complete` is `true` only on the last
73752
+ * page of a list that `maxNodes` did not cut.
73753
+ *
73754
+ * @example
73755
+ * ```typescript
73756
+ * let page = await client.vocabulary.picklist(schemeId, { limit: 100 });
73757
+ * while (page.nextCursor !== undefined) {
73758
+ * page = await client.vocabulary.picklist(schemeId, { cursor: page.nextCursor });
73759
+ * }
73760
+ * ```
73761
+ */
73762
+ async picklist(schemeId, query, requestOptions) {
73763
+ const wire = {
73764
+ ...viewQuery(query?.view),
73765
+ ...pageQuery(query)
73766
+ };
73767
+ if (query?.root !== void 0) wire.root = query.root;
73768
+ if (query?.maxDepth !== void 0) wire.max_depth = query.maxDepth;
73769
+ if (query?.maxNodes !== void 0) wire.max_nodes = query.maxNodes;
73770
+ if (query?.language !== void 0) wire.language = query.language;
73771
+ const response = await this.api.schemePicklist(schemeId, wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
73772
+ return decodeResponse(response, VocabularyPicklistFromApiToFront);
73773
+ }
73774
+ /**
73775
+ * The concepts a query on one concept may be expanded to, each with the
73776
+ * relation and mapping ids that support it.
73777
+ *
73778
+ * @param conceptId - The concept to expand (UUID).
73779
+ * @param query - The view, the scheme, the direction, transitivity,
73780
+ * hierarchy kinds, related links, mapping kinds, `maxNodes` and a display
73781
+ * language.
73782
+ * @param requestOptions - Per-call options (timeout, retries, signal, headers).
73783
+ * @returns The concepts and external concepts with their support, the
73784
+ * withheld relations and `complete` / `stopReason`.
73785
+ * @throws {@link NotFoundError} 404 for an unknown concept, scheme, release or revision.
73786
+ * @throws {@link VocabularyRefusedError} 400 `invalid_request`; 409
73787
+ * `vocabulary_plugin_unavailable`.
73788
+ *
73789
+ * @remarks
73790
+ * `GET /api/v1/vocabulary/concepts/{concept_id}/expansion`.
73791
+ * `hierarchyKinds` and `mappingKinds` are sent comma-separated. A
73792
+ * partitive link that would end a transitive path is not followed unless
73793
+ * the scheme's policy states `partitiveTransitive: true`; it is listed in
73794
+ * `withheldRelationIds`.
73795
+ *
73796
+ * @example
73797
+ * ```typescript
73798
+ * const expansion = await client.vocabulary.expandConcept(conceptId, {
73799
+ * schemeId,
73800
+ * transitive: true,
73801
+ * mappingKinds: ['exact', 'close'],
73802
+ * });
73803
+ * ```
73804
+ */
73805
+ async expandConcept(conceptId, query, requestOptions) {
73806
+ const wire = {
73807
+ ...viewQuery(query.view),
73808
+ scheme_id: query.schemeId
73809
+ };
73810
+ if (query.direction !== void 0) wire.direction = query.direction;
73811
+ if (query.transitive !== void 0) wire.transitive = query.transitive;
73812
+ if (query.hierarchyKinds !== void 0) wire.hierarchy_kinds = query.hierarchyKinds.join(",");
73813
+ if (query.includeRelated !== void 0) wire.include_related = query.includeRelated;
73814
+ if (query.mappingKinds !== void 0) wire.mapping_kinds = query.mappingKinds.join(",");
73815
+ if (query.maxNodes !== void 0) wire.max_nodes = query.maxNodes;
73816
+ if (query.language !== void 0) wire.language = query.language;
73817
+ const response = await this.api.conceptExpansion(conceptId, wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
73818
+ return decodeResponse(response, VocabularyExpansionFromApiToFront);
73819
+ }
73820
+ // ---------------------------------------------------------------------------
73821
+ // Imports
73822
+ // ---------------------------------------------------------------------------
73823
+ /**
73824
+ * Parse an uploaded source file and store its import proposal. Writes no
73825
+ * vocabulary record.
73826
+ *
73827
+ * @param request - The uploaded file, its format, the declared dataset, the
73828
+ * target scheme and the RDF options.
73829
+ * @param requestOptions - The required `idempotencyKey` and per-call options.
73830
+ * @returns The import: artefact identity, completeness, item counts by
73831
+ * disposition, reconciliation entries and proposed record counts.
73832
+ * @throws {@link VocabularyRefusedError} 403 `vocabulary_actor_required`,
73833
+ * `vocabulary_authority_denied`, `vocabulary_authority_undetermined`; 404
73834
+ * `source_file_not_found`; 409 `vocabulary_plugin_unavailable`; 413
73835
+ * `source_too_large` (over 20 MiB); 422 `format_unsupported`,
73836
+ * `invalid_request`.
73837
+ * @throws {@link IdempotencyKeyReusedError} 422 when the key committed a different request.
73838
+ * @throws {@link MutationOutcomeUnconfirmedError} 503 when the commit outcome is unknown.
73839
+ *
73840
+ * @remarks
73841
+ * `POST /api/v1/vocabulary/imports` with `Idempotency-Key`. Upload the file
73842
+ * first with `client.sources.uploadFile` and pass its id. Permission
73843
+ * `author_vocabulary` on the tenant. An incomplete parse
73844
+ * (`complete: false`) can be read and paged, never committed. Recover an
73845
+ * unknown outcome with {@link VocabularyClient.getRequestOutcome}
73846
+ * (`'create_import'`).
73847
+ *
73848
+ * @example
73849
+ * ```typescript
73850
+ * const key = crypto.randomUUID(); // bind once; pass the same key on every retry
73851
+ * const file = await client.sources.uploadFile(new Blob([turtle]), 'scheme.ttl');
73852
+ * const proposal = await client.vocabulary.createImport(
73853
+ * {
73854
+ * sourceFileId: file.id,
73855
+ * format: 'turtle',
73856
+ * dataset: 'https://example.org/scheme',
73857
+ * targetScheme: { existing: { schemeId } },
73858
+ * },
73859
+ * { idempotencyKey: key },
73860
+ * );
73861
+ * ```
73862
+ */
73863
+ async createImport(request, requestOptions) {
73864
+ const response = await this.api.createImport(
73865
+ CreateVocabularyImportRequestFromFrontToApi(request),
73866
+ idempotencyParams(requestOptions.idempotencyKey, requestOptions)
73867
+ ).catch(rethrowVocabularyRefusal);
73868
+ return decodeResponse(response, VocabularyImportFromApiToFront);
73869
+ }
73870
+ /**
73871
+ * One import proposal.
73872
+ *
73873
+ * @param importId - The import (UUID).
73874
+ * @param requestOptions - Per-call options (timeout, retries, signal, headers).
73875
+ * @returns The import, with `committedRevisionId` once committed.
73876
+ * @throws {@link NotFoundError} 404 for an unknown import.
73877
+ * @throws {@link VocabularyRefusedError} 409 `vocabulary_plugin_unavailable`.
73878
+ *
73879
+ * @remarks
73880
+ * `GET /api/v1/vocabulary/imports/{import_id}`.
73881
+ *
73882
+ * @example
73883
+ * ```typescript
73884
+ * const proposal = await client.vocabulary.getImport(importId);
73885
+ * ```
73886
+ */
73887
+ async getImport(importId, requestOptions) {
73888
+ const response = await this.api.getImport(importId, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
73889
+ return decodeResponse(response, VocabularyImportFromApiToFront);
73890
+ }
73891
+ /**
73892
+ * One page of an import's source items, by ordinal: what was read, where,
73893
+ * and what became of it.
73894
+ *
73895
+ * @param importId - The import (UUID).
73896
+ * @param query - A disposition filter and cursor paging (`limit` 1 to 500).
73897
+ * @param requestOptions - Per-call options (timeout, retries, signal, headers).
73898
+ * @returns The items, the next cursor and `complete`.
73899
+ * @throws {@link NotFoundError} 404 for an unknown import.
73900
+ * @throws {@link VocabularyRefusedError} 400 `invalid_request` (a malformed
73901
+ * cursor or limit); 409 `vocabulary_plugin_unavailable`.
73902
+ *
73903
+ * @remarks
73904
+ * `GET /api/v1/vocabulary/imports/{import_id}/items`. Nothing read is
73905
+ * dropped: a malformed part is a `rejected` item with its coordinates.
73906
+ *
73907
+ * @example
73908
+ * ```typescript
73909
+ * const rejected = await client.vocabulary.listImportItems(importId, {
73910
+ * disposition: 'rejected',
73911
+ * });
73912
+ * ```
73913
+ */
73914
+ async listImportItems(importId, query, requestOptions) {
73915
+ const wire = pageQuery(query);
73916
+ if (query?.disposition !== void 0) wire.disposition = query.disposition;
73917
+ const response = await this.api.importItems(importId, wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
73918
+ return decodeResponse(response, VocabularyImportItemPageFromApiToFront);
73919
+ }
73920
+ /**
73921
+ * Commit an import proposal with the reviewer's decisions as one candidate
73922
+ * revision: a new candidate, or the next revision of `candidateId`.
73923
+ *
73924
+ * @param importId - The import (UUID).
73925
+ * @param request - The change reason, a title (new candidate) or a
73926
+ * `candidateId`, and one decision per reconciliation entry.
73927
+ * @param requestOptions - The required `idempotencyKey`, `ifMatch` when
73928
+ * `candidateId` is given, and per-call options.
73929
+ * @returns The candidate revision the import became.
73930
+ * @throws {@link PreconditionFailedError} 412 when `ifMatch` is not the head.
73931
+ * @throws {@link NotFoundError} 404 for an unknown import or candidate.
73932
+ * @throws {@link VocabularyRefusedError} 409 `import_incomplete`,
73933
+ * `import_already_committed`, `import_baseline_stale`,
73934
+ * `active_release_changed`, `candidate_closed`; 422
73935
+ * `reconciliation_undecided` (see `refusal.undecidedSourceKeys`),
73936
+ * `invalid_decision`, `import_too_large`, `invalid_records`; 428
73937
+ * `if_match_required`; 403 authority.
73938
+ * @throws {@link IdempotencyKeyReusedError} 422.
73939
+ * @throws {@link MutationOutcomeUnconfirmedError} 503.
73940
+ *
73941
+ * @remarks
73942
+ * `POST /api/v1/vocabulary/imports/{import_id}/commit` with
73943
+ * `Idempotency-Key` (and `If-Match` with `candidateId`). Source keys travel
73944
+ * as values, verbatim. The revision is a candidate: steward review,
73945
+ * approval, release and activation still apply. Recover an unknown outcome
73946
+ * with {@link VocabularyClient.getRequestOutcome} (`'commit_import'`).
73947
+ *
73948
+ * @example
73949
+ * ```typescript
73950
+ * const key = crypto.randomUUID(); // bind once; pass the same key on every retry
73951
+ * const revision = await client.vocabulary.commitImport(
73952
+ * importId,
73953
+ * {
73954
+ * title: 'Import the manufacturing scheme',
73955
+ * changeReason: 'Adopt the reviewed source',
73956
+ * decisions: proposal.reconciliation.map((entry) => ({
73957
+ * sourceKey: entry.sourceKey,
73958
+ * decision: 'create_new',
73959
+ * })),
73960
+ * },
73961
+ * { idempotencyKey: key },
73962
+ * );
73963
+ * ```
73964
+ */
73965
+ async commitImport(importId, request, requestOptions) {
73966
+ const response = await this.api.commitImport(
73967
+ importId,
73968
+ CommitVocabularyImportRequestFromFrontToApi(request),
73969
+ idempotencyParams(requestOptions.idempotencyKey, requestOptions, requestOptions.ifMatch)
73970
+ ).catch(rethrowVocabularyRefusal);
73971
+ return decodeResponse(response, VocabularyCandidateRevisionFromApiToFront);
73972
+ }
73973
+ // ---------------------------------------------------------------------------
73974
+ // Migration plans
73975
+ // ---------------------------------------------------------------------------
73976
+ /**
73977
+ * Store the reviewer's dispositions of legacy sorts over the current legacy
73978
+ * inventory. Converts nothing.
73979
+ *
73980
+ * @param request - One disposition per planned sort.
73981
+ * @param requestOptions - The required `idempotencyKey` and per-call options.
73982
+ * @returns The plan, with the fingerprint and per-sort usage of the inventory it binds.
73983
+ * @throws {@link VocabularyRefusedError} 422 `invalid_disposition` (a
73984
+ * `formal_in_use` sort planned `convert_lexical`), `invalid_request`; 400
73985
+ * `read_budget_exceeded`; 403 authority; 409 `vocabulary_plugin_unavailable`.
73986
+ * @throws {@link IdempotencyKeyReusedError} 422.
73987
+ * @throws {@link MutationOutcomeUnconfirmedError} 503.
73988
+ *
73989
+ * @remarks
73990
+ * `POST /api/v1/vocabulary/migration/plans` with `Idempotency-Key`. Read the
73991
+ * inventory first with {@link VocabularyClient.migrationPreview}. Recover an
73992
+ * unknown outcome with {@link VocabularyClient.getRequestOutcome}
73993
+ * (`'create_migration_plan'`).
73994
+ *
73995
+ * @example
73996
+ * ```typescript
73997
+ * const key = crypto.randomUUID(); // bind once; pass the same key on every retry
73998
+ * const plan = await client.vocabulary.createMigrationPlan(
73999
+ * { dispositions: [{ sortId, disposition: 'convert_lexical', rationale: 'Labels only' }] },
74000
+ * { idempotencyKey: key },
74001
+ * );
74002
+ * ```
74003
+ */
74004
+ async createMigrationPlan(request, requestOptions) {
74005
+ const response = await this.api.createMigrationPlan(
74006
+ CreateVocabularyMigrationPlanRequestFromFrontToApi(request),
74007
+ idempotencyParams(requestOptions.idempotencyKey, requestOptions)
74008
+ ).catch(rethrowVocabularyRefusal);
74009
+ return decodeResponse(response, VocabularyMigrationPlanFromApiToFront);
74010
+ }
74011
+ /**
74012
+ * One migration plan.
74013
+ *
74014
+ * @param planId - The plan (UUID).
74015
+ * @param requestOptions - Per-call options (timeout, retries, signal, headers).
74016
+ * @returns The plan.
74017
+ * @throws {@link NotFoundError} 404 for an unknown plan.
74018
+ * @throws {@link VocabularyRefusedError} 409 `vocabulary_plugin_unavailable`.
74019
+ *
74020
+ * @remarks
74021
+ * `GET /api/v1/vocabulary/migration/plans/{plan_id}`.
74022
+ *
74023
+ * @example
74024
+ * ```typescript
74025
+ * const plan = await client.vocabulary.getMigrationPlan(planId);
74026
+ * ```
74027
+ */
74028
+ async getMigrationPlan(planId, requestOptions) {
74029
+ const response = await this.api.getMigrationPlan(planId, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
74030
+ return decodeResponse(response, VocabularyMigrationPlanFromApiToFront);
74031
+ }
74032
+ /**
74033
+ * Apply a migration plan as a new candidate on the active release.
74034
+ *
74035
+ * @param planId - The plan (UUID).
74036
+ * @param request - The title, the change reason, the target scheme and the
74037
+ * language of the legacy labels.
74038
+ * @param requestOptions - The required `idempotencyKey` and per-call options.
74039
+ * @returns The candidate revision: concepts, the `legacy_theory` artefact,
74040
+ * source associations and one `migration_decision` per planned sort.
74041
+ * @throws {@link NotFoundError} 404 for an unknown plan.
74042
+ * @throws {@link VocabularyRefusedError} 409 `migration_plan_stale` (the
74043
+ * legacy inventory changed; see `refusal.changedSorts`),
74044
+ * `active_release_changed`; 422 `invalid_records`, `import_too_large`;
74045
+ * 403 authority.
74046
+ * @throws {@link IdempotencyKeyReusedError} 422.
74047
+ * @throws {@link MutationOutcomeUnconfirmedError} 503.
74048
+ *
74049
+ * @remarks
74050
+ * `POST /api/v1/vocabulary/migration/plans/{plan_id}/apply` with
74051
+ * `Idempotency-Key`. No sort is converted, removed or reparented: the
74052
+ * candidate holds governed records only, and it still needs review,
74053
+ * approval, release and activation. Without `defaultLanguage` no label is
74054
+ * written. Recover an unknown outcome with
74055
+ * {@link VocabularyClient.getRequestOutcome} (`'apply_migration_plan'`).
74056
+ *
74057
+ * @example
74058
+ * ```typescript
74059
+ * const key = crypto.randomUUID(); // bind once; pass the same key on every retry
74060
+ * const revision = await client.vocabulary.applyMigrationPlan(
74061
+ * plan.planId,
74062
+ * {
74063
+ * title: 'Migrate the legacy vocabulary',
74064
+ * changeReason: 'Plan reviewed',
74065
+ * scheme: { existing: { schemeId } },
74066
+ * defaultLanguage: 'en',
74067
+ * },
74068
+ * { idempotencyKey: key },
74069
+ * );
74070
+ * ```
74071
+ */
74072
+ async applyMigrationPlan(planId, request, requestOptions) {
74073
+ const response = await this.api.applyMigrationPlan(
74074
+ planId,
74075
+ ApplyVocabularyMigrationPlanRequestFromFrontToApi(request),
74076
+ idempotencyParams(requestOptions.idempotencyKey, requestOptions)
74077
+ ).catch(rethrowVocabularyRefusal);
74078
+ return decodeResponse(response, VocabularyCandidateRevisionFromApiToFront);
74079
+ }
74080
+ // ---------------------------------------------------------------------------
74081
+ // Exports and SPARQL
74082
+ // ---------------------------------------------------------------------------
74083
+ /**
74084
+ * The records of a view as `kos-json/v1`, with the source preservation
74085
+ * inventory and a manifest.
74086
+ *
74087
+ * @param query - The view; the active release when absent.
74088
+ * @param requestOptions - Per-call options (timeout, retries, signal, headers).
74089
+ * @returns Every readable record by id, every `source_artifact` record, and
74090
+ * the manifest (record count, counts by kind, records digest, the records
74091
+ * that could not be read, the stored context manifest).
74092
+ * @throws {@link NotFoundError} 404 for an unknown release or revision.
74093
+ * @throws {@link VocabularyRefusedError} 400 `invalid_request`; 409
74094
+ * `vocabulary_plugin_unavailable`.
74095
+ *
74096
+ * @remarks
74097
+ * `GET /api/v1/vocabulary/exports/native`. A record that does not parse as
74098
+ * its kind is listed in `manifest.unreadable`, never dropped silently.
74099
+ *
74100
+ * @example
74101
+ * ```typescript
74102
+ * const exported = await client.vocabulary.exportNative();
74103
+ * console.log(exported.manifest.recordCount, exported.manifest.unreadable.length);
74104
+ * ```
74105
+ */
74106
+ async exportNative(query, requestOptions) {
74107
+ const response = await this.api.exportNative(viewQuery(query?.view), toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
74108
+ return decodeResponse(response, VocabularyNativeExportFromApiToFront);
74109
+ }
74110
+ /**
74111
+ * The SKOS projection of one scheme as Turtle or RDF/XML, with its
74112
+ * manifest: the IRI of every published record and what the projection does
74113
+ * not express.
74114
+ *
74115
+ * @param query - The view, the scheme, the RDF syntax and `includeProvenance`.
74116
+ * @param requestOptions - Per-call options (timeout, retries, signal, headers).
74117
+ * @returns The content, its media type, its SHA-256 and the manifest.
74118
+ * @throws {@link NotFoundError} 404 for an unknown scheme, release or revision.
74119
+ * @throws {@link VocabularyRefusedError} 400 `invalid_request`; 409
74120
+ * `vocabulary_plugin_unavailable`; 422 `export_unrepresentable`.
74121
+ *
74122
+ * @remarks
74123
+ * `GET /api/v1/vocabulary/exports/skos` (`skos-projection/v1`,
74124
+ * `concept-iri/v1`). Read `manifest.losses` before treating the content as
74125
+ * the whole vocabulary: governance records, evidence and other schemes are
74126
+ * not projected.
74127
+ *
74128
+ * @example
74129
+ * ```typescript
74130
+ * const skos = await client.vocabulary.exportSkos({ schemeId, format: 'turtle' });
74131
+ * for (const loss of skos.manifest.losses) console.log(loss.kind, loss.recordIds.length);
74132
+ * ```
74133
+ */
74134
+ async exportSkos(query, requestOptions) {
74135
+ const wire = {
74136
+ ...viewQuery(query.view),
74137
+ scheme_id: query.schemeId
74138
+ };
74139
+ if (query.format !== void 0) wire.format = query.format;
74140
+ if (query.includeProvenance !== void 0) wire.include_provenance = query.includeProvenance;
74141
+ const response = await this.api.exportSkos(wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
74142
+ return decodeResponse(response, VocabularySkosExportFromApiToFront);
74143
+ }
74144
+ /**
74145
+ * One read-only SPARQL query over the SKOS projection of one scheme of one
74146
+ * view.
74147
+ *
74148
+ * @param request - The query, the scheme, the view and `maxResults` (1 to 100000).
74149
+ * @param requestOptions - Per-call options (timeout, retries, signal, headers).
74150
+ * @returns The answer, discriminated by `form`: the W3C results document
74151
+ * for `select` and `ask`, N-Triples for `construct` and `describe`; the
74152
+ * dataset it was computed over; `complete` and `stopReason`.
74153
+ * @throws {@link VocabularyRefusedError} 400 `sparql_unsupported` (an
74154
+ * update, a `SERVICE` clause or a `FROM`/`FROM NAMED` clause),
74155
+ * `invalid_request` (a query that does not parse); 422
74156
+ * `export_unrepresentable` (the projection holds a value the dataset
74157
+ * cannot load); 503 `vocabulary_sparql_unavailable`, `sparql_deadline`
74158
+ * (no answer before the deadline); 409 `vocabulary_plugin_unavailable`.
74159
+ * @throws {@link NotFoundError} 404 for an unknown scheme, release or revision.
74160
+ *
74161
+ * @remarks
74162
+ * `POST /api/v1/vocabulary/sparql`. The query is a string value: the body
74163
+ * transform never changes it. A reached `maxResults` or deadline answers
74164
+ * `complete: false` with `stopReason`.
74165
+ *
74166
+ * @example
74167
+ * ```typescript
74168
+ * const answer = await client.vocabulary.sparql({
74169
+ * schemeId,
74170
+ * query: 'SELECT ?c WHERE { ?c a <http://www.w3.org/2004/02/skos/core#Concept> }',
74171
+ * });
74172
+ * if (answer.form === 'select') console.log(answer.results.results.bindings.length);
74173
+ * ```
74174
+ */
74175
+ async sparql(request, requestOptions) {
74176
+ const response = await this.api.sparqlQuery(VocabularySparqlRequestFromFrontToApi(request), toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
74177
+ return decodeResponse(response, VocabularySparqlResultFromApiToFront);
74178
+ }
71105
74179
  };
71106
74180
 
71107
74181
  // src/normalizers/plugins.ts