@kortexya/reasoninglayer 7.1.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +114 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +316 -74
- package/dist/index.d.ts +316 -74
- package/dist/index.js +114 -15
- 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 = "8.0.0";
|
|
9
9
|
function resolveConfig(config) {
|
|
10
10
|
if (!config.baseUrl) {
|
|
11
11
|
throw new Error("ClientConfig.baseUrl is required");
|
|
@@ -17104,6 +17104,23 @@ var Vocabulary = class {
|
|
|
17104
17104
|
format: "json",
|
|
17105
17105
|
...params
|
|
17106
17106
|
});
|
|
17107
|
+
/**
|
|
17108
|
+
* No description
|
|
17109
|
+
*
|
|
17110
|
+
* @tags vocabulary
|
|
17111
|
+
* @name RevisionRecords
|
|
17112
|
+
* @summary `GET /api/v1/vocabulary/revisions/{revision_id}/records` — the records the revision's cumulative change set inserts or replaces, by id, optionally of one kind (#628). The revision answer counts them; this read pages them.
|
|
17113
|
+
* @request GET:/api/v1/vocabulary/revisions/{revision_id}/records
|
|
17114
|
+
* @secure
|
|
17115
|
+
*/
|
|
17116
|
+
revisionRecords = (revisionId, query, params = {}) => this.http.request({
|
|
17117
|
+
path: `/api/v1/vocabulary/revisions/${revisionId}/records`,
|
|
17118
|
+
method: "GET",
|
|
17119
|
+
query,
|
|
17120
|
+
secure: true,
|
|
17121
|
+
format: "json",
|
|
17122
|
+
...params
|
|
17123
|
+
});
|
|
17107
17124
|
/**
|
|
17108
17125
|
* No description
|
|
17109
17126
|
*
|
|
@@ -17890,7 +17907,8 @@ function FeatureDescriptorDtoFromApiToFront(dto) {
|
|
|
17890
17907
|
minCount: dto.min_count ?? void 0,
|
|
17891
17908
|
maxCount: dto.max_count ?? void 0,
|
|
17892
17909
|
cardinalityOrigin: dto.cardinality_origin ?? void 0,
|
|
17893
|
-
annotations: definedRecord2(dto.annotations)
|
|
17910
|
+
annotations: definedRecord2(dto.annotations),
|
|
17911
|
+
rangeConjunction: dto.range_conjunction
|
|
17894
17912
|
};
|
|
17895
17913
|
}
|
|
17896
17914
|
function FeatureDescriptorDtoFromFrontToApi(model) {
|
|
@@ -19570,7 +19588,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
19570
19588
|
created_by: [1, 0],
|
|
19571
19589
|
minted_ids: [1, { object: {} }],
|
|
19572
19590
|
outcome: [1, 0],
|
|
19573
|
-
|
|
19591
|
+
record_counts: [1, { object: {} }],
|
|
19574
19592
|
removals: [1, { array: 0 }],
|
|
19575
19593
|
replayed: [1, 0],
|
|
19576
19594
|
revision_id: [1, 0],
|
|
@@ -21445,7 +21463,8 @@ var RESPONSE_COMPONENTS = {
|
|
|
21445
21463
|
relations_integrated: [1, 0],
|
|
21446
21464
|
sort_names: [1, { array: 0 }],
|
|
21447
21465
|
term_ids: [1, { array: 0 }],
|
|
21448
|
-
total_tokens: [1, 0]
|
|
21466
|
+
total_tokens: [1, 0],
|
|
21467
|
+
work_cache: [2, "IngestionWorkCacheDto"]
|
|
21449
21468
|
}
|
|
21450
21469
|
},
|
|
21451
21470
|
DocumentStatusCounts: {
|
|
@@ -22069,6 +22088,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
22069
22088
|
object: {
|
|
22070
22089
|
annotations: [0, { object: {} }],
|
|
22071
22090
|
name: [1, 0],
|
|
22091
|
+
range_conjunction: [0, { array: 0 }],
|
|
22072
22092
|
declared_by: [1, { array: 0 }],
|
|
22073
22093
|
signature: [1, 0]
|
|
22074
22094
|
}
|
|
@@ -22176,7 +22196,13 @@ var RESPONSE_COMPONENTS = {
|
|
|
22176
22196
|
},
|
|
22177
22197
|
FeatureBindingDto: { object: { name: [1, 0], value: [1, 0] } },
|
|
22178
22198
|
FeatureChangeDto: { object: { feature: [1, 0] } },
|
|
22179
|
-
FeatureDescriptorDto: {
|
|
22199
|
+
FeatureDescriptorDto: {
|
|
22200
|
+
object: {
|
|
22201
|
+
annotations: [0, { object: {} }],
|
|
22202
|
+
name: [1, 0],
|
|
22203
|
+
range_conjunction: [0, { array: 0 }]
|
|
22204
|
+
}
|
|
22205
|
+
},
|
|
22180
22206
|
FeatureDiff: { object: { change: [1, 0], feature: [1, 0] } },
|
|
22181
22207
|
FeatureFilterDto: { object: { name: [1, 0], value: [1, 0] } },
|
|
22182
22208
|
FeatureMismatchDto: {
|
|
@@ -25707,6 +25733,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
25707
25733
|
revision_id: [1, 0]
|
|
25708
25734
|
}
|
|
25709
25735
|
},
|
|
25736
|
+
RevisionRecordPageResponse: { object: { items: [1, { array: 0 }], revision_id: [1, 0] } },
|
|
25710
25737
|
RevisionSummaryDto: {
|
|
25711
25738
|
object: {
|
|
25712
25739
|
authors: [1, { array: 0 }],
|
|
@@ -31278,6 +31305,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
31278
31305
|
path: "/api/v1/vocabulary/revisions/{revision_id}/diff",
|
|
31279
31306
|
responses: { 200: "RevisionDiffDto" }
|
|
31280
31307
|
},
|
|
31308
|
+
revisionRecords: {
|
|
31309
|
+
method: "GET",
|
|
31310
|
+
path: "/api/v1/vocabulary/revisions/{revision_id}/records",
|
|
31311
|
+
responses: { 200: "RevisionRecordPageResponse" }
|
|
31312
|
+
},
|
|
31281
31313
|
revokeApproverRoleHandler: {
|
|
31282
31314
|
method: "DELETE",
|
|
31283
31315
|
path: "/api/v1/action-reviews/role-bindings/{principal}",
|
|
@@ -42728,7 +42760,8 @@ function DocumentStatsDtoFromApiToFront(dto) {
|
|
|
42728
42760
|
sortNames: dto.sort_names,
|
|
42729
42761
|
termIds: dto.term_ids,
|
|
42730
42762
|
totalTokens: dto.total_tokens,
|
|
42731
|
-
fcaDiscovery: dto.fca_discovery ? FcaIngestionReportFromApiToFront(dto.fca_discovery) : void 0
|
|
42763
|
+
fcaDiscovery: dto.fca_discovery ? FcaIngestionReportFromApiToFront(dto.fca_discovery) : void 0,
|
|
42764
|
+
workCache: dto.work_cache ? IngestionWorkCacheDtoFromApiToFront(dto.work_cache) : void 0
|
|
42732
42765
|
};
|
|
42733
42766
|
}
|
|
42734
42767
|
function SessionStatsResponseFromApiToFront(dto) {
|
|
@@ -51253,8 +51286,7 @@ var AnalysisClient = class {
|
|
|
51253
51286
|
* the first question, and the search report.
|
|
51254
51287
|
* @throws {ForbiddenError} 403 with code `exploration_actor_required` when
|
|
51255
51288
|
* the request carries no gateway human actor (`authenticatedUser`).
|
|
51256
|
-
* @throws {BadRequestError} 400 for an unknown sort name,
|
|
51257
|
-
* population bound (`exploration_population_limit`), native-predicate
|
|
51289
|
+
* @throws {BadRequestError} 400 for an unknown sort name, native-predicate
|
|
51258
51290
|
* semantics, or a scaled interpretation that is not complete.
|
|
51259
51291
|
*
|
|
51260
51292
|
* @remarks
|
|
@@ -51389,8 +51421,8 @@ var AnalysisClient = class {
|
|
|
51389
51421
|
*
|
|
51390
51422
|
* @param sessionId - Exploration session ID.
|
|
51391
51423
|
* @param request - The bounds of this search step (`maxWork`,
|
|
51392
|
-
* `maxCandidates`, `searchTimeoutMs`);
|
|
51393
|
-
*
|
|
51424
|
+
* `maxCandidates`, `searchTimeoutMs`); an omitted or `null` bound is
|
|
51425
|
+
* unbounded.
|
|
51394
51426
|
* @param requestOptions - Per-call request options.
|
|
51395
51427
|
* @returns The next question (absent when the search stopped again or was
|
|
51396
51428
|
* exhausted), the progress, and the search report.
|
|
@@ -70648,6 +70680,12 @@ function TaxonomyPolicyInputFromFrontToApi(record) {
|
|
|
70648
70680
|
}
|
|
70649
70681
|
return out;
|
|
70650
70682
|
}
|
|
70683
|
+
function DefinitionPolicyInputFromFrontToApi(record) {
|
|
70684
|
+
return {
|
|
70685
|
+
scheme: VocabularyRecordRefFromFrontToApi(record.scheme),
|
|
70686
|
+
definitions: record.definitions
|
|
70687
|
+
};
|
|
70688
|
+
}
|
|
70651
70689
|
function ExternalConceptInputFromFrontToApi(record) {
|
|
70652
70690
|
const out = {
|
|
70653
70691
|
authority: record.authority,
|
|
@@ -70806,10 +70844,19 @@ function VocabularyRecordInputFromFrontToApi(record) {
|
|
|
70806
70844
|
};
|
|
70807
70845
|
case "collection_member":
|
|
70808
70846
|
return { kind: "collection_member", ...CollectionMemberInputFromFrontToApi(record) };
|
|
70847
|
+
case "definition_policy":
|
|
70848
|
+
return { kind: "definition_policy", ...DefinitionPolicyInputFromFrontToApi(record) };
|
|
70809
70849
|
}
|
|
70810
70850
|
}
|
|
70811
70851
|
function VocabularyRecordOperationFromFrontToApi(operation) {
|
|
70812
|
-
|
|
70852
|
+
switch (operation.op) {
|
|
70853
|
+
case "upsert":
|
|
70854
|
+
return { op: "upsert", record: VocabularyRecordInputFromFrontToApi(operation.record) };
|
|
70855
|
+
case "remove":
|
|
70856
|
+
return { op: "remove", record_id: operation.recordId };
|
|
70857
|
+
case "accept_proposals":
|
|
70858
|
+
return { op: "accept_proposals" };
|
|
70859
|
+
}
|
|
70813
70860
|
}
|
|
70814
70861
|
function CreateVocabularyCandidateRequestFromFrontToApi(request) {
|
|
70815
70862
|
return {
|
|
@@ -71171,6 +71218,16 @@ function VocabularyTaxonomyPolicyRecordFromApiToFront(dto) {
|
|
|
71171
71218
|
if (present(dto.partitive_transitive)) out.partitiveTransitive = dto.partitive_transitive;
|
|
71172
71219
|
return out;
|
|
71173
71220
|
}
|
|
71221
|
+
function VocabularyDefinitionPolicyRecordFromApiToFront(dto) {
|
|
71222
|
+
return {
|
|
71223
|
+
recordId: dto.record_id,
|
|
71224
|
+
revision: dto.revision,
|
|
71225
|
+
changeReason: dto.change_reason,
|
|
71226
|
+
scheme: dto.scheme,
|
|
71227
|
+
policy: dto.policy,
|
|
71228
|
+
definitions: dto.definitions
|
|
71229
|
+
};
|
|
71230
|
+
}
|
|
71174
71231
|
function VocabularyExternalConceptRecordFromApiToFront(dto) {
|
|
71175
71232
|
const out = {
|
|
71176
71233
|
recordId: dto.record_id,
|
|
@@ -71389,6 +71446,11 @@ function VocabularyRecordViewFromApiToFront(dto) {
|
|
|
71389
71446
|
kind: "migration_decision",
|
|
71390
71447
|
...VocabularyMigrationDecisionRecordFromApiToFront(dto)
|
|
71391
71448
|
};
|
|
71449
|
+
case "definition_policy":
|
|
71450
|
+
return {
|
|
71451
|
+
kind: "definition_policy",
|
|
71452
|
+
...VocabularyDefinitionPolicyRecordFromApiToFront(dto)
|
|
71453
|
+
};
|
|
71392
71454
|
}
|
|
71393
71455
|
}
|
|
71394
71456
|
function FindingContextFromApiToFront(dto) {
|
|
@@ -71756,7 +71818,7 @@ function VocabularyCandidateRevisionFromApiToFront(dto) {
|
|
|
71756
71818
|
createdBy: dto.created_by,
|
|
71757
71819
|
createdAt: dto.created_at,
|
|
71758
71820
|
changeReason: dto.change_reason,
|
|
71759
|
-
|
|
71821
|
+
recordCounts: dataMap(dto.record_counts),
|
|
71760
71822
|
removals: dto.removals,
|
|
71761
71823
|
mintedIds: dataMap(dto.minted_ids),
|
|
71762
71824
|
advisoryFindings: dto.advisory_findings.map(VocabularyFindingFromApiToFront),
|
|
@@ -71937,6 +71999,14 @@ function VocabularyRecordPageFromApiToFront(dto) {
|
|
|
71937
71999
|
if (present(dto.next_cursor)) out.nextCursor = dto.next_cursor;
|
|
71938
72000
|
return out;
|
|
71939
72001
|
}
|
|
72002
|
+
function VocabularyRevisionRecordPageFromApiToFront(dto) {
|
|
72003
|
+
const out = {
|
|
72004
|
+
revisionId: dto.revision_id,
|
|
72005
|
+
items: dto.items.map(VocabularyRecordViewFromApiToFront)
|
|
72006
|
+
};
|
|
72007
|
+
if (present(dto.next_cursor)) out.nextCursor = dto.next_cursor;
|
|
72008
|
+
return out;
|
|
72009
|
+
}
|
|
71940
72010
|
function VocabularyActivationResultFromApiToFront(dto) {
|
|
71941
72011
|
const out = {
|
|
71942
72012
|
releaseId: dto.release_id,
|
|
@@ -73063,7 +73133,7 @@ var VocabularyClient = class {
|
|
|
73063
73133
|
return decodeResponse(response, VocabularyCandidateRevisionFromApiToFront);
|
|
73064
73134
|
}
|
|
73065
73135
|
/**
|
|
73066
|
-
* One revision: its baseline, authors,
|
|
73136
|
+
* One revision: its baseline, authors, record counts and removals.
|
|
73067
73137
|
*
|
|
73068
73138
|
* @param revisionId - The revision (UUID).
|
|
73069
73139
|
* @param requestOptions - Per-call options (timeout, retries, signal, headers).
|
|
@@ -73072,18 +73142,47 @@ var VocabularyClient = class {
|
|
|
73072
73142
|
* @throws {@link VocabularyRefusedError} 409 `vocabulary_plugin_unavailable`.
|
|
73073
73143
|
*
|
|
73074
73144
|
* @remarks
|
|
73075
|
-
* `GET /api/v1/vocabulary/revisions/{revision_id}`.
|
|
73145
|
+
* `GET /api/v1/vocabulary/revisions/{revision_id}`. The answer counts the
|
|
73146
|
+
* records by kind (`recordCounts`); read the records with
|
|
73147
|
+
* {@link VocabularyClient.listRevisionRecords}.
|
|
73076
73148
|
*
|
|
73077
73149
|
* @example
|
|
73078
73150
|
* ```typescript
|
|
73079
73151
|
* const revision = await client.vocabulary.getRevision(revisionId);
|
|
73080
|
-
* const
|
|
73152
|
+
* const conceptCount = revision.recordCounts['concept'] ?? 0;
|
|
73081
73153
|
* ```
|
|
73082
73154
|
*/
|
|
73083
73155
|
async getRevision(revisionId, requestOptions) {
|
|
73084
73156
|
const response = await this.api.getRevision(revisionId, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
73085
73157
|
return decodeResponse(response, VocabularyCandidateRevisionFromApiToFront);
|
|
73086
73158
|
}
|
|
73159
|
+
/**
|
|
73160
|
+
* One page of the records a revision's cumulative change set inserts or
|
|
73161
|
+
* replaces.
|
|
73162
|
+
*
|
|
73163
|
+
* @param revisionId - The revision (UUID).
|
|
73164
|
+
* @param query - A record-kind filter and cursor paging (`limit` 1 to 500).
|
|
73165
|
+
* @param requestOptions - Per-call options (timeout, retries, signal, headers).
|
|
73166
|
+
* @returns The records and the next cursor.
|
|
73167
|
+
* @throws {@link NotFoundError} 404 for an unknown revision.
|
|
73168
|
+
* @throws {@link VocabularyRefusedError} 400 `invalid_request`; 409
|
|
73169
|
+
* `vocabulary_plugin_unavailable`.
|
|
73170
|
+
*
|
|
73171
|
+
* @remarks
|
|
73172
|
+
* `GET /api/v1/vocabulary/revisions/{revision_id}/records?kind&cursor&limit`.
|
|
73173
|
+
* Records come by id; the engine default page size is 50.
|
|
73174
|
+
*
|
|
73175
|
+
* @example
|
|
73176
|
+
* ```typescript
|
|
73177
|
+
* const page = await client.vocabulary.listRevisionRecords(revisionId, { kind: 'concept' });
|
|
73178
|
+
* ```
|
|
73179
|
+
*/
|
|
73180
|
+
async listRevisionRecords(revisionId, query, requestOptions) {
|
|
73181
|
+
const wire = pageQuery(query);
|
|
73182
|
+
if (query?.kind !== void 0) wire.kind = query.kind;
|
|
73183
|
+
const response = await this.api.revisionRecords(revisionId, wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
73184
|
+
return decodeResponse(response, VocabularyRevisionRecordPageFromApiToFront);
|
|
73185
|
+
}
|
|
73087
73186
|
/**
|
|
73088
73187
|
* A revision against its baseline: records added, changed (with per-feature
|
|
73089
73188
|
* before/after values) and removed.
|