Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,7 @@ knowledge-base/api-reference/

# Local config files with credentials
packages/llm-batch/config.json

# OpenAPI specs for generated clients
packages/context-registry/src/spec/*.yaml
packages/tabular-orchestration/src/spec/*.yaml
2 changes: 1 addition & 1 deletion adr/009-tabular-orchestration-release-strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ An end-to-end workflow commonly uses both to prepare context and submit a predic

```mermaid
flowchart TD
subgraph ctx ["@sap-ai-sdk/ctx-registry"]
subgraph ctx ["@sap-ai-sdk/context-registry"]
DD[Data Destination]
TA[Tabular Artifact]
SC[Scenario Config Artifact]
Expand Down
51 changes: 51 additions & 0 deletions packages/context-registry/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "@sap-ai-sdk/context-registry",
"version": "2.15.0",
"description": "This package provides a client for the SAP AI Core Context Registry service.",
"keywords": [
"context-registry",
"sap-ai-sdk"
],
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/SAP/ai-sdk-js",
"directory": "packages/context-registry"
},
"files": [
"dist/**/*.js",
"dist/**/*.js.map",
"dist/**/*.d.ts",
"dist/**/*.d.ts.map"
],
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./internal.js": {
"types": "./dist/internal.d.ts",
"default": "./dist/internal.js"
}
},
"scripts": {
"compile": "tsc",
"test": "vitest run",
"lint": "oxlint && oxfmt --check .",
"lint:fix": "oxlint --fix && oxfmt .",
"generate": "openapi-generator --generateESM --clearOutputDir -i ./src/spec/context-registry-async.yaml -o ./src/client -s ./src/spec/options-per-service.json && pnpm update-imports && pnpm lint:fix",
"update-imports": "node ../../scripts/update-imports.ts ./src/client/context-registry"
},
"dependencies": {
"@sap-ai-sdk/core": "workspace:^",
"@sap-cloud-sdk/connectivity": "^4.8.0",
"@sap-cloud-sdk/http-client": "^4.8.0",
"@sap-cloud-sdk/openapi": "^4.8.0"
},
"devDependencies": {
"vitest": "4.1.10"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,239 @@
/*
* Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved.
*
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/
import { OpenApiRequestBuilder } from '@sap-ai-sdk/core';

import type {
DataDestinationAsyncGetDataDestinations,
DataDestinationAsyncGetDataDestination,
DataDestinationAsyncCreateDataDestination,
DataDestinationAsyncAsyncCreateDataDestinationResponse,
DataDestinationCommonPatchDataDestination,
DataDestinationCommonLabels,
DataDestinationCommonValidateDataDestinationRequest,
DataDestinationAsyncValidateDataDestinationResponse
} from './schema/index.js';
/**
* Representation of the 'DataDestinationAsyncSpecificationDataDestinationsApi'.
* This API is part of the 'context-registry' service.
*/
export const DataDestinationAsyncSpecificationDataDestinationsApi = {
_defaultBasePath: '/admin/tcr',
/**
* Get all data destinations in the tenant (resource group)
* @param queryParameters - Object containing the following keys: $top, $skip, $count.
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
* @returns The request builder, use the `execute()` method to trigger the request.
*/
getAllDataDestinations: (
queryParameters: { $top?: number; $skip?: number; $count?: boolean },
headerParameters: { 'AI-Resource-Group': string }
) =>
new OpenApiRequestBuilder<DataDestinationAsyncGetDataDestinations>(
'get',
'/dataDestinations',
{
headerParameters,
queryParameters
},
DataDestinationAsyncSpecificationDataDestinationsApi._defaultBasePath
),
/**
* Get metadata of a specific data destination (excluding credentials)
* @param dataDestinationName - The ID of the data destination to get
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
* @returns The request builder, use the `execute()` method to trigger the request.
*/
getDataDestinationByName: (
dataDestinationName: string,
headerParameters: { 'AI-Resource-Group': string }
) =>
new OpenApiRequestBuilder<DataDestinationAsyncGetDataDestination>(
'get',
'/dataDestinations/{dataDestinationName}',
{
pathParameters: { dataDestinationName },
headerParameters
},
DataDestinationAsyncSpecificationDataDestinationsApi._defaultBasePath
),
/**
* Create a data destination asynchronously. Schema validation happens synchronously; credential validation and secret storage run in a background task. Poll GET /dataDestinations/{name} to track progress via status and errorMessage. Returns 202 (not exists or ERROR retry), 409 (ACTIVE or DELETING), 422 (retry exhausted).
*
* @param dataDestinationName - Unique identifier for the data destination
* @param body - Request body.
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
* @returns The request builder, use the `execute()` method to trigger the request.
*/
createUpdateDataDestination: (
dataDestinationName: string,
body: DataDestinationAsyncCreateDataDestination,
headerParameters: { 'AI-Resource-Group': string }
) =>
new OpenApiRequestBuilder<DataDestinationAsyncAsyncCreateDataDestinationResponse>(
'put',
'/dataDestinations/{dataDestinationName}',
{
pathParameters: { dataDestinationName },
body,
headerParameters: {
'content-type': 'application/json',
...headerParameters
}
},
DataDestinationAsyncSpecificationDataDestinationsApi._defaultBasePath
),
/**
* Update a data destination (excluding name and type)
* @param dataDestinationName - The ID of the data destination to update
* @param body - Request body.
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
* @returns The request builder, use the `execute()` method to trigger the request.
*/
patchDataDestinationByName: (
dataDestinationName: string,
body: DataDestinationCommonPatchDataDestination,
headerParameters: { 'AI-Resource-Group': string }
) =>
new OpenApiRequestBuilder<any>(
'patch',
'/dataDestinations/{dataDestinationName}',
{
pathParameters: { dataDestinationName },
body,
headerParameters: {
'content-type': 'application/json',
...headerParameters
}
},
DataDestinationAsyncSpecificationDataDestinationsApi._defaultBasePath
),
/**
* Mark the data destination for deletion. Synchronously checks for dependent TabularArtifacts; returns 202 immediately after marking DELETING. The cron reaper handles secret deletion and hard delete.
*
* @param dataDestinationName - The ID of the data destination to delete
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
* @returns The request builder, use the `execute()` method to trigger the request.
*/
deleteDataDestinationByName: (
dataDestinationName: string,
headerParameters: { 'AI-Resource-Group': string }
) =>
new OpenApiRequestBuilder<any>(
'delete',
'/dataDestinations/{dataDestinationName}',
{
pathParameters: { dataDestinationName },
headerParameters
},
DataDestinationAsyncSpecificationDataDestinationsApi._defaultBasePath
),
/**
* Search data destinations by label key-value pairs
* @param body - Request body.
* @param queryParameters - Object containing the following keys: $top, $skip, $count.
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
* @returns The request builder, use the `execute()` method to trigger the request.
*/
searchDestinations: (
body: {
labels: DataDestinationCommonLabels;
} & Record<string, any>,
queryParameters: { $top?: number; $skip?: number; $count?: boolean },
headerParameters: { 'AI-Resource-Group': string }
) =>
new OpenApiRequestBuilder<DataDestinationAsyncGetDataDestinations>(
'post',
'/dataDestinations/search',
{
body,
headerParameters: {
'content-type': 'application/json',
...headerParameters
},
queryParameters
},
DataDestinationAsyncSpecificationDataDestinationsApi._defaultBasePath
),
/**
* Test provider connectivity before saving. Nothing is persisted.
* @param body - Request body.
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
* @returns The request builder, use the `execute()` method to trigger the request.
*/
validateDataDestination: (
body: DataDestinationCommonValidateDataDestinationRequest,
headerParameters: { 'AI-Resource-Group': string }
) =>
new OpenApiRequestBuilder<DataDestinationAsyncValidateDataDestinationResponse>(
'post',
'/dataDestinations/validate',
{
body,
headerParameters: {
'content-type': 'application/json',
...headerParameters
}
},
DataDestinationAsyncSpecificationDataDestinationsApi._defaultBasePath
),
/**
* Re-verify an already-saved destination using stored credentials.
* @param dataDestinationName - The name of the data destination to validate
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
* @returns The request builder, use the `execute()` method to trigger the request.
*/
validateDataDestinationByName: (
dataDestinationName: string,
headerParameters: { 'AI-Resource-Group': string }
) =>
new OpenApiRequestBuilder<DataDestinationAsyncValidateDataDestinationResponse>(
'post',
'/dataDestinations/{dataDestinationName}/validate',
{
pathParameters: { dataDestinationName },
headerParameters
},
DataDestinationAsyncSpecificationDataDestinationsApi._defaultBasePath
),
/**
* Internal endpoint to immediately trigger the cleanup cycle for stuck Data Destinations (old PROCESSING, old DELETING) beyond the threshold. If an optional list of names is provided, only those specific Data Destinations are cleaned up. Otherwise all stuck DDs are processed. Deletes config secrets and hard-deletes metadata rows.
*
* @param body - Request body.
* @returns The request builder, use the `execute()` method to trigger the request.
*/
controllersDataDestinationV1EndpointsTriggerDdCleanup: (
body:
| {
/**
* Optional list of Data Destination names to clean up. When provided, only these specific names are processed. When omitted or empty array, all stuck Data Destinations are cleaned up.
*
* @example [
* "my-s3-dd",
* "my-gcs-dd"
* ]
*/
names?: string[];
}
| undefined
) =>
new OpenApiRequestBuilder<
{
/**
* Human-readable cleanup result
* @example "3 Data Destinations deleted successfully"
*/
message: string;
} & Record<string, any>
>(
'post',
'/dataDestinations/cleanup',
{
body,
headerParameters: { 'content-type': 'application/json' }
},
DataDestinationAsyncSpecificationDataDestinationsApi._defaultBasePath
)
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved.
*
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/
import { OpenApiRequestBuilder } from '@sap-ai-sdk/core';
/**
* Representation of the 'DataDestinationAsyncSpecificationOtherApi'.
* This API is part of the 'context-registry' service.
*/
export const DataDestinationAsyncSpecificationOtherApi = {
_defaultBasePath: '/admin/tcr',
/**
* Create a request builder for execution of get requests to the '/health' endpoint.
* @returns The request builder, use the `execute()` method to trigger the request.
*/
healthEndpointsGetContextRegistryHealth: () =>
new OpenApiRequestBuilder<string>(
'get',
'/health',
{},
DataDestinationAsyncSpecificationOtherApi._defaultBasePath
)
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved.
*
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/
import { OpenApiRequestBuilder } from '@sap-ai-sdk/core';
/**
* Representation of the 'HealthSpecificationOtherApi'.
* This API is part of the 'context-registry' service.
*/
export const HealthSpecificationOtherApi = {
_defaultBasePath: '/admin/tcr',
/**
* Create a request builder for execution of get requests to the '/api/v1/healthz' endpoint.
* @returns The request builder, use the `execute()` method to trigger the request.
*/
healthEndpointsHealthz: () =>
new OpenApiRequestBuilder<string>(
'get',
'/api/v1/healthz',
{},
HealthSpecificationOtherApi._defaultBasePath
)
};
15 changes: 15 additions & 0 deletions packages/context-registry/src/client/context-registry/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved.
*
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/
export * from './health-specification-other-api.js';
export * from './provisioning-specification-resource-group-api.js';
export * from './sql-api-specification-ddl-api.js';
export * from './sql-api-specification-dml-api.js';
export * from './sql-api-specification-select-api.js';
export * from './data-destination-async-specification-data-destinations-api.js';
export * from './data-destination-async-specification-other-api.js';
export * from './scenario-configuration-async-specification-scenario-configuration-manager-api.js';
export * from './tabular-artifact-async-specification-tabular-artifacts-api.js';
export * from './schema/index.js';
Loading
Loading