@kortexya/reasoninglayer 6.2.0 → 7.1.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/README.md +1 -1
- package/dist/index.cjs +3107 -49
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5854 -138
- package/dist/index.d.ts +5854 -138
- package/dist/index.js +3107 -49
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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 = "
|
|
8
|
+
var SDK_VERSION = "7.1.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
|
|
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
|
|
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,36 @@ 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
|
+
});
|
|
9491
|
+
/**
|
|
9492
|
+
* No description
|
|
9493
|
+
*
|
|
9494
|
+
* @tags namespaces
|
|
9495
|
+
* @name GetNamespaceAnswerCacheSavings
|
|
9496
|
+
* @request GET:/api/v1/namespaces/{id}/answer-cache-savings
|
|
9497
|
+
* @secure
|
|
9498
|
+
*/
|
|
9499
|
+
getNamespaceAnswerCacheSavings = (id, params = {}) => this.http.request({
|
|
9500
|
+
path: `/api/v1/namespaces/${id}/answer-cache-savings`,
|
|
9501
|
+
method: "GET",
|
|
9502
|
+
secure: true,
|
|
9503
|
+
format: "json",
|
|
9504
|
+
...params
|
|
9505
|
+
});
|
|
9409
9506
|
/**
|
|
9410
9507
|
* No description
|
|
9411
9508
|
*
|
|
@@ -9454,6 +9551,23 @@ var Namespaces = class {
|
|
|
9454
9551
|
format: "json",
|
|
9455
9552
|
...params
|
|
9456
9553
|
});
|
|
9554
|
+
/**
|
|
9555
|
+
* No description
|
|
9556
|
+
*
|
|
9557
|
+
* @tags namespaces
|
|
9558
|
+
* @name UpdateNamespaceAnswerCachePolicy
|
|
9559
|
+
* @request PUT:/api/v1/namespaces/{id}/answer-cache-policy
|
|
9560
|
+
* @secure
|
|
9561
|
+
*/
|
|
9562
|
+
updateNamespaceAnswerCachePolicy = (id, data, params = {}) => this.http.request({
|
|
9563
|
+
path: `/api/v1/namespaces/${id}/answer-cache-policy`,
|
|
9564
|
+
method: "PUT",
|
|
9565
|
+
body: data,
|
|
9566
|
+
secure: true,
|
|
9567
|
+
type: "application/json",
|
|
9568
|
+
format: "json",
|
|
9569
|
+
...params
|
|
9570
|
+
});
|
|
9457
9571
|
/**
|
|
9458
9572
|
* No description
|
|
9459
9573
|
*
|
|
@@ -10031,6 +10145,21 @@ var Analysis = class {
|
|
|
10031
10145
|
format: "json",
|
|
10032
10146
|
...params
|
|
10033
10147
|
});
|
|
10148
|
+
/**
|
|
10149
|
+
* @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.
|
|
10150
|
+
*
|
|
10151
|
+
* @tags analysis
|
|
10152
|
+
* @name StreamFcaConcepts
|
|
10153
|
+
* @summary Stream the formal concepts of a visible scope as NDJSON.
|
|
10154
|
+
* @request POST:/api/v1/analysis/fca-concepts/stream
|
|
10155
|
+
*/
|
|
10156
|
+
streamFcaConcepts = (data, params = {}) => this.http.request({
|
|
10157
|
+
path: `/api/v1/analysis/fca-concepts/stream`,
|
|
10158
|
+
method: "POST",
|
|
10159
|
+
body: data,
|
|
10160
|
+
type: "application/json",
|
|
10161
|
+
...params
|
|
10162
|
+
});
|
|
10034
10163
|
/**
|
|
10035
10164
|
* No description
|
|
10036
10165
|
*
|
|
@@ -11427,7 +11556,7 @@ var Ontology = class {
|
|
|
11427
11556
|
...params
|
|
11428
11557
|
});
|
|
11429
11558
|
/**
|
|
11430
|
-
* @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
|
|
11559
|
+
* @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.
|
|
11431
11560
|
*
|
|
11432
11561
|
* @tags ontology
|
|
11433
11562
|
* @name OntologyPipelineStatus
|
|
@@ -16361,6 +16490,24 @@ var Vocabulary = class {
|
|
|
16361
16490
|
format: "json",
|
|
16362
16491
|
...params
|
|
16363
16492
|
});
|
|
16493
|
+
/**
|
|
16494
|
+
* No description
|
|
16495
|
+
*
|
|
16496
|
+
* @tags vocabulary
|
|
16497
|
+
* @name ApplyMigrationPlan
|
|
16498
|
+
* @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.
|
|
16499
|
+
* @request POST:/api/v1/vocabulary/migration/plans/{plan_id}/apply
|
|
16500
|
+
* @secure
|
|
16501
|
+
*/
|
|
16502
|
+
applyMigrationPlan = (planId, data, params = {}) => this.http.request({
|
|
16503
|
+
path: `/api/v1/vocabulary/migration/plans/${planId}/apply`,
|
|
16504
|
+
method: "POST",
|
|
16505
|
+
body: data,
|
|
16506
|
+
secure: true,
|
|
16507
|
+
type: "application/json",
|
|
16508
|
+
format: "json",
|
|
16509
|
+
...params
|
|
16510
|
+
});
|
|
16364
16511
|
/**
|
|
16365
16512
|
* No description
|
|
16366
16513
|
*
|
|
@@ -16397,6 +16544,41 @@ var Vocabulary = class {
|
|
|
16397
16544
|
format: "json",
|
|
16398
16545
|
...params
|
|
16399
16546
|
});
|
|
16547
|
+
/**
|
|
16548
|
+
* No description
|
|
16549
|
+
*
|
|
16550
|
+
* @tags vocabulary
|
|
16551
|
+
* @name CommitImport
|
|
16552
|
+
* @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`).
|
|
16553
|
+
* @request POST:/api/v1/vocabulary/imports/{import_id}/commit
|
|
16554
|
+
* @secure
|
|
16555
|
+
*/
|
|
16556
|
+
commitImport = (importId, data, params = {}) => this.http.request({
|
|
16557
|
+
path: `/api/v1/vocabulary/imports/${importId}/commit`,
|
|
16558
|
+
method: "POST",
|
|
16559
|
+
body: data,
|
|
16560
|
+
secure: true,
|
|
16561
|
+
type: "application/json",
|
|
16562
|
+
format: "json",
|
|
16563
|
+
...params
|
|
16564
|
+
});
|
|
16565
|
+
/**
|
|
16566
|
+
* No description
|
|
16567
|
+
*
|
|
16568
|
+
* @tags vocabulary
|
|
16569
|
+
* @name ConceptExpansion
|
|
16570
|
+
* @summary `GET /api/v1/vocabulary/concepts/{concept_id}/expansion` — the concepts a query on one concept may be expanded to, each with its support.
|
|
16571
|
+
* @request GET:/api/v1/vocabulary/concepts/{concept_id}/expansion
|
|
16572
|
+
* @secure
|
|
16573
|
+
*/
|
|
16574
|
+
conceptExpansion = (conceptId, query, params = {}) => this.http.request({
|
|
16575
|
+
path: `/api/v1/vocabulary/concepts/${conceptId}/expansion`,
|
|
16576
|
+
method: "GET",
|
|
16577
|
+
query,
|
|
16578
|
+
secure: true,
|
|
16579
|
+
format: "json",
|
|
16580
|
+
...params
|
|
16581
|
+
});
|
|
16400
16582
|
/**
|
|
16401
16583
|
* No description
|
|
16402
16584
|
*
|
|
@@ -16413,6 +16595,23 @@ var Vocabulary = class {
|
|
|
16413
16595
|
format: "json",
|
|
16414
16596
|
...params
|
|
16415
16597
|
});
|
|
16598
|
+
/**
|
|
16599
|
+
* No description
|
|
16600
|
+
*
|
|
16601
|
+
* @tags vocabulary
|
|
16602
|
+
* @name ConceptRelations
|
|
16603
|
+
* @summary `GET /api/v1/vocabulary/concepts/{concept_id}/relations` — the direct relations of one kind of a concept in one scheme, of every status.
|
|
16604
|
+
* @request GET:/api/v1/vocabulary/concepts/{concept_id}/relations
|
|
16605
|
+
* @secure
|
|
16606
|
+
*/
|
|
16607
|
+
conceptRelations = (conceptId, query, params = {}) => this.http.request({
|
|
16608
|
+
path: `/api/v1/vocabulary/concepts/${conceptId}/relations`,
|
|
16609
|
+
method: "GET",
|
|
16610
|
+
query,
|
|
16611
|
+
secure: true,
|
|
16612
|
+
format: "json",
|
|
16613
|
+
...params
|
|
16614
|
+
});
|
|
16416
16615
|
/**
|
|
16417
16616
|
* No description
|
|
16418
16617
|
*
|
|
@@ -16431,6 +16630,76 @@ var Vocabulary = class {
|
|
|
16431
16630
|
format: "json",
|
|
16432
16631
|
...params
|
|
16433
16632
|
});
|
|
16633
|
+
/**
|
|
16634
|
+
* No description
|
|
16635
|
+
*
|
|
16636
|
+
* @tags vocabulary
|
|
16637
|
+
* @name CreateImport
|
|
16638
|
+
* @summary `POST /api/v1/vocabulary/imports` — parse an uploaded source file and store its proposal. Writes no vocabulary record.
|
|
16639
|
+
* @request POST:/api/v1/vocabulary/imports
|
|
16640
|
+
* @secure
|
|
16641
|
+
*/
|
|
16642
|
+
createImport = (data, params = {}) => this.http.request({
|
|
16643
|
+
path: `/api/v1/vocabulary/imports`,
|
|
16644
|
+
method: "POST",
|
|
16645
|
+
body: data,
|
|
16646
|
+
secure: true,
|
|
16647
|
+
type: "application/json",
|
|
16648
|
+
format: "json",
|
|
16649
|
+
...params
|
|
16650
|
+
});
|
|
16651
|
+
/**
|
|
16652
|
+
* No description
|
|
16653
|
+
*
|
|
16654
|
+
* @tags vocabulary
|
|
16655
|
+
* @name CreateMigrationPlan
|
|
16656
|
+
* @summary `POST /api/v1/vocabulary/migration/plans` — store the reviewer's dispositions of legacy sorts over the current legacy inventory.
|
|
16657
|
+
* @request POST:/api/v1/vocabulary/migration/plans
|
|
16658
|
+
* @secure
|
|
16659
|
+
*/
|
|
16660
|
+
createMigrationPlan = (data, params = {}) => this.http.request({
|
|
16661
|
+
path: `/api/v1/vocabulary/migration/plans`,
|
|
16662
|
+
method: "POST",
|
|
16663
|
+
body: data,
|
|
16664
|
+
secure: true,
|
|
16665
|
+
type: "application/json",
|
|
16666
|
+
format: "json",
|
|
16667
|
+
...params
|
|
16668
|
+
});
|
|
16669
|
+
/**
|
|
16670
|
+
* No description
|
|
16671
|
+
*
|
|
16672
|
+
* @tags vocabulary
|
|
16673
|
+
* @name ExportNative
|
|
16674
|
+
* @summary `GET /api/v1/vocabulary/exports/native` — the view's records as `kos-json/v1`.
|
|
16675
|
+
* @request GET:/api/v1/vocabulary/exports/native
|
|
16676
|
+
* @secure
|
|
16677
|
+
*/
|
|
16678
|
+
exportNative = (query, params = {}) => this.http.request({
|
|
16679
|
+
path: `/api/v1/vocabulary/exports/native`,
|
|
16680
|
+
method: "GET",
|
|
16681
|
+
query,
|
|
16682
|
+
secure: true,
|
|
16683
|
+
format: "json",
|
|
16684
|
+
...params
|
|
16685
|
+
});
|
|
16686
|
+
/**
|
|
16687
|
+
* No description
|
|
16688
|
+
*
|
|
16689
|
+
* @tags vocabulary
|
|
16690
|
+
* @name ExportSkos
|
|
16691
|
+
* @summary `GET /api/v1/vocabulary/exports/skos` — the SKOS projection of one scheme as Turtle or RDF/XML, with its manifest.
|
|
16692
|
+
* @request GET:/api/v1/vocabulary/exports/skos
|
|
16693
|
+
* @secure
|
|
16694
|
+
*/
|
|
16695
|
+
exportSkos = (query, params = {}) => this.http.request({
|
|
16696
|
+
path: `/api/v1/vocabulary/exports/skos`,
|
|
16697
|
+
method: "GET",
|
|
16698
|
+
query,
|
|
16699
|
+
secure: true,
|
|
16700
|
+
format: "json",
|
|
16701
|
+
...params
|
|
16702
|
+
});
|
|
16434
16703
|
/**
|
|
16435
16704
|
* No description
|
|
16436
16705
|
*
|
|
@@ -16496,6 +16765,38 @@ var Vocabulary = class {
|
|
|
16496
16765
|
format: "json",
|
|
16497
16766
|
...params
|
|
16498
16767
|
});
|
|
16768
|
+
/**
|
|
16769
|
+
* No description
|
|
16770
|
+
*
|
|
16771
|
+
* @tags vocabulary
|
|
16772
|
+
* @name GetImport
|
|
16773
|
+
* @summary `GET /api/v1/vocabulary/imports/{import_id}` — an import.
|
|
16774
|
+
* @request GET:/api/v1/vocabulary/imports/{import_id}
|
|
16775
|
+
* @secure
|
|
16776
|
+
*/
|
|
16777
|
+
getImport = (importId, params = {}) => this.http.request({
|
|
16778
|
+
path: `/api/v1/vocabulary/imports/${importId}`,
|
|
16779
|
+
method: "GET",
|
|
16780
|
+
secure: true,
|
|
16781
|
+
format: "json",
|
|
16782
|
+
...params
|
|
16783
|
+
});
|
|
16784
|
+
/**
|
|
16785
|
+
* No description
|
|
16786
|
+
*
|
|
16787
|
+
* @tags vocabulary
|
|
16788
|
+
* @name GetMigrationPlan
|
|
16789
|
+
* @summary `GET /api/v1/vocabulary/migration/plans/{plan_id}` — a plan.
|
|
16790
|
+
* @request GET:/api/v1/vocabulary/migration/plans/{plan_id}
|
|
16791
|
+
* @secure
|
|
16792
|
+
*/
|
|
16793
|
+
getMigrationPlan = (planId, params = {}) => this.http.request({
|
|
16794
|
+
path: `/api/v1/vocabulary/migration/plans/${planId}`,
|
|
16795
|
+
method: "GET",
|
|
16796
|
+
secure: true,
|
|
16797
|
+
format: "json",
|
|
16798
|
+
...params
|
|
16799
|
+
});
|
|
16499
16800
|
/**
|
|
16500
16801
|
* No description
|
|
16501
16802
|
*
|
|
@@ -16528,6 +16829,40 @@ var Vocabulary = class {
|
|
|
16528
16829
|
format: "json",
|
|
16529
16830
|
...params
|
|
16530
16831
|
});
|
|
16832
|
+
/**
|
|
16833
|
+
* No description
|
|
16834
|
+
*
|
|
16835
|
+
* @tags vocabulary
|
|
16836
|
+
* @name GetVocabularyCollection
|
|
16837
|
+
* @summary `GET /api/v1/vocabulary/collections/{collection_id}` — one collection with its labels, its member occurrences, its nested collections and its documentation notes.
|
|
16838
|
+
* @request GET:/api/v1/vocabulary/collections/{collection_id}
|
|
16839
|
+
* @secure
|
|
16840
|
+
*/
|
|
16841
|
+
getVocabularyCollection = (collectionId, query, params = {}) => this.http.request({
|
|
16842
|
+
path: `/api/v1/vocabulary/collections/${collectionId}`,
|
|
16843
|
+
method: "GET",
|
|
16844
|
+
query,
|
|
16845
|
+
secure: true,
|
|
16846
|
+
format: "json",
|
|
16847
|
+
...params
|
|
16848
|
+
});
|
|
16849
|
+
/**
|
|
16850
|
+
* No description
|
|
16851
|
+
*
|
|
16852
|
+
* @tags vocabulary
|
|
16853
|
+
* @name ImportItems
|
|
16854
|
+
* @summary `GET /api/v1/vocabulary/imports/{import_id}/items` — the items of an import by ordinal, each with its coordinates, disposition, reason and target.
|
|
16855
|
+
* @request GET:/api/v1/vocabulary/imports/{import_id}/items
|
|
16856
|
+
* @secure
|
|
16857
|
+
*/
|
|
16858
|
+
importItems = (importId, query, params = {}) => this.http.request({
|
|
16859
|
+
path: `/api/v1/vocabulary/imports/${importId}/items`,
|
|
16860
|
+
method: "GET",
|
|
16861
|
+
query,
|
|
16862
|
+
secure: true,
|
|
16863
|
+
format: "json",
|
|
16864
|
+
...params
|
|
16865
|
+
});
|
|
16531
16866
|
/**
|
|
16532
16867
|
* No description
|
|
16533
16868
|
*
|
|
@@ -16602,7 +16937,7 @@ var Vocabulary = class {
|
|
|
16602
16937
|
*
|
|
16603
16938
|
* @tags vocabulary
|
|
16604
16939
|
* @name ListSchemes
|
|
16605
|
-
* @summary `GET /api/v1/vocabulary/schemes` — the schemes of a view.
|
|
16940
|
+
* @summary `GET /api/v1/vocabulary/schemes` — the schemes of a view, each with its languages and its documentation notes.
|
|
16606
16941
|
* @request GET:/api/v1/vocabulary/schemes
|
|
16607
16942
|
* @secure
|
|
16608
16943
|
*/
|
|
@@ -16614,6 +16949,23 @@ var Vocabulary = class {
|
|
|
16614
16949
|
format: "json",
|
|
16615
16950
|
...params
|
|
16616
16951
|
});
|
|
16952
|
+
/**
|
|
16953
|
+
* No description
|
|
16954
|
+
*
|
|
16955
|
+
* @tags vocabulary
|
|
16956
|
+
* @name ListVocabularyCollections
|
|
16957
|
+
* @summary `GET /api/v1/vocabulary/collections` — the collections of one scheme.
|
|
16958
|
+
* @request GET:/api/v1/vocabulary/collections
|
|
16959
|
+
* @secure
|
|
16960
|
+
*/
|
|
16961
|
+
listVocabularyCollections = (query, params = {}) => this.http.request({
|
|
16962
|
+
path: `/api/v1/vocabulary/collections`,
|
|
16963
|
+
method: "GET",
|
|
16964
|
+
query,
|
|
16965
|
+
secure: true,
|
|
16966
|
+
format: "json",
|
|
16967
|
+
...params
|
|
16968
|
+
});
|
|
16617
16969
|
/**
|
|
16618
16970
|
* No description
|
|
16619
16971
|
*
|
|
@@ -16770,6 +17122,91 @@ var Vocabulary = class {
|
|
|
16770
17122
|
format: "json",
|
|
16771
17123
|
...params
|
|
16772
17124
|
});
|
|
17125
|
+
/**
|
|
17126
|
+
* No description
|
|
17127
|
+
*
|
|
17128
|
+
* @tags vocabulary
|
|
17129
|
+
* @name SchemeHierarchy
|
|
17130
|
+
* @summary `GET /api/v1/vocabulary/schemes/{scheme_id}/hierarchy` — the `broader` links of one scheme around a concept, or below its top concepts.
|
|
17131
|
+
* @request GET:/api/v1/vocabulary/schemes/{scheme_id}/hierarchy
|
|
17132
|
+
* @secure
|
|
17133
|
+
*/
|
|
17134
|
+
schemeHierarchy = (schemeId, query, params = {}) => this.http.request({
|
|
17135
|
+
path: `/api/v1/vocabulary/schemes/${schemeId}/hierarchy`,
|
|
17136
|
+
method: "GET",
|
|
17137
|
+
query,
|
|
17138
|
+
secure: true,
|
|
17139
|
+
format: "json",
|
|
17140
|
+
...params
|
|
17141
|
+
});
|
|
17142
|
+
/**
|
|
17143
|
+
* No description
|
|
17144
|
+
*
|
|
17145
|
+
* @tags vocabulary
|
|
17146
|
+
* @name SchemePaths
|
|
17147
|
+
* @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.
|
|
17148
|
+
* @request GET:/api/v1/vocabulary/schemes/{scheme_id}/paths
|
|
17149
|
+
* @secure
|
|
17150
|
+
*/
|
|
17151
|
+
schemePaths = (schemeId, query, params = {}) => this.http.request({
|
|
17152
|
+
path: `/api/v1/vocabulary/schemes/${schemeId}/paths`,
|
|
17153
|
+
method: "GET",
|
|
17154
|
+
query,
|
|
17155
|
+
secure: true,
|
|
17156
|
+
format: "json",
|
|
17157
|
+
...params
|
|
17158
|
+
});
|
|
17159
|
+
/**
|
|
17160
|
+
* No description
|
|
17161
|
+
*
|
|
17162
|
+
* @tags vocabulary
|
|
17163
|
+
* @name SchemePicklist
|
|
17164
|
+
* @summary `GET /api/v1/vocabulary/schemes/{scheme_id}/picklist` — the scheme's concepts depth first, for a form control.
|
|
17165
|
+
* @request GET:/api/v1/vocabulary/schemes/{scheme_id}/picklist
|
|
17166
|
+
* @secure
|
|
17167
|
+
*/
|
|
17168
|
+
schemePicklist = (schemeId, query, params = {}) => this.http.request({
|
|
17169
|
+
path: `/api/v1/vocabulary/schemes/${schemeId}/picklist`,
|
|
17170
|
+
method: "GET",
|
|
17171
|
+
query,
|
|
17172
|
+
secure: true,
|
|
17173
|
+
format: "json",
|
|
17174
|
+
...params
|
|
17175
|
+
});
|
|
17176
|
+
/**
|
|
17177
|
+
* No description
|
|
17178
|
+
*
|
|
17179
|
+
* @tags vocabulary
|
|
17180
|
+
* @name SchemePolicy
|
|
17181
|
+
* @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`.
|
|
17182
|
+
* @request GET:/api/v1/vocabulary/schemes/{scheme_id}/policy
|
|
17183
|
+
* @secure
|
|
17184
|
+
*/
|
|
17185
|
+
schemePolicy = (schemeId, query, params = {}) => this.http.request({
|
|
17186
|
+
path: `/api/v1/vocabulary/schemes/${schemeId}/policy`,
|
|
17187
|
+
method: "GET",
|
|
17188
|
+
query,
|
|
17189
|
+
secure: true,
|
|
17190
|
+
format: "json",
|
|
17191
|
+
...params
|
|
17192
|
+
});
|
|
17193
|
+
/**
|
|
17194
|
+
* No description
|
|
17195
|
+
*
|
|
17196
|
+
* @tags vocabulary
|
|
17197
|
+
* @name SchemeTopConcepts
|
|
17198
|
+
* @summary `GET /api/v1/vocabulary/schemes/{scheme_id}/top-concepts` — the concepts with an accepted membership in the scheme marked `top_concept`.
|
|
17199
|
+
* @request GET:/api/v1/vocabulary/schemes/{scheme_id}/top-concepts
|
|
17200
|
+
* @secure
|
|
17201
|
+
*/
|
|
17202
|
+
schemeTopConcepts = (schemeId, query, params = {}) => this.http.request({
|
|
17203
|
+
path: `/api/v1/vocabulary/schemes/${schemeId}/top-concepts`,
|
|
17204
|
+
method: "GET",
|
|
17205
|
+
query,
|
|
17206
|
+
secure: true,
|
|
17207
|
+
format: "json",
|
|
17208
|
+
...params
|
|
17209
|
+
});
|
|
16773
17210
|
/**
|
|
16774
17211
|
* No description
|
|
16775
17212
|
*
|
|
@@ -16787,6 +17224,24 @@ var Vocabulary = class {
|
|
|
16787
17224
|
format: "json",
|
|
16788
17225
|
...params
|
|
16789
17226
|
});
|
|
17227
|
+
/**
|
|
17228
|
+
* No description
|
|
17229
|
+
*
|
|
17230
|
+
* @tags vocabulary
|
|
17231
|
+
* @name SparqlQuery
|
|
17232
|
+
* @summary `POST /api/v1/vocabulary/sparql` — one read-only SPARQL query over the SKOS projection of one scheme of one view.
|
|
17233
|
+
* @request POST:/api/v1/vocabulary/sparql
|
|
17234
|
+
* @secure
|
|
17235
|
+
*/
|
|
17236
|
+
sparqlQuery = (data, params = {}) => this.http.request({
|
|
17237
|
+
path: `/api/v1/vocabulary/sparql`,
|
|
17238
|
+
method: "POST",
|
|
17239
|
+
body: data,
|
|
17240
|
+
secure: true,
|
|
17241
|
+
type: "application/json",
|
|
17242
|
+
format: "json",
|
|
17243
|
+
...params
|
|
17244
|
+
});
|
|
16790
17245
|
/**
|
|
16791
17246
|
* No description
|
|
16792
17247
|
*
|
|
@@ -17572,7 +18027,8 @@ function SortListResponseFromApiToFront(dto) {
|
|
|
17572
18027
|
sorts: dto.sorts.map(SortDtoFromApiToFront),
|
|
17573
18028
|
count: dto.count,
|
|
17574
18029
|
total: dto.total,
|
|
17575
|
-
offset: dto.offset
|
|
18030
|
+
offset: dto.offset,
|
|
18031
|
+
ontologyRevision: dto.ontology_revision
|
|
17576
18032
|
};
|
|
17577
18033
|
}
|
|
17578
18034
|
function ListSortsQueryFromFrontToApi(query) {
|
|
@@ -17919,27 +18375,150 @@ function DeprecateSortRequestFromFrontToApi(model) {
|
|
|
17919
18375
|
if (model.replacement !== void 0) out.replacement = model.replacement;
|
|
17920
18376
|
return out;
|
|
17921
18377
|
}
|
|
18378
|
+
function FactorLimitsFromFrontToApi(model) {
|
|
18379
|
+
const out = {};
|
|
18380
|
+
if (model.maxSorts !== void 0) out.max_sorts = model.maxSorts;
|
|
18381
|
+
if (model.maxContextSorts !== void 0) out.max_context_sorts = model.maxContextSorts;
|
|
18382
|
+
if (model.maxParentEdges !== void 0) out.max_parent_edges = model.maxParentEdges;
|
|
18383
|
+
if (model.maxDeclarations !== void 0) out.max_declarations = model.maxDeclarations;
|
|
18384
|
+
if (model.maxAttributes !== void 0) out.max_attributes = model.maxAttributes;
|
|
18385
|
+
if (model.maxInputBytes !== void 0) out.max_input_bytes = model.maxInputBytes;
|
|
18386
|
+
if (model.maxConcepts !== void 0) out.max_concepts = model.maxConcepts;
|
|
18387
|
+
if (model.maxVisitedConcepts !== void 0) out.max_visited_concepts = model.maxVisitedConcepts;
|
|
18388
|
+
if (model.maxWork !== void 0) out.max_work = model.maxWork;
|
|
18389
|
+
if (model.maxProposals !== void 0) out.max_proposals = model.maxProposals;
|
|
18390
|
+
if (model.maxOutputBytes !== void 0) out.max_output_bytes = model.maxOutputBytes;
|
|
18391
|
+
return out;
|
|
18392
|
+
}
|
|
17922
18393
|
function FactorSortsRequestFromFrontToApi(model) {
|
|
17923
18394
|
const out = {};
|
|
17924
18395
|
if (model.sortIds !== void 0) out.sort_ids = model.sortIds;
|
|
17925
18396
|
if (model.minSorts !== void 0) out.min_sorts = model.minSorts;
|
|
18397
|
+
if (model.limits !== void 0) {
|
|
18398
|
+
out.limits = model.limits === null ? null : FactorLimitsFromFrontToApi(model.limits);
|
|
18399
|
+
}
|
|
17926
18400
|
return out;
|
|
17927
18401
|
}
|
|
17928
|
-
function
|
|
17929
|
-
const out = {
|
|
17930
|
-
if (dto.
|
|
17931
|
-
if (dto.
|
|
17932
|
-
if (dto.
|
|
18402
|
+
function FactorLimitsFromApiToFront(dto) {
|
|
18403
|
+
const out = {};
|
|
18404
|
+
if (dto.max_sorts != null) out.maxSorts = dto.max_sorts;
|
|
18405
|
+
if (dto.max_context_sorts != null) out.maxContextSorts = dto.max_context_sorts;
|
|
18406
|
+
if (dto.max_parent_edges != null) out.maxParentEdges = dto.max_parent_edges;
|
|
18407
|
+
if (dto.max_declarations != null) out.maxDeclarations = dto.max_declarations;
|
|
18408
|
+
if (dto.max_attributes != null) out.maxAttributes = dto.max_attributes;
|
|
18409
|
+
if (dto.max_input_bytes != null) out.maxInputBytes = dto.max_input_bytes;
|
|
18410
|
+
if (dto.max_concepts != null) out.maxConcepts = dto.max_concepts;
|
|
18411
|
+
if (dto.max_visited_concepts != null) out.maxVisitedConcepts = dto.max_visited_concepts;
|
|
18412
|
+
if (dto.max_work != null) out.maxWork = dto.max_work;
|
|
18413
|
+
if (dto.max_proposals != null) out.maxProposals = dto.max_proposals;
|
|
18414
|
+
if (dto.max_output_bytes != null) out.maxOutputBytes = dto.max_output_bytes;
|
|
17933
18415
|
return out;
|
|
17934
18416
|
}
|
|
17935
|
-
function
|
|
18417
|
+
function FactorSharedFeatureFromApiToFront(dto) {
|
|
17936
18418
|
return {
|
|
18419
|
+
...FeatureDescriptorDtoFromApiToFront(dto),
|
|
18420
|
+
signature: dto.signature,
|
|
18421
|
+
declaredBy: dto.declared_by
|
|
18422
|
+
};
|
|
18423
|
+
}
|
|
18424
|
+
function isJsonValue2(value) {
|
|
18425
|
+
return typeof value === "string" || typeof value === "number" || typeof value === "boolean" || typeof value === "object";
|
|
18426
|
+
}
|
|
18427
|
+
function isFactorRecord(value) {
|
|
18428
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
18429
|
+
}
|
|
18430
|
+
function factorStringList(value, field) {
|
|
18431
|
+
if (!Array.isArray(value)) throw new TypeError(`factor context: ${field} is not an array`);
|
|
18432
|
+
const items = value;
|
|
18433
|
+
return items.map((item) => {
|
|
18434
|
+
if (typeof item !== "string")
|
|
18435
|
+
throw new TypeError(`factor context: ${field} holds a non-string`);
|
|
18436
|
+
return item;
|
|
18437
|
+
});
|
|
18438
|
+
}
|
|
18439
|
+
function factorNumberList(value, field) {
|
|
18440
|
+
if (!Array.isArray(value)) throw new TypeError(`factor context: ${field} is not an array`);
|
|
18441
|
+
const items = value;
|
|
18442
|
+
return items.map((item) => {
|
|
18443
|
+
if (typeof item !== "number")
|
|
18444
|
+
throw new TypeError(`factor context: ${field} holds a non-number`);
|
|
18445
|
+
return item;
|
|
18446
|
+
});
|
|
18447
|
+
}
|
|
18448
|
+
function factorString(record, key, field) {
|
|
18449
|
+
const value = Reflect.get(record, key);
|
|
18450
|
+
if (typeof value !== "string")
|
|
18451
|
+
throw new TypeError(`factor context: ${field}.${key} is not a string`);
|
|
18452
|
+
return value;
|
|
18453
|
+
}
|
|
18454
|
+
function FactorContextFromApiToFront(value) {
|
|
18455
|
+
if (!isFactorRecord(value)) throw new TypeError("factor context is not an object");
|
|
18456
|
+
const sorts = Reflect.get(value, "sorts");
|
|
18457
|
+
if (!Array.isArray(sorts)) throw new TypeError("factor context: sorts is not an array");
|
|
18458
|
+
const snapshot = Reflect.get(value, "incidence");
|
|
18459
|
+
if (!isFactorRecord(snapshot)) throw new TypeError("factor context: incidence is not an object");
|
|
18460
|
+
const version = Reflect.get(snapshot, "version");
|
|
18461
|
+
if (typeof version !== "number") {
|
|
18462
|
+
throw new TypeError("factor context: incidence.version is not a number");
|
|
18463
|
+
}
|
|
18464
|
+
const rows = Reflect.get(snapshot, "incidence");
|
|
18465
|
+
if (!Array.isArray(rows))
|
|
18466
|
+
throw new TypeError("factor context: incidence.incidence is not an array");
|
|
18467
|
+
const rowList = rows;
|
|
18468
|
+
const sortList = sorts;
|
|
18469
|
+
return {
|
|
18470
|
+
version: factorString(value, "version", "context"),
|
|
18471
|
+
tenant: factorString(value, "tenant", "context"),
|
|
18472
|
+
policySha256: factorString(value, "policy_sha256", "context"),
|
|
18473
|
+
sorts: sortList.map((sort) => {
|
|
18474
|
+
if (!isJsonValue2(sort)) throw new TypeError("factor context: sorts holds a non-JSON value");
|
|
18475
|
+
return sort;
|
|
18476
|
+
}),
|
|
18477
|
+
incidence: {
|
|
18478
|
+
version,
|
|
18479
|
+
objects: factorStringList(Reflect.get(snapshot, "objects"), "incidence.objects"),
|
|
18480
|
+
attributes: factorStringList(Reflect.get(snapshot, "attributes"), "incidence.attributes"),
|
|
18481
|
+
incidence: rowList.map((row) => factorNumberList(row, "incidence.incidence"))
|
|
18482
|
+
}
|
|
18483
|
+
};
|
|
18484
|
+
}
|
|
18485
|
+
function FactorSortsResponseFromApiToFront(dto) {
|
|
18486
|
+
const out = {
|
|
18487
|
+
version: dto.version,
|
|
17937
18488
|
proposals: dto.proposals.map((p) => ({
|
|
17938
18489
|
memberSorts: p.member_sorts.map((m) => ({ id: m.id, name: m.name })),
|
|
17939
18490
|
sharedFeatures: p.shared_features.map(FactorSharedFeatureFromApiToFront),
|
|
17940
|
-
suggestedName: p.suggested_name
|
|
17941
|
-
|
|
18491
|
+
suggestedName: p.suggested_name,
|
|
18492
|
+
extent: p.extent,
|
|
18493
|
+
intent: p.intent
|
|
18494
|
+
})),
|
|
18495
|
+
inputComplete: dto.input_complete,
|
|
18496
|
+
limits: FactorLimitsFromApiToFront(dto.limits),
|
|
18497
|
+
minSorts: dto.min_sorts,
|
|
18498
|
+
nativeAdmission: dto.native_admission
|
|
17942
18499
|
};
|
|
18500
|
+
if (dto.input_stop != null) {
|
|
18501
|
+
out.inputStop = {
|
|
18502
|
+
reason: dto.input_stop.reason,
|
|
18503
|
+
resource: dto.input_stop.resource,
|
|
18504
|
+
limit: dto.input_stop.limit
|
|
18505
|
+
};
|
|
18506
|
+
}
|
|
18507
|
+
if (dto.search != null) {
|
|
18508
|
+
out.search = {
|
|
18509
|
+
complete: dto.search.complete,
|
|
18510
|
+
stopReason: dto.search.stop_reason,
|
|
18511
|
+
visitedConcepts: dto.search.visited_concepts,
|
|
18512
|
+
work: dto.search.work,
|
|
18513
|
+
emittedConcepts: dto.search.emitted_concepts
|
|
18514
|
+
};
|
|
18515
|
+
}
|
|
18516
|
+
if (dto.presentation_stop_reason != null) {
|
|
18517
|
+
out.presentationStopReason = dto.presentation_stop_reason;
|
|
18518
|
+
}
|
|
18519
|
+
if (dto.context_sha256 != null) out.contextSha256 = dto.context_sha256;
|
|
18520
|
+
if (dto.context != null) out.context = FactorContextFromApiToFront(dto.context);
|
|
18521
|
+
return out;
|
|
17943
18522
|
}
|
|
17944
18523
|
function PatchSortRequestFromFrontToApi(model) {
|
|
17945
18524
|
const out = {};
|
|
@@ -18730,6 +19309,9 @@ var RESPONSE_COMPONENTS = {
|
|
|
18730
19309
|
},
|
|
18731
19310
|
BaselineDto: { object: { snapshot_hash: [1, 0], stale: [1, 0] } },
|
|
18732
19311
|
BatchCopyResponse: { object: { copies: [1, { array: "CopyResultDto" }] } },
|
|
19312
|
+
BatchGetSubsumptionsResponse: {
|
|
19313
|
+
object: { degrees: [1, { array: "GetFuzzySubsumptionResponse" }] }
|
|
19314
|
+
},
|
|
18733
19315
|
BatchOperationResultDto: { object: { duration_ms: [1, 0], index: [1, 0], success: [1, 0] } },
|
|
18734
19316
|
BatchResponse: {
|
|
18735
19317
|
object: {
|
|
@@ -18923,7 +19505,11 @@ var RESPONSE_COMPONENTS = {
|
|
|
18923
19505
|
},
|
|
18924
19506
|
BulkRowRefusalDto: { object: { index: [1, 0], message: [1, 0] } },
|
|
18925
19507
|
BulkSetSimilaritiesResponse: { object: { errors: [0, { array: 0 }], set_count: [1, 0] } },
|
|
19508
|
+
BulkSetSubsumptionsResponse: {
|
|
19509
|
+
object: { outcomes: [1, { array: "BulkSubsumptionOutcome" }], set_count: [1, 0] }
|
|
19510
|
+
},
|
|
18926
19511
|
BulkSortError: { object: { error: [1, 0], kind: [1, 0], name: [1, 0], sort_created: [1, 0] } },
|
|
19512
|
+
BulkSubsumptionOutcome: { object: { sub_sort_id: [1, 0], sup_sort_id: [1, 0], written: [1, 0] } },
|
|
18927
19513
|
BundleBelief: {
|
|
18928
19514
|
object: { confidence: [1, 0], features: [0, { object: {} }], sort: [1, 0], source: [1, 0] }
|
|
18929
19515
|
},
|
|
@@ -19479,6 +20065,17 @@ var RESPONSE_COMPONENTS = {
|
|
|
19479
20065
|
verdicts: [1, { array: 0 }]
|
|
19480
20066
|
}
|
|
19481
20067
|
},
|
|
20068
|
+
CollectionDetailResponse: {
|
|
20069
|
+
object: {
|
|
20070
|
+
collection: [1, "CollectionRecordDto"],
|
|
20071
|
+
context: [2, "ContextRefDto"],
|
|
20072
|
+
documentation: [1, { array: "DocumentationRecordDto" }],
|
|
20073
|
+
labels: [1, { array: "CollectionLabelViewDto" }],
|
|
20074
|
+
members: [1, { array: "CollectionMemberViewDto" }],
|
|
20075
|
+
nested_collections: [1, { array: 0 }],
|
|
20076
|
+
view: [1, "ViewRefDto"]
|
|
20077
|
+
}
|
|
20078
|
+
},
|
|
19482
20079
|
CollectionDto: {
|
|
19483
20080
|
object: {
|
|
19484
20081
|
depth: [1, 0],
|
|
@@ -19488,10 +20085,42 @@ var RESPONSE_COMPONENTS = {
|
|
|
19488
20085
|
tags: [1, { array: 0 }]
|
|
19489
20086
|
}
|
|
19490
20087
|
},
|
|
20088
|
+
CollectionLabelViewDto: {
|
|
20089
|
+
object: { collection_label_id: [1, 0], label_id: [1, 0], role: [1, 0] }
|
|
20090
|
+
},
|
|
19491
20091
|
CollectionListResponse: {
|
|
19492
20092
|
object: { collections: [1, { array: "CollectionDto" }], count: [1, 0] }
|
|
19493
20093
|
},
|
|
20094
|
+
CollectionMemberViewDto: {
|
|
20095
|
+
object: { display_label: [2, "DisplayLabelDto"], occurrence_id: [1, 0] }
|
|
20096
|
+
},
|
|
20097
|
+
CollectionPageResponse: {
|
|
20098
|
+
object: {
|
|
20099
|
+
complete: [1, 0],
|
|
20100
|
+
context: [2, "ContextRefDto"],
|
|
20101
|
+
items: [1, { array: "CollectionSummaryDto" }],
|
|
20102
|
+
scheme_id: [1, 0],
|
|
20103
|
+
view: [1, "ViewRefDto"]
|
|
20104
|
+
}
|
|
20105
|
+
},
|
|
20106
|
+
CollectionRecordDto: {
|
|
20107
|
+
object: {
|
|
20108
|
+
change_reason: [1, 0],
|
|
20109
|
+
ordered: [1, 0],
|
|
20110
|
+
record_id: [1, 0],
|
|
20111
|
+
revision: [1, 0],
|
|
20112
|
+
scheme: [1, 0],
|
|
20113
|
+
status: [1, 0]
|
|
20114
|
+
}
|
|
20115
|
+
},
|
|
19494
20116
|
CollectionResponse: { object: { collection: [1, "CollectionDto"] } },
|
|
20117
|
+
CollectionSummaryDto: {
|
|
20118
|
+
object: {
|
|
20119
|
+
collection: [1, "CollectionRecordDto"],
|
|
20120
|
+
labels: [1, { array: "CollectionLabelViewDto" }],
|
|
20121
|
+
member_count: [1, 0]
|
|
20122
|
+
}
|
|
20123
|
+
},
|
|
19495
20124
|
CommunitiesResponseDto: {
|
|
19496
20125
|
object: {
|
|
19497
20126
|
communities: [1, { array: 0 }],
|
|
@@ -19633,6 +20262,18 @@ var RESPONSE_COMPONENTS = {
|
|
|
19633
20262
|
term_versions: [1, { array: "TermVersionEntryDto" }]
|
|
19634
20263
|
}
|
|
19635
20264
|
},
|
|
20265
|
+
ConceptMappingViewDto: {
|
|
20266
|
+
object: {
|
|
20267
|
+
change_reason: [1, 0],
|
|
20268
|
+
mapping_kind: [1, 0],
|
|
20269
|
+
record_id: [1, 0],
|
|
20270
|
+
revision: [1, 0],
|
|
20271
|
+
status: [1, 0],
|
|
20272
|
+
subject: [1, 0],
|
|
20273
|
+
target_display_label: [2, "DisplayLabelDto"],
|
|
20274
|
+
target_external_concept: [2, "ExternalConceptRecordDto"]
|
|
20275
|
+
}
|
|
20276
|
+
},
|
|
19636
20277
|
ConceptMatchDto: {
|
|
19637
20278
|
object: {
|
|
19638
20279
|
canonical_name: [1, 0],
|
|
@@ -19655,6 +20296,37 @@ var RESPONSE_COMPONENTS = {
|
|
|
19655
20296
|
ConceptRecordDto: {
|
|
19656
20297
|
object: { change_reason: [1, 0], record_id: [1, 0], revision: [1, 0], status: [1, 0] }
|
|
19657
20298
|
},
|
|
20299
|
+
ConceptRelationEntryDto: {
|
|
20300
|
+
object: {
|
|
20301
|
+
concept_id: [1, 0],
|
|
20302
|
+
display_label: [2, "DisplayLabelDto"],
|
|
20303
|
+
relation: [1, 0],
|
|
20304
|
+
relation_id: [1, 0],
|
|
20305
|
+
status: [1, 0]
|
|
20306
|
+
}
|
|
20307
|
+
},
|
|
20308
|
+
ConceptRelationRecordDto: {
|
|
20309
|
+
object: {
|
|
20310
|
+
change_reason: [1, 0],
|
|
20311
|
+
object: [1, 0],
|
|
20312
|
+
record_id: [1, 0],
|
|
20313
|
+
relation: [1, 0],
|
|
20314
|
+
revision: [1, 0],
|
|
20315
|
+
scheme: [1, 0],
|
|
20316
|
+
status: [1, 0],
|
|
20317
|
+
subject: [1, 0]
|
|
20318
|
+
}
|
|
20319
|
+
},
|
|
20320
|
+
ConceptRelationsResponse: {
|
|
20321
|
+
object: {
|
|
20322
|
+
concept_id: [1, 0],
|
|
20323
|
+
context: [2, "ContextRefDto"],
|
|
20324
|
+
relation: [1, 0],
|
|
20325
|
+
relations: [1, { array: "ConceptRelationEntryDto" }],
|
|
20326
|
+
scheme_id: [1, 0],
|
|
20327
|
+
view: [1, "ViewRefDto"]
|
|
20328
|
+
}
|
|
20329
|
+
},
|
|
19658
20330
|
ConceptReleaseDto: {
|
|
19659
20331
|
object: { record_etag: [1, 0], release_id: [1, 0], release_number: [1, 0] }
|
|
19660
20332
|
},
|
|
@@ -19705,14 +20377,21 @@ var RESPONSE_COMPONENTS = {
|
|
|
19705
20377
|
object: {
|
|
19706
20378
|
aboutness: [1, { array: "AboutnessRecordDto" }],
|
|
19707
20379
|
authority_references: [1, { array: "AuthorityReferenceRecordDto" }],
|
|
20380
|
+
collections: [1, { array: 0 }],
|
|
19708
20381
|
concept: [1, "ConceptRecordDto"],
|
|
19709
20382
|
definition_guidance: [1, "DefinitionGuidanceDto"],
|
|
19710
20383
|
definitions: [1, { array: "DefinitionRecordDto" }],
|
|
19711
20384
|
display_label: [2, "DisplayLabelDto"],
|
|
20385
|
+
documentation: [1, { array: "DocumentationRecordDto" }],
|
|
19712
20386
|
evidence: [1, { array: "EvidenceViewDto" }],
|
|
19713
20387
|
identity_decisions: [1, { array: "IdentityDecisionRecordDto" }],
|
|
19714
20388
|
labels: [1, { array: "LabelUseViewDto" }],
|
|
19715
|
-
|
|
20389
|
+
mappings: [1, { array: "ConceptMappingViewDto" }],
|
|
20390
|
+
memberships: [1, { array: "MembershipViewDto" }],
|
|
20391
|
+
notations: [1, { array: "NotationRecordDto" }],
|
|
20392
|
+
relations: [1, { array: "ConceptRelationRecordDto" }],
|
|
20393
|
+
source_associations: [1, { array: "SourceAssociationRecordDto" }],
|
|
20394
|
+
xl_labels: [1, { array: "XlLabelViewDto" }]
|
|
19716
20395
|
}
|
|
19717
20396
|
},
|
|
19718
20397
|
ConditionalIndependenceResponse: { object: { explanation: [1, 0], independent: [1, 0] } },
|
|
@@ -20088,6 +20767,19 @@ var RESPONSE_COMPONENTS = {
|
|
|
20088
20767
|
CronJobRunDto: { object: { origin: [1, 0], run_id: [1, 0], started_at: [1, 0], status: [1, 0] } },
|
|
20089
20768
|
CronScheduleDto: { object: { schedule_type: [1, 0], value: [1, 0] } },
|
|
20090
20769
|
CrossCuttingResponseDto: { object: { items: [1, { array: 0 }], scope_truncated: [1, 0] } },
|
|
20770
|
+
CspSolveResponse: {
|
|
20771
|
+
object: {
|
|
20772
|
+
backtracks: [1, 0],
|
|
20773
|
+
nodes_explored: [1, 0],
|
|
20774
|
+
propagations: [1, 0],
|
|
20775
|
+
propagator_invocations: [1, 0],
|
|
20776
|
+
satisfiable: [1, 0],
|
|
20777
|
+
search_exhausted: [1, 0],
|
|
20778
|
+
solutions: [1, { array: { object: {} } }],
|
|
20779
|
+
solve_time_ms: [1, 0],
|
|
20780
|
+
total_found: [1, 0]
|
|
20781
|
+
}
|
|
20782
|
+
},
|
|
20091
20783
|
CuriosityTargetDto: {
|
|
20092
20784
|
object: { exploration_priority: [1, 0], novelty: [1, 0], target_id: [1, 0] }
|
|
20093
20785
|
},
|
|
@@ -20130,6 +20822,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
20130
20822
|
object: {
|
|
20131
20823
|
actions_executed: [1, { array: 0 }],
|
|
20132
20824
|
goals_achieved: [1, { array: 0 }],
|
|
20825
|
+
goals_deferred: [0, { array: 0 }],
|
|
20133
20826
|
goals_failed: [1, { array: 0 }],
|
|
20134
20827
|
goals_pursued: [1, { array: 0 }],
|
|
20135
20828
|
new_beliefs: [1, { array: 0 }],
|
|
@@ -20214,6 +20907,15 @@ var RESPONSE_COMPONENTS = {
|
|
|
20214
20907
|
}
|
|
20215
20908
|
},
|
|
20216
20909
|
DeclareLatentVariableResponse: { object: { declared: [1, 0], variable: [1, 0] } },
|
|
20910
|
+
DeclaredAlphaCutMember: { object: { degree: [1, 0], sort_id: [1, 0] } },
|
|
20911
|
+
DeclaredAlphaCutResponse: {
|
|
20912
|
+
object: {
|
|
20913
|
+
alpha: [1, 0],
|
|
20914
|
+
concept_sort_id: [1, 0],
|
|
20915
|
+
members: [1, { array: "DeclaredAlphaCutMember" }],
|
|
20916
|
+
strict: [1, 0]
|
|
20917
|
+
}
|
|
20918
|
+
},
|
|
20217
20919
|
DeclaredEgress: { object: { host: [1, 0], purpose: [1, 0] } },
|
|
20218
20920
|
DecodeGlbResponse: {
|
|
20219
20921
|
object: {
|
|
@@ -20780,6 +21482,9 @@ var RESPONSE_COMPONENTS = {
|
|
|
20780
21482
|
DocumentVersionsResponse: {
|
|
20781
21483
|
object: { family_id: [1, 0], versions: [1, { array: "DocumentDto" }] }
|
|
20782
21484
|
},
|
|
21485
|
+
DocumentationRecordDto: {
|
|
21486
|
+
object: { change_reason: [1, 0], note_kind: [1, 0], record_id: [1, 0], revision: [1, 0] }
|
|
21487
|
+
},
|
|
20783
21488
|
DonorWeightDto: { object: { name: [1, 0], weight: [1, 0] } },
|
|
20784
21489
|
DoseResponseResponse: {
|
|
20785
21490
|
object: {
|
|
@@ -21126,6 +21831,30 @@ var RESPONSE_COMPONENTS = {
|
|
|
21126
21831
|
ExecutionSessionStatsResponse: {
|
|
21127
21832
|
object: { curried_function_count: [1, 0], db_available: [1, 0], memory_session_count: [1, 0] }
|
|
21128
21833
|
},
|
|
21834
|
+
ExpandedConceptDto: {
|
|
21835
|
+
object: {
|
|
21836
|
+
concept_id: [1, 0],
|
|
21837
|
+
display_label: [2, "DisplayLabelDto"],
|
|
21838
|
+
support: [1, { array: 0 }]
|
|
21839
|
+
}
|
|
21840
|
+
},
|
|
21841
|
+
ExpandedExternalDto: {
|
|
21842
|
+
object: { external_concept_id: [1, 0], iri: [1, 0], support: [1, { array: 0 }] }
|
|
21843
|
+
},
|
|
21844
|
+
ExpansionResponse: {
|
|
21845
|
+
object: {
|
|
21846
|
+
complete: [1, 0],
|
|
21847
|
+
concept_id: [1, 0],
|
|
21848
|
+
concepts: [1, { array: "ExpandedConceptDto" }],
|
|
21849
|
+
context: [2, "ContextRefDto"],
|
|
21850
|
+
direction: [1, 0],
|
|
21851
|
+
external_concepts: [1, { array: "ExpandedExternalDto" }],
|
|
21852
|
+
scheme_id: [1, 0],
|
|
21853
|
+
transitive: [1, 0],
|
|
21854
|
+
view: [1, "ViewRefDto"],
|
|
21855
|
+
withheld_relation_ids: [1, { array: 0 }]
|
|
21856
|
+
}
|
|
21857
|
+
},
|
|
21129
21858
|
ExpireReviewsResponse: { object: { escalated: [1, { array: 0 }], timed_out: [1, { array: 0 }] } },
|
|
21130
21859
|
ExplorationCompleteResponseDto: {
|
|
21131
21860
|
object: {
|
|
@@ -21205,6 +21934,17 @@ var RESPONSE_COMPONENTS = {
|
|
|
21205
21934
|
webhook_url: [1, 0]
|
|
21206
21935
|
}
|
|
21207
21936
|
},
|
|
21937
|
+
ExternalConceptRecordDto: {
|
|
21938
|
+
object: {
|
|
21939
|
+
authority: [1, 0],
|
|
21940
|
+
change_reason: [1, 0],
|
|
21941
|
+
dataset_version: [1, 0],
|
|
21942
|
+
iri: [1, 0],
|
|
21943
|
+
record_id: [1, 0],
|
|
21944
|
+
resolution: [1, 0],
|
|
21945
|
+
revision: [1, 0]
|
|
21946
|
+
}
|
|
21947
|
+
},
|
|
21208
21948
|
ExternalMatchDto: { object: { match_type: [1, 0], ontology_id: [1, 0], source: [1, 0] } },
|
|
21209
21949
|
ExternalMatchProposalDto: {
|
|
21210
21950
|
object: {
|
|
@@ -21304,16 +22044,47 @@ var RESPONSE_COMPONENTS = {
|
|
|
21304
22044
|
present: [1, 0]
|
|
21305
22045
|
}
|
|
21306
22046
|
},
|
|
22047
|
+
FactorInputStopDto: { object: { reason: [1, 0] } },
|
|
22048
|
+
FactorLimitsDto: { object: {} },
|
|
21307
22049
|
FactorMemberSortDto: { object: { id: [1, 0], name: [1, 0] } },
|
|
21308
22050
|
FactorProposalDto: {
|
|
21309
22051
|
object: {
|
|
22052
|
+
extent: [1, { array: 0 }],
|
|
22053
|
+
intent: [1, { array: 0 }],
|
|
21310
22054
|
member_sorts: [1, { array: "FactorMemberSortDto" }],
|
|
21311
22055
|
shared_features: [1, { array: "FactorSharedFeatureDto" }],
|
|
21312
22056
|
suggested_name: [1, 0]
|
|
21313
22057
|
}
|
|
21314
22058
|
},
|
|
21315
|
-
|
|
21316
|
-
|
|
22059
|
+
FactorSearchDto: {
|
|
22060
|
+
object: {
|
|
22061
|
+
complete: [1, 0],
|
|
22062
|
+
emitted_concepts: [1, 0],
|
|
22063
|
+
stop_reason: [1, 0],
|
|
22064
|
+
visited_concepts: [1, 0],
|
|
22065
|
+
work: [1, 0]
|
|
22066
|
+
}
|
|
22067
|
+
},
|
|
22068
|
+
FactorSharedFeatureDto: {
|
|
22069
|
+
object: {
|
|
22070
|
+
annotations: [0, { object: {} }],
|
|
22071
|
+
name: [1, 0],
|
|
22072
|
+
declared_by: [1, { array: 0 }],
|
|
22073
|
+
signature: [1, 0]
|
|
22074
|
+
}
|
|
22075
|
+
},
|
|
22076
|
+
FactorSortsResponse: {
|
|
22077
|
+
object: {
|
|
22078
|
+
input_complete: [1, 0],
|
|
22079
|
+
input_stop: [2, "FactorInputStopDto"],
|
|
22080
|
+
limits: [1, "FactorLimitsDto"],
|
|
22081
|
+
min_sorts: [1, 0],
|
|
22082
|
+
native_admission: [1, 0],
|
|
22083
|
+
proposals: [1, { array: "FactorProposalDto" }],
|
|
22084
|
+
search: [2, "FactorSearchDto"],
|
|
22085
|
+
version: [1, 0]
|
|
22086
|
+
}
|
|
22087
|
+
},
|
|
21317
22088
|
FactoryResetResponse: {
|
|
21318
22089
|
object: {
|
|
21319
22090
|
cache_cleared: [1, 0],
|
|
@@ -21332,17 +22103,17 @@ var RESPONSE_COMPONENTS = {
|
|
|
21332
22103
|
object: {
|
|
21333
22104
|
complete: [1, 0],
|
|
21334
22105
|
implications: [1, { array: "FcaImplicationRecordDto" }],
|
|
21335
|
-
max_candidates: [
|
|
21336
|
-
max_work: [
|
|
22106
|
+
max_candidates: [3, 0],
|
|
22107
|
+
max_work: [3, 0]
|
|
21337
22108
|
}
|
|
21338
22109
|
},
|
|
21339
22110
|
FcaConceptClaimDto: {
|
|
21340
22111
|
object: {
|
|
21341
22112
|
complete: [1, 0],
|
|
21342
22113
|
concepts: [1, { array: "FcaConceptRecordDto" }],
|
|
21343
|
-
max_concepts: [
|
|
21344
|
-
max_visited_concepts: [
|
|
21345
|
-
max_work: [
|
|
22114
|
+
max_concepts: [3, 0],
|
|
22115
|
+
max_visited_concepts: [3, 0],
|
|
22116
|
+
max_work: [3, 0],
|
|
21346
22117
|
min_extent_size: [1, 0],
|
|
21347
22118
|
min_intent_size: [1, 0]
|
|
21348
22119
|
}
|
|
@@ -21915,6 +22686,40 @@ var RESPONSE_COMPONENTS = {
|
|
|
21915
22686
|
HiddenToolDto: {
|
|
21916
22687
|
object: { name: [1, 0], quality: [1, 0], reason: [1, 0], required_quality: [1, 0] }
|
|
21917
22688
|
},
|
|
22689
|
+
HierarchyEdgeDto: {
|
|
22690
|
+
object: { object: [1, 0], relation_id: [1, 0], status: [1, 0], subject: [1, 0] }
|
|
22691
|
+
},
|
|
22692
|
+
HierarchyNodeDto: {
|
|
22693
|
+
object: {
|
|
22694
|
+
concept_id: [1, 0],
|
|
22695
|
+
depth: [1, 0],
|
|
22696
|
+
display_label: [2, "DisplayLabelDto"],
|
|
22697
|
+
via: [1, { array: 0 }]
|
|
22698
|
+
}
|
|
22699
|
+
},
|
|
22700
|
+
HierarchyPathsResponse: {
|
|
22701
|
+
object: {
|
|
22702
|
+
complete: [1, 0],
|
|
22703
|
+
context: [2, "ContextRefDto"],
|
|
22704
|
+
from: [1, 0],
|
|
22705
|
+
paths: [1, { array: { array: 0 } }],
|
|
22706
|
+
scheme_id: [1, 0],
|
|
22707
|
+
to: [1, 0],
|
|
22708
|
+
view: [1, "ViewRefDto"]
|
|
22709
|
+
}
|
|
22710
|
+
},
|
|
22711
|
+
HierarchyResponse: {
|
|
22712
|
+
object: {
|
|
22713
|
+
complete: [1, 0],
|
|
22714
|
+
context: [2, "ContextRefDto"],
|
|
22715
|
+
direction: [1, 0],
|
|
22716
|
+
edges: [1, { array: "HierarchyEdgeDto" }],
|
|
22717
|
+
nodes: [1, { array: "HierarchyNodeDto" }],
|
|
22718
|
+
scheme_id: [1, 0],
|
|
22719
|
+
transitive: [1, 0],
|
|
22720
|
+
view: [1, "ViewRefDto"]
|
|
22721
|
+
}
|
|
22722
|
+
},
|
|
21918
22723
|
HoldoutCertifiedDto: {
|
|
21919
22724
|
object: {
|
|
21920
22725
|
certified: [1, 0],
|
|
@@ -22063,6 +22868,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
22063
22868
|
sorts_created: [1, 0]
|
|
22064
22869
|
}
|
|
22065
22870
|
},
|
|
22871
|
+
ImportCellNoteDto: { object: { column: [1, 0], disposition: [1, 0], reason: [1, 0] } },
|
|
22066
22872
|
ImportFoundryResponse: {
|
|
22067
22873
|
object: {
|
|
22068
22874
|
mapped_interface_types: [1, 0],
|
|
@@ -22081,9 +22887,11 @@ var RESPONSE_COMPONENTS = {
|
|
|
22081
22887
|
object: {
|
|
22082
22888
|
reified_sorts_created: [1, { array: 0 }],
|
|
22083
22889
|
relations_discovered: [1, 0],
|
|
22084
|
-
sorts_created: [1, { array: 0 }]
|
|
22890
|
+
sorts_created: [1, { array: 0 }],
|
|
22891
|
+
sorts_refused: [0, { array: "ImportRefusedSortDto" }]
|
|
22085
22892
|
}
|
|
22086
22893
|
},
|
|
22894
|
+
ImportRefusedSortDto: { object: { name: [1, 0], reason: [1, 0] } },
|
|
22087
22895
|
InboxItemDto: {
|
|
22088
22896
|
object: {
|
|
22089
22897
|
body: [1, 0],
|
|
@@ -22299,7 +23107,16 @@ var RESPONSE_COMPONENTS = {
|
|
|
22299
23107
|
sorts_reused: [1, 0],
|
|
22300
23108
|
sota_extraction_gate: [0, "SotaExtractionGateStatsDto"],
|
|
22301
23109
|
term_ids: [1, { array: 0 }],
|
|
22302
|
-
token_usage: [0, "TokenUsageDto"]
|
|
23110
|
+
token_usage: [0, "TokenUsageDto"],
|
|
23111
|
+
work_cache: [0, "IngestionWorkCacheDto"]
|
|
23112
|
+
}
|
|
23113
|
+
},
|
|
23114
|
+
IngestionWorkCacheDto: {
|
|
23115
|
+
object: {
|
|
23116
|
+
model_calls: [1, 0],
|
|
23117
|
+
reused_model_calls: [1, 0],
|
|
23118
|
+
reused_recorded_token_usage: [1, "TokenUsageDto"],
|
|
23119
|
+
unkeyed_model_calls: [1, 0]
|
|
22303
23120
|
}
|
|
22304
23121
|
},
|
|
22305
23122
|
InheritedFeatureChangeDto: {
|
|
@@ -22457,6 +23274,15 @@ var RESPONSE_COMPONENTS = {
|
|
|
22457
23274
|
term_id: [1, 0]
|
|
22458
23275
|
}
|
|
22459
23276
|
},
|
|
23277
|
+
IriChoiceDto: {
|
|
23278
|
+
object: {
|
|
23279
|
+
iri: [1, 0],
|
|
23280
|
+
kind: [1, 0],
|
|
23281
|
+
record_id: [1, 0],
|
|
23282
|
+
rule: [1, 0],
|
|
23283
|
+
source_associations: [1, { array: 0 }]
|
|
23284
|
+
}
|
|
23285
|
+
},
|
|
22460
23286
|
IriRepairDto: { object: { original: [1, 0], repaired: [1, 0] } },
|
|
22461
23287
|
IsSubtypeResponse: { object: { is_subtype: [1, 0] } },
|
|
22462
23288
|
IterationMetricDto: {
|
|
@@ -22482,6 +23308,15 @@ var RESPONSE_COMPONENTS = {
|
|
|
22482
23308
|
wake_trigger: [1, 0]
|
|
22483
23309
|
}
|
|
22484
23310
|
},
|
|
23311
|
+
LabelRelationViewDto: {
|
|
23312
|
+
object: {
|
|
23313
|
+
object: [1, 0],
|
|
23314
|
+
record_id: [1, 0],
|
|
23315
|
+
relation: [1, 0],
|
|
23316
|
+
subject: [1, 0],
|
|
23317
|
+
other_xl_label_id: [1, 0]
|
|
23318
|
+
}
|
|
23319
|
+
},
|
|
22485
23320
|
LabelSearchHitDto: {
|
|
22486
23321
|
object: {
|
|
22487
23322
|
concept_id: [1, 0],
|
|
@@ -22705,6 +23540,19 @@ var RESPONSE_COMPONENTS = {
|
|
|
22705
23540
|
LedgerInfoDto: {
|
|
22706
23541
|
object: { backend: [1, 0], durability: [1, 0], n_records: [1, 0], survives_restart: [1, 0] }
|
|
22707
23542
|
},
|
|
23543
|
+
LegacySortInventoryDto: {
|
|
23544
|
+
object: {
|
|
23545
|
+
bound_constraint_count: [1, 0],
|
|
23546
|
+
classification: [1, 0],
|
|
23547
|
+
feature_count: [1, 0],
|
|
23548
|
+
features_ranging_over: [1, 0],
|
|
23549
|
+
instances: [1, 0],
|
|
23550
|
+
parents: [1, { array: 0 }],
|
|
23551
|
+
rules_referencing: [1, 0],
|
|
23552
|
+
sort_id: [1, 0],
|
|
23553
|
+
sort_name: [1, 0]
|
|
23554
|
+
}
|
|
23555
|
+
},
|
|
22708
23556
|
LggClassResponseDto: {
|
|
22709
23557
|
object: {
|
|
22710
23558
|
absent_from_store: [1, 0],
|
|
@@ -23295,6 +24143,18 @@ var RESPONSE_COMPONENTS = {
|
|
|
23295
24143
|
}
|
|
23296
24144
|
},
|
|
23297
24145
|
MeterDto: { object: { used: [1, 0] } },
|
|
24146
|
+
MigrationPlanResponse: {
|
|
24147
|
+
object: {
|
|
24148
|
+
byte_size: [1, 0],
|
|
24149
|
+
created_at: [1, 0],
|
|
24150
|
+
created_by: [1, 0],
|
|
24151
|
+
dispositions: [1, { array: "PlannedDispositionDto" }],
|
|
24152
|
+
fingerprint: [1, 0],
|
|
24153
|
+
inventory: [1, { array: "LegacySortInventoryDto" }],
|
|
24154
|
+
plan_id: [1, 0],
|
|
24155
|
+
replayed: [1, 0]
|
|
24156
|
+
}
|
|
24157
|
+
},
|
|
23298
24158
|
MigrationPreviewEntryDto: {
|
|
23299
24159
|
object: {
|
|
23300
24160
|
classification: [1, 0],
|
|
@@ -23383,11 +24243,45 @@ var RESPONSE_COMPONENTS = {
|
|
|
23383
24243
|
variable: [1, 0]
|
|
23384
24244
|
}
|
|
23385
24245
|
},
|
|
24246
|
+
NamespaceAnswerCachePolicyDto: {
|
|
24247
|
+
object: { enabled: [1, 0], revision: [1, 0], ttl_seconds: [1, 0] }
|
|
24248
|
+
},
|
|
24249
|
+
NamespaceAnswerCacheSavingsDto: {
|
|
24250
|
+
object: {
|
|
24251
|
+
bypassed: [1, 0],
|
|
24252
|
+
counted_since: [1, 0],
|
|
24253
|
+
disabled: [1, 0],
|
|
24254
|
+
fresh_model_calls: [1, 0],
|
|
24255
|
+
reused_model_calls: [1, 0],
|
|
24256
|
+
token_usage_measured: [1, 0],
|
|
24257
|
+
unavailable: [1, 0],
|
|
24258
|
+
unqualified: [1, 0]
|
|
24259
|
+
}
|
|
24260
|
+
},
|
|
23386
24261
|
NamespaceDto: {
|
|
23387
24262
|
object: { id: [1, 0], name: [1, 0], path: [1, 0], tags: [1, { array: 0 }], visibility: [1, 0] }
|
|
23388
24263
|
},
|
|
23389
24264
|
NamespaceListResponse: { object: { count: [1, 0], namespaces: [1, { array: "NamespaceDto" }] } },
|
|
23390
24265
|
NamespaceResponse: { object: { namespace: [1, "NamespaceDto"] } },
|
|
24266
|
+
NativeExportManifestDto: {
|
|
24267
|
+
object: {
|
|
24268
|
+
context_manifest: [2, "ContextManifestDto"],
|
|
24269
|
+
counts_by_kind: [1, { object: {} }],
|
|
24270
|
+
record_count: [1, 0],
|
|
24271
|
+
records_sha256: [1, 0],
|
|
24272
|
+
unreadable: [1, { array: "UnreadableRecordDto" }]
|
|
24273
|
+
}
|
|
24274
|
+
},
|
|
24275
|
+
NativeExportResponse: {
|
|
24276
|
+
object: {
|
|
24277
|
+
artifacts: [1, { array: "SourceArtifactRecordDto" }],
|
|
24278
|
+
context: [2, "ContextRefDto"],
|
|
24279
|
+
format: [1, 0],
|
|
24280
|
+
manifest: [1, "NativeExportManifestDto"],
|
|
24281
|
+
records: [1, { array: 0 }],
|
|
24282
|
+
view: [1, "ViewRefDto"]
|
|
24283
|
+
}
|
|
24284
|
+
},
|
|
23391
24285
|
NearMiss: {
|
|
23392
24286
|
object: {
|
|
23393
24287
|
byte_end: [1, 0],
|
|
@@ -23426,6 +24320,9 @@ var RESPONSE_COMPONENTS = {
|
|
|
23426
24320
|
},
|
|
23427
24321
|
NlQueryResultItem: { object: { features: [1, { object: {} }], id: [1, 0], sort_name: [1, 0] } },
|
|
23428
24322
|
NodeScoreDto: { object: { node_id: [1, 0], score: [1, 0] } },
|
|
24323
|
+
NotationRecordDto: {
|
|
24324
|
+
object: { concept: [1, 0], record_id: [1, 0], scheme: [1, 0], value: [1, 0] }
|
|
24325
|
+
},
|
|
23429
24326
|
NumberToStringResponse: { object: { result: [1, 0] } },
|
|
23430
24327
|
OAuthStartResponse: { object: { auth_url: [1, 0] } },
|
|
23431
24328
|
ObjectTypeDto: {
|
|
@@ -23919,6 +24816,25 @@ var RESPONSE_COMPONENTS = {
|
|
|
23919
24816
|
}
|
|
23920
24817
|
},
|
|
23921
24818
|
PersonalityTrait: { object: { description: [1, 0], name: [1, 0], strength: [1, 0] } },
|
|
24819
|
+
PicklistEntryDto: {
|
|
24820
|
+
object: {
|
|
24821
|
+
concept_id: [1, 0],
|
|
24822
|
+
depth: [1, 0],
|
|
24823
|
+
display_label: [2, "DisplayLabelDto"],
|
|
24824
|
+
other_parent_relation_ids: [1, { array: 0 }]
|
|
24825
|
+
}
|
|
24826
|
+
},
|
|
24827
|
+
PicklistResponse: {
|
|
24828
|
+
object: {
|
|
24829
|
+
complete: [1, 0],
|
|
24830
|
+
context: [2, "ContextRefDto"],
|
|
24831
|
+
entries: [1, { array: "PicklistEntryDto" }],
|
|
24832
|
+
roots: [1, { array: 0 }],
|
|
24833
|
+
roots_from: [1, 0],
|
|
24834
|
+
scheme_id: [1, 0],
|
|
24835
|
+
view: [1, "ViewRefDto"]
|
|
24836
|
+
}
|
|
24837
|
+
},
|
|
23922
24838
|
PipelineQualityStatsDto: {
|
|
23923
24839
|
object: {
|
|
23924
24840
|
axioms_deduplicated: [1, 0],
|
|
@@ -23972,6 +24888,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
23972
24888
|
total_requested: [1, 0]
|
|
23973
24889
|
}
|
|
23974
24890
|
},
|
|
24891
|
+
PlannedDispositionDto: { object: { disposition: [1, 0], rationale: [1, 0], sort_id: [1, 0] } },
|
|
23975
24892
|
PlannedStrategyDto: { object: { allocated: [1, 0], name: [1, 0], weight: [1, 0] } },
|
|
23976
24893
|
PluginBindingDto: {
|
|
23977
24894
|
object: {
|
|
@@ -24102,6 +25019,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
24102
25019
|
total_profit: [1, 0]
|
|
24103
25020
|
}
|
|
24104
25021
|
},
|
|
25022
|
+
ProjectionLossDto: { object: { kind: [1, 0], reason: [1, 0], record_ids: [1, { array: 0 }] } },
|
|
24105
25023
|
PromptTraceDto: { object: { llm_context: [1, "LlmContextTraceDto"], system_prompt: [1, 0] } },
|
|
24106
25024
|
ProofConclusionDto: { object: { features: [1, { object: {} }], sort_id: [1, 0] } },
|
|
24107
25025
|
ProofDto: {
|
|
@@ -24401,6 +25319,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
24401
25319
|
timestamp: [1, 0]
|
|
24402
25320
|
}
|
|
24403
25321
|
},
|
|
25322
|
+
ReconciliationEntryDto: { object: { kind: [1, 0], proposal: [1, 0], source_key: [1, 0] } },
|
|
24404
25323
|
RecordChangeDto: {
|
|
24405
25324
|
object: { feature_changes: [1, { array: "RecordFeatureChangeDto" }], record_id: [1, 0] }
|
|
24406
25325
|
},
|
|
@@ -25123,6 +26042,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
25123
26042
|
SchemeViewDto: {
|
|
25124
26043
|
object: {
|
|
25125
26044
|
display_name: [1, 0],
|
|
26045
|
+
documentation: [1, { array: "DocumentationRecordDto" }],
|
|
25126
26046
|
languages: [1, { array: "SchemeLanguageViewDto" }],
|
|
25127
26047
|
purpose: [1, 0],
|
|
25128
26048
|
revision: [1, 0],
|
|
@@ -25308,6 +26228,26 @@ var RESPONSE_COMPONENTS = {
|
|
|
25308
26228
|
}
|
|
25309
26229
|
},
|
|
25310
26230
|
SkippedWebPageDto: { object: { depth: [1, 0], message: [1, 0], reason: [1, 0], url: [1, 0] } },
|
|
26231
|
+
SkosExportResponse: {
|
|
26232
|
+
object: {
|
|
26233
|
+
content: [1, 0],
|
|
26234
|
+
manifest: [1, "SkosManifestDto"],
|
|
26235
|
+
media_type: [1, 0],
|
|
26236
|
+
sha256: [1, 0]
|
|
26237
|
+
}
|
|
26238
|
+
},
|
|
26239
|
+
SkosManifestDto: {
|
|
26240
|
+
object: {
|
|
26241
|
+
include_provenance: [1, 0],
|
|
26242
|
+
iri_policy: [1, 0],
|
|
26243
|
+
iris: [1, { array: "IriChoiceDto" }],
|
|
26244
|
+
losses: [1, { array: "ProjectionLossDto" }],
|
|
26245
|
+
projection: [1, 0],
|
|
26246
|
+
scheme_id: [1, 0],
|
|
26247
|
+
triple_count: [1, 0],
|
|
26248
|
+
view: [1, "ViewRefDto"]
|
|
26249
|
+
}
|
|
26250
|
+
},
|
|
25311
26251
|
SmoothingParametersDto: { object: { alpha: [1, 0] } },
|
|
25312
26252
|
SmtCheckResponse: { object: { assignments: [2, { object: {} }], result: [1, 0] } },
|
|
25313
26253
|
SnapshotFilter: { object: { request_path_pattern: [1, 0] } },
|
|
@@ -25576,6 +26516,25 @@ var RESPONSE_COMPONENTS = {
|
|
|
25576
26516
|
schema_rejected_missing_source_span: [1, 0]
|
|
25577
26517
|
}
|
|
25578
26518
|
},
|
|
26519
|
+
SourceArtifactRecordDto: {
|
|
26520
|
+
object: {
|
|
26521
|
+
byte_size: [1, 0],
|
|
26522
|
+
dataset: [1, 0],
|
|
26523
|
+
format: [1, 0],
|
|
26524
|
+
record_id: [1, 0],
|
|
26525
|
+
retained_locator: [1, 0],
|
|
26526
|
+
sha256: [1, 0]
|
|
26527
|
+
}
|
|
26528
|
+
},
|
|
26529
|
+
SourceAssociationRecordDto: {
|
|
26530
|
+
object: {
|
|
26531
|
+
artifact: [1, 0],
|
|
26532
|
+
change_reason: [1, 0],
|
|
26533
|
+
record_id: [1, 0],
|
|
26534
|
+
revision: [1, 0],
|
|
26535
|
+
source_key: [1, 0]
|
|
26536
|
+
}
|
|
26537
|
+
},
|
|
25579
26538
|
SourceDetailResponse: {
|
|
25580
26539
|
object: {
|
|
25581
26540
|
available: [1, 0],
|
|
@@ -25621,6 +26580,14 @@ var RESPONSE_COMPONENTS = {
|
|
|
25621
26580
|
}
|
|
25622
26581
|
},
|
|
25623
26582
|
SpaceResponse: { object: { constraint_count: [1, 0], id: [1, 0], status: [1, 0] } },
|
|
26583
|
+
SparqlDatasetDto: {
|
|
26584
|
+
object: {
|
|
26585
|
+
projection: [1, 0],
|
|
26586
|
+
scheme_id: [1, 0],
|
|
26587
|
+
triple_count: [1, 0],
|
|
26588
|
+
view: [1, "ViewRefDto"]
|
|
26589
|
+
}
|
|
26590
|
+
},
|
|
25624
26591
|
SparqlExplainDto: {
|
|
25625
26592
|
object: {
|
|
25626
26593
|
complete: [1, 0],
|
|
@@ -25643,6 +26610,14 @@ var RESPONSE_COMPONENTS = {
|
|
|
25643
26610
|
sorts: [0, { array: 0 }]
|
|
25644
26611
|
}
|
|
25645
26612
|
},
|
|
26613
|
+
SparqlResponse: {
|
|
26614
|
+
object: {
|
|
26615
|
+
complete: [1, 0],
|
|
26616
|
+
dataset: [1, "SparqlDatasetDto"],
|
|
26617
|
+
form: [1, 0],
|
|
26618
|
+
results: [1, { object: {} }]
|
|
26619
|
+
}
|
|
26620
|
+
},
|
|
25646
26621
|
SparqlUpdateExplainDto: { object: { osfql: [1, { array: 0 }] } },
|
|
25647
26622
|
SpeakerDetectionDto: {
|
|
25648
26623
|
object: {
|
|
@@ -25905,6 +26880,18 @@ var RESPONSE_COMPONENTS = {
|
|
|
25905
26880
|
}
|
|
25906
26881
|
},
|
|
25907
26882
|
TaskDto: { object: { is_primitive: [1, 0], subtasks: [1, { array: 0 }], task_id: [1, 0] } },
|
|
26883
|
+
TaxonomyPolicyResponse: {
|
|
26884
|
+
object: {
|
|
26885
|
+
acyclic: [1, 0],
|
|
26886
|
+
context: [2, "ContextRefDto"],
|
|
26887
|
+
declared: [1, 0],
|
|
26888
|
+
policy: [1, 0],
|
|
26889
|
+
require_placement: [1, 0],
|
|
26890
|
+
scheme_id: [1, 0],
|
|
26891
|
+
top_concepts: [1, 0],
|
|
26892
|
+
view: [1, "ViewRefDto"]
|
|
26893
|
+
}
|
|
26894
|
+
},
|
|
25908
26895
|
TemporalModelCheckResponse: {
|
|
25909
26896
|
object: {
|
|
25910
26897
|
counterexample: [2, "CounterExampleDto"],
|
|
@@ -26048,6 +27035,14 @@ var RESPONSE_COMPONENTS = {
|
|
|
26048
27035
|
}
|
|
26049
27036
|
},
|
|
26050
27037
|
ToolCallInfo: { object: { arguments: [1, 0], confidence: [1, 0], name: [1, 0] } },
|
|
27038
|
+
TopConceptsResponse: {
|
|
27039
|
+
object: {
|
|
27040
|
+
concepts: [1, { array: "ConceptSummaryDto" }],
|
|
27041
|
+
context: [2, "ContextRefDto"],
|
|
27042
|
+
scheme_id: [1, 0],
|
|
27043
|
+
view: [1, "ViewRefDto"]
|
|
27044
|
+
}
|
|
27045
|
+
},
|
|
26051
27046
|
TraceStepDto: {
|
|
26052
27047
|
object: {
|
|
26053
27048
|
entropy: [1, 0],
|
|
@@ -26254,6 +27249,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
26254
27249
|
UnknownClusterDto: {
|
|
26255
27250
|
object: { cluster: [1, 0], spans: [1, { array: "SpeechSpanDto" }], speech_secs: [1, 0] }
|
|
26256
27251
|
},
|
|
27252
|
+
UnreadableRecordDto: { object: { reason: [1, 0], record_id: [1, 0] } },
|
|
26257
27253
|
UnsatisfiableClassDto: { object: { class: [1, 0], disjoint_pair: [1, { array: 0 }] } },
|
|
26258
27254
|
UnsatisfiableSortDto: { object: { disjoint_pair: [1, { array: 0 }], sort: [1, 0] } },
|
|
26259
27255
|
UpdateAgentResponse: {
|
|
@@ -26490,6 +27486,40 @@ var RESPONSE_COMPONENTS = {
|
|
|
26490
27486
|
subjects: [1, { array: 0 }]
|
|
26491
27487
|
}
|
|
26492
27488
|
},
|
|
27489
|
+
VocabularyImportArtifactDto: {
|
|
27490
|
+
object: { byte_size: [1, 0], format: [1, 0], sha256: [1, 0], source_file_id: [1, 0] }
|
|
27491
|
+
},
|
|
27492
|
+
VocabularyImportItemDto: {
|
|
27493
|
+
object: {
|
|
27494
|
+
coordinates: [1, { object: {} }],
|
|
27495
|
+
disposition: [1, 0],
|
|
27496
|
+
item: [1, { object: {} }],
|
|
27497
|
+
notes: [1, { array: "ImportCellNoteDto" }],
|
|
27498
|
+
ordinal: [1, 0],
|
|
27499
|
+
resource_keys: [1, { array: 0 }]
|
|
27500
|
+
}
|
|
27501
|
+
},
|
|
27502
|
+
VocabularyImportItemsResponse: {
|
|
27503
|
+
object: {
|
|
27504
|
+
complete: [1, 0],
|
|
27505
|
+
import_id: [1, 0],
|
|
27506
|
+
items: [1, { array: "VocabularyImportItemDto" }]
|
|
27507
|
+
}
|
|
27508
|
+
},
|
|
27509
|
+
VocabularyImportResponse: {
|
|
27510
|
+
object: {
|
|
27511
|
+
artifact: [1, "VocabularyImportArtifactDto"],
|
|
27512
|
+
complete: [1, 0],
|
|
27513
|
+
counts: [1, { object: {} }],
|
|
27514
|
+
created_at: [1, 0],
|
|
27515
|
+
created_by: [1, 0],
|
|
27516
|
+
dataset: [1, 0],
|
|
27517
|
+
import_id: [1, 0],
|
|
27518
|
+
proposed_record_counts: [1, { object: {} }],
|
|
27519
|
+
reconciliation: [1, { array: "ReconciliationEntryDto" }],
|
|
27520
|
+
replayed: [1, 0]
|
|
27521
|
+
}
|
|
27522
|
+
},
|
|
26493
27523
|
VocabularyMatch: {
|
|
26494
27524
|
object: {
|
|
26495
27525
|
canonical: [1, 0],
|
|
@@ -26588,7 +27618,8 @@ var RESPONSE_COMPONENTS = {
|
|
|
26588
27618
|
blocked_by: [1, { array: "WhyNotPremiseDto" }],
|
|
26589
27619
|
head_sort: [1, 0],
|
|
26590
27620
|
jointly_unsatisfied: [1, 0],
|
|
26591
|
-
rule_id: [1, 0]
|
|
27621
|
+
rule_id: [1, 0],
|
|
27622
|
+
undetermined: [0, { array: "WhyNotPremiseDto" }]
|
|
26592
27623
|
}
|
|
26593
27624
|
},
|
|
26594
27625
|
WithOriginals_AsyncBatchIngestionResponse: {
|
|
@@ -26669,6 +27700,20 @@ var RESPONSE_COMPONENTS = {
|
|
|
26669
27700
|
}
|
|
26670
27701
|
},
|
|
26671
27702
|
WorldModelTransitionDto: { object: { probability: [1, 0] } },
|
|
27703
|
+
XlLabelViewDto: {
|
|
27704
|
+
object: {
|
|
27705
|
+
change_reason: [1, 0],
|
|
27706
|
+
concept: [1, 0],
|
|
27707
|
+
label: [1, 0],
|
|
27708
|
+
record_id: [1, 0],
|
|
27709
|
+
resource_key: [1, 0],
|
|
27710
|
+
revision: [1, 0],
|
|
27711
|
+
role: [1, 0],
|
|
27712
|
+
scheme: [1, 0],
|
|
27713
|
+
incoming_relations: [1, { array: "LabelRelationViewDto" }],
|
|
27714
|
+
outgoing_relations: [1, { array: "LabelRelationViewDto" }]
|
|
27715
|
+
}
|
|
27716
|
+
},
|
|
26672
27717
|
YankResponse: { object: { plugin_id: [1, 0], yanked: [1, 0] } }
|
|
26673
27718
|
};
|
|
26674
27719
|
var RESPONSE_OPERATIONS = {
|
|
@@ -26858,6 +27903,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
26858
27903
|
path: "/api/v1/causal/intervention",
|
|
26859
27904
|
responses: { 200: "InterventionResponse" }
|
|
26860
27905
|
},
|
|
27906
|
+
applyMigrationPlan: {
|
|
27907
|
+
method: "POST",
|
|
27908
|
+
path: "/api/v1/vocabulary/migration/plans/{plan_id}/apply",
|
|
27909
|
+
responses: { 201: "CandidateRevisionResponse" }
|
|
27910
|
+
},
|
|
26861
27911
|
applySnapshot: {
|
|
26862
27912
|
method: "POST",
|
|
26863
27913
|
path: "/api/v1/admin/snapshots/{snapshot_id}/apply/{target_tenant_id}",
|
|
@@ -26953,6 +28003,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
26953
28003
|
path: "/api/v1/copy/batch",
|
|
26954
28004
|
responses: { 200: "BatchCopyResponse" }
|
|
26955
28005
|
},
|
|
28006
|
+
batchGetSubsumptions: {
|
|
28007
|
+
method: "POST",
|
|
28008
|
+
path: "/api/v1/sorts/subsumption/get/batch",
|
|
28009
|
+
responses: { 200: "BatchGetSubsumptionsResponse" }
|
|
28010
|
+
},
|
|
26956
28011
|
bayesianPredict: {
|
|
26957
28012
|
method: "POST",
|
|
26958
28013
|
path: "/api/v1/inference/bayesian-predict",
|
|
@@ -27068,6 +28123,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
27068
28123
|
path: "/api/v1/sorts/similarity/bulk",
|
|
27069
28124
|
responses: { 200: "BulkSetSimilaritiesResponse" }
|
|
27070
28125
|
},
|
|
28126
|
+
bulkSetSubsumptions: {
|
|
28127
|
+
method: "POST",
|
|
28128
|
+
path: "/api/v1/sorts/subsumption/bulk",
|
|
28129
|
+
responses: { 200: "BulkSetSubsumptionsResponse" }
|
|
28130
|
+
},
|
|
27071
28131
|
calibrateConformal: {
|
|
27072
28132
|
method: "POST",
|
|
27073
28133
|
path: "/api/v1/conformal/calibrate",
|
|
@@ -27232,6 +28292,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
27232
28292
|
path: "/api/v1/flow-networks/{network_id}/commit",
|
|
27233
28293
|
responses: { 200: "FlowNetworkResponse" }
|
|
27234
28294
|
},
|
|
28295
|
+
commitImport: {
|
|
28296
|
+
method: "POST",
|
|
28297
|
+
path: "/api/v1/vocabulary/imports/{import_id}/commit",
|
|
28298
|
+
responses: { 201: "CandidateRevisionResponse" }
|
|
28299
|
+
},
|
|
27235
28300
|
commitSpace: {
|
|
27236
28301
|
method: "POST",
|
|
27237
28302
|
path: "/api/v1/spaces/{space_id}/commit",
|
|
@@ -27316,11 +28381,21 @@ var RESPONSE_OPERATIONS = {
|
|
|
27316
28381
|
path: "/api/v1/analysis/path",
|
|
27317
28382
|
responses: { 200: "PathResponse" }
|
|
27318
28383
|
},
|
|
28384
|
+
conceptExpansion: {
|
|
28385
|
+
method: "GET",
|
|
28386
|
+
path: "/api/v1/vocabulary/concepts/{concept_id}/expansion",
|
|
28387
|
+
responses: { 200: "ExpansionResponse" }
|
|
28388
|
+
},
|
|
27319
28389
|
conceptHistory: {
|
|
27320
28390
|
method: "GET",
|
|
27321
28391
|
path: "/api/v1/vocabulary/concepts/{concept_id}/history",
|
|
27322
28392
|
responses: { 200: "ConceptHistoryResponse" }
|
|
27323
28393
|
},
|
|
28394
|
+
conceptRelations: {
|
|
28395
|
+
method: "GET",
|
|
28396
|
+
path: "/api/v1/vocabulary/concepts/{concept_id}/relations",
|
|
28397
|
+
responses: { 200: "ConceptRelationsResponse" }
|
|
28398
|
+
},
|
|
27324
28399
|
configureOrchestrator: {
|
|
27325
28400
|
method: "POST",
|
|
27326
28401
|
path: "/api/v1/inference/orchestrator/configure",
|
|
@@ -27439,11 +28514,21 @@ var RESPONSE_OPERATIONS = {
|
|
|
27439
28514
|
path: "/api/v1/inference/goals",
|
|
27440
28515
|
responses: { 201: "CreateGoalResponse" }
|
|
27441
28516
|
},
|
|
28517
|
+
createImport: {
|
|
28518
|
+
method: "POST",
|
|
28519
|
+
path: "/api/v1/vocabulary/imports",
|
|
28520
|
+
responses: { 201: "VocabularyImportResponse" }
|
|
28521
|
+
},
|
|
27442
28522
|
createIngestSource: {
|
|
27443
28523
|
method: "POST",
|
|
27444
28524
|
path: "/api/v1/ingest/sources",
|
|
27445
28525
|
responses: { 201: "SourceDto" }
|
|
27446
28526
|
},
|
|
28527
|
+
createMigrationPlan: {
|
|
28528
|
+
method: "POST",
|
|
28529
|
+
path: "/api/v1/vocabulary/migration/plans",
|
|
28530
|
+
responses: { 201: "MigrationPlanResponse" }
|
|
28531
|
+
},
|
|
27447
28532
|
createModule: {
|
|
27448
28533
|
method: "POST",
|
|
27449
28534
|
path: "/api/v1/modules",
|
|
@@ -27527,6 +28612,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
27527
28612
|
path: "/api/v1/causal/latent-variables",
|
|
27528
28613
|
responses: { 201: "DeclareLatentVariableResponse" }
|
|
27529
28614
|
},
|
|
28615
|
+
declaredAlphaCutBelow: {
|
|
28616
|
+
method: "POST",
|
|
28617
|
+
path: "/api/v1/sorts/subsumption/alpha-cut",
|
|
28618
|
+
responses: { 200: "DeclaredAlphaCutResponse" }
|
|
28619
|
+
},
|
|
27530
28620
|
decodeGlb: {
|
|
27531
28621
|
method: "POST",
|
|
27532
28622
|
path: "/api/v1/sorts/glb/decode",
|
|
@@ -27950,6 +29040,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
27950
29040
|
path: "/api/v1/synthetic/export-jsonl",
|
|
27951
29041
|
responses: { 200: "ExportJsonlResponse" }
|
|
27952
29042
|
},
|
|
29043
|
+
exportNative: {
|
|
29044
|
+
method: "GET",
|
|
29045
|
+
path: "/api/v1/vocabulary/exports/native",
|
|
29046
|
+
responses: { 200: "NativeExportResponse" }
|
|
29047
|
+
},
|
|
27953
29048
|
exportPatternContext: {
|
|
27954
29049
|
method: "POST",
|
|
27955
29050
|
path: "/api/v1/analysis/pattern-proposals/context",
|
|
@@ -27960,6 +29055,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
27960
29055
|
path: "/api/v1/proof/export",
|
|
27961
29056
|
responses: { 200: "ProofExportResponse" }
|
|
27962
29057
|
},
|
|
29058
|
+
exportSkos: {
|
|
29059
|
+
method: "GET",
|
|
29060
|
+
path: "/api/v1/vocabulary/exports/skos",
|
|
29061
|
+
responses: { 200: "SkosExportResponse" }
|
|
29062
|
+
},
|
|
27963
29063
|
extendDsr: {
|
|
27964
29064
|
method: "POST",
|
|
27965
29065
|
path: "/api/v1/dsr/{id}/extend",
|
|
@@ -28426,6 +29526,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
28426
29526
|
path: "/api/v1/visualization/hypergraph",
|
|
28427
29527
|
responses: { 200: "HypergraphResponse" }
|
|
28428
29528
|
},
|
|
29529
|
+
getImport: {
|
|
29530
|
+
method: "GET",
|
|
29531
|
+
path: "/api/v1/vocabulary/imports/{import_id}",
|
|
29532
|
+
responses: { 200: "VocabularyImportResponse" }
|
|
29533
|
+
},
|
|
28429
29534
|
getInbox: { method: "GET", path: "/api/v1/inbox", responses: { 200: "InboxResponse" } },
|
|
28430
29535
|
getInferenceJob: {
|
|
28431
29536
|
method: "GET",
|
|
@@ -28482,6 +29587,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
28482
29587
|
path: "/api/v1/inference/meta-sorts",
|
|
28483
29588
|
responses: { 200: "MetaSortsResponse" }
|
|
28484
29589
|
},
|
|
29590
|
+
getMigrationPlan: {
|
|
29591
|
+
method: "GET",
|
|
29592
|
+
path: "/api/v1/vocabulary/migration/plans/{plan_id}",
|
|
29593
|
+
responses: { 200: "MigrationPlanResponse" }
|
|
29594
|
+
},
|
|
28485
29595
|
getMyTenant: {
|
|
28486
29596
|
method: "GET",
|
|
28487
29597
|
path: "/api/v1/tenants/me",
|
|
@@ -28497,6 +29607,16 @@ var RESPONSE_OPERATIONS = {
|
|
|
28497
29607
|
path: "/api/v1/namespaces/{id}/ancestors",
|
|
28498
29608
|
responses: { 200: "NamespaceListResponse" }
|
|
28499
29609
|
},
|
|
29610
|
+
getNamespaceAnswerCachePolicy: {
|
|
29611
|
+
method: "GET",
|
|
29612
|
+
path: "/api/v1/namespaces/{id}/answer-cache-policy",
|
|
29613
|
+
responses: { 200: "NamespaceAnswerCachePolicyDto" }
|
|
29614
|
+
},
|
|
29615
|
+
getNamespaceAnswerCacheSavings: {
|
|
29616
|
+
method: "GET",
|
|
29617
|
+
path: "/api/v1/namespaces/{id}/answer-cache-savings",
|
|
29618
|
+
responses: { 200: "NamespaceAnswerCacheSavingsDto" }
|
|
29619
|
+
},
|
|
28500
29620
|
getNamespaceByPath: {
|
|
28501
29621
|
method: "GET",
|
|
28502
29622
|
path: "/api/v1/namespaces/path/{tenant_id}/{path}",
|
|
@@ -28720,6 +29840,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
28720
29840
|
path: "/api/v1/verification/certificates/{id}",
|
|
28721
29841
|
responses: { 200: "VerificationCertificateResponse" }
|
|
28722
29842
|
},
|
|
29843
|
+
getVocabularyCollection: {
|
|
29844
|
+
method: "GET",
|
|
29845
|
+
path: "/api/v1/vocabulary/collections/{collection_id}",
|
|
29846
|
+
responses: { 200: "CollectionDetailResponse" }
|
|
29847
|
+
},
|
|
28723
29848
|
getWorkflow: { method: "GET", path: "/api/v1/workflows/{id}", responses: { 200: "WorkflowDto" } },
|
|
28724
29849
|
getWorkflowRun: {
|
|
28725
29850
|
method: "GET",
|
|
@@ -28792,6 +29917,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
28792
29917
|
path: "/api/v1/ontology/import-foundry",
|
|
28793
29918
|
responses: { 201: "ImportFoundryResponse" }
|
|
28794
29919
|
},
|
|
29920
|
+
importItems: {
|
|
29921
|
+
method: "GET",
|
|
29922
|
+
path: "/api/v1/vocabulary/imports/{import_id}/items",
|
|
29923
|
+
responses: { 200: "VocabularyImportItemsResponse" }
|
|
29924
|
+
},
|
|
28795
29925
|
importKappa: {
|
|
28796
29926
|
method: "POST",
|
|
28797
29927
|
path: "/api/v1/injection/kappa",
|
|
@@ -29396,6 +30526,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
29396
30526
|
path: "/api/v1/namespaces/{namespace_id}/visible-terms",
|
|
29397
30527
|
responses: { 200: "TermListResponse" }
|
|
29398
30528
|
},
|
|
30529
|
+
listVocabularyCollections: {
|
|
30530
|
+
method: "GET",
|
|
30531
|
+
path: "/api/v1/vocabulary/collections",
|
|
30532
|
+
responses: { 200: "CollectionPageResponse" }
|
|
30533
|
+
},
|
|
29399
30534
|
listVoices: {
|
|
29400
30535
|
method: "GET",
|
|
29401
30536
|
path: "/api/v1/speech/voices",
|
|
@@ -30210,6 +31345,31 @@ var RESPONSE_OPERATIONS = {
|
|
|
30210
31345
|
path: "/api/v1/vocabulary/candidates/{candidate_id}/revisions",
|
|
30211
31346
|
responses: { 201: "CandidateRevisionResponse" }
|
|
30212
31347
|
},
|
|
31348
|
+
schemeHierarchy: {
|
|
31349
|
+
method: "GET",
|
|
31350
|
+
path: "/api/v1/vocabulary/schemes/{scheme_id}/hierarchy",
|
|
31351
|
+
responses: { 200: "HierarchyResponse" }
|
|
31352
|
+
},
|
|
31353
|
+
schemePaths: {
|
|
31354
|
+
method: "GET",
|
|
31355
|
+
path: "/api/v1/vocabulary/schemes/{scheme_id}/paths",
|
|
31356
|
+
responses: { 200: "HierarchyPathsResponse" }
|
|
31357
|
+
},
|
|
31358
|
+
schemePicklist: {
|
|
31359
|
+
method: "GET",
|
|
31360
|
+
path: "/api/v1/vocabulary/schemes/{scheme_id}/picklist",
|
|
31361
|
+
responses: { 200: "PicklistResponse" }
|
|
31362
|
+
},
|
|
31363
|
+
schemePolicy: {
|
|
31364
|
+
method: "GET",
|
|
31365
|
+
path: "/api/v1/vocabulary/schemes/{scheme_id}/policy",
|
|
31366
|
+
responses: { 200: "TaxonomyPolicyResponse" }
|
|
31367
|
+
},
|
|
31368
|
+
schemeTopConcepts: {
|
|
31369
|
+
method: "GET",
|
|
31370
|
+
path: "/api/v1/vocabulary/schemes/{scheme_id}/top-concepts",
|
|
31371
|
+
responses: { 200: "TopConceptsResponse" }
|
|
31372
|
+
},
|
|
30213
31373
|
scmCounterfactual: {
|
|
30214
31374
|
method: "POST",
|
|
30215
31375
|
path: "/api/v1/causal/counterfactual/scm",
|
|
@@ -30350,6 +31510,7 @@ var RESPONSE_OPERATIONS = {
|
|
|
30350
31510
|
path: "/api/v1/constraints/solve",
|
|
30351
31511
|
responses: { 200: "SolveConstraintResponse" }
|
|
30352
31512
|
},
|
|
31513
|
+
solveCsp: { method: "POST", path: "/api/v1/csp/solve", responses: { 200: "CspSolveResponse" } },
|
|
30353
31514
|
solveFlowNetwork: {
|
|
30354
31515
|
method: "POST",
|
|
30355
31516
|
path: "/api/v1/flow-networks/{network_id}/solve",
|
|
@@ -30377,6 +31538,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
30377
31538
|
path: "/api/v1/sorts/index/status",
|
|
30378
31539
|
responses: { 200: "SortIndexStatusResponse" }
|
|
30379
31540
|
},
|
|
31541
|
+
sparqlQuery: {
|
|
31542
|
+
method: "POST",
|
|
31543
|
+
path: "/api/v1/vocabulary/sparql",
|
|
31544
|
+
responses: { 200: "SparqlResponse" }
|
|
31545
|
+
},
|
|
30380
31546
|
startExploration: {
|
|
30381
31547
|
method: "POST",
|
|
30382
31548
|
path: "/api/v1/analysis/attribute-exploration/start",
|
|
@@ -30617,6 +31783,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
30617
31783
|
path: "/api/v1/cognitive/agents/{agent_id}",
|
|
30618
31784
|
responses: { 200: "UpdateAgentResponse" }
|
|
30619
31785
|
},
|
|
31786
|
+
updateNamespaceAnswerCachePolicy: {
|
|
31787
|
+
method: "PUT",
|
|
31788
|
+
path: "/api/v1/namespaces/{id}/answer-cache-policy",
|
|
31789
|
+
responses: { 200: "NamespaceAnswerCachePolicyDto" }
|
|
31790
|
+
},
|
|
30620
31791
|
updatePlanStats: {
|
|
30621
31792
|
method: "POST",
|
|
30622
31793
|
path: "/api/v1/cognitive/agents/plans/stats",
|
|
@@ -31084,19 +32255,42 @@ var SortsClient = class {
|
|
|
31084
32255
|
/**
|
|
31085
32256
|
* Propose mixin parents for feature shapes several sorts repeat unchanged.
|
|
31086
32257
|
*
|
|
31087
|
-
* @param request - Which sorts to analyse (default: all),
|
|
31088
|
-
*
|
|
31089
|
-
*
|
|
31090
|
-
* @
|
|
32258
|
+
* @param request - Which sorts to analyse (default: all), the least number of
|
|
32259
|
+
* sorts a proposal must cover (default and floor: 2), and optional lower
|
|
32260
|
+
* budgets in `limits`.
|
|
32261
|
+
* @returns Candidate parents, most shared declarations first, with the input,
|
|
32262
|
+
* search and presentation coverage of the run.
|
|
32263
|
+
* @throws {ApiError} If the request fails: `400` for an invalid selection or a
|
|
32264
|
+
* limit above the native ceiling, `403` when a source or ancestor schema is
|
|
32265
|
+
* not readable, `422` when a declaration cannot be represented losslessly.
|
|
31091
32266
|
*
|
|
31092
32267
|
* @remarks
|
|
31093
|
-
*
|
|
31094
|
-
*
|
|
31095
|
-
* before creating the parent.
|
|
32268
|
+
* Never writes. The analysis runs native formal concept analysis over whole
|
|
32269
|
+
* feature declarations and checks each concept. `suggestedName` is a
|
|
32270
|
+
* placeholder to rename before creating the parent.
|
|
32271
|
+
*
|
|
32272
|
+
* Coverage has three independent parts. Read all three before you claim
|
|
32273
|
+
* coverage. `inputComplete` says whether the whole cohort was read within the
|
|
32274
|
+
* limits; when it is `false`, `inputStop` names the stop and no search ran.
|
|
32275
|
+
* `search.complete` says whether the enumeration was exhausted. That
|
|
32276
|
+
* exhaustion concerns the stated tenant and policy cohort only. Presentation
|
|
32277
|
+
* can truncate independently: `presentationStopReason` is set when the list
|
|
32278
|
+
* is shorter than the search result.
|
|
32279
|
+
*
|
|
32280
|
+
* A proposal is a candidate, not an admission. `nativeAdmission` is always
|
|
32281
|
+
* `false`. Neither the report nor its digest `contextSha256` is an admission
|
|
32282
|
+
* seal. To accept a candidate, use the existing governed declaration and
|
|
32283
|
+
* reparenting operations.
|
|
32284
|
+
*
|
|
32285
|
+
* Serialization: the request `limits` keys are sent as snake_case `max_*`.
|
|
32286
|
+
* An absent budget is omitted, never sent as `null`.
|
|
31096
32287
|
*
|
|
31097
32288
|
* @example
|
|
31098
32289
|
* ```typescript
|
|
31099
|
-
* const
|
|
32290
|
+
* const report = await client.sorts.factorSorts({ minSorts: 3, limits: { maxProposals: 50 } });
|
|
32291
|
+
* if (report.inputComplete && report.search?.complete && report.presentationStopReason == null) {
|
|
32292
|
+
* console.log(report.proposals.length);
|
|
32293
|
+
* }
|
|
31100
32294
|
* ```
|
|
31101
32295
|
*/
|
|
31102
32296
|
async factorSorts(request = {}, requestOptions) {
|
|
@@ -33257,6 +34451,17 @@ function SolutionDtoFromApiToFront(dto) {
|
|
|
33257
34451
|
}
|
|
33258
34452
|
return solution;
|
|
33259
34453
|
}
|
|
34454
|
+
function WhyNotPremiseFromApiToFront(dto) {
|
|
34455
|
+
return {
|
|
34456
|
+
sort: dto.sort,
|
|
34457
|
+
// Premise feature names are user data: kept as written.
|
|
34458
|
+
features: Object.fromEntries(
|
|
34459
|
+
Object.entries(dto.features).filter(
|
|
34460
|
+
(entry) => entry[1] !== void 0
|
|
34461
|
+
)
|
|
34462
|
+
)
|
|
34463
|
+
};
|
|
34464
|
+
}
|
|
33260
34465
|
function WhyNotFromApiToFront(dto) {
|
|
33261
34466
|
return {
|
|
33262
34467
|
goalSort: dto.goal_sort,
|
|
@@ -33274,14 +34479,9 @@ function WhyNotFromApiToFront(dto) {
|
|
|
33274
34479
|
rules: dto.rules.map((r) => ({
|
|
33275
34480
|
ruleId: r.rule_id,
|
|
33276
34481
|
headSort: r.head_sort,
|
|
33277
|
-
blockedBy: r.blocked_by.map(
|
|
33278
|
-
|
|
33279
|
-
|
|
33280
|
-
Object.entries(p.features).filter(
|
|
33281
|
-
(entry) => entry[1] !== void 0
|
|
33282
|
-
)
|
|
33283
|
-
)
|
|
33284
|
-
})),
|
|
34482
|
+
blockedBy: r.blocked_by.map(WhyNotPremiseFromApiToFront),
|
|
34483
|
+
// Always sent by the engine; an engine that predates it sends none.
|
|
34484
|
+
undetermined: (r.undetermined ?? []).map(WhyNotPremiseFromApiToFront),
|
|
33285
34485
|
jointlyUnsatisfied: r.jointly_unsatisfied
|
|
33286
34486
|
}))
|
|
33287
34487
|
};
|
|
@@ -34976,6 +36176,7 @@ function UnifiableQueryRequestFromFrontToApi(model) {
|
|
|
34976
36176
|
}
|
|
34977
36177
|
function FindBySortRequestFromFrontToApi(model) {
|
|
34978
36178
|
return {
|
|
36179
|
+
fields: model.fields ?? void 0,
|
|
34979
36180
|
sort_id: model.sortId ?? void 0,
|
|
34980
36181
|
sort_name: model.sortName ?? void 0,
|
|
34981
36182
|
filter: model.filter ?? void 0,
|
|
@@ -35074,6 +36275,7 @@ function ToolCallInfoFromApiToFront(dto) {
|
|
|
35074
36275
|
function NlQueryRequestFromFrontToApi(model) {
|
|
35075
36276
|
return {
|
|
35076
36277
|
query: model.query,
|
|
36278
|
+
fresh: model.fresh,
|
|
35077
36279
|
mode: model.mode,
|
|
35078
36280
|
tenant_id: model.tenantId,
|
|
35079
36281
|
conversation_history: model.conversationHistory ?? void 0,
|
|
@@ -35663,6 +36865,7 @@ function CycleOutcomeDtoFromApiToFront(dto) {
|
|
|
35663
36865
|
goalsPursued: dto.goals_pursued,
|
|
35664
36866
|
goalsAchieved: dto.goals_achieved,
|
|
35665
36867
|
goalsFailed: dto.goals_failed,
|
|
36868
|
+
goalsDeferred: dto.goals_deferred ?? [],
|
|
35666
36869
|
actionsExecuted: dto.actions_executed,
|
|
35667
36870
|
newBeliefs: dto.new_beliefs,
|
|
35668
36871
|
updatedBeliefs: dto.updated_beliefs,
|
|
@@ -37982,6 +39185,30 @@ function NamespaceListResponseFromApiToFront(dto) {
|
|
|
37982
39185
|
count: dto.count
|
|
37983
39186
|
};
|
|
37984
39187
|
}
|
|
39188
|
+
function UpdateNamespaceAnswerCachePolicyRequestFromFrontToApi(model) {
|
|
39189
|
+
return { enabled: model.enabled, ttl_seconds: model.ttlSeconds };
|
|
39190
|
+
}
|
|
39191
|
+
function NamespaceAnswerCacheSavingsDtoFromApiToFront(dto) {
|
|
39192
|
+
return {
|
|
39193
|
+
countedSince: dto.counted_since,
|
|
39194
|
+
freshModelCalls: dto.fresh_model_calls,
|
|
39195
|
+
reusedModelCalls: dto.reused_model_calls,
|
|
39196
|
+
bypassed: dto.bypassed,
|
|
39197
|
+
disabled: dto.disabled,
|
|
39198
|
+
unavailable: dto.unavailable,
|
|
39199
|
+
unqualified: dto.unqualified,
|
|
39200
|
+
tokenUsageMeasured: dto.token_usage_measured
|
|
39201
|
+
};
|
|
39202
|
+
}
|
|
39203
|
+
function NamespaceAnswerCachePolicyDtoFromApiToFront(dto) {
|
|
39204
|
+
return {
|
|
39205
|
+
enabled: dto.enabled,
|
|
39206
|
+
ttlSeconds: dto.ttl_seconds,
|
|
39207
|
+
revision: dto.revision,
|
|
39208
|
+
updatedBy: dto.updated_by,
|
|
39209
|
+
updatedAt: dto.updated_at
|
|
39210
|
+
};
|
|
39211
|
+
}
|
|
37985
39212
|
|
|
37986
39213
|
// src/resources/namespaces.ts
|
|
37987
39214
|
var NamespacesClient = class {
|
|
@@ -38033,6 +39260,51 @@ var NamespacesClient = class {
|
|
|
38033
39260
|
const response = await this.api.getNamespace(namespaceId, toRequestParams(requestOptions));
|
|
38034
39261
|
return decodeResponse(response, (dto) => NamespaceDtoFromApiToFront(dto.namespace));
|
|
38035
39262
|
}
|
|
39263
|
+
/** Read durable answer-cache settings. OSFKB checks the native namespace grant. */
|
|
39264
|
+
async getAnswerCachePolicy(namespaceId, requestOptions) {
|
|
39265
|
+
const response = await this.api.getNamespaceAnswerCachePolicy(
|
|
39266
|
+
namespaceId,
|
|
39267
|
+
toRequestParams(requestOptions)
|
|
39268
|
+
);
|
|
39269
|
+
return decodeResponse(response, NamespaceAnswerCachePolicyDtoFromApiToFront);
|
|
39270
|
+
}
|
|
39271
|
+
/**
|
|
39272
|
+
* Read the answer-cache outcomes the engine counted for a namespace.
|
|
39273
|
+
*
|
|
39274
|
+
* @param namespaceId - Namespace UUID.
|
|
39275
|
+
* @param requestOptions - Per-call options (timeout, retries, signal, headers).
|
|
39276
|
+
* @returns The counters of this engine process since `countedSince`.
|
|
39277
|
+
* @throws {ForbiddenError} 403 without a native `manage_answer_cache` grant.
|
|
39278
|
+
* @throws {NotFoundError} 404 for a namespace not in this tenant.
|
|
39279
|
+
* @throws {ServiceUnavailableError} 503 when the namespace state or authority is unavailable.
|
|
39280
|
+
*
|
|
39281
|
+
* @remarks
|
|
39282
|
+
* `GET /api/v1/namespaces/{id}/answer-cache-savings`. The counters are
|
|
39283
|
+
* process-local and not durable; token savings are not measured
|
|
39284
|
+
* (`tokenUsageMeasured: false`). Response mapped from snake_case.
|
|
39285
|
+
*
|
|
39286
|
+
* @example
|
|
39287
|
+
* ```typescript
|
|
39288
|
+
* const savings = await client.namespaces.getAnswerCacheSavings(namespaceId);
|
|
39289
|
+
* console.log(savings.reusedModelCalls, 'of', savings.freshModelCalls + savings.reusedModelCalls);
|
|
39290
|
+
* ```
|
|
39291
|
+
*/
|
|
39292
|
+
async getAnswerCacheSavings(namespaceId, requestOptions) {
|
|
39293
|
+
const response = await this.api.getNamespaceAnswerCacheSavings(
|
|
39294
|
+
namespaceId,
|
|
39295
|
+
toRequestParams(requestOptions)
|
|
39296
|
+
);
|
|
39297
|
+
return decodeResponse(response, NamespaceAnswerCacheSavingsDtoFromApiToFront);
|
|
39298
|
+
}
|
|
39299
|
+
/** Save settings in OSFKB; policy validation and cache admission stay in the engine. */
|
|
39300
|
+
async updateAnswerCachePolicy(namespaceId, request, requestOptions) {
|
|
39301
|
+
const response = await this.api.updateNamespaceAnswerCachePolicy(
|
|
39302
|
+
namespaceId,
|
|
39303
|
+
UpdateNamespaceAnswerCachePolicyRequestFromFrontToApi(request),
|
|
39304
|
+
toRequestParams(requestOptions)
|
|
39305
|
+
);
|
|
39306
|
+
return decodeResponse(response, NamespaceAnswerCachePolicyDtoFromApiToFront);
|
|
39307
|
+
}
|
|
38036
39308
|
/**
|
|
38037
39309
|
* Delete a namespace.
|
|
38038
39310
|
*
|
|
@@ -40938,6 +42210,14 @@ function TokenUsageDtoFromApiToFront(dto) {
|
|
|
40938
42210
|
totalTokens: dto.total_tokens
|
|
40939
42211
|
};
|
|
40940
42212
|
}
|
|
42213
|
+
function IngestionWorkCacheDtoFromApiToFront(dto) {
|
|
42214
|
+
return {
|
|
42215
|
+
modelCalls: dto.model_calls,
|
|
42216
|
+
reusedModelCalls: dto.reused_model_calls,
|
|
42217
|
+
unkeyedModelCalls: dto.unkeyed_model_calls,
|
|
42218
|
+
reusedRecordedTokenUsage: TokenUsageDtoFromApiToFront(dto.reused_recorded_token_usage)
|
|
42219
|
+
};
|
|
42220
|
+
}
|
|
40941
42221
|
function AlignmentStatsDtoFromApiToFront(dto) {
|
|
40942
42222
|
return {
|
|
40943
42223
|
avgFuzzyRatio: dto.avg_fuzzy_ratio,
|
|
@@ -41035,6 +42315,7 @@ function IngestionStatsDtoFromApiToFront(dto) {
|
|
|
41035
42315
|
sotaExtractionGate: dto.sota_extraction_gate ? SotaExtractionGateStatsDtoFromApiToFront(dto.sota_extraction_gate) : void 0,
|
|
41036
42316
|
termIds: dto.term_ids,
|
|
41037
42317
|
tokenUsage: dto.token_usage ? TokenUsageDtoFromApiToFront(dto.token_usage) : void 0,
|
|
42318
|
+
workCache: dto.work_cache ? IngestionWorkCacheDtoFromApiToFront(dto.work_cache) : void 0,
|
|
41038
42319
|
fcaDiscovery: dto.fca_discovery ? FcaIngestionReportFromApiToFront(dto.fca_discovery) : void 0
|
|
41039
42320
|
};
|
|
41040
42321
|
}
|
|
@@ -41234,6 +42515,7 @@ function TranslateRdfResponseFromApiToFront(dto) {
|
|
|
41234
42515
|
prefixes: definedRecordOrNullish(dto.prefixes),
|
|
41235
42516
|
repairedIriCount: dto.repaired_iri_count ?? 0,
|
|
41236
42517
|
repairedIris: (dto.repaired_iris ?? []).map(IriRepairFromApiToFront),
|
|
42518
|
+
routedToVocabularyImport: dto.routed_to_vocabulary_import ?? 0,
|
|
41237
42519
|
sortPreviews: (dto.sort_previews ?? []).map(SortPreviewFromApiToFront),
|
|
41238
42520
|
sorts: dto.sorts,
|
|
41239
42521
|
termCount: dto.term_count,
|
|
@@ -41288,6 +42570,7 @@ function IngestRdfResponseFromApiToFront(dto) {
|
|
|
41288
42570
|
return {
|
|
41289
42571
|
repairedIriCount: dto.repaired_iri_count ?? 0,
|
|
41290
42572
|
repairedIris: (dto.repaired_iris ?? []).map(IriRepairFromApiToFront),
|
|
42573
|
+
routedToVocabularyImport: dto.routed_to_vocabulary_import ?? 0,
|
|
41291
42574
|
shapesParsed: dto.shapes_parsed,
|
|
41292
42575
|
sortNames: dto.sort_names,
|
|
41293
42576
|
sortsCreated: dto.sorts_created,
|
|
@@ -41309,6 +42592,7 @@ function RdfImportReceiptFromApiToFront(dto) {
|
|
|
41309
42592
|
return {
|
|
41310
42593
|
repairedIriCount: dto.repaired_iri_count,
|
|
41311
42594
|
repairedIris: dto.repaired_iris.map(IriRepairFromApiToFront),
|
|
42595
|
+
routedToVocabularyImport: dto.routed_to_vocabulary_import,
|
|
41312
42596
|
shapesParsed: dto.shapes_parsed,
|
|
41313
42597
|
sortsCreated: dto.sorts_created,
|
|
41314
42598
|
termsCreated: dto.terms_created
|
|
@@ -41826,6 +43110,7 @@ function RdfUploadFromApiToFront(dto) {
|
|
|
41826
43110
|
prefixBindings: definedRecord(dto.prefix_bindings ?? {}),
|
|
41827
43111
|
quadsCommitted: dto.quads_committed,
|
|
41828
43112
|
batchesCommitted: dto.batches_committed,
|
|
43113
|
+
routedToVocabularyImport: dto.routed_to_vocabulary_import ?? 0,
|
|
41829
43114
|
resourcesCreated: dto.resources_created,
|
|
41830
43115
|
sortsCreated: dto.sorts_created,
|
|
41831
43116
|
error: dto.error,
|
|
@@ -53115,7 +54400,23 @@ var VOCABULARY_REFUSAL_CODES = members({
|
|
|
53115
54400
|
vocabulary_outcome_unconfirmed: true,
|
|
53116
54401
|
no_committed_outcome: true,
|
|
53117
54402
|
governed_sort_write_refused: true,
|
|
53118
|
-
read_budget_exceeded: true
|
|
54403
|
+
read_budget_exceeded: true,
|
|
54404
|
+
cursor_mismatch: true,
|
|
54405
|
+
format_unsupported: true,
|
|
54406
|
+
source_too_large: true,
|
|
54407
|
+
source_file_not_found: true,
|
|
54408
|
+
import_incomplete: true,
|
|
54409
|
+
import_too_large: true,
|
|
54410
|
+
import_already_committed: true,
|
|
54411
|
+
import_baseline_stale: true,
|
|
54412
|
+
reconciliation_undecided: true,
|
|
54413
|
+
invalid_decision: true,
|
|
54414
|
+
migration_plan_stale: true,
|
|
54415
|
+
invalid_disposition: true,
|
|
54416
|
+
sparql_unsupported: true,
|
|
54417
|
+
vocabulary_sparql_unavailable: true,
|
|
54418
|
+
sparql_deadline: true,
|
|
54419
|
+
export_unrepresentable: true
|
|
53119
54420
|
});
|
|
53120
54421
|
var VOCABULARY_FINDING_CODES = members({
|
|
53121
54422
|
declaration_violation: true,
|
|
@@ -53136,7 +54437,24 @@ var VOCABULARY_FINDING_CODES = members({
|
|
|
53136
54437
|
evidence_provenance_unknown: true,
|
|
53137
54438
|
stale_baseline: true,
|
|
53138
54439
|
plugin_context_changed: true,
|
|
53139
|
-
language_unknown: true
|
|
54440
|
+
language_unknown: true,
|
|
54441
|
+
hierarchy_self_link: true,
|
|
54442
|
+
hierarchy_cycle: true,
|
|
54443
|
+
hierarchy_depth_exceeded: true,
|
|
54444
|
+
partitive_interpretation_unresolved: true,
|
|
54445
|
+
relation_outside_scheme: true,
|
|
54446
|
+
related_also_hierarchical: true,
|
|
54447
|
+
top_concept_has_broader: true,
|
|
54448
|
+
missing_top_concept: true,
|
|
54449
|
+
unplaced_concept: true,
|
|
54450
|
+
mapping_conflict: true,
|
|
54451
|
+
mapping_target_unavailable: true,
|
|
54452
|
+
notation_duplicate: true,
|
|
54453
|
+
collection_member_dangling: true,
|
|
54454
|
+
collection_cycle: true,
|
|
54455
|
+
collection_position_duplicate: true,
|
|
54456
|
+
collection_position_missing: true,
|
|
54457
|
+
xl_label_without_label_use: true
|
|
53140
54458
|
});
|
|
53141
54459
|
var VOCABULARY_FINDING_SEVERITIES = members({
|
|
53142
54460
|
blocking: true,
|
|
@@ -53184,7 +54502,11 @@ var VOCABULARY_OPERATIONS = members({
|
|
|
53184
54502
|
reject: true,
|
|
53185
54503
|
withdraw: true,
|
|
53186
54504
|
release: true,
|
|
53187
|
-
activate: true
|
|
54505
|
+
activate: true,
|
|
54506
|
+
create_import: true,
|
|
54507
|
+
commit_import: true,
|
|
54508
|
+
create_migration_plan: true,
|
|
54509
|
+
apply_migration_plan: true
|
|
53188
54510
|
});
|
|
53189
54511
|
|
|
53190
54512
|
// src/utils/vocabulary-refusal.ts
|
|
@@ -53330,7 +54652,9 @@ function readRefusal(body) {
|
|
|
53330
54652
|
findingIds: optionalStrings(wire.finding_ids, "finding_ids"),
|
|
53331
54653
|
conflicts: optionalList(wire.conflicts, "conflicts", readConflict),
|
|
53332
54654
|
recordErrors: optionalList(wire.record_errors, "record_errors", readRecordError),
|
|
53333
|
-
missingRelations: optionalStrings(wire.missing_relations, "missing_relations")
|
|
54655
|
+
missingRelations: optionalStrings(wire.missing_relations, "missing_relations"),
|
|
54656
|
+
undecidedSourceKeys: optionalStrings(wire.undecided_source_keys, "undecided_source_keys"),
|
|
54657
|
+
changedSorts: optionalStrings(wire.changed_sorts, "changed_sorts")
|
|
53334
54658
|
};
|
|
53335
54659
|
if (!isAbsent(wire.current)) out.current = readCurrent(wire.current, "current");
|
|
53336
54660
|
if (!isAbsent(wire.authority)) out.authority = readAuthority(wire.authority, "authority");
|
|
@@ -61674,7 +62998,11 @@ function ImportOwlResponseFromApiToFront(dto) {
|
|
|
61674
62998
|
return {
|
|
61675
62999
|
reifiedSortsCreated: dto.reified_sorts_created,
|
|
61676
63000
|
relationsDiscovered: dto.relations_discovered,
|
|
61677
|
-
sortsCreated: dto.sorts_created
|
|
63001
|
+
sortsCreated: dto.sorts_created,
|
|
63002
|
+
sortsRefused: (dto.sorts_refused ?? []).map((sort) => ({
|
|
63003
|
+
name: sort.name,
|
|
63004
|
+
reason: sort.reason
|
|
63005
|
+
}))
|
|
61678
63006
|
};
|
|
61679
63007
|
}
|
|
61680
63008
|
function ExecuteTranspiledRequestFromFrontToApi(model) {
|
|
@@ -69293,6 +70621,99 @@ function AboutnessInputFromFrontToApi(record) {
|
|
|
69293
70621
|
}
|
|
69294
70622
|
return out;
|
|
69295
70623
|
}
|
|
70624
|
+
function ConceptRelationInputFromFrontToApi(record) {
|
|
70625
|
+
const out = {
|
|
70626
|
+
scheme: VocabularyRecordRefFromFrontToApi(record.scheme),
|
|
70627
|
+
subject: VocabularyRecordRefFromFrontToApi(record.subject),
|
|
70628
|
+
object: VocabularyRecordRefFromFrontToApi(record.object),
|
|
70629
|
+
relation: record.relation,
|
|
70630
|
+
status: record.status
|
|
70631
|
+
};
|
|
70632
|
+
if (record.hierarchyKind !== void 0) out.hierarchy_kind = record.hierarchyKind;
|
|
70633
|
+
if (record.evidence !== void 0) {
|
|
70634
|
+
out.evidence = VocabularyRecordRefFromFrontToApi(record.evidence);
|
|
70635
|
+
}
|
|
70636
|
+
return out;
|
|
70637
|
+
}
|
|
70638
|
+
function TaxonomyPolicyInputFromFrontToApi(record) {
|
|
70639
|
+
const out = {
|
|
70640
|
+
scheme: VocabularyRecordRefFromFrontToApi(record.scheme),
|
|
70641
|
+
acyclic: record.acyclic,
|
|
70642
|
+
require_placement: record.requirePlacement,
|
|
70643
|
+
top_concepts: record.topConcepts
|
|
70644
|
+
};
|
|
70645
|
+
if (record.maxDepth !== void 0) out.max_depth = record.maxDepth;
|
|
70646
|
+
if (record.partitiveTransitive !== void 0) {
|
|
70647
|
+
out.partitive_transitive = record.partitiveTransitive;
|
|
70648
|
+
}
|
|
70649
|
+
return out;
|
|
70650
|
+
}
|
|
70651
|
+
function ExternalConceptInputFromFrontToApi(record) {
|
|
70652
|
+
const out = {
|
|
70653
|
+
authority: record.authority,
|
|
70654
|
+
dataset_version: record.datasetVersion,
|
|
70655
|
+
iri: record.iri,
|
|
70656
|
+
resolution: record.resolution
|
|
70657
|
+
};
|
|
70658
|
+
if (record.recordId !== void 0) out.record_id = record.recordId;
|
|
70659
|
+
if (record.clientRef !== void 0) out.client_ref = record.clientRef;
|
|
70660
|
+
if (record.labelText !== void 0) out.label_text = record.labelText;
|
|
70661
|
+
if (record.labelLanguage !== void 0) out.label_language = record.labelLanguage;
|
|
70662
|
+
if (record.evidence !== void 0) {
|
|
70663
|
+
out.evidence = VocabularyRecordRefFromFrontToApi(record.evidence);
|
|
70664
|
+
}
|
|
70665
|
+
return out;
|
|
70666
|
+
}
|
|
70667
|
+
function MappingTargetFromFrontToApi(target) {
|
|
70668
|
+
return "concept" in target ? { concept: VocabularyRecordRefFromFrontToApi(target.concept) } : { external: VocabularyRecordRefFromFrontToApi(target.external) };
|
|
70669
|
+
}
|
|
70670
|
+
function ConceptMappingInputFromFrontToApi(record) {
|
|
70671
|
+
const out = {
|
|
70672
|
+
subject: VocabularyRecordRefFromFrontToApi(record.subject),
|
|
70673
|
+
target: MappingTargetFromFrontToApi(record.target),
|
|
70674
|
+
mapping_kind: record.mappingKind,
|
|
70675
|
+
status: record.status
|
|
70676
|
+
};
|
|
70677
|
+
if (record.evidence !== void 0) {
|
|
70678
|
+
out.evidence = VocabularyRecordRefFromFrontToApi(record.evidence);
|
|
70679
|
+
}
|
|
70680
|
+
return out;
|
|
70681
|
+
}
|
|
70682
|
+
function DocumentationInputFromFrontToApi(record) {
|
|
70683
|
+
const out = {
|
|
70684
|
+
subject: VocabularyRecordRefFromFrontToApi(record.subject),
|
|
70685
|
+
note_kind: record.noteKind
|
|
70686
|
+
};
|
|
70687
|
+
if (record.recordId !== void 0) out.record_id = record.recordId;
|
|
70688
|
+
if (record.clientRef !== void 0) out.client_ref = record.clientRef;
|
|
70689
|
+
if (record.text !== void 0) out.text = record.text;
|
|
70690
|
+
if (record.resourceLocator !== void 0) out.resource_locator = record.resourceLocator;
|
|
70691
|
+
if (record.language !== void 0) out.language = record.language;
|
|
70692
|
+
if (record.evidence !== void 0) {
|
|
70693
|
+
out.evidence = VocabularyRecordRefFromFrontToApi(record.evidence);
|
|
70694
|
+
}
|
|
70695
|
+
return out;
|
|
70696
|
+
}
|
|
70697
|
+
function CollectionInputFromFrontToApi(record) {
|
|
70698
|
+
const out = {
|
|
70699
|
+
scheme: VocabularyRecordRefFromFrontToApi(record.scheme),
|
|
70700
|
+
ordered: record.ordered,
|
|
70701
|
+
status: record.status
|
|
70702
|
+
};
|
|
70703
|
+
if (record.recordId !== void 0) out.record_id = record.recordId;
|
|
70704
|
+
if (record.clientRef !== void 0) out.client_ref = record.clientRef;
|
|
70705
|
+
return out;
|
|
70706
|
+
}
|
|
70707
|
+
function CollectionMemberInputFromFrontToApi(record) {
|
|
70708
|
+
const out = {
|
|
70709
|
+
collection: VocabularyRecordRefFromFrontToApi(record.collection),
|
|
70710
|
+
member: VocabularyRecordRefFromFrontToApi(record.member)
|
|
70711
|
+
};
|
|
70712
|
+
if (record.recordId !== void 0) out.record_id = record.recordId;
|
|
70713
|
+
if (record.clientRef !== void 0) out.client_ref = record.clientRef;
|
|
70714
|
+
if (record.position !== void 0) out.position = record.position;
|
|
70715
|
+
return out;
|
|
70716
|
+
}
|
|
69296
70717
|
function VocabularyRecordInputFromFrontToApi(record) {
|
|
69297
70718
|
switch (record.kind) {
|
|
69298
70719
|
case "scheme":
|
|
@@ -69336,6 +70757,55 @@ function VocabularyRecordInputFromFrontToApi(record) {
|
|
|
69336
70757
|
return { kind: "identity_decision", ...IdentityDecisionInputFromFrontToApi(record) };
|
|
69337
70758
|
case "aboutness":
|
|
69338
70759
|
return { kind: "aboutness", ...AboutnessInputFromFrontToApi(record) };
|
|
70760
|
+
case "concept_relation":
|
|
70761
|
+
return { kind: "concept_relation", ...ConceptRelationInputFromFrontToApi(record) };
|
|
70762
|
+
case "taxonomy_policy":
|
|
70763
|
+
return { kind: "taxonomy_policy", ...TaxonomyPolicyInputFromFrontToApi(record) };
|
|
70764
|
+
case "external_concept":
|
|
70765
|
+
return { kind: "external_concept", ...ExternalConceptInputFromFrontToApi(record) };
|
|
70766
|
+
case "concept_mapping":
|
|
70767
|
+
return { kind: "concept_mapping", ...ConceptMappingInputFromFrontToApi(record) };
|
|
70768
|
+
case "documentation":
|
|
70769
|
+
return { kind: "documentation", ...DocumentationInputFromFrontToApi(record) };
|
|
70770
|
+
case "notation": {
|
|
70771
|
+
const out = {
|
|
70772
|
+
kind: "notation",
|
|
70773
|
+
concept: VocabularyRecordRefFromFrontToApi(record.concept),
|
|
70774
|
+
scheme: VocabularyRecordRefFromFrontToApi(record.scheme),
|
|
70775
|
+
value: record.value
|
|
70776
|
+
};
|
|
70777
|
+
if (record.datatype !== void 0) out.datatype = record.datatype;
|
|
70778
|
+
return out;
|
|
70779
|
+
}
|
|
70780
|
+
case "xl_label":
|
|
70781
|
+
return {
|
|
70782
|
+
kind: "xl_label",
|
|
70783
|
+
concept: VocabularyRecordRefFromFrontToApi(record.concept),
|
|
70784
|
+
scheme: VocabularyRecordRefFromFrontToApi(record.scheme),
|
|
70785
|
+
resource_key: record.resourceKey,
|
|
70786
|
+
text: record.text,
|
|
70787
|
+
language: record.language,
|
|
70788
|
+
role: record.role
|
|
70789
|
+
};
|
|
70790
|
+
case "label_relation":
|
|
70791
|
+
return {
|
|
70792
|
+
kind: "label_relation",
|
|
70793
|
+
subject: VocabularyRecordRefFromFrontToApi(record.subject),
|
|
70794
|
+
object: VocabularyRecordRefFromFrontToApi(record.object),
|
|
70795
|
+
relation: record.relation
|
|
70796
|
+
};
|
|
70797
|
+
case "collection":
|
|
70798
|
+
return { kind: "collection", ...CollectionInputFromFrontToApi(record) };
|
|
70799
|
+
case "collection_label":
|
|
70800
|
+
return {
|
|
70801
|
+
kind: "collection_label",
|
|
70802
|
+
collection: VocabularyRecordRefFromFrontToApi(record.collection),
|
|
70803
|
+
text: record.text,
|
|
70804
|
+
language: record.language,
|
|
70805
|
+
role: record.role
|
|
70806
|
+
};
|
|
70807
|
+
case "collection_member":
|
|
70808
|
+
return { kind: "collection_member", ...CollectionMemberInputFromFrontToApi(record) };
|
|
69339
70809
|
}
|
|
69340
70810
|
}
|
|
69341
70811
|
function VocabularyRecordOperationFromFrontToApi(operation) {
|
|
@@ -69443,6 +70913,79 @@ function ActivateVocabularyReleaseRequestFromFrontToApi(request) {
|
|
|
69443
70913
|
if (request.rationale !== void 0) out.rationale = request.rationale;
|
|
69444
70914
|
return out;
|
|
69445
70915
|
}
|
|
70916
|
+
function VocabularyImportTargetSchemeFromFrontToApi(target) {
|
|
70917
|
+
return "existing" in target ? { existing: { scheme_id: target.existing.schemeId } } : { new: { scheme: SchemeInputFromFrontToApi(target.new.scheme) } };
|
|
70918
|
+
}
|
|
70919
|
+
function ExternalAuthorityFromFrontToApi(authority) {
|
|
70920
|
+
return {
|
|
70921
|
+
iri_prefix: authority.iriPrefix,
|
|
70922
|
+
authority: authority.authority,
|
|
70923
|
+
dataset_version: authority.datasetVersion
|
|
70924
|
+
};
|
|
70925
|
+
}
|
|
70926
|
+
function CreateVocabularyImportRequestFromFrontToApi(request) {
|
|
70927
|
+
const out = {
|
|
70928
|
+
source_file_id: request.sourceFileId,
|
|
70929
|
+
format: request.format,
|
|
70930
|
+
dataset: request.dataset,
|
|
70931
|
+
target_scheme: VocabularyImportTargetSchemeFromFrontToApi(request.targetScheme)
|
|
70932
|
+
};
|
|
70933
|
+
if (request.schemeMap !== void 0) out.scheme_map = request.schemeMap;
|
|
70934
|
+
if (request.defaultLanguage !== void 0) out.default_language = request.defaultLanguage;
|
|
70935
|
+
if (request.externalAuthorities !== void 0) {
|
|
70936
|
+
out.external_authorities = request.externalAuthorities.map(ExternalAuthorityFromFrontToApi);
|
|
70937
|
+
}
|
|
70938
|
+
if (request.attribution !== void 0) out.attribution = request.attribution;
|
|
70939
|
+
if (request.license !== void 0) out.license = request.license;
|
|
70940
|
+
return out;
|
|
70941
|
+
}
|
|
70942
|
+
function ResourceDecisionFromFrontToApi(decision) {
|
|
70943
|
+
const out = {
|
|
70944
|
+
source_key: decision.sourceKey,
|
|
70945
|
+
decision: decision.decision
|
|
70946
|
+
};
|
|
70947
|
+
if (decision.conceptId !== void 0) out.concept_id = decision.conceptId;
|
|
70948
|
+
if (decision.rationale !== void 0) out.rationale = decision.rationale;
|
|
70949
|
+
return out;
|
|
70950
|
+
}
|
|
70951
|
+
function CommitVocabularyImportRequestFromFrontToApi(request) {
|
|
70952
|
+
const out = { change_reason: request.changeReason };
|
|
70953
|
+
if (request.title !== void 0) out.title = request.title;
|
|
70954
|
+
if (request.candidateId !== void 0) out.candidate_id = request.candidateId;
|
|
70955
|
+
if (request.decisions !== void 0) {
|
|
70956
|
+
out.decisions = request.decisions.map(ResourceDecisionFromFrontToApi);
|
|
70957
|
+
}
|
|
70958
|
+
return out;
|
|
70959
|
+
}
|
|
70960
|
+
function PlannedDispositionFromFrontToApi(disposition) {
|
|
70961
|
+
return {
|
|
70962
|
+
sort_id: disposition.sortId,
|
|
70963
|
+
disposition: disposition.disposition,
|
|
70964
|
+
rationale: disposition.rationale
|
|
70965
|
+
};
|
|
70966
|
+
}
|
|
70967
|
+
function CreateVocabularyMigrationPlanRequestFromFrontToApi(request) {
|
|
70968
|
+
return { dispositions: request.dispositions.map(PlannedDispositionFromFrontToApi) };
|
|
70969
|
+
}
|
|
70970
|
+
function ApplyVocabularyMigrationPlanRequestFromFrontToApi(request) {
|
|
70971
|
+
const out = {
|
|
70972
|
+
title: request.title,
|
|
70973
|
+
change_reason: request.changeReason,
|
|
70974
|
+
scheme: VocabularyImportTargetSchemeFromFrontToApi(request.scheme)
|
|
70975
|
+
};
|
|
70976
|
+
if (request.defaultLanguage !== void 0) out.default_language = request.defaultLanguage;
|
|
70977
|
+
return out;
|
|
70978
|
+
}
|
|
70979
|
+
function VocabularySparqlRequestFromFrontToApi(request) {
|
|
70980
|
+
const out = { query: request.query, scheme_id: request.schemeId };
|
|
70981
|
+
if (request.view !== void 0) {
|
|
70982
|
+
out.view = request.view.view;
|
|
70983
|
+
if (request.view.view === "release") out.release_id = request.view.releaseId;
|
|
70984
|
+
if (request.view.view === "candidate") out.revision_id = request.view.revisionId;
|
|
70985
|
+
}
|
|
70986
|
+
if (request.maxResults !== void 0) out.max_results = request.maxResults;
|
|
70987
|
+
return out;
|
|
70988
|
+
}
|
|
69446
70989
|
function VocabularySchemeRecordFromApiToFront(dto) {
|
|
69447
70990
|
const out = {
|
|
69448
70991
|
recordId: dto.record_id,
|
|
@@ -69598,6 +71141,186 @@ function VocabularyAboutnessRecordFromApiToFront(dto) {
|
|
|
69598
71141
|
if (present(dto.evidence)) out.evidence = dto.evidence;
|
|
69599
71142
|
return out;
|
|
69600
71143
|
}
|
|
71144
|
+
function VocabularyConceptRelationRecordFromApiToFront(dto) {
|
|
71145
|
+
const out = {
|
|
71146
|
+
recordId: dto.record_id,
|
|
71147
|
+
revision: dto.revision,
|
|
71148
|
+
changeReason: dto.change_reason,
|
|
71149
|
+
scheme: dto.scheme,
|
|
71150
|
+
subject: dto.subject,
|
|
71151
|
+
object: dto.object,
|
|
71152
|
+
relation: dto.relation,
|
|
71153
|
+
status: dto.status
|
|
71154
|
+
};
|
|
71155
|
+
if (present(dto.hierarchy_kind)) out.hierarchyKind = dto.hierarchy_kind;
|
|
71156
|
+
if (present(dto.evidence)) out.evidence = dto.evidence;
|
|
71157
|
+
return out;
|
|
71158
|
+
}
|
|
71159
|
+
function VocabularyTaxonomyPolicyRecordFromApiToFront(dto) {
|
|
71160
|
+
const out = {
|
|
71161
|
+
recordId: dto.record_id,
|
|
71162
|
+
revision: dto.revision,
|
|
71163
|
+
changeReason: dto.change_reason,
|
|
71164
|
+
scheme: dto.scheme,
|
|
71165
|
+
policy: dto.policy,
|
|
71166
|
+
acyclic: dto.acyclic,
|
|
71167
|
+
requirePlacement: dto.require_placement,
|
|
71168
|
+
topConcepts: dto.top_concepts
|
|
71169
|
+
};
|
|
71170
|
+
if (present(dto.max_depth)) out.maxDepth = dto.max_depth;
|
|
71171
|
+
if (present(dto.partitive_transitive)) out.partitiveTransitive = dto.partitive_transitive;
|
|
71172
|
+
return out;
|
|
71173
|
+
}
|
|
71174
|
+
function VocabularyExternalConceptRecordFromApiToFront(dto) {
|
|
71175
|
+
const out = {
|
|
71176
|
+
recordId: dto.record_id,
|
|
71177
|
+
revision: dto.revision,
|
|
71178
|
+
changeReason: dto.change_reason,
|
|
71179
|
+
authority: dto.authority,
|
|
71180
|
+
datasetVersion: dto.dataset_version,
|
|
71181
|
+
iri: dto.iri,
|
|
71182
|
+
resolution: dto.resolution
|
|
71183
|
+
};
|
|
71184
|
+
if (present(dto.label_text)) out.labelText = dto.label_text;
|
|
71185
|
+
if (present(dto.label_language)) out.labelLanguage = dto.label_language;
|
|
71186
|
+
if (present(dto.evidence)) out.evidence = dto.evidence;
|
|
71187
|
+
return out;
|
|
71188
|
+
}
|
|
71189
|
+
function VocabularyConceptMappingRecordFromApiToFront(dto) {
|
|
71190
|
+
const out = {
|
|
71191
|
+
recordId: dto.record_id,
|
|
71192
|
+
revision: dto.revision,
|
|
71193
|
+
changeReason: dto.change_reason,
|
|
71194
|
+
subject: dto.subject,
|
|
71195
|
+
mappingKind: dto.mapping_kind,
|
|
71196
|
+
status: dto.status
|
|
71197
|
+
};
|
|
71198
|
+
if (present(dto.target_concept)) out.targetConcept = dto.target_concept;
|
|
71199
|
+
if (present(dto.target_external)) out.targetExternal = dto.target_external;
|
|
71200
|
+
if (present(dto.evidence)) out.evidence = dto.evidence;
|
|
71201
|
+
return out;
|
|
71202
|
+
}
|
|
71203
|
+
function VocabularyDocumentationRecordFromApiToFront(dto) {
|
|
71204
|
+
const out = {
|
|
71205
|
+
recordId: dto.record_id,
|
|
71206
|
+
revision: dto.revision,
|
|
71207
|
+
changeReason: dto.change_reason,
|
|
71208
|
+
noteKind: dto.note_kind
|
|
71209
|
+
};
|
|
71210
|
+
if (present(dto.concept)) out.concept = dto.concept;
|
|
71211
|
+
if (present(dto.scheme)) out.scheme = dto.scheme;
|
|
71212
|
+
if (present(dto.collection)) out.collection = dto.collection;
|
|
71213
|
+
if (present(dto.text)) out.text = dto.text;
|
|
71214
|
+
if (present(dto.resource_locator)) out.resourceLocator = dto.resource_locator;
|
|
71215
|
+
if (present(dto.language)) out.language = dto.language;
|
|
71216
|
+
if (present(dto.language_as_submitted)) out.languageAsSubmitted = dto.language_as_submitted;
|
|
71217
|
+
if (present(dto.evidence)) out.evidence = dto.evidence;
|
|
71218
|
+
return out;
|
|
71219
|
+
}
|
|
71220
|
+
function VocabularyNotationRecordFromApiToFront(dto) {
|
|
71221
|
+
const out = {
|
|
71222
|
+
recordId: dto.record_id,
|
|
71223
|
+
concept: dto.concept,
|
|
71224
|
+
scheme: dto.scheme,
|
|
71225
|
+
value: dto.value
|
|
71226
|
+
};
|
|
71227
|
+
if (present(dto.datatype)) out.datatype = dto.datatype;
|
|
71228
|
+
return out;
|
|
71229
|
+
}
|
|
71230
|
+
function VocabularyXlLabelRecordFromApiToFront(dto) {
|
|
71231
|
+
return {
|
|
71232
|
+
recordId: dto.record_id,
|
|
71233
|
+
revision: dto.revision,
|
|
71234
|
+
changeReason: dto.change_reason,
|
|
71235
|
+
concept: dto.concept,
|
|
71236
|
+
scheme: dto.scheme,
|
|
71237
|
+
resourceKey: dto.resource_key,
|
|
71238
|
+
label: dto.label,
|
|
71239
|
+
role: dto.role
|
|
71240
|
+
};
|
|
71241
|
+
}
|
|
71242
|
+
function VocabularyLabelRelationRecordFromApiToFront(dto) {
|
|
71243
|
+
return {
|
|
71244
|
+
recordId: dto.record_id,
|
|
71245
|
+
subject: dto.subject,
|
|
71246
|
+
object: dto.object,
|
|
71247
|
+
relation: dto.relation
|
|
71248
|
+
};
|
|
71249
|
+
}
|
|
71250
|
+
function VocabularyCollectionRecordFromApiToFront(dto) {
|
|
71251
|
+
return {
|
|
71252
|
+
recordId: dto.record_id,
|
|
71253
|
+
revision: dto.revision,
|
|
71254
|
+
changeReason: dto.change_reason,
|
|
71255
|
+
scheme: dto.scheme,
|
|
71256
|
+
ordered: dto.ordered,
|
|
71257
|
+
status: dto.status
|
|
71258
|
+
};
|
|
71259
|
+
}
|
|
71260
|
+
function VocabularyCollectionLabelRecordFromApiToFront(dto) {
|
|
71261
|
+
return {
|
|
71262
|
+
recordId: dto.record_id,
|
|
71263
|
+
collection: dto.collection,
|
|
71264
|
+
label: dto.label,
|
|
71265
|
+
role: dto.role
|
|
71266
|
+
};
|
|
71267
|
+
}
|
|
71268
|
+
function VocabularyCollectionMemberRecordFromApiToFront(dto) {
|
|
71269
|
+
const out = {
|
|
71270
|
+
recordId: dto.record_id,
|
|
71271
|
+
revision: dto.revision,
|
|
71272
|
+
changeReason: dto.change_reason,
|
|
71273
|
+
collection: dto.collection
|
|
71274
|
+
};
|
|
71275
|
+
if (present(dto.member_concept)) out.memberConcept = dto.member_concept;
|
|
71276
|
+
if (present(dto.member_collection)) out.memberCollection = dto.member_collection;
|
|
71277
|
+
if (present(dto.position)) out.position = dto.position;
|
|
71278
|
+
return out;
|
|
71279
|
+
}
|
|
71280
|
+
function VocabularySourceArtifactRecordFromApiToFront(dto) {
|
|
71281
|
+
const out = {
|
|
71282
|
+
recordId: dto.record_id,
|
|
71283
|
+
sha256: dto.sha256,
|
|
71284
|
+
byteSize: dto.byte_size,
|
|
71285
|
+
format: dto.format,
|
|
71286
|
+
dataset: dto.dataset,
|
|
71287
|
+
retainedLocator: dto.retained_locator
|
|
71288
|
+
};
|
|
71289
|
+
if (present(dto.file_name)) out.fileName = dto.file_name;
|
|
71290
|
+
if (present(dto.media_type)) out.mediaType = dto.media_type;
|
|
71291
|
+
if (present(dto.attribution)) out.attribution = dto.attribution;
|
|
71292
|
+
if (present(dto.license)) out.license = dto.license;
|
|
71293
|
+
if (present(dto.retrieval_context)) out.retrievalContext = dto.retrieval_context;
|
|
71294
|
+
return out;
|
|
71295
|
+
}
|
|
71296
|
+
function VocabularySourceAssociationRecordFromApiToFront(dto) {
|
|
71297
|
+
const out = {
|
|
71298
|
+
recordId: dto.record_id,
|
|
71299
|
+
revision: dto.revision,
|
|
71300
|
+
changeReason: dto.change_reason,
|
|
71301
|
+
artifact: dto.artifact,
|
|
71302
|
+
sourceKey: dto.source_key
|
|
71303
|
+
};
|
|
71304
|
+
if (present(dto.concept)) out.concept = dto.concept;
|
|
71305
|
+
if (present(dto.collection)) out.collection = dto.collection;
|
|
71306
|
+
if (present(dto.external_concept)) out.externalConcept = dto.external_concept;
|
|
71307
|
+
return out;
|
|
71308
|
+
}
|
|
71309
|
+
function VocabularyMigrationDecisionRecordFromApiToFront(dto) {
|
|
71310
|
+
const out = {
|
|
71311
|
+
recordId: dto.record_id,
|
|
71312
|
+
revision: dto.revision,
|
|
71313
|
+
changeReason: dto.change_reason,
|
|
71314
|
+
plan: dto.plan,
|
|
71315
|
+
legacySort: dto.legacy_sort,
|
|
71316
|
+
legacySortName: dto.legacy_sort_name,
|
|
71317
|
+
fingerprint: dto.fingerprint,
|
|
71318
|
+
disposition: dto.disposition,
|
|
71319
|
+
rationale: dto.rationale
|
|
71320
|
+
};
|
|
71321
|
+
if (present(dto.concept)) out.concept = dto.concept;
|
|
71322
|
+
return out;
|
|
71323
|
+
}
|
|
69601
71324
|
function VocabularyRecordViewFromApiToFront(dto) {
|
|
69602
71325
|
switch (dto.kind) {
|
|
69603
71326
|
case "scheme":
|
|
@@ -69632,6 +71355,40 @@ function VocabularyRecordViewFromApiToFront(dto) {
|
|
|
69632
71355
|
};
|
|
69633
71356
|
case "aboutness":
|
|
69634
71357
|
return { kind: "aboutness", ...VocabularyAboutnessRecordFromApiToFront(dto) };
|
|
71358
|
+
case "concept_relation":
|
|
71359
|
+
return { kind: "concept_relation", ...VocabularyConceptRelationRecordFromApiToFront(dto) };
|
|
71360
|
+
case "taxonomy_policy":
|
|
71361
|
+
return { kind: "taxonomy_policy", ...VocabularyTaxonomyPolicyRecordFromApiToFront(dto) };
|
|
71362
|
+
case "external_concept":
|
|
71363
|
+
return { kind: "external_concept", ...VocabularyExternalConceptRecordFromApiToFront(dto) };
|
|
71364
|
+
case "concept_mapping":
|
|
71365
|
+
return { kind: "concept_mapping", ...VocabularyConceptMappingRecordFromApiToFront(dto) };
|
|
71366
|
+
case "documentation":
|
|
71367
|
+
return { kind: "documentation", ...VocabularyDocumentationRecordFromApiToFront(dto) };
|
|
71368
|
+
case "notation":
|
|
71369
|
+
return { kind: "notation", ...VocabularyNotationRecordFromApiToFront(dto) };
|
|
71370
|
+
case "xl_label":
|
|
71371
|
+
return { kind: "xl_label", ...VocabularyXlLabelRecordFromApiToFront(dto) };
|
|
71372
|
+
case "label_relation":
|
|
71373
|
+
return { kind: "label_relation", ...VocabularyLabelRelationRecordFromApiToFront(dto) };
|
|
71374
|
+
case "collection":
|
|
71375
|
+
return { kind: "collection", ...VocabularyCollectionRecordFromApiToFront(dto) };
|
|
71376
|
+
case "collection_label":
|
|
71377
|
+
return { kind: "collection_label", ...VocabularyCollectionLabelRecordFromApiToFront(dto) };
|
|
71378
|
+
case "collection_member":
|
|
71379
|
+
return { kind: "collection_member", ...VocabularyCollectionMemberRecordFromApiToFront(dto) };
|
|
71380
|
+
case "source_artifact":
|
|
71381
|
+
return { kind: "source_artifact", ...VocabularySourceArtifactRecordFromApiToFront(dto) };
|
|
71382
|
+
case "source_association":
|
|
71383
|
+
return {
|
|
71384
|
+
kind: "source_association",
|
|
71385
|
+
...VocabularySourceAssociationRecordFromApiToFront(dto)
|
|
71386
|
+
};
|
|
71387
|
+
case "migration_decision":
|
|
71388
|
+
return {
|
|
71389
|
+
kind: "migration_decision",
|
|
71390
|
+
...VocabularyMigrationDecisionRecordFromApiToFront(dto)
|
|
71391
|
+
};
|
|
69635
71392
|
}
|
|
69636
71393
|
}
|
|
69637
71394
|
function FindingContextFromApiToFront(dto) {
|
|
@@ -69763,7 +71520,8 @@ function SchemeViewFromApiToFront(dto) {
|
|
|
69763
71520
|
revision: dto.revision,
|
|
69764
71521
|
displayName: dto.display_name,
|
|
69765
71522
|
purpose: dto.purpose,
|
|
69766
|
-
languages: dto.languages.map(SchemeLanguageViewFromApiToFront)
|
|
71523
|
+
languages: dto.languages.map(SchemeLanguageViewFromApiToFront),
|
|
71524
|
+
documentation: dto.documentation.map(VocabularyDocumentationRecordFromApiToFront)
|
|
69767
71525
|
};
|
|
69768
71526
|
if (present(dto.scope_note)) out.scopeNote = dto.scope_note;
|
|
69769
71527
|
if (present(dto.exclusions)) out.exclusions = dto.exclusions;
|
|
@@ -69848,6 +71606,38 @@ function DefinitionGuidanceFromApiToFront(dto) {
|
|
|
69848
71606
|
parentEdgeCreated: dto.parent_edge_created
|
|
69849
71607
|
};
|
|
69850
71608
|
}
|
|
71609
|
+
function LabelRelationViewFromApiToFront(dto) {
|
|
71610
|
+
const out = {
|
|
71611
|
+
...VocabularyLabelRelationRecordFromApiToFront(dto),
|
|
71612
|
+
otherXlLabelId: dto.other_xl_label_id
|
|
71613
|
+
};
|
|
71614
|
+
if (present(dto.other_resource_key)) out.otherResourceKey = dto.other_resource_key;
|
|
71615
|
+
if (present(dto.other_text)) out.otherText = dto.other_text;
|
|
71616
|
+
if (present(dto.other_language)) out.otherLanguage = dto.other_language;
|
|
71617
|
+
return out;
|
|
71618
|
+
}
|
|
71619
|
+
function XlLabelViewFromApiToFront(dto) {
|
|
71620
|
+
const out = {
|
|
71621
|
+
...VocabularyXlLabelRecordFromApiToFront(dto),
|
|
71622
|
+
outgoingRelations: dto.outgoing_relations.map(LabelRelationViewFromApiToFront),
|
|
71623
|
+
incomingRelations: dto.incoming_relations.map(LabelRelationViewFromApiToFront)
|
|
71624
|
+
};
|
|
71625
|
+
if (present(dto.text)) out.text = dto.text;
|
|
71626
|
+
if (present(dto.language)) out.language = dto.language;
|
|
71627
|
+
return out;
|
|
71628
|
+
}
|
|
71629
|
+
function ConceptMappingViewFromApiToFront(dto) {
|
|
71630
|
+
const out = VocabularyConceptMappingRecordFromApiToFront(dto);
|
|
71631
|
+
if (present(dto.target_external_concept)) {
|
|
71632
|
+
out.targetExternalConcept = VocabularyExternalConceptRecordFromApiToFront(
|
|
71633
|
+
dto.target_external_concept
|
|
71634
|
+
);
|
|
71635
|
+
}
|
|
71636
|
+
if (present(dto.target_display_label)) {
|
|
71637
|
+
out.targetDisplayLabel = VocabularyDisplayLabelFromApiToFront(dto.target_display_label);
|
|
71638
|
+
}
|
|
71639
|
+
return out;
|
|
71640
|
+
}
|
|
69851
71641
|
function ConceptViewFromApiToFront(dto) {
|
|
69852
71642
|
const out = {
|
|
69853
71643
|
concept: VocabularyConceptRecordFromApiToFront(dto.concept),
|
|
@@ -69860,7 +71650,16 @@ function ConceptViewFromApiToFront(dto) {
|
|
|
69860
71650
|
authorityReferences: dto.authority_references.map(
|
|
69861
71651
|
VocabularyAuthorityReferenceRecordFromApiToFront
|
|
69862
71652
|
),
|
|
69863
|
-
aboutness: dto.aboutness.map(VocabularyAboutnessRecordFromApiToFront)
|
|
71653
|
+
aboutness: dto.aboutness.map(VocabularyAboutnessRecordFromApiToFront),
|
|
71654
|
+
relations: dto.relations.map(VocabularyConceptRelationRecordFromApiToFront),
|
|
71655
|
+
mappings: dto.mappings.map(ConceptMappingViewFromApiToFront),
|
|
71656
|
+
documentation: dto.documentation.map(VocabularyDocumentationRecordFromApiToFront),
|
|
71657
|
+
notations: dto.notations.map(VocabularyNotationRecordFromApiToFront),
|
|
71658
|
+
xlLabels: dto.xl_labels.map(XlLabelViewFromApiToFront),
|
|
71659
|
+
collections: dto.collections,
|
|
71660
|
+
sourceAssociations: dto.source_associations.map(
|
|
71661
|
+
VocabularySourceAssociationRecordFromApiToFront
|
|
71662
|
+
)
|
|
69864
71663
|
};
|
|
69865
71664
|
if (present(dto.display_label)) {
|
|
69866
71665
|
out.displayLabel = VocabularyDisplayLabelFromApiToFront(dto.display_label);
|
|
@@ -70168,6 +71967,12 @@ function isReleaseBody(value) {
|
|
|
70168
71967
|
function isActivationBody(value) {
|
|
70169
71968
|
return componentFault(value, "ActivationResponse", "body") === void 0;
|
|
70170
71969
|
}
|
|
71970
|
+
function isImportBody(value) {
|
|
71971
|
+
return componentFault(value, "VocabularyImportResponse", "body") === void 0;
|
|
71972
|
+
}
|
|
71973
|
+
function isMigrationPlanBody(value) {
|
|
71974
|
+
return componentFault(value, "MigrationPlanResponse", "body") === void 0;
|
|
71975
|
+
}
|
|
70171
71976
|
var COMMITTED_COMPONENT = {
|
|
70172
71977
|
create_candidate: "CandidateRevisionResponse",
|
|
70173
71978
|
save_revision: "CandidateRevisionResponse",
|
|
@@ -70179,13 +71984,19 @@ var COMMITTED_COMPONENT = {
|
|
|
70179
71984
|
reject: "DecisionResponse",
|
|
70180
71985
|
withdraw: "DecisionResponse",
|
|
70181
71986
|
release: "ReleaseResponse",
|
|
70182
|
-
activate: "ActivationResponse"
|
|
71987
|
+
activate: "ActivationResponse",
|
|
71988
|
+
create_import: "VocabularyImportResponse",
|
|
71989
|
+
commit_import: "CandidateRevisionResponse",
|
|
71990
|
+
create_migration_plan: "MigrationPlanResponse",
|
|
71991
|
+
apply_migration_plan: "CandidateRevisionResponse"
|
|
70183
71992
|
};
|
|
70184
71993
|
function CommittedResultFromApiToFront(operation, body) {
|
|
70185
71994
|
switch (operation) {
|
|
70186
71995
|
case "create_candidate":
|
|
70187
71996
|
case "save_revision":
|
|
70188
71997
|
case "rebase":
|
|
71998
|
+
case "commit_import":
|
|
71999
|
+
case "apply_migration_plan":
|
|
70189
72000
|
if (isCandidateRevisionBody(body)) {
|
|
70190
72001
|
return { operation, body: VocabularyCandidateRevisionFromApiToFront(body) };
|
|
70191
72002
|
}
|
|
@@ -70214,6 +72025,16 @@ function CommittedResultFromApiToFront(operation, body) {
|
|
|
70214
72025
|
return { operation, body: VocabularyActivationResultFromApiToFront(body) };
|
|
70215
72026
|
}
|
|
70216
72027
|
break;
|
|
72028
|
+
case "create_import":
|
|
72029
|
+
if (isImportBody(body)) {
|
|
72030
|
+
return { operation, body: VocabularyImportFromApiToFront(body) };
|
|
72031
|
+
}
|
|
72032
|
+
break;
|
|
72033
|
+
case "create_migration_plan":
|
|
72034
|
+
if (isMigrationPlanBody(body)) {
|
|
72035
|
+
return { operation, body: VocabularyMigrationPlanFromApiToFront(body) };
|
|
72036
|
+
}
|
|
72037
|
+
break;
|
|
70217
72038
|
}
|
|
70218
72039
|
throw new TypeError(
|
|
70219
72040
|
componentFault(body, COMMITTED_COMPONENT[operation], "body") ?? `body is not a ${COMMITTED_COMPONENT[operation]}`
|
|
@@ -70296,6 +72117,568 @@ function VocabularyMigrationPreviewFromApiToFront(dto) {
|
|
|
70296
72117
|
if (present(dto.next_cursor)) out.nextCursor = dto.next_cursor;
|
|
70297
72118
|
return out;
|
|
70298
72119
|
}
|
|
72120
|
+
function HierarchyNodeFromApiToFront(dto) {
|
|
72121
|
+
const out = {
|
|
72122
|
+
conceptId: dto.concept_id,
|
|
72123
|
+
depth: dto.depth,
|
|
72124
|
+
via: dto.via
|
|
72125
|
+
};
|
|
72126
|
+
if (present(dto.display_label)) {
|
|
72127
|
+
out.displayLabel = VocabularyDisplayLabelFromApiToFront(dto.display_label);
|
|
72128
|
+
}
|
|
72129
|
+
return out;
|
|
72130
|
+
}
|
|
72131
|
+
function HierarchyEdgeFromApiToFront(dto) {
|
|
72132
|
+
const out = {
|
|
72133
|
+
relationId: dto.relation_id,
|
|
72134
|
+
subject: dto.subject,
|
|
72135
|
+
object: dto.object,
|
|
72136
|
+
status: dto.status
|
|
72137
|
+
};
|
|
72138
|
+
if (present(dto.hierarchy_kind)) out.hierarchyKind = dto.hierarchy_kind;
|
|
72139
|
+
return out;
|
|
72140
|
+
}
|
|
72141
|
+
function VocabularyHierarchyFromApiToFront(dto) {
|
|
72142
|
+
const out = {
|
|
72143
|
+
view: ViewRefFromApiToFront(dto.view),
|
|
72144
|
+
schemeId: dto.scheme_id,
|
|
72145
|
+
direction: dto.direction,
|
|
72146
|
+
transitive: dto.transitive,
|
|
72147
|
+
nodes: dto.nodes.map(HierarchyNodeFromApiToFront),
|
|
72148
|
+
edges: dto.edges.map(HierarchyEdgeFromApiToFront),
|
|
72149
|
+
complete: dto.complete
|
|
72150
|
+
};
|
|
72151
|
+
if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
|
|
72152
|
+
if (present(dto.root)) out.root = dto.root;
|
|
72153
|
+
if (present(dto.stop_reason)) out.stopReason = dto.stop_reason;
|
|
72154
|
+
return out;
|
|
72155
|
+
}
|
|
72156
|
+
function VocabularyHierarchyPathsFromApiToFront(dto) {
|
|
72157
|
+
const out = {
|
|
72158
|
+
view: ViewRefFromApiToFront(dto.view),
|
|
72159
|
+
schemeId: dto.scheme_id,
|
|
72160
|
+
from: dto.from,
|
|
72161
|
+
to: dto.to,
|
|
72162
|
+
paths: dto.paths,
|
|
72163
|
+
complete: dto.complete
|
|
72164
|
+
};
|
|
72165
|
+
if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
|
|
72166
|
+
if (present(dto.stop_reason)) out.stopReason = dto.stop_reason;
|
|
72167
|
+
return out;
|
|
72168
|
+
}
|
|
72169
|
+
function VocabularyTopConceptsFromApiToFront(dto) {
|
|
72170
|
+
const out = {
|
|
72171
|
+
view: ViewRefFromApiToFront(dto.view),
|
|
72172
|
+
schemeId: dto.scheme_id,
|
|
72173
|
+
concepts: dto.concepts.map(ConceptSummaryFromApiToFront)
|
|
72174
|
+
};
|
|
72175
|
+
if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
|
|
72176
|
+
return out;
|
|
72177
|
+
}
|
|
72178
|
+
function VocabularyTaxonomyPolicyFromApiToFront(dto) {
|
|
72179
|
+
const out = {
|
|
72180
|
+
view: ViewRefFromApiToFront(dto.view),
|
|
72181
|
+
schemeId: dto.scheme_id,
|
|
72182
|
+
declared: dto.declared,
|
|
72183
|
+
policy: dto.policy,
|
|
72184
|
+
acyclic: dto.acyclic,
|
|
72185
|
+
requirePlacement: dto.require_placement,
|
|
72186
|
+
topConcepts: dto.top_concepts
|
|
72187
|
+
};
|
|
72188
|
+
if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
|
|
72189
|
+
if (present(dto.record_id)) out.recordId = dto.record_id;
|
|
72190
|
+
if (present(dto.revision)) out.revision = dto.revision;
|
|
72191
|
+
if (present(dto.change_reason)) out.changeReason = dto.change_reason;
|
|
72192
|
+
if (present(dto.max_depth)) out.maxDepth = dto.max_depth;
|
|
72193
|
+
if (present(dto.partitive_transitive)) out.partitiveTransitive = dto.partitive_transitive;
|
|
72194
|
+
return out;
|
|
72195
|
+
}
|
|
72196
|
+
function ConceptRelationEntryFromApiToFront(dto) {
|
|
72197
|
+
const out = {
|
|
72198
|
+
relationId: dto.relation_id,
|
|
72199
|
+
relation: dto.relation,
|
|
72200
|
+
conceptId: dto.concept_id,
|
|
72201
|
+
status: dto.status
|
|
72202
|
+
};
|
|
72203
|
+
if (present(dto.display_label)) {
|
|
72204
|
+
out.displayLabel = VocabularyDisplayLabelFromApiToFront(dto.display_label);
|
|
72205
|
+
}
|
|
72206
|
+
if (present(dto.hierarchy_kind)) out.hierarchyKind = dto.hierarchy_kind;
|
|
72207
|
+
if (present(dto.evidence)) out.evidence = dto.evidence;
|
|
72208
|
+
return out;
|
|
72209
|
+
}
|
|
72210
|
+
function VocabularyConceptRelationsFromApiToFront(dto) {
|
|
72211
|
+
const out = {
|
|
72212
|
+
view: ViewRefFromApiToFront(dto.view),
|
|
72213
|
+
conceptId: dto.concept_id,
|
|
72214
|
+
schemeId: dto.scheme_id,
|
|
72215
|
+
relation: dto.relation,
|
|
72216
|
+
relations: dto.relations.map(ConceptRelationEntryFromApiToFront)
|
|
72217
|
+
};
|
|
72218
|
+
if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
|
|
72219
|
+
return out;
|
|
72220
|
+
}
|
|
72221
|
+
function CollectionLabelViewFromApiToFront(dto) {
|
|
72222
|
+
const out = {
|
|
72223
|
+
collectionLabelId: dto.collection_label_id,
|
|
72224
|
+
labelId: dto.label_id,
|
|
72225
|
+
role: dto.role
|
|
72226
|
+
};
|
|
72227
|
+
if (present(dto.text)) out.text = dto.text;
|
|
72228
|
+
if (present(dto.language)) out.language = dto.language;
|
|
72229
|
+
return out;
|
|
72230
|
+
}
|
|
72231
|
+
function CollectionSummaryFromApiToFront(dto) {
|
|
72232
|
+
return {
|
|
72233
|
+
collection: VocabularyCollectionRecordFromApiToFront(dto.collection),
|
|
72234
|
+
labels: dto.labels.map(CollectionLabelViewFromApiToFront),
|
|
72235
|
+
memberCount: dto.member_count
|
|
72236
|
+
};
|
|
72237
|
+
}
|
|
72238
|
+
function VocabularyCollectionPageFromApiToFront(dto) {
|
|
72239
|
+
const out = {
|
|
72240
|
+
view: ViewRefFromApiToFront(dto.view),
|
|
72241
|
+
schemeId: dto.scheme_id,
|
|
72242
|
+
items: dto.items.map(CollectionSummaryFromApiToFront),
|
|
72243
|
+
complete: dto.complete
|
|
72244
|
+
};
|
|
72245
|
+
if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
|
|
72246
|
+
if (present(dto.next_cursor)) out.nextCursor = dto.next_cursor;
|
|
72247
|
+
return out;
|
|
72248
|
+
}
|
|
72249
|
+
function CollectionMemberViewFromApiToFront(dto) {
|
|
72250
|
+
const out = { occurrenceId: dto.occurrence_id };
|
|
72251
|
+
if (present(dto.member_concept)) out.memberConcept = dto.member_concept;
|
|
72252
|
+
if (present(dto.member_collection)) out.memberCollection = dto.member_collection;
|
|
72253
|
+
if (present(dto.position)) out.position = dto.position;
|
|
72254
|
+
if (present(dto.display_label)) {
|
|
72255
|
+
out.displayLabel = VocabularyDisplayLabelFromApiToFront(dto.display_label);
|
|
72256
|
+
}
|
|
72257
|
+
return out;
|
|
72258
|
+
}
|
|
72259
|
+
function VocabularyCollectionDetailFromApiToFront(dto) {
|
|
72260
|
+
const out = {
|
|
72261
|
+
view: ViewRefFromApiToFront(dto.view),
|
|
72262
|
+
collection: VocabularyCollectionRecordFromApiToFront(dto.collection),
|
|
72263
|
+
labels: dto.labels.map(CollectionLabelViewFromApiToFront),
|
|
72264
|
+
members: dto.members.map(CollectionMemberViewFromApiToFront),
|
|
72265
|
+
nestedCollections: dto.nested_collections,
|
|
72266
|
+
documentation: dto.documentation.map(VocabularyDocumentationRecordFromApiToFront)
|
|
72267
|
+
};
|
|
72268
|
+
if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
|
|
72269
|
+
return out;
|
|
72270
|
+
}
|
|
72271
|
+
function PicklistEntryFromApiToFront(dto) {
|
|
72272
|
+
const out = {
|
|
72273
|
+
conceptId: dto.concept_id,
|
|
72274
|
+
depth: dto.depth,
|
|
72275
|
+
otherParentRelationIds: dto.other_parent_relation_ids
|
|
72276
|
+
};
|
|
72277
|
+
if (present(dto.display_label)) {
|
|
72278
|
+
out.displayLabel = VocabularyDisplayLabelFromApiToFront(dto.display_label);
|
|
72279
|
+
}
|
|
72280
|
+
if (present(dto.parent_relation_id)) out.parentRelationId = dto.parent_relation_id;
|
|
72281
|
+
return out;
|
|
72282
|
+
}
|
|
72283
|
+
function VocabularyPicklistFromApiToFront(dto) {
|
|
72284
|
+
const out = {
|
|
72285
|
+
view: ViewRefFromApiToFront(dto.view),
|
|
72286
|
+
schemeId: dto.scheme_id,
|
|
72287
|
+
rootsFrom: dto.roots_from,
|
|
72288
|
+
roots: dto.roots,
|
|
72289
|
+
entries: dto.entries.map(PicklistEntryFromApiToFront),
|
|
72290
|
+
complete: dto.complete
|
|
72291
|
+
};
|
|
72292
|
+
if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
|
|
72293
|
+
if (present(dto.root)) out.root = dto.root;
|
|
72294
|
+
if (present(dto.next_cursor)) out.nextCursor = dto.next_cursor;
|
|
72295
|
+
if (present(dto.stop_reason)) out.stopReason = dto.stop_reason;
|
|
72296
|
+
return out;
|
|
72297
|
+
}
|
|
72298
|
+
function ExpandedConceptFromApiToFront(dto) {
|
|
72299
|
+
const out = { conceptId: dto.concept_id, support: dto.support };
|
|
72300
|
+
if (present(dto.depth)) out.depth = dto.depth;
|
|
72301
|
+
if (present(dto.display_label)) {
|
|
72302
|
+
out.displayLabel = VocabularyDisplayLabelFromApiToFront(dto.display_label);
|
|
72303
|
+
}
|
|
72304
|
+
return out;
|
|
72305
|
+
}
|
|
72306
|
+
function VocabularyExpansionFromApiToFront(dto) {
|
|
72307
|
+
const out = {
|
|
72308
|
+
view: ViewRefFromApiToFront(dto.view),
|
|
72309
|
+
conceptId: dto.concept_id,
|
|
72310
|
+
schemeId: dto.scheme_id,
|
|
72311
|
+
direction: dto.direction,
|
|
72312
|
+
transitive: dto.transitive,
|
|
72313
|
+
concepts: dto.concepts.map(ExpandedConceptFromApiToFront),
|
|
72314
|
+
externalConcepts: dto.external_concepts.map(
|
|
72315
|
+
(external) => ({
|
|
72316
|
+
externalConceptId: external.external_concept_id,
|
|
72317
|
+
iri: external.iri,
|
|
72318
|
+
support: external.support
|
|
72319
|
+
})
|
|
72320
|
+
),
|
|
72321
|
+
withheldRelationIds: dto.withheld_relation_ids,
|
|
72322
|
+
complete: dto.complete
|
|
72323
|
+
};
|
|
72324
|
+
if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
|
|
72325
|
+
if (present(dto.stop_reason)) out.stopReason = dto.stop_reason;
|
|
72326
|
+
return out;
|
|
72327
|
+
}
|
|
72328
|
+
function ReconciliationProposalFromApiToFront(dto) {
|
|
72329
|
+
switch (dto.proposal) {
|
|
72330
|
+
case "exact_source_match":
|
|
72331
|
+
return { proposal: "exact_source_match", target: dto.target };
|
|
72332
|
+
case "ambiguous":
|
|
72333
|
+
return { proposal: "ambiguous", candidates: dto.candidates };
|
|
72334
|
+
case "new":
|
|
72335
|
+
return { proposal: "new" };
|
|
72336
|
+
}
|
|
72337
|
+
}
|
|
72338
|
+
function ReconciliationEntryFromApiToFront(dto) {
|
|
72339
|
+
return {
|
|
72340
|
+
sourceKey: dto.source_key,
|
|
72341
|
+
kind: dto.kind,
|
|
72342
|
+
proposal: ReconciliationProposalFromApiToFront(dto.proposal)
|
|
72343
|
+
};
|
|
72344
|
+
}
|
|
72345
|
+
function VocabularyImportFromApiToFront(dto) {
|
|
72346
|
+
const out = {
|
|
72347
|
+
importId: dto.import_id,
|
|
72348
|
+
artifact: {
|
|
72349
|
+
sourceFileId: dto.artifact.source_file_id,
|
|
72350
|
+
sha256: dto.artifact.sha256,
|
|
72351
|
+
byteSize: dto.artifact.byte_size,
|
|
72352
|
+
format: dto.artifact.format
|
|
72353
|
+
},
|
|
72354
|
+
dataset: dto.dataset,
|
|
72355
|
+
complete: dto.complete,
|
|
72356
|
+
counts: dataMap(dto.counts),
|
|
72357
|
+
proposedRecordCounts: dataMap(dto.proposed_record_counts),
|
|
72358
|
+
reconciliation: dto.reconciliation.map(ReconciliationEntryFromApiToFront),
|
|
72359
|
+
createdBy: dto.created_by,
|
|
72360
|
+
createdAt: dto.created_at,
|
|
72361
|
+
replayed: dto.replayed
|
|
72362
|
+
};
|
|
72363
|
+
if (present(dto.stop_reason)) out.stopReason = dto.stop_reason;
|
|
72364
|
+
if (present(dto.baseline_release_id)) out.baselineReleaseId = dto.baseline_release_id;
|
|
72365
|
+
if (present(dto.committed_revision_id)) out.committedRevisionId = dto.committed_revision_id;
|
|
72366
|
+
if (present(dto.committed_at)) out.committedAt = dto.committed_at;
|
|
72367
|
+
return out;
|
|
72368
|
+
}
|
|
72369
|
+
function externalVariant(value, path) {
|
|
72370
|
+
const wire = wireObject(value, path);
|
|
72371
|
+
const entries = Object.entries(wire);
|
|
72372
|
+
const first = entries[0];
|
|
72373
|
+
if (entries.length !== 1 || first === void 0) {
|
|
72374
|
+
throw new TypeError(`${path} is not a single-variant object`);
|
|
72375
|
+
}
|
|
72376
|
+
return first;
|
|
72377
|
+
}
|
|
72378
|
+
function ImportCoordinatesFromWire(value, path) {
|
|
72379
|
+
const [variant, body] = externalVariant(value, path);
|
|
72380
|
+
const at = `${path}.${variant}`;
|
|
72381
|
+
switch (variant) {
|
|
72382
|
+
case "triple": {
|
|
72383
|
+
const wire = wireObject(body, at);
|
|
72384
|
+
return { triple: { index: wireNumber(wire.index, `${at}.index`) } };
|
|
72385
|
+
}
|
|
72386
|
+
case "text": {
|
|
72387
|
+
const wire = wireObject(body, at);
|
|
72388
|
+
return {
|
|
72389
|
+
text: {
|
|
72390
|
+
line: wireNumber(wire.line, `${at}.line`),
|
|
72391
|
+
column: wireNumber(wire.column, `${at}.column`),
|
|
72392
|
+
offset: wireNumber(wire.offset, `${at}.offset`)
|
|
72393
|
+
}
|
|
72394
|
+
};
|
|
72395
|
+
}
|
|
72396
|
+
case "row": {
|
|
72397
|
+
const wire = wireObject(body, at);
|
|
72398
|
+
const row = { row: wireNumber(wire.row, `${at}.row`) };
|
|
72399
|
+
if (present(wire.sheet)) row.sheet = wireString(wire.sheet, `${at}.sheet`);
|
|
72400
|
+
return { row };
|
|
72401
|
+
}
|
|
72402
|
+
case "cell": {
|
|
72403
|
+
const wire = wireObject(body, at);
|
|
72404
|
+
return {
|
|
72405
|
+
cell: {
|
|
72406
|
+
sheet: wireString(wire.sheet, `${at}.sheet`),
|
|
72407
|
+
cell: wireString(wire.cell, `${at}.cell`)
|
|
72408
|
+
}
|
|
72409
|
+
};
|
|
72410
|
+
}
|
|
72411
|
+
case "part": {
|
|
72412
|
+
const wire = wireObject(body, at);
|
|
72413
|
+
return { part: { name: wireString(wire.name, `${at}.name`) } };
|
|
72414
|
+
}
|
|
72415
|
+
case "legacy_sort": {
|
|
72416
|
+
const wire = wireObject(body, at);
|
|
72417
|
+
return { legacySort: { sortId: wireString(wire.sort_id, `${at}.sort_id`) } };
|
|
72418
|
+
}
|
|
72419
|
+
case "json_pointer": {
|
|
72420
|
+
const wire = wireObject(body, at);
|
|
72421
|
+
return { jsonPointer: { pointer: wireString(wire.pointer, `${at}.pointer`) } };
|
|
72422
|
+
}
|
|
72423
|
+
}
|
|
72424
|
+
throw new TypeError(`${path} has the unknown variant ${variant}`);
|
|
72425
|
+
}
|
|
72426
|
+
function SourceTermFromWire(value, path) {
|
|
72427
|
+
const [variant, body] = externalVariant(value, path);
|
|
72428
|
+
const at = `${path}.${variant}`;
|
|
72429
|
+
switch (variant) {
|
|
72430
|
+
case "iri":
|
|
72431
|
+
return { iri: wireString(body, at) };
|
|
72432
|
+
case "blank":
|
|
72433
|
+
return { blank: wireString(body, at) };
|
|
72434
|
+
case "literal": {
|
|
72435
|
+
const wire = wireObject(body, at);
|
|
72436
|
+
const literal = {
|
|
72437
|
+
value: wireString(wire.value, `${at}.value`),
|
|
72438
|
+
datatype: wireString(wire.datatype, `${at}.datatype`)
|
|
72439
|
+
};
|
|
72440
|
+
if (present(wire.language)) literal.language = wireString(wire.language, `${at}.language`);
|
|
72441
|
+
return { literal };
|
|
72442
|
+
}
|
|
72443
|
+
}
|
|
72444
|
+
throw new TypeError(`${path} has the unknown variant ${variant}`);
|
|
72445
|
+
}
|
|
72446
|
+
var SOURCE_ITEM_KINDS = ["statement", "row", "record", "rejected"];
|
|
72447
|
+
function SourceItemFromWire(value, path) {
|
|
72448
|
+
const wire = wireObject(value, path);
|
|
72449
|
+
const coordinates = ImportCoordinatesFromWire(wire.coordinates, `${path}.coordinates`);
|
|
72450
|
+
const kind = wireLiteral(wire.item, SOURCE_ITEM_KINDS, `${path}.item`);
|
|
72451
|
+
switch (kind) {
|
|
72452
|
+
case "statement":
|
|
72453
|
+
return {
|
|
72454
|
+
item: "statement",
|
|
72455
|
+
coordinates,
|
|
72456
|
+
subject: SourceTermFromWire(wire.subject, `${path}.subject`),
|
|
72457
|
+
predicate: wireString(wire.predicate, `${path}.predicate`),
|
|
72458
|
+
object: SourceTermFromWire(wire.object, `${path}.object`)
|
|
72459
|
+
};
|
|
72460
|
+
case "row": {
|
|
72461
|
+
const cells = {};
|
|
72462
|
+
for (const [column, text] of Object.entries(wireObject(wire.cells, `${path}.cells`))) {
|
|
72463
|
+
cells[column] = wireString(text, `${path}.cells.${column}`);
|
|
72464
|
+
}
|
|
72465
|
+
return {
|
|
72466
|
+
item: "row",
|
|
72467
|
+
coordinates,
|
|
72468
|
+
cells,
|
|
72469
|
+
formulas: wireStringArray(wire.formulas, `${path}.formulas`)
|
|
72470
|
+
};
|
|
72471
|
+
}
|
|
72472
|
+
case "record": {
|
|
72473
|
+
const record = wire.record;
|
|
72474
|
+
if (!isJsonValue(record)) throw new TypeError(`${path}.record is missing`);
|
|
72475
|
+
return { item: "record", coordinates, record };
|
|
72476
|
+
}
|
|
72477
|
+
case "rejected":
|
|
72478
|
+
return {
|
|
72479
|
+
item: "rejected",
|
|
72480
|
+
coordinates,
|
|
72481
|
+
reason: wireString(wire.reason, `${path}.reason`),
|
|
72482
|
+
message: wireString(wire.message, `${path}.message`)
|
|
72483
|
+
};
|
|
72484
|
+
}
|
|
72485
|
+
}
|
|
72486
|
+
function ImportCellNoteFromApiToFront(dto) {
|
|
72487
|
+
const out = {
|
|
72488
|
+
column: dto.column,
|
|
72489
|
+
disposition: dto.disposition,
|
|
72490
|
+
reason: dto.reason
|
|
72491
|
+
};
|
|
72492
|
+
if (present(dto.resource_key)) out.resourceKey = dto.resource_key;
|
|
72493
|
+
return out;
|
|
72494
|
+
}
|
|
72495
|
+
function ImportItemFromApiToFront(dto) {
|
|
72496
|
+
const out = {
|
|
72497
|
+
ordinal: dto.ordinal,
|
|
72498
|
+
coordinates: ImportCoordinatesFromWire(dto.coordinates, "coordinates"),
|
|
72499
|
+
item: SourceItemFromWire(dto.item, "item"),
|
|
72500
|
+
disposition: dto.disposition,
|
|
72501
|
+
resourceKeys: dto.resource_keys,
|
|
72502
|
+
notes: dto.notes.map(ImportCellNoteFromApiToFront)
|
|
72503
|
+
};
|
|
72504
|
+
if (present(dto.reason)) out.reason = dto.reason;
|
|
72505
|
+
if (present(dto.target_record_id)) out.targetRecordId = dto.target_record_id;
|
|
72506
|
+
return out;
|
|
72507
|
+
}
|
|
72508
|
+
function VocabularyImportItemPageFromApiToFront(dto) {
|
|
72509
|
+
const out = {
|
|
72510
|
+
importId: dto.import_id,
|
|
72511
|
+
items: dto.items.map(ImportItemFromApiToFront),
|
|
72512
|
+
complete: dto.complete
|
|
72513
|
+
};
|
|
72514
|
+
if (present(dto.next_cursor)) out.nextCursor = dto.next_cursor;
|
|
72515
|
+
return out;
|
|
72516
|
+
}
|
|
72517
|
+
function LegacySortInventoryFromApiToFront(dto) {
|
|
72518
|
+
return {
|
|
72519
|
+
sortId: dto.sort_id,
|
|
72520
|
+
sortName: dto.sort_name,
|
|
72521
|
+
classification: dto.classification,
|
|
72522
|
+
parents: dto.parents,
|
|
72523
|
+
featureCount: dto.feature_count,
|
|
72524
|
+
boundConstraintCount: dto.bound_constraint_count,
|
|
72525
|
+
instances: dto.instances,
|
|
72526
|
+
rulesReferencing: dto.rules_referencing,
|
|
72527
|
+
featuresRangingOver: dto.features_ranging_over
|
|
72528
|
+
};
|
|
72529
|
+
}
|
|
72530
|
+
function VocabularyMigrationPlanFromApiToFront(dto) {
|
|
72531
|
+
return {
|
|
72532
|
+
planId: dto.plan_id,
|
|
72533
|
+
fingerprint: dto.fingerprint,
|
|
72534
|
+
byteSize: dto.byte_size,
|
|
72535
|
+
inventory: dto.inventory.map(LegacySortInventoryFromApiToFront),
|
|
72536
|
+
dispositions: dto.dispositions.map(
|
|
72537
|
+
(planned) => ({
|
|
72538
|
+
sortId: planned.sort_id,
|
|
72539
|
+
disposition: planned.disposition,
|
|
72540
|
+
rationale: planned.rationale
|
|
72541
|
+
})
|
|
72542
|
+
),
|
|
72543
|
+
createdBy: dto.created_by,
|
|
72544
|
+
createdAt: dto.created_at,
|
|
72545
|
+
replayed: dto.replayed
|
|
72546
|
+
};
|
|
72547
|
+
}
|
|
72548
|
+
function NativeExportManifestFromApiToFront(dto) {
|
|
72549
|
+
const out = {
|
|
72550
|
+
recordCount: dto.record_count,
|
|
72551
|
+
countsByKind: dataMap(dto.counts_by_kind),
|
|
72552
|
+
recordsSha256: dto.records_sha256,
|
|
72553
|
+
unreadable: dto.unreadable.map((record) => ({
|
|
72554
|
+
recordId: record.record_id,
|
|
72555
|
+
reason: record.reason
|
|
72556
|
+
}))
|
|
72557
|
+
};
|
|
72558
|
+
if (present(dto.context_manifest)) {
|
|
72559
|
+
out.contextManifest = ContextManifestFromApiToFront(dto.context_manifest);
|
|
72560
|
+
}
|
|
72561
|
+
return out;
|
|
72562
|
+
}
|
|
72563
|
+
function VocabularyNativeExportFromApiToFront(dto) {
|
|
72564
|
+
const out = {
|
|
72565
|
+
format: dto.format,
|
|
72566
|
+
view: ViewRefFromApiToFront(dto.view),
|
|
72567
|
+
records: dto.records.map(VocabularyRecordViewFromApiToFront),
|
|
72568
|
+
artifacts: dto.artifacts.map(VocabularySourceArtifactRecordFromApiToFront),
|
|
72569
|
+
manifest: NativeExportManifestFromApiToFront(dto.manifest)
|
|
72570
|
+
};
|
|
72571
|
+
if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
|
|
72572
|
+
return out;
|
|
72573
|
+
}
|
|
72574
|
+
function IriChoiceFromApiToFront(dto) {
|
|
72575
|
+
return {
|
|
72576
|
+
recordId: dto.record_id,
|
|
72577
|
+
kind: dto.kind,
|
|
72578
|
+
iri: dto.iri,
|
|
72579
|
+
rule: dto.rule,
|
|
72580
|
+
sourceAssociations: dto.source_associations
|
|
72581
|
+
};
|
|
72582
|
+
}
|
|
72583
|
+
function ProjectionLossFromApiToFront(dto) {
|
|
72584
|
+
return { kind: dto.kind, reason: dto.reason, recordIds: dto.record_ids };
|
|
72585
|
+
}
|
|
72586
|
+
function SkosManifestFromApiToFront(dto) {
|
|
72587
|
+
const out = {
|
|
72588
|
+
projection: dto.projection,
|
|
72589
|
+
iriPolicy: dto.iri_policy,
|
|
72590
|
+
view: ViewRefFromApiToFront(dto.view),
|
|
72591
|
+
schemeId: dto.scheme_id,
|
|
72592
|
+
includeProvenance: dto.include_provenance,
|
|
72593
|
+
tripleCount: dto.triple_count,
|
|
72594
|
+
iris: dto.iris.map(IriChoiceFromApiToFront),
|
|
72595
|
+
losses: dto.losses.map(ProjectionLossFromApiToFront)
|
|
72596
|
+
};
|
|
72597
|
+
if (present(dto.context_id)) out.contextId = dto.context_id;
|
|
72598
|
+
return out;
|
|
72599
|
+
}
|
|
72600
|
+
function VocabularySkosExportFromApiToFront(dto) {
|
|
72601
|
+
return {
|
|
72602
|
+
mediaType: dto.media_type,
|
|
72603
|
+
content: dto.content,
|
|
72604
|
+
sha256: dto.sha256,
|
|
72605
|
+
manifest: SkosManifestFromApiToFront(dto.manifest)
|
|
72606
|
+
};
|
|
72607
|
+
}
|
|
72608
|
+
function SparqlDatasetFromApiToFront(dto) {
|
|
72609
|
+
const out = {
|
|
72610
|
+
view: ViewRefFromApiToFront(dto.view),
|
|
72611
|
+
schemeId: dto.scheme_id,
|
|
72612
|
+
projection: dto.projection,
|
|
72613
|
+
tripleCount: dto.triple_count
|
|
72614
|
+
};
|
|
72615
|
+
if (present(dto.context_id)) out.contextId = dto.context_id;
|
|
72616
|
+
return out;
|
|
72617
|
+
}
|
|
72618
|
+
var SPARQL_TERM_TYPES = ["uri", "bnode", "literal"];
|
|
72619
|
+
function SparqlTermFromWire(value, path) {
|
|
72620
|
+
const wire = wireObject(value, path);
|
|
72621
|
+
const type = wireLiteral(wire.type, SPARQL_TERM_TYPES, `${path}.type`);
|
|
72622
|
+
const lexical = wireString(wire.value, `${path}.value`);
|
|
72623
|
+
switch (type) {
|
|
72624
|
+
case "uri":
|
|
72625
|
+
return { type: "uri", value: lexical };
|
|
72626
|
+
case "bnode":
|
|
72627
|
+
return { type: "bnode", value: lexical };
|
|
72628
|
+
case "literal": {
|
|
72629
|
+
const term = {
|
|
72630
|
+
type: "literal",
|
|
72631
|
+
value: lexical
|
|
72632
|
+
};
|
|
72633
|
+
const language = wire["xml:lang"];
|
|
72634
|
+
if (present(language)) term["xml:lang"] = wireString(language, `${path}.xml:lang`);
|
|
72635
|
+
if (present(wire.datatype)) term.datatype = wireString(wire.datatype, `${path}.datatype`);
|
|
72636
|
+
return term;
|
|
72637
|
+
}
|
|
72638
|
+
}
|
|
72639
|
+
}
|
|
72640
|
+
function SparqlSelectDocumentFromWire(value) {
|
|
72641
|
+
const wire = wireObject(value, "results");
|
|
72642
|
+
const head = wireObject(wire.head, "results.head");
|
|
72643
|
+
const results = wireObject(wire.results, "results.results");
|
|
72644
|
+
return {
|
|
72645
|
+
head: { vars: wireStringArray(head.vars, "results.head.vars") },
|
|
72646
|
+
results: {
|
|
72647
|
+
bindings: wireArray(results.bindings, "results.results.bindings").map((solution, index) => {
|
|
72648
|
+
const path = `results.results.bindings[${index}]`;
|
|
72649
|
+
const binding = {};
|
|
72650
|
+
for (const [variable, term] of Object.entries(wireObject(solution, path))) {
|
|
72651
|
+
binding[variable] = SparqlTermFromWire(term, `${path}.${variable}`);
|
|
72652
|
+
}
|
|
72653
|
+
return binding;
|
|
72654
|
+
})
|
|
72655
|
+
}
|
|
72656
|
+
};
|
|
72657
|
+
}
|
|
72658
|
+
function SparqlAskDocumentFromWire(value) {
|
|
72659
|
+
const wire = wireObject(value, "results");
|
|
72660
|
+
wireObject(wire.head, "results.head");
|
|
72661
|
+
return { head: {}, boolean: wireBoolean(wire.boolean, "results.boolean") };
|
|
72662
|
+
}
|
|
72663
|
+
function VocabularySparqlResultFromApiToFront(dto) {
|
|
72664
|
+
const base = {
|
|
72665
|
+
dataset: SparqlDatasetFromApiToFront(dto.dataset),
|
|
72666
|
+
complete: dto.complete
|
|
72667
|
+
};
|
|
72668
|
+
if (present(dto.stop_reason)) base.stopReason = dto.stop_reason;
|
|
72669
|
+
switch (dto.form) {
|
|
72670
|
+
case "select":
|
|
72671
|
+
return { ...base, form: "select", results: SparqlSelectDocumentFromWire(dto.results) };
|
|
72672
|
+
case "ask":
|
|
72673
|
+
return { ...base, form: "ask", results: SparqlAskDocumentFromWire(dto.results) };
|
|
72674
|
+
case "construct":
|
|
72675
|
+
case "describe": {
|
|
72676
|
+
const nTriples = dto.n_triples;
|
|
72677
|
+
if (!present(nTriples)) throw new TypeError("n_triples is missing from a graph answer");
|
|
72678
|
+
return { ...base, form: dto.form, nTriples };
|
|
72679
|
+
}
|
|
72680
|
+
}
|
|
72681
|
+
}
|
|
70299
72682
|
|
|
70300
72683
|
// src/resources/vocabulary.ts
|
|
70301
72684
|
function viewQuery(selector) {
|
|
@@ -71266,6 +73649,681 @@ var VocabularyClient = class {
|
|
|
71266
73649
|
const response = await this.api.migrationPreview(pageQuery(query), toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
71267
73650
|
return decodeResponse(response, VocabularyMigrationPreviewFromApiToFront);
|
|
71268
73651
|
}
|
|
73652
|
+
// ---------------------------------------------------------------------------
|
|
73653
|
+
// Taxonomy and thesaurus reads
|
|
73654
|
+
// ---------------------------------------------------------------------------
|
|
73655
|
+
/**
|
|
73656
|
+
* The `broader` links of one scheme around a concept, or below its top
|
|
73657
|
+
* concepts: a DAG of concepts and the stored relations that witness them.
|
|
73658
|
+
*
|
|
73659
|
+
* @param schemeId - The scheme (UUID); only its relations are followed.
|
|
73660
|
+
* @param query - The view, a start concept, the direction, transitivity,
|
|
73661
|
+
* hierarchy kinds, a status, `maxNodes` (1 to 100000) and a display language.
|
|
73662
|
+
* @param requestOptions - Per-call options (timeout, retries, signal, headers).
|
|
73663
|
+
* @returns The nodes (each once, with every relation that reaches it in
|
|
73664
|
+
* `via`), the edges, and `complete` / `stopReason`.
|
|
73665
|
+
* @throws {@link NotFoundError} 404 for an unknown scheme, concept, release or revision.
|
|
73666
|
+
* @throws {@link VocabularyRefusedError} 400 `invalid_request`; 409
|
|
73667
|
+
* `vocabulary_plugin_unavailable`.
|
|
73668
|
+
*
|
|
73669
|
+
* @remarks
|
|
73670
|
+
* `GET /api/v1/vocabulary/schemes/{scheme_id}/hierarchy`. `hierarchyKinds`
|
|
73671
|
+
* is sent as one comma-separated parameter. A traversal that reaches
|
|
73672
|
+
* `maxNodes` or the deadline answers `complete: false` with its
|
|
73673
|
+
* `stopReason`: a partial answer, not an error. Read `complete` before
|
|
73674
|
+
* concluding that a concept is absent. Mappings are never followed.
|
|
73675
|
+
*
|
|
73676
|
+
* @example
|
|
73677
|
+
* ```typescript
|
|
73678
|
+
* const tree = await client.vocabulary.schemeHierarchy(schemeId, { transitive: true });
|
|
73679
|
+
* if (!tree.complete) console.log('partial:', tree.stopReason);
|
|
73680
|
+
* for (const node of tree.nodes) console.log(node.depth, node.displayLabel?.text, node.via);
|
|
73681
|
+
* ```
|
|
73682
|
+
*/
|
|
73683
|
+
async schemeHierarchy(schemeId, query, requestOptions) {
|
|
73684
|
+
const wire = viewQuery(query?.view);
|
|
73685
|
+
if (query?.conceptId !== void 0) wire.concept_id = query.conceptId;
|
|
73686
|
+
if (query?.direction !== void 0) wire.direction = query.direction;
|
|
73687
|
+
if (query?.transitive !== void 0) wire.transitive = query.transitive;
|
|
73688
|
+
if (query?.hierarchyKinds !== void 0) wire.hierarchy_kinds = query.hierarchyKinds.join(",");
|
|
73689
|
+
if (query?.status !== void 0) wire.status = query.status;
|
|
73690
|
+
if (query?.maxNodes !== void 0) wire.max_nodes = query.maxNodes;
|
|
73691
|
+
if (query?.language !== void 0) wire.language = query.language;
|
|
73692
|
+
const response = await this.api.schemeHierarchy(schemeId, wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
73693
|
+
return decodeResponse(response, VocabularyHierarchyFromApiToFront);
|
|
73694
|
+
}
|
|
73695
|
+
/**
|
|
73696
|
+
* The simple paths of accepted `broader` links from a narrower concept up
|
|
73697
|
+
* to a broader one.
|
|
73698
|
+
*
|
|
73699
|
+
* @param schemeId - The scheme (UUID).
|
|
73700
|
+
* @param query - The view, `from` and `to` (UUIDs), hierarchy kinds,
|
|
73701
|
+
* `maxNodes` (1 to 100000) and `maxPaths` (1 to 1024).
|
|
73702
|
+
* @param requestOptions - Per-call options (timeout, retries, signal, headers).
|
|
73703
|
+
* @returns Each path as a sequence of relation ids, shortest first, and
|
|
73704
|
+
* `complete` / `stopReason`.
|
|
73705
|
+
* @throws {@link NotFoundError} 404 for an unknown scheme, concept, release or revision.
|
|
73706
|
+
* @throws {@link VocabularyRefusedError} 400 `invalid_request`; 409
|
|
73707
|
+
* `vocabulary_plugin_unavailable`.
|
|
73708
|
+
*
|
|
73709
|
+
* @remarks
|
|
73710
|
+
* `GET /api/v1/vocabulary/schemes/{scheme_id}/paths`. An empty `paths`
|
|
73711
|
+
* with `complete: true` means no path exists; with `complete: false` it
|
|
73712
|
+
* means the search stopped (`path_limit`, `node_limit` or `deadline`).
|
|
73713
|
+
*
|
|
73714
|
+
* @example
|
|
73715
|
+
* ```typescript
|
|
73716
|
+
* const { paths, complete } = await client.vocabulary.schemePaths(schemeId, {
|
|
73717
|
+
* from: narrowerId,
|
|
73718
|
+
* to: broaderId,
|
|
73719
|
+
* });
|
|
73720
|
+
* ```
|
|
73721
|
+
*/
|
|
73722
|
+
async schemePaths(schemeId, query, requestOptions) {
|
|
73723
|
+
const wire = {
|
|
73724
|
+
...viewQuery(query.view),
|
|
73725
|
+
from: query.from,
|
|
73726
|
+
to: query.to
|
|
73727
|
+
};
|
|
73728
|
+
if (query.hierarchyKinds !== void 0) wire.hierarchy_kinds = query.hierarchyKinds.join(",");
|
|
73729
|
+
if (query.maxNodes !== void 0) wire.max_nodes = query.maxNodes;
|
|
73730
|
+
if (query.maxPaths !== void 0) wire.max_paths = query.maxPaths;
|
|
73731
|
+
const response = await this.api.schemePaths(schemeId, wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
73732
|
+
return decodeResponse(response, VocabularyHierarchyPathsFromApiToFront);
|
|
73733
|
+
}
|
|
73734
|
+
/**
|
|
73735
|
+
* The top concepts of a scheme: the concepts with an accepted membership
|
|
73736
|
+
* marked `topConcept`.
|
|
73737
|
+
*
|
|
73738
|
+
* @param schemeId - The scheme (UUID).
|
|
73739
|
+
* @param query - The view and a display language.
|
|
73740
|
+
* @param requestOptions - Per-call options (timeout, retries, signal, headers).
|
|
73741
|
+
* @returns The concepts, by id.
|
|
73742
|
+
* @throws {@link NotFoundError} 404 for an unknown scheme, release or revision.
|
|
73743
|
+
* @throws {@link VocabularyRefusedError} 400 `invalid_request`; 409
|
|
73744
|
+
* `vocabulary_plugin_unavailable`.
|
|
73745
|
+
*
|
|
73746
|
+
* @remarks
|
|
73747
|
+
* `GET /api/v1/vocabulary/schemes/{scheme_id}/top-concepts`.
|
|
73748
|
+
*
|
|
73749
|
+
* @example
|
|
73750
|
+
* ```typescript
|
|
73751
|
+
* const { concepts } = await client.vocabulary.topConcepts(schemeId, { language: 'en' });
|
|
73752
|
+
* ```
|
|
73753
|
+
*/
|
|
73754
|
+
async topConcepts(schemeId, query, requestOptions) {
|
|
73755
|
+
const wire = viewQuery(query?.view);
|
|
73756
|
+
if (query?.language !== void 0) wire.language = query.language;
|
|
73757
|
+
const response = await this.api.schemeTopConcepts(schemeId, wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
73758
|
+
return decodeResponse(response, VocabularyTopConceptsFromApiToFront);
|
|
73759
|
+
}
|
|
73760
|
+
/**
|
|
73761
|
+
* The taxonomy policy of a scheme, or the `taxonomy-policy/v1` defaults
|
|
73762
|
+
* with `declared: false`.
|
|
73763
|
+
*
|
|
73764
|
+
* @param schemeId - The scheme (UUID).
|
|
73765
|
+
* @param query - The view.
|
|
73766
|
+
* @param requestOptions - Per-call options (timeout, retries, signal, headers).
|
|
73767
|
+
* @returns The policy in force for the scheme in that view.
|
|
73768
|
+
* @throws {@link NotFoundError} 404 for an unknown scheme, release or revision.
|
|
73769
|
+
* @throws {@link VocabularyRefusedError} 400 `invalid_request`; 409
|
|
73770
|
+
* `vocabulary_plugin_unavailable`.
|
|
73771
|
+
*
|
|
73772
|
+
* @remarks
|
|
73773
|
+
* `GET /api/v1/vocabulary/schemes/{scheme_id}/policy`. An absent
|
|
73774
|
+
* `partitiveTransitive` is unstated: a partitive path of two or more links
|
|
73775
|
+
* is reported, never derived.
|
|
73776
|
+
*
|
|
73777
|
+
* @example
|
|
73778
|
+
* ```typescript
|
|
73779
|
+
* const policy = await client.vocabulary.schemePolicy(schemeId);
|
|
73780
|
+
* if (!policy.declared) console.log('defaults', policy.policy);
|
|
73781
|
+
* ```
|
|
73782
|
+
*/
|
|
73783
|
+
async schemePolicy(schemeId, query, requestOptions) {
|
|
73784
|
+
const response = await this.api.schemePolicy(schemeId, viewQuery(query?.view), toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
73785
|
+
return decodeResponse(response, VocabularyTaxonomyPolicyFromApiToFront);
|
|
73786
|
+
}
|
|
73787
|
+
/**
|
|
73788
|
+
* The direct relations of one kind of a concept in one scheme, of every
|
|
73789
|
+
* status.
|
|
73790
|
+
*
|
|
73791
|
+
* @param conceptId - The concept (UUID).
|
|
73792
|
+
* @param query - The view, the scheme, `relation` (`related`, `broader` or
|
|
73793
|
+
* `narrower`) and a display language.
|
|
73794
|
+
* @param requestOptions - Per-call options (timeout, retries, signal, headers).
|
|
73795
|
+
* @returns The relations, by relation id, each with the concept at the other end.
|
|
73796
|
+
* @throws {@link NotFoundError} 404 for an unknown concept, scheme, release or revision.
|
|
73797
|
+
* @throws {@link VocabularyRefusedError} 400 `invalid_request`; 409
|
|
73798
|
+
* `vocabulary_plugin_unavailable`.
|
|
73799
|
+
*
|
|
73800
|
+
* @remarks
|
|
73801
|
+
* `GET /api/v1/vocabulary/concepts/{concept_id}/relations`. `narrower` is
|
|
73802
|
+
* the inverse read of the stored `broader` links; nothing derived is listed.
|
|
73803
|
+
*
|
|
73804
|
+
* @example
|
|
73805
|
+
* ```typescript
|
|
73806
|
+
* const { relations } = await client.vocabulary.conceptRelations(conceptId, {
|
|
73807
|
+
* schemeId,
|
|
73808
|
+
* relation: 'narrower',
|
|
73809
|
+
* });
|
|
73810
|
+
* ```
|
|
73811
|
+
*/
|
|
73812
|
+
async conceptRelations(conceptId, query, requestOptions) {
|
|
73813
|
+
const wire = {
|
|
73814
|
+
...viewQuery(query.view),
|
|
73815
|
+
scheme_id: query.schemeId,
|
|
73816
|
+
relation: query.relation
|
|
73817
|
+
};
|
|
73818
|
+
if (query.language !== void 0) wire.language = query.language;
|
|
73819
|
+
const response = await this.api.conceptRelations(conceptId, wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
73820
|
+
return decodeResponse(response, VocabularyConceptRelationsFromApiToFront);
|
|
73821
|
+
}
|
|
73822
|
+
/**
|
|
73823
|
+
* One page of the collections of one scheme.
|
|
73824
|
+
*
|
|
73825
|
+
* @param query - The view, the scheme and cursor paging (`limit` 1 to 200).
|
|
73826
|
+
* @param requestOptions - Per-call options (timeout, retries, signal, headers).
|
|
73827
|
+
* @returns The collections with their labels and member counts, the next
|
|
73828
|
+
* cursor and `complete`.
|
|
73829
|
+
* @throws {@link NotFoundError} 404 for an unknown scheme, release or revision.
|
|
73830
|
+
* @throws {@link VocabularyRefusedError} 400 `invalid_request`,
|
|
73831
|
+
* `cursor_mismatch` (a cursor read with another view or scheme); 409
|
|
73832
|
+
* `vocabulary_plugin_unavailable`.
|
|
73833
|
+
*
|
|
73834
|
+
* @remarks
|
|
73835
|
+
* `GET /api/v1/vocabulary/collections?scheme_id&cursor&limit`. A cursor is
|
|
73836
|
+
* bound to the tenant, the view and the scheme.
|
|
73837
|
+
*
|
|
73838
|
+
* @example
|
|
73839
|
+
* ```typescript
|
|
73840
|
+
* const page = await client.vocabulary.listCollections({ schemeId, limit: 50 });
|
|
73841
|
+
* ```
|
|
73842
|
+
*/
|
|
73843
|
+
async listCollections(query, requestOptions) {
|
|
73844
|
+
const wire = {
|
|
73845
|
+
...viewQuery(query.view),
|
|
73846
|
+
...pageQuery(query),
|
|
73847
|
+
scheme_id: query.schemeId
|
|
73848
|
+
};
|
|
73849
|
+
const response = await this.api.listVocabularyCollections(wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
73850
|
+
return decodeResponse(response, VocabularyCollectionPageFromApiToFront);
|
|
73851
|
+
}
|
|
73852
|
+
/**
|
|
73853
|
+
* One collection with its labels, its member occurrences and its nested
|
|
73854
|
+
* collections.
|
|
73855
|
+
*
|
|
73856
|
+
* @param collectionId - The collection (UUID).
|
|
73857
|
+
* @param query - The view and a display language for member concepts.
|
|
73858
|
+
* @param requestOptions - Per-call options (timeout, retries, signal, headers).
|
|
73859
|
+
* @returns The collection detail. Member occurrences keep their positions.
|
|
73860
|
+
* @throws {@link NotFoundError} 404 when the view does not hold the collection.
|
|
73861
|
+
* @throws {@link VocabularyRefusedError} 400 `invalid_request`; 409
|
|
73862
|
+
* `vocabulary_plugin_unavailable`.
|
|
73863
|
+
*
|
|
73864
|
+
* @remarks
|
|
73865
|
+
* `GET /api/v1/vocabulary/collections/{collection_id}`. Members are listed
|
|
73866
|
+
* by position (absent first), then by occurrence id; a member that occurs
|
|
73867
|
+
* twice is listed twice.
|
|
73868
|
+
*
|
|
73869
|
+
* @example
|
|
73870
|
+
* ```typescript
|
|
73871
|
+
* const detail = await client.vocabulary.getCollection(collectionId, { language: 'en' });
|
|
73872
|
+
* for (const member of detail.members) console.log(member.position, member.memberConcept);
|
|
73873
|
+
* ```
|
|
73874
|
+
*/
|
|
73875
|
+
async getCollection(collectionId, query, requestOptions) {
|
|
73876
|
+
const wire = viewQuery(
|
|
73877
|
+
query?.view
|
|
73878
|
+
);
|
|
73879
|
+
if (query?.language !== void 0) wire.language = query.language;
|
|
73880
|
+
const response = await this.api.getVocabularyCollection(collectionId, wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
73881
|
+
return decodeResponse(response, VocabularyCollectionDetailFromApiToFront);
|
|
73882
|
+
}
|
|
73883
|
+
/**
|
|
73884
|
+
* One page of the depth-first list of a scheme's concepts, for a form
|
|
73885
|
+
* control. A concept with several parents is listed once.
|
|
73886
|
+
*
|
|
73887
|
+
* @param schemeId - The scheme (UUID).
|
|
73888
|
+
* @param query - The view, a root, `maxDepth`, `maxNodes` (1 to 100000),
|
|
73889
|
+
* a display language and cursor paging (`limit` 1 to 500).
|
|
73890
|
+
* @param requestOptions - Per-call options (timeout, retries, signal, headers).
|
|
73891
|
+
* @returns The entries of this page, the roots, the next cursor,
|
|
73892
|
+
* `complete` and `stopReason`.
|
|
73893
|
+
* @throws {@link NotFoundError} 404 for an unknown scheme, root, release or revision.
|
|
73894
|
+
* @throws {@link VocabularyRefusedError} 400 `invalid_request`,
|
|
73895
|
+
* `cursor_mismatch`; 409 `vocabulary_plugin_unavailable`.
|
|
73896
|
+
*
|
|
73897
|
+
* @remarks
|
|
73898
|
+
* `GET /api/v1/vocabulary/schemes/{scheme_id}/picklist`. Only accepted
|
|
73899
|
+
* `broader` relations are followed. `complete` is `true` only on the last
|
|
73900
|
+
* page of a list that `maxNodes` did not cut.
|
|
73901
|
+
*
|
|
73902
|
+
* @example
|
|
73903
|
+
* ```typescript
|
|
73904
|
+
* let page = await client.vocabulary.picklist(schemeId, { limit: 100 });
|
|
73905
|
+
* while (page.nextCursor !== undefined) {
|
|
73906
|
+
* page = await client.vocabulary.picklist(schemeId, { cursor: page.nextCursor });
|
|
73907
|
+
* }
|
|
73908
|
+
* ```
|
|
73909
|
+
*/
|
|
73910
|
+
async picklist(schemeId, query, requestOptions) {
|
|
73911
|
+
const wire = {
|
|
73912
|
+
...viewQuery(query?.view),
|
|
73913
|
+
...pageQuery(query)
|
|
73914
|
+
};
|
|
73915
|
+
if (query?.root !== void 0) wire.root = query.root;
|
|
73916
|
+
if (query?.maxDepth !== void 0) wire.max_depth = query.maxDepth;
|
|
73917
|
+
if (query?.maxNodes !== void 0) wire.max_nodes = query.maxNodes;
|
|
73918
|
+
if (query?.language !== void 0) wire.language = query.language;
|
|
73919
|
+
const response = await this.api.schemePicklist(schemeId, wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
73920
|
+
return decodeResponse(response, VocabularyPicklistFromApiToFront);
|
|
73921
|
+
}
|
|
73922
|
+
/**
|
|
73923
|
+
* The concepts a query on one concept may be expanded to, each with the
|
|
73924
|
+
* relation and mapping ids that support it.
|
|
73925
|
+
*
|
|
73926
|
+
* @param conceptId - The concept to expand (UUID).
|
|
73927
|
+
* @param query - The view, the scheme, the direction, transitivity,
|
|
73928
|
+
* hierarchy kinds, related links, mapping kinds, `maxNodes` and a display
|
|
73929
|
+
* language.
|
|
73930
|
+
* @param requestOptions - Per-call options (timeout, retries, signal, headers).
|
|
73931
|
+
* @returns The concepts and external concepts with their support, the
|
|
73932
|
+
* withheld relations and `complete` / `stopReason`.
|
|
73933
|
+
* @throws {@link NotFoundError} 404 for an unknown concept, scheme, release or revision.
|
|
73934
|
+
* @throws {@link VocabularyRefusedError} 400 `invalid_request`; 409
|
|
73935
|
+
* `vocabulary_plugin_unavailable`.
|
|
73936
|
+
*
|
|
73937
|
+
* @remarks
|
|
73938
|
+
* `GET /api/v1/vocabulary/concepts/{concept_id}/expansion`.
|
|
73939
|
+
* `hierarchyKinds` and `mappingKinds` are sent comma-separated. A
|
|
73940
|
+
* partitive link that would end a transitive path is not followed unless
|
|
73941
|
+
* the scheme's policy states `partitiveTransitive: true`; it is listed in
|
|
73942
|
+
* `withheldRelationIds`.
|
|
73943
|
+
*
|
|
73944
|
+
* @example
|
|
73945
|
+
* ```typescript
|
|
73946
|
+
* const expansion = await client.vocabulary.expandConcept(conceptId, {
|
|
73947
|
+
* schemeId,
|
|
73948
|
+
* transitive: true,
|
|
73949
|
+
* mappingKinds: ['exact', 'close'],
|
|
73950
|
+
* });
|
|
73951
|
+
* ```
|
|
73952
|
+
*/
|
|
73953
|
+
async expandConcept(conceptId, query, requestOptions) {
|
|
73954
|
+
const wire = {
|
|
73955
|
+
...viewQuery(query.view),
|
|
73956
|
+
scheme_id: query.schemeId
|
|
73957
|
+
};
|
|
73958
|
+
if (query.direction !== void 0) wire.direction = query.direction;
|
|
73959
|
+
if (query.transitive !== void 0) wire.transitive = query.transitive;
|
|
73960
|
+
if (query.hierarchyKinds !== void 0) wire.hierarchy_kinds = query.hierarchyKinds.join(",");
|
|
73961
|
+
if (query.includeRelated !== void 0) wire.include_related = query.includeRelated;
|
|
73962
|
+
if (query.mappingKinds !== void 0) wire.mapping_kinds = query.mappingKinds.join(",");
|
|
73963
|
+
if (query.maxNodes !== void 0) wire.max_nodes = query.maxNodes;
|
|
73964
|
+
if (query.language !== void 0) wire.language = query.language;
|
|
73965
|
+
const response = await this.api.conceptExpansion(conceptId, wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
73966
|
+
return decodeResponse(response, VocabularyExpansionFromApiToFront);
|
|
73967
|
+
}
|
|
73968
|
+
// ---------------------------------------------------------------------------
|
|
73969
|
+
// Imports
|
|
73970
|
+
// ---------------------------------------------------------------------------
|
|
73971
|
+
/**
|
|
73972
|
+
* Parse an uploaded source file and store its import proposal. Writes no
|
|
73973
|
+
* vocabulary record.
|
|
73974
|
+
*
|
|
73975
|
+
* @param request - The uploaded file, its format, the declared dataset, the
|
|
73976
|
+
* target scheme and the RDF options.
|
|
73977
|
+
* @param requestOptions - The required `idempotencyKey` and per-call options.
|
|
73978
|
+
* @returns The import: artefact identity, completeness, item counts by
|
|
73979
|
+
* disposition, reconciliation entries and proposed record counts.
|
|
73980
|
+
* @throws {@link VocabularyRefusedError} 403 `vocabulary_actor_required`,
|
|
73981
|
+
* `vocabulary_authority_denied`, `vocabulary_authority_undetermined`; 404
|
|
73982
|
+
* `source_file_not_found`; 409 `vocabulary_plugin_unavailable`; 413
|
|
73983
|
+
* `source_too_large` (over 20 MiB); 422 `format_unsupported`,
|
|
73984
|
+
* `invalid_request`.
|
|
73985
|
+
* @throws {@link IdempotencyKeyReusedError} 422 when the key committed a different request.
|
|
73986
|
+
* @throws {@link MutationOutcomeUnconfirmedError} 503 when the commit outcome is unknown.
|
|
73987
|
+
*
|
|
73988
|
+
* @remarks
|
|
73989
|
+
* `POST /api/v1/vocabulary/imports` with `Idempotency-Key`. Upload the file
|
|
73990
|
+
* first with `client.sources.uploadFile` and pass its id. Permission
|
|
73991
|
+
* `author_vocabulary` on the tenant. An incomplete parse
|
|
73992
|
+
* (`complete: false`) can be read and paged, never committed. Recover an
|
|
73993
|
+
* unknown outcome with {@link VocabularyClient.getRequestOutcome}
|
|
73994
|
+
* (`'create_import'`).
|
|
73995
|
+
*
|
|
73996
|
+
* @example
|
|
73997
|
+
* ```typescript
|
|
73998
|
+
* const key = crypto.randomUUID(); // bind once; pass the same key on every retry
|
|
73999
|
+
* const file = await client.sources.uploadFile(new Blob([turtle]), 'scheme.ttl');
|
|
74000
|
+
* const proposal = await client.vocabulary.createImport(
|
|
74001
|
+
* {
|
|
74002
|
+
* sourceFileId: file.id,
|
|
74003
|
+
* format: 'turtle',
|
|
74004
|
+
* dataset: 'https://example.org/scheme',
|
|
74005
|
+
* targetScheme: { existing: { schemeId } },
|
|
74006
|
+
* },
|
|
74007
|
+
* { idempotencyKey: key },
|
|
74008
|
+
* );
|
|
74009
|
+
* ```
|
|
74010
|
+
*/
|
|
74011
|
+
async createImport(request, requestOptions) {
|
|
74012
|
+
const response = await this.api.createImport(
|
|
74013
|
+
CreateVocabularyImportRequestFromFrontToApi(request),
|
|
74014
|
+
idempotencyParams(requestOptions.idempotencyKey, requestOptions)
|
|
74015
|
+
).catch(rethrowVocabularyRefusal);
|
|
74016
|
+
return decodeResponse(response, VocabularyImportFromApiToFront);
|
|
74017
|
+
}
|
|
74018
|
+
/**
|
|
74019
|
+
* One import proposal.
|
|
74020
|
+
*
|
|
74021
|
+
* @param importId - The import (UUID).
|
|
74022
|
+
* @param requestOptions - Per-call options (timeout, retries, signal, headers).
|
|
74023
|
+
* @returns The import, with `committedRevisionId` once committed.
|
|
74024
|
+
* @throws {@link NotFoundError} 404 for an unknown import.
|
|
74025
|
+
* @throws {@link VocabularyRefusedError} 409 `vocabulary_plugin_unavailable`.
|
|
74026
|
+
*
|
|
74027
|
+
* @remarks
|
|
74028
|
+
* `GET /api/v1/vocabulary/imports/{import_id}`.
|
|
74029
|
+
*
|
|
74030
|
+
* @example
|
|
74031
|
+
* ```typescript
|
|
74032
|
+
* const proposal = await client.vocabulary.getImport(importId);
|
|
74033
|
+
* ```
|
|
74034
|
+
*/
|
|
74035
|
+
async getImport(importId, requestOptions) {
|
|
74036
|
+
const response = await this.api.getImport(importId, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
74037
|
+
return decodeResponse(response, VocabularyImportFromApiToFront);
|
|
74038
|
+
}
|
|
74039
|
+
/**
|
|
74040
|
+
* One page of an import's source items, by ordinal: what was read, where,
|
|
74041
|
+
* and what became of it.
|
|
74042
|
+
*
|
|
74043
|
+
* @param importId - The import (UUID).
|
|
74044
|
+
* @param query - A disposition filter and cursor paging (`limit` 1 to 500).
|
|
74045
|
+
* @param requestOptions - Per-call options (timeout, retries, signal, headers).
|
|
74046
|
+
* @returns The items, the next cursor and `complete`.
|
|
74047
|
+
* @throws {@link NotFoundError} 404 for an unknown import.
|
|
74048
|
+
* @throws {@link VocabularyRefusedError} 400 `invalid_request` (a malformed
|
|
74049
|
+
* cursor or limit); 409 `vocabulary_plugin_unavailable`.
|
|
74050
|
+
*
|
|
74051
|
+
* @remarks
|
|
74052
|
+
* `GET /api/v1/vocabulary/imports/{import_id}/items`. Nothing read is
|
|
74053
|
+
* dropped: a malformed part is a `rejected` item with its coordinates.
|
|
74054
|
+
*
|
|
74055
|
+
* @example
|
|
74056
|
+
* ```typescript
|
|
74057
|
+
* const rejected = await client.vocabulary.listImportItems(importId, {
|
|
74058
|
+
* disposition: 'rejected',
|
|
74059
|
+
* });
|
|
74060
|
+
* ```
|
|
74061
|
+
*/
|
|
74062
|
+
async listImportItems(importId, query, requestOptions) {
|
|
74063
|
+
const wire = pageQuery(query);
|
|
74064
|
+
if (query?.disposition !== void 0) wire.disposition = query.disposition;
|
|
74065
|
+
const response = await this.api.importItems(importId, wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
74066
|
+
return decodeResponse(response, VocabularyImportItemPageFromApiToFront);
|
|
74067
|
+
}
|
|
74068
|
+
/**
|
|
74069
|
+
* Commit an import proposal with the reviewer's decisions as one candidate
|
|
74070
|
+
* revision: a new candidate, or the next revision of `candidateId`.
|
|
74071
|
+
*
|
|
74072
|
+
* @param importId - The import (UUID).
|
|
74073
|
+
* @param request - The change reason, a title (new candidate) or a
|
|
74074
|
+
* `candidateId`, and one decision per reconciliation entry.
|
|
74075
|
+
* @param requestOptions - The required `idempotencyKey`, `ifMatch` when
|
|
74076
|
+
* `candidateId` is given, and per-call options.
|
|
74077
|
+
* @returns The candidate revision the import became.
|
|
74078
|
+
* @throws {@link PreconditionFailedError} 412 when `ifMatch` is not the head.
|
|
74079
|
+
* @throws {@link NotFoundError} 404 for an unknown import or candidate.
|
|
74080
|
+
* @throws {@link VocabularyRefusedError} 409 `import_incomplete`,
|
|
74081
|
+
* `import_already_committed`, `import_baseline_stale`,
|
|
74082
|
+
* `active_release_changed`, `candidate_closed`; 422
|
|
74083
|
+
* `reconciliation_undecided` (see `refusal.undecidedSourceKeys`),
|
|
74084
|
+
* `invalid_decision`, `import_too_large`, `invalid_records`; 428
|
|
74085
|
+
* `if_match_required`; 403 authority.
|
|
74086
|
+
* @throws {@link IdempotencyKeyReusedError} 422.
|
|
74087
|
+
* @throws {@link MutationOutcomeUnconfirmedError} 503.
|
|
74088
|
+
*
|
|
74089
|
+
* @remarks
|
|
74090
|
+
* `POST /api/v1/vocabulary/imports/{import_id}/commit` with
|
|
74091
|
+
* `Idempotency-Key` (and `If-Match` with `candidateId`). Source keys travel
|
|
74092
|
+
* as values, verbatim. The revision is a candidate: steward review,
|
|
74093
|
+
* approval, release and activation still apply. Recover an unknown outcome
|
|
74094
|
+
* with {@link VocabularyClient.getRequestOutcome} (`'commit_import'`).
|
|
74095
|
+
*
|
|
74096
|
+
* @example
|
|
74097
|
+
* ```typescript
|
|
74098
|
+
* const key = crypto.randomUUID(); // bind once; pass the same key on every retry
|
|
74099
|
+
* const revision = await client.vocabulary.commitImport(
|
|
74100
|
+
* importId,
|
|
74101
|
+
* {
|
|
74102
|
+
* title: 'Import the manufacturing scheme',
|
|
74103
|
+
* changeReason: 'Adopt the reviewed source',
|
|
74104
|
+
* decisions: proposal.reconciliation.map((entry) => ({
|
|
74105
|
+
* sourceKey: entry.sourceKey,
|
|
74106
|
+
* decision: 'create_new',
|
|
74107
|
+
* })),
|
|
74108
|
+
* },
|
|
74109
|
+
* { idempotencyKey: key },
|
|
74110
|
+
* );
|
|
74111
|
+
* ```
|
|
74112
|
+
*/
|
|
74113
|
+
async commitImport(importId, request, requestOptions) {
|
|
74114
|
+
const response = await this.api.commitImport(
|
|
74115
|
+
importId,
|
|
74116
|
+
CommitVocabularyImportRequestFromFrontToApi(request),
|
|
74117
|
+
idempotencyParams(requestOptions.idempotencyKey, requestOptions, requestOptions.ifMatch)
|
|
74118
|
+
).catch(rethrowVocabularyRefusal);
|
|
74119
|
+
return decodeResponse(response, VocabularyCandidateRevisionFromApiToFront);
|
|
74120
|
+
}
|
|
74121
|
+
// ---------------------------------------------------------------------------
|
|
74122
|
+
// Migration plans
|
|
74123
|
+
// ---------------------------------------------------------------------------
|
|
74124
|
+
/**
|
|
74125
|
+
* Store the reviewer's dispositions of legacy sorts over the current legacy
|
|
74126
|
+
* inventory. Converts nothing.
|
|
74127
|
+
*
|
|
74128
|
+
* @param request - One disposition per planned sort.
|
|
74129
|
+
* @param requestOptions - The required `idempotencyKey` and per-call options.
|
|
74130
|
+
* @returns The plan, with the fingerprint and per-sort usage of the inventory it binds.
|
|
74131
|
+
* @throws {@link VocabularyRefusedError} 422 `invalid_disposition` (a
|
|
74132
|
+
* `formal_in_use` sort planned `convert_lexical`), `invalid_request`; 400
|
|
74133
|
+
* `read_budget_exceeded`; 403 authority; 409 `vocabulary_plugin_unavailable`.
|
|
74134
|
+
* @throws {@link IdempotencyKeyReusedError} 422.
|
|
74135
|
+
* @throws {@link MutationOutcomeUnconfirmedError} 503.
|
|
74136
|
+
*
|
|
74137
|
+
* @remarks
|
|
74138
|
+
* `POST /api/v1/vocabulary/migration/plans` with `Idempotency-Key`. Read the
|
|
74139
|
+
* inventory first with {@link VocabularyClient.migrationPreview}. Recover an
|
|
74140
|
+
* unknown outcome with {@link VocabularyClient.getRequestOutcome}
|
|
74141
|
+
* (`'create_migration_plan'`).
|
|
74142
|
+
*
|
|
74143
|
+
* @example
|
|
74144
|
+
* ```typescript
|
|
74145
|
+
* const key = crypto.randomUUID(); // bind once; pass the same key on every retry
|
|
74146
|
+
* const plan = await client.vocabulary.createMigrationPlan(
|
|
74147
|
+
* { dispositions: [{ sortId, disposition: 'convert_lexical', rationale: 'Labels only' }] },
|
|
74148
|
+
* { idempotencyKey: key },
|
|
74149
|
+
* );
|
|
74150
|
+
* ```
|
|
74151
|
+
*/
|
|
74152
|
+
async createMigrationPlan(request, requestOptions) {
|
|
74153
|
+
const response = await this.api.createMigrationPlan(
|
|
74154
|
+
CreateVocabularyMigrationPlanRequestFromFrontToApi(request),
|
|
74155
|
+
idempotencyParams(requestOptions.idempotencyKey, requestOptions)
|
|
74156
|
+
).catch(rethrowVocabularyRefusal);
|
|
74157
|
+
return decodeResponse(response, VocabularyMigrationPlanFromApiToFront);
|
|
74158
|
+
}
|
|
74159
|
+
/**
|
|
74160
|
+
* One migration plan.
|
|
74161
|
+
*
|
|
74162
|
+
* @param planId - The plan (UUID).
|
|
74163
|
+
* @param requestOptions - Per-call options (timeout, retries, signal, headers).
|
|
74164
|
+
* @returns The plan.
|
|
74165
|
+
* @throws {@link NotFoundError} 404 for an unknown plan.
|
|
74166
|
+
* @throws {@link VocabularyRefusedError} 409 `vocabulary_plugin_unavailable`.
|
|
74167
|
+
*
|
|
74168
|
+
* @remarks
|
|
74169
|
+
* `GET /api/v1/vocabulary/migration/plans/{plan_id}`.
|
|
74170
|
+
*
|
|
74171
|
+
* @example
|
|
74172
|
+
* ```typescript
|
|
74173
|
+
* const plan = await client.vocabulary.getMigrationPlan(planId);
|
|
74174
|
+
* ```
|
|
74175
|
+
*/
|
|
74176
|
+
async getMigrationPlan(planId, requestOptions) {
|
|
74177
|
+
const response = await this.api.getMigrationPlan(planId, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
74178
|
+
return decodeResponse(response, VocabularyMigrationPlanFromApiToFront);
|
|
74179
|
+
}
|
|
74180
|
+
/**
|
|
74181
|
+
* Apply a migration plan as a new candidate on the active release.
|
|
74182
|
+
*
|
|
74183
|
+
* @param planId - The plan (UUID).
|
|
74184
|
+
* @param request - The title, the change reason, the target scheme and the
|
|
74185
|
+
* language of the legacy labels.
|
|
74186
|
+
* @param requestOptions - The required `idempotencyKey` and per-call options.
|
|
74187
|
+
* @returns The candidate revision: concepts, the `legacy_theory` artefact,
|
|
74188
|
+
* source associations and one `migration_decision` per planned sort.
|
|
74189
|
+
* @throws {@link NotFoundError} 404 for an unknown plan.
|
|
74190
|
+
* @throws {@link VocabularyRefusedError} 409 `migration_plan_stale` (the
|
|
74191
|
+
* legacy inventory changed; see `refusal.changedSorts`),
|
|
74192
|
+
* `active_release_changed`; 422 `invalid_records`, `import_too_large`;
|
|
74193
|
+
* 403 authority.
|
|
74194
|
+
* @throws {@link IdempotencyKeyReusedError} 422.
|
|
74195
|
+
* @throws {@link MutationOutcomeUnconfirmedError} 503.
|
|
74196
|
+
*
|
|
74197
|
+
* @remarks
|
|
74198
|
+
* `POST /api/v1/vocabulary/migration/plans/{plan_id}/apply` with
|
|
74199
|
+
* `Idempotency-Key`. No sort is converted, removed or reparented: the
|
|
74200
|
+
* candidate holds governed records only, and it still needs review,
|
|
74201
|
+
* approval, release and activation. Without `defaultLanguage` no label is
|
|
74202
|
+
* written. Recover an unknown outcome with
|
|
74203
|
+
* {@link VocabularyClient.getRequestOutcome} (`'apply_migration_plan'`).
|
|
74204
|
+
*
|
|
74205
|
+
* @example
|
|
74206
|
+
* ```typescript
|
|
74207
|
+
* const key = crypto.randomUUID(); // bind once; pass the same key on every retry
|
|
74208
|
+
* const revision = await client.vocabulary.applyMigrationPlan(
|
|
74209
|
+
* plan.planId,
|
|
74210
|
+
* {
|
|
74211
|
+
* title: 'Migrate the legacy vocabulary',
|
|
74212
|
+
* changeReason: 'Plan reviewed',
|
|
74213
|
+
* scheme: { existing: { schemeId } },
|
|
74214
|
+
* defaultLanguage: 'en',
|
|
74215
|
+
* },
|
|
74216
|
+
* { idempotencyKey: key },
|
|
74217
|
+
* );
|
|
74218
|
+
* ```
|
|
74219
|
+
*/
|
|
74220
|
+
async applyMigrationPlan(planId, request, requestOptions) {
|
|
74221
|
+
const response = await this.api.applyMigrationPlan(
|
|
74222
|
+
planId,
|
|
74223
|
+
ApplyVocabularyMigrationPlanRequestFromFrontToApi(request),
|
|
74224
|
+
idempotencyParams(requestOptions.idempotencyKey, requestOptions)
|
|
74225
|
+
).catch(rethrowVocabularyRefusal);
|
|
74226
|
+
return decodeResponse(response, VocabularyCandidateRevisionFromApiToFront);
|
|
74227
|
+
}
|
|
74228
|
+
// ---------------------------------------------------------------------------
|
|
74229
|
+
// Exports and SPARQL
|
|
74230
|
+
// ---------------------------------------------------------------------------
|
|
74231
|
+
/**
|
|
74232
|
+
* The records of a view as `kos-json/v1`, with the source preservation
|
|
74233
|
+
* inventory and a manifest.
|
|
74234
|
+
*
|
|
74235
|
+
* @param query - The view; the active release when absent.
|
|
74236
|
+
* @param requestOptions - Per-call options (timeout, retries, signal, headers).
|
|
74237
|
+
* @returns Every readable record by id, every `source_artifact` record, and
|
|
74238
|
+
* the manifest (record count, counts by kind, records digest, the records
|
|
74239
|
+
* that could not be read, the stored context manifest).
|
|
74240
|
+
* @throws {@link NotFoundError} 404 for an unknown release or revision.
|
|
74241
|
+
* @throws {@link VocabularyRefusedError} 400 `invalid_request`; 409
|
|
74242
|
+
* `vocabulary_plugin_unavailable`.
|
|
74243
|
+
*
|
|
74244
|
+
* @remarks
|
|
74245
|
+
* `GET /api/v1/vocabulary/exports/native`. A record that does not parse as
|
|
74246
|
+
* its kind is listed in `manifest.unreadable`, never dropped silently.
|
|
74247
|
+
*
|
|
74248
|
+
* @example
|
|
74249
|
+
* ```typescript
|
|
74250
|
+
* const exported = await client.vocabulary.exportNative();
|
|
74251
|
+
* console.log(exported.manifest.recordCount, exported.manifest.unreadable.length);
|
|
74252
|
+
* ```
|
|
74253
|
+
*/
|
|
74254
|
+
async exportNative(query, requestOptions) {
|
|
74255
|
+
const response = await this.api.exportNative(viewQuery(query?.view), toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
74256
|
+
return decodeResponse(response, VocabularyNativeExportFromApiToFront);
|
|
74257
|
+
}
|
|
74258
|
+
/**
|
|
74259
|
+
* The SKOS projection of one scheme as Turtle or RDF/XML, with its
|
|
74260
|
+
* manifest: the IRI of every published record and what the projection does
|
|
74261
|
+
* not express.
|
|
74262
|
+
*
|
|
74263
|
+
* @param query - The view, the scheme, the RDF syntax and `includeProvenance`.
|
|
74264
|
+
* @param requestOptions - Per-call options (timeout, retries, signal, headers).
|
|
74265
|
+
* @returns The content, its media type, its SHA-256 and the manifest.
|
|
74266
|
+
* @throws {@link NotFoundError} 404 for an unknown scheme, release or revision.
|
|
74267
|
+
* @throws {@link VocabularyRefusedError} 400 `invalid_request`; 409
|
|
74268
|
+
* `vocabulary_plugin_unavailable`; 422 `export_unrepresentable`.
|
|
74269
|
+
*
|
|
74270
|
+
* @remarks
|
|
74271
|
+
* `GET /api/v1/vocabulary/exports/skos` (`skos-projection/v1`,
|
|
74272
|
+
* `concept-iri/v1`). Read `manifest.losses` before treating the content as
|
|
74273
|
+
* the whole vocabulary: governance records, evidence and other schemes are
|
|
74274
|
+
* not projected.
|
|
74275
|
+
*
|
|
74276
|
+
* @example
|
|
74277
|
+
* ```typescript
|
|
74278
|
+
* const skos = await client.vocabulary.exportSkos({ schemeId, format: 'turtle' });
|
|
74279
|
+
* for (const loss of skos.manifest.losses) console.log(loss.kind, loss.recordIds.length);
|
|
74280
|
+
* ```
|
|
74281
|
+
*/
|
|
74282
|
+
async exportSkos(query, requestOptions) {
|
|
74283
|
+
const wire = {
|
|
74284
|
+
...viewQuery(query.view),
|
|
74285
|
+
scheme_id: query.schemeId
|
|
74286
|
+
};
|
|
74287
|
+
if (query.format !== void 0) wire.format = query.format;
|
|
74288
|
+
if (query.includeProvenance !== void 0) wire.include_provenance = query.includeProvenance;
|
|
74289
|
+
const response = await this.api.exportSkos(wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
74290
|
+
return decodeResponse(response, VocabularySkosExportFromApiToFront);
|
|
74291
|
+
}
|
|
74292
|
+
/**
|
|
74293
|
+
* One read-only SPARQL query over the SKOS projection of one scheme of one
|
|
74294
|
+
* view.
|
|
74295
|
+
*
|
|
74296
|
+
* @param request - The query, the scheme, the view and `maxResults` (1 to 100000).
|
|
74297
|
+
* @param requestOptions - Per-call options (timeout, retries, signal, headers).
|
|
74298
|
+
* @returns The answer, discriminated by `form`: the W3C results document
|
|
74299
|
+
* for `select` and `ask`, N-Triples for `construct` and `describe`; the
|
|
74300
|
+
* dataset it was computed over; `complete` and `stopReason`.
|
|
74301
|
+
* @throws {@link VocabularyRefusedError} 400 `sparql_unsupported` (an
|
|
74302
|
+
* update, a `SERVICE` clause or a `FROM`/`FROM NAMED` clause),
|
|
74303
|
+
* `invalid_request` (a query that does not parse); 422
|
|
74304
|
+
* `export_unrepresentable` (the projection holds a value the dataset
|
|
74305
|
+
* cannot load); 503 `vocabulary_sparql_unavailable`, `sparql_deadline`
|
|
74306
|
+
* (no answer before the deadline); 409 `vocabulary_plugin_unavailable`.
|
|
74307
|
+
* @throws {@link NotFoundError} 404 for an unknown scheme, release or revision.
|
|
74308
|
+
*
|
|
74309
|
+
* @remarks
|
|
74310
|
+
* `POST /api/v1/vocabulary/sparql`. The query is a string value: the body
|
|
74311
|
+
* transform never changes it. A reached `maxResults` or deadline answers
|
|
74312
|
+
* `complete: false` with `stopReason`.
|
|
74313
|
+
*
|
|
74314
|
+
* @example
|
|
74315
|
+
* ```typescript
|
|
74316
|
+
* const answer = await client.vocabulary.sparql({
|
|
74317
|
+
* schemeId,
|
|
74318
|
+
* query: 'SELECT ?c WHERE { ?c a <http://www.w3.org/2004/02/skos/core#Concept> }',
|
|
74319
|
+
* });
|
|
74320
|
+
* if (answer.form === 'select') console.log(answer.results.results.bindings.length);
|
|
74321
|
+
* ```
|
|
74322
|
+
*/
|
|
74323
|
+
async sparql(request, requestOptions) {
|
|
74324
|
+
const response = await this.api.sparqlQuery(VocabularySparqlRequestFromFrontToApi(request), toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
74325
|
+
return decodeResponse(response, VocabularySparqlResultFromApiToFront);
|
|
74326
|
+
}
|
|
71269
74327
|
};
|
|
71270
74328
|
|
|
71271
74329
|
// src/normalizers/plugins.ts
|