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