@kortexya/reasoninglayer 1.20.0 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -7,7 +7,7 @@ var __export = (target, all) => {
7
7
  };
8
8
 
9
9
  // src/config.ts
10
- var SDK_VERSION = "1.20.0";
10
+ var SDK_VERSION = "1.22.0";
11
11
  function resolveConfig(config) {
12
12
  if (!config.baseUrl) {
13
13
  throw new Error("ClientConfig.baseUrl is required");
@@ -2835,9 +2835,10 @@ var Ingestion = class {
2835
2835
  * @request POST:/api/v1/ingest/document
2836
2836
  * @secure
2837
2837
  */
2838
- ingestDocument = (data, params = {}) => this.http.request({
2838
+ ingestDocument = (data, query, params = {}) => this.http.request({
2839
2839
  path: `/api/v1/ingest/document`,
2840
2840
  method: "POST",
2841
+ query,
2841
2842
  body: data,
2842
2843
  secure: true,
2843
2844
  type: "application/json",
@@ -2889,7 +2890,7 @@ var Ingestion = class {
2889
2890
  * @request POST:/api/v1/ingest/markdown
2890
2891
  * @secure
2891
2892
  */
2892
- ingestMarkdown = (query, data, params = {}) => this.http.request({
2893
+ ingestMarkdown = (data, query, params = {}) => this.http.request({
2893
2894
  path: `/api/v1/ingest/markdown`,
2894
2895
  method: "POST",
2895
2896
  query,
@@ -2924,7 +2925,7 @@ var Ingestion = class {
2924
2925
  * @request POST:/api/v1/ingest/rdf
2925
2926
  * @secure
2926
2927
  */
2927
- ingestRdf = (query, data, params = {}) => this.http.request({
2928
+ ingestRdf = (data, query, params = {}) => this.http.request({
2928
2929
  path: `/api/v1/ingest/rdf`,
2929
2930
  method: "POST",
2930
2931
  query,
@@ -12257,7 +12258,9 @@ function SortDtoFromApiToFront(dto) {
12257
12258
  description: dto.description ?? void 0,
12258
12259
  origin: dto.origin ? SortOriginDtoFromApiToFront(dto.origin) : void 0,
12259
12260
  status: dto.status ? SortStatusDtoFromApiToFront(dto.status) : void 0,
12260
- needsReview: dto.needs_review
12261
+ needsReview: dto.needs_review,
12262
+ pluginId: dto.plugin_id ?? void 0,
12263
+ pluginLocalName: dto.plugin_local_name ?? void 0
12261
12264
  };
12262
12265
  }
12263
12266
  function SortInfoDtoFromApiToFront(dto) {
@@ -13388,8 +13391,9 @@ var TermsClient = class {
13388
13391
  return BulkAddTermsResponseFromApiToFront(response.data);
13389
13392
  }
13390
13393
  /**
13391
- * List all terms for the authenticated tenant.
13394
+ * List terms for the authenticated tenant.
13392
13395
  *
13396
+ * @param query - Optional paging and sort filter. Omit for every term.
13393
13397
  * @returns The list of terms with total count.
13394
13398
  * @throws {ApiError} If the request fails.
13395
13399
  *
@@ -13398,17 +13402,24 @@ var TermsClient = class {
13398
13402
  * Requires X-Tenant-Id header (set via client configuration).
13399
13403
  * Uses the tagged {@link ValueDto} serialization format.
13400
13404
  *
13405
+ * `sortName` filters on the sort's committed name. For a plugin-contributed
13406
+ * sort that is the namespaced form (`plugin:<plugin-name>:<local>`), which
13407
+ * {@link SortDto.name} carries and {@link SortDto.pluginLocalName} maps back
13408
+ * to the name its author wrote.
13409
+ *
13401
13410
  * @example
13402
13411
  * ```typescript
13403
13412
  * const result = await client.terms.listTerms();
13404
13413
  * console.log(`Found ${result.count} terms`);
13405
- * for (const term of result.terms) {
13406
- * console.log(term.id, term.sortName);
13407
- * }
13414
+ *
13415
+ * // Only the first page of one sort's terms.
13416
+ * const page = await client.terms.listTerms({ sortName: 'person', limit: 50 });
13408
13417
  * ```
13409
13418
  */
13410
- async listTerms() {
13411
- const response = await this.api.listTerms();
13419
+ async listTerms(query) {
13420
+ const response = await this.api.listTerms(
13421
+ query ? { limit: query.limit, offset: query.offset, sort_name: query.sortName } : void 0
13422
+ );
13412
13423
  return TermListResponseFromApiToFront(response.data);
13413
13424
  }
13414
13425
  /**
@@ -20404,8 +20415,8 @@ var IngestionClient = class {
20404
20415
  */
20405
20416
  async ingestRdf(request) {
20406
20417
  const response = await this.api.ingestRdf(
20407
- { sync: request.sync ?? false },
20408
- IngestRdfRequestFromFrontToApi(request)
20418
+ IngestRdfRequestFromFrontToApi(request),
20419
+ { sync: request.sync ?? false }
20409
20420
  );
20410
20421
  return IngestRdfResponseFromApiToFront(response.data);
20411
20422
  }
@@ -27027,7 +27038,8 @@ function ClearTenantResponseFromApiToFront(dto) {
27027
27038
  fingerprintsDeleted: dto.fingerprints_deleted,
27028
27039
  sortsDeleted: dto.sorts_deleted,
27029
27040
  inferenceStateCleared: dto.inference_state_cleared,
27030
- cacheInvalidated: dto.cache_invalidated
27041
+ cacheInvalidated: dto.cache_invalidated,
27042
+ pluginInstallsDeleted: dto.plugin_installs_deleted
27031
27043
  };
27032
27044
  }
27033
27045
  function TenantInfoFromApiToFront(dto) {
@@ -28930,6 +28942,12 @@ function SourceExcerptDtoFromApiToFront(dto) {
28930
28942
  sourceDocument: wire.source_document ?? void 0
28931
28943
  };
28932
28944
  }
28945
+ function SchemaExcerptDtoFromApiToFront(dto) {
28946
+ return {
28947
+ sortName: dto.sort_name,
28948
+ featureNames: dto.feature_names
28949
+ };
28950
+ }
28933
28951
  function ClaimAnnotationDtoFromApiToFront(dto) {
28934
28952
  return {
28935
28953
  text: dto.text,
@@ -28938,6 +28956,7 @@ function ClaimAnnotationDtoFromApiToFront(dto) {
28938
28956
  confidence: dto.confidence,
28939
28957
  sourceTermIds: dto.source_term_ids,
28940
28958
  sourceExcerpts: dto.source_excerpts?.map(SourceExcerptDtoFromApiToFront),
28959
+ schemaExcerpts: dto.schema_excerpts?.map(SchemaExcerptDtoFromApiToFront),
28941
28960
  osfqlQuery: dto.osfql_query ?? void 0,
28942
28961
  derivationSummary: dto.derivation_summary ? DerivationSummaryDtoFromApiToFront(dto.derivation_summary) : void 0
28943
28962
  };
@@ -32409,13 +32428,17 @@ function InstallPluginResponseFromApiToFront(dto) {
32409
32428
  installId: dto.install_id,
32410
32429
  sortsAdded: dto.sorts_added,
32411
32430
  rulesAdded: dto.rules_added,
32412
- state: dto.state
32431
+ state: dto.state,
32432
+ degraded: dto.degraded,
32433
+ degradation: dto.degradation ?? void 0
32413
32434
  };
32414
32435
  }
32415
32436
  function InstallStateFromApiToFront(dto) {
32416
32437
  return {
32417
32438
  installId: dto.install_id,
32418
- state: dto.state
32439
+ state: dto.state,
32440
+ degraded: dto.degraded,
32441
+ degradation: dto.degradation ?? void 0
32419
32442
  };
32420
32443
  }
32421
32444
  function UpgradeInstallRequestFromFrontToApi(model) {
@@ -32439,7 +32462,9 @@ function InstallSummaryFromApiToFront(dto) {
32439
32462
  pluginId: dto.plugin_id,
32440
32463
  version: dto.version,
32441
32464
  state: dto.state,
32442
- systemWide: dto.system_wide
32465
+ systemWide: dto.system_wide,
32466
+ degraded: dto.degraded,
32467
+ degradation: dto.degradation ?? void 0
32443
32468
  };
32444
32469
  }
32445
32470
  function InstallListFromApiToFront(dto) {