Skip to content

Commit 0ee93af

Browse files
committed
chore: fixes
1 parent 73986c7 commit 0ee93af

15 files changed

Lines changed: 64 additions & 44 deletions

‎packages/core/src/poll-async-resource.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ export interface PollAsyncResourceOptions<T, ReadT = T> {
2626
initialRetryAfter?: string;
2727
/** Returns the Retry-After header value from a polling response, if available. */
2828
getRetryAfter?: (response: ReadT) => string | undefined;
29+
/** Called after each poll attempt with the attempt number and current resource. */
30+
onPoll?: (attempt: number, resource: T) => void;
2931
/** Signal that cancels polling and waiting. */
3032
signal?: AbortSignal;
3133
/** Override the sleep function, e.g. for testing. */
@@ -64,6 +66,7 @@ export async function pollAsyncResource<T, ReadT = T>({
6466
getResource,
6567
isComplete,
6668
getFailure,
69+
onPoll,
6770
maxAttempts = DEFAULT_MAX_ATTEMPTS,
6871
intervalMs = DEFAULT_INTERVAL_MS,
6972
initialRetryAfter,
@@ -88,6 +91,7 @@ export async function pollAsyncResource<T, ReadT = T>({
8891
if (failure) {
8992
throw new Error(failure);
9093
}
94+
onPoll?.(attempt, resource);
9195
if (isComplete(resource)) {
9296
return resource;
9397
}

‎packages/ctx-registry/src/client/ctx-registry/data-destination-async-specification-data-destinations-api.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import type {
2020
* This API is part of the 'ctx-registry' service.
2121
*/
2222
export const DataDestinationAsyncSpecificationDataDestinationsApi = {
23-
_defaultBasePath: '/v2/admin/tcr',
23+
_defaultBasePath: '/admin/tcr',
2424
/**
2525
* Get all data destinations in the tenant (resource group)
2626
* @param queryParameters - Object containing the following keys: $top, $skip, $count.

‎packages/ctx-registry/src/client/ctx-registry/data-destination-async-specification-other-api.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { OpenApiRequestBuilder } from '@sap-ai-sdk/core';
99
* This API is part of the 'ctx-registry' service.
1010
*/
1111
export const DataDestinationAsyncSpecificationOtherApi = {
12-
_defaultBasePath: '/v2/admin/tcr',
12+
_defaultBasePath: '/admin/tcr',
1313
/**
1414
* Create a request builder for execution of get requests to the '/health' endpoint.
1515
* @returns The request builder, use the `execute()` method to trigger the request.

‎packages/ctx-registry/src/client/ctx-registry/health-specification-other-api.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { OpenApiRequestBuilder } from '@sap-ai-sdk/core';
99
* This API is part of the 'ctx-registry' service.
1010
*/
1111
export const HealthSpecificationOtherApi = {
12-
_defaultBasePath: '/v2/admin/tcr',
12+
_defaultBasePath: '/admin/tcr',
1313
/**
1414
* Create a request builder for execution of get requests to the '/api/v1/healthz' endpoint.
1515
* @returns The request builder, use the `execute()` method to trigger the request.

‎packages/ctx-registry/src/client/ctx-registry/provisioning-specification-resource-group-api.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type { ProvisioningResourceGroup } from './schema/index.js';
1111
* This API is part of the 'ctx-registry' service.
1212
*/
1313
export const ProvisioningSpecificationResourceGroupApi = {
14-
_defaultBasePath: '/v2/admin/tcr',
14+
_defaultBasePath: '/admin/tcr',
1515
/**
1616
* Get details of about a resourceGroup
1717
* @param tenantId - Id of a main tenant, which corresponds to the SCP subaccount id

‎packages/ctx-registry/src/client/ctx-registry/scenario-configuration-async-specification-scenario-configuration-manager-api.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import type {
1919
*/
2020
export const ScenarioConfigurationAsyncSpecificationScenarioConfigurationManagerApi =
2121
{
22-
_defaultBasePath: '/v2/admin/tcr',
22+
_defaultBasePath: '/admin/tcr',
2323
/**
2424
* Get all scenario configurations in the tenant (resource group)
2525
* @param queryParameters - Object containing the following keys: $top, $skip, $count.

‎packages/ctx-registry/src/client/ctx-registry/sql-api-specification-ddl-api.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import type {
2020
* This API is part of the 'ctx-registry' service.
2121
*/
2222
export const SqlApiSpecificationDDLApi = {
23-
_defaultBasePath: '/v2/admin/tcr',
23+
_defaultBasePath: '/admin/tcr',
2424
/**
2525
* Executes a DDL statement (CREATE TABLE/INDEX/VIEW, ALTER TABLE, DROP TABLE/INDEX/VIEW, GRANT, REVOKE) via SQL_DDL_USER. After a successful CREATE TABLE the service automatically grants INSERT/UPDATE/DELETE to SQL_DML_USER and SELECT to SQL_SELECT_USER, and registers the table in the internal registry. Schema-level operations (CREATE SCHEMA, DROP SCHEMA) are rejected.
2626
*

‎packages/ctx-registry/src/client/ctx-registry/sql-api-specification-dml-api.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import type {
1616
* This API is part of the 'ctx-registry' service.
1717
*/
1818
export const SqlApiSpecificationDMLApi = {
19-
_defaultBasePath: '/v2/admin/tcr',
19+
_defaultBasePath: '/admin/tcr',
2020
/**
2121
* Executes a single DML statement (INSERT, UPDATE, DELETE, UPSERT, MERGE) against the caller's tenant schema via SQL_DML_USER. Any DDL or SELECT keyword causes a 400 INVALID_SQL_CLASS error. All data values must be supplied as named bind parameters (:name); inline literals are rejected.
2222
*

‎packages/ctx-registry/src/client/ctx-registry/sql-api-specification-select-api.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import type {
1414
* This API is part of the 'ctx-registry' service.
1515
*/
1616
export const SqlApiSpecificationSELECTApi = {
17-
_defaultBasePath: '/v2/admin/tcr',
17+
_defaultBasePath: '/admin/tcr',
1818
/**
1919
* Executes a read-only SQL query via SQL_SELECT_USER. Only SELECT statements (including CTEs introduced with WITH) are accepted. All user-supplied filter values must be passed as named bind parameters.
2020
* Pagination modes:

‎packages/ctx-registry/src/client/ctx-registry/tabular-artifact-async-specification-tabular-artifacts-api.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import type {
1616
* This API is part of the 'ctx-registry' service.
1717
*/
1818
export const TabularArtifactAsyncSpecificationTabularArtifactsApi = {
19-
_defaultBasePath: '/v2/admin/tcr',
19+
_defaultBasePath: '/admin/tcr',
2020
/**
2121
* Retrieve details of a specific Tabular Artifact by name including schema metadata.
2222
*

0 commit comments

Comments
 (0)