Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .changeset/tricky-buses-feel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sap-ai-sdk/ai-api': minor
---

[feat] Update `ai-api` package with the new specification (2509b).
137 changes: 137 additions & 0 deletions packages/ai-api/src/client/AI_CORE_API/execution-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ import type {
AiExecutionModificationRequest,
AiExecutionModificationResponse,
AiExecutionDeletionResponse,
AiExecutionScheduleList,
AiExecutionScheduleCreationData,
AiExecutionScheduleCreationResponse,
AiExecutionSchedule,
AiExecutionScheduleModificationRequest,
AiExecutionScheduleModificationResponse,
AiExecutionScheduleDeletionResponse,
RTALogCommonResponse
} from './schema/index.js';
/**
Expand Down Expand Up @@ -162,6 +169,112 @@ export const ExecutionApi = {
},
ExecutionApi._defaultBasePath
),
/**
* Retrieve a list of execution schedules that match the specified filter criteria.
* Filter criteria include executionScheduleStatus or a configurationId.
* With top/skip parameters it is possible to paginate the result list.
*
* @param queryParameters - Object containing the following keys: configurationId, status, $top, $skip.
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
* @returns The request builder, use the `execute()` method to trigger the request.
*/
executionScheduleQuery: (
queryParameters: {
configurationId?: string;
status?: 'ACTIVE' | 'INACTIVE';
$top?: number;
$skip?: number;
},
headerParameters: { 'AI-Resource-Group': string }
) =>
new OpenApiRequestBuilder<AiExecutionScheduleList>(
'get',
'/lm/executionSchedules',
{
queryParameters,
headerParameters
},
ExecutionApi._defaultBasePath
),
/**
* Create an execution schedule using the configuration specified by configurationId, and schedule.
* @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.
*/
executionScheduleCreate: (
body: AiExecutionScheduleCreationData,
headerParameters: { 'AI-Resource-Group': string }
) =>
new OpenApiRequestBuilder<AiExecutionScheduleCreationResponse>(
'post',
'/lm/executionSchedules',
{
body,
headerParameters
},
ExecutionApi._defaultBasePath
),
/**
* Retrieve details for execution schedule with executionScheduleId.
* @param executionScheduleId - Execution Schedule identifier
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
* @returns The request builder, use the `execute()` method to trigger the request.
*/
executionScheduleGet: (
executionScheduleId: string,
headerParameters: { 'AI-Resource-Group': string }
) =>
new OpenApiRequestBuilder<AiExecutionSchedule>(
'get',
'/lm/executionSchedules/{executionScheduleId}',
{
pathParameters: { executionScheduleId },
headerParameters
},
ExecutionApi._defaultBasePath
),
/**
* Update details of an execution schedule
* @param executionScheduleId - Execution Schedule identifier
* @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.
*/
executionScheduleModify: (
executionScheduleId: string,
body: AiExecutionScheduleModificationRequest,
headerParameters: { 'AI-Resource-Group': string }
) =>
new OpenApiRequestBuilder<AiExecutionScheduleModificationResponse>(
'patch',
'/lm/executionSchedules/{executionScheduleId}',
{
pathParameters: { executionScheduleId },
body,
headerParameters
},
ExecutionApi._defaultBasePath
),
/**
* Delete the execution schedule with executionScheduleId.
* @param executionScheduleId - Execution Schedule identifier
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
* @returns The request builder, use the `execute()` method to trigger the request.
*/
executionScheduleDelete: (
executionScheduleId: string,
headerParameters: { 'AI-Resource-Group': string }
) =>
new OpenApiRequestBuilder<AiExecutionScheduleDeletionResponse>(
'delete',
'/lm/executionSchedules/{executionScheduleId}',
{
pathParameters: { executionScheduleId },
headerParameters
},
ExecutionApi._defaultBasePath
),
/**
* Retrieve the number of available executions. The number can be filtered by
* scenarioId, configurationId, executableIdsList or by execution status.
Expand Down Expand Up @@ -196,6 +309,30 @@ export const ExecutionApi = {
},
ExecutionApi._defaultBasePath
),
/**
* Retrieve the number of scheduled executions. The number can be filtered by
* configurationId or executionScheduleStatus.
*
* @param queryParameters - Object containing the following keys: configurationId, status.
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
* @returns The request builder, use the `execute()` method to trigger the request.
*/
executionScheduleCount: (
queryParameters: {
configurationId?: string;
status?: 'ACTIVE' | 'INACTIVE';
},
headerParameters: { 'AI-Resource-Group': string }
) =>
new OpenApiRequestBuilder<number>(
'get',
'/lm/executionSchedules/$count',
{
queryParameters,
headerParameters
},
ExecutionApi._defaultBasePath
),
/**
* Retrieve logs of an execution for getting insight into the execution results or failures.
* @param executionId - Execution identifier
Expand Down
152 changes: 0 additions & 152 deletions packages/ai-api/src/client/AI_CORE_API/execution-schedule-api.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/ai-api/src/client/AI_CORE_API/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export * from './artifact-api.js';
export * from './configuration-api.js';
export * from './deployment-api.js';
export * from './execution-api.js';
export * from './execution-schedule-api.js';
export * from './scenario-api.js';
export * from './executable-api.js';
export * from './meta-api.js';
Expand Down
19 changes: 18 additions & 1 deletion packages/ai-api/src/client/AI_CORE_API/resource-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { OpenApiRequestBuilder } from '@sap-ai-sdk/core';
import type {
BckndResourceGetResponse,
BckndResourcePatchBody,
BckndResourcePatchResponse
BckndResourcePatchResponse,
BckndInstanceTypeGetResponse
} from './schema/index.js';
/**
* Representation of the 'ResourceApi'.
Expand Down Expand Up @@ -47,5 +48,21 @@ export const ResourceApi = {
headerParameters
},
ResourceApi._defaultBasePath
),
/**
* Lists all the instance types available in the cluster.
* @param headerParameters - Object containing the following keys: Authorization.
* @returns The request builder, use the `execute()` method to trigger the request.
*/
kubesubmitV4InstanceTypesGet: (headerParameters?: {
Authorization?: string;
}) =>
new OpenApiRequestBuilder<BckndInstanceTypeGetResponse>(
'get',
'/admin/resources/instanceTypes',
{
headerParameters
},
ResourceApi._defaultBasePath
)
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/

import type { BckndGenericSecretLabels } from './bcknd-generic-secret-labels.js';
/**
* Representation of the 'BckndGenericSecretDetails' schema.
*/
Expand All @@ -16,6 +16,7 @@ export type BckndGenericSecretDetails = {
* Timestamp at which secret was created
*/
createdAt: string;
labels?: BckndGenericSecretLabels;
/**
* Sync status of the replicated secrets in all resource groups of the tenant
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/
import type { BckndGenericSecretData } from './bcknd-generic-secret-data.js';
import type { BckndGenericSecretLabels } from './bcknd-generic-secret-labels.js';
/**
* Representation of the 'BckndGenericSecretPatchBody' schema.
*/
export type BckndGenericSecretPatchBody = {
data: BckndGenericSecretData;
labels?: BckndGenericSecretLabels;
} & Record<string, any>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2025 SAP SE or an SAP affiliate company. All rights reserved.
*
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/
import type { BckndInstanceType } from './bcknd-instance-type.js';
/**
* Representation of the 'BckndInstanceTypeGetResponse' schema.
*/
export type BckndInstanceTypeGetResponse = {
instanceTypes: BckndInstanceType;
} & Record<string, any>;
Loading
Loading