Skip to content

Commit

Permalink
[OpenAPI] Spec updates (#1382)
Browse files Browse the repository at this point in the history
Co-authored-by: simonapencea <[email protected]>
  • Loading branch information
xata-bot and simonapencea authored Feb 22, 2024
1 parent 8ba20c6 commit c445e9b
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/client/src/api/controlPlaneComponents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ export type UpdateClusterVariables = {
*/
export const updateCluster = (variables: UpdateClusterVariables, signal?: AbortSignal) =>
controlPlaneFetch<
Schemas.ClusterMetadata,
Schemas.ClusterUpdateMetadata,
UpdateClusterError,
Schemas.ClusterUpdateDetails,
{},
Expand Down
69 changes: 59 additions & 10 deletions packages/client/src/api/controlPlaneSchemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,56 @@ export type ClusterResponse = {
clusterID: string;
};

/**
* @x-internal true
*/
export type AutoscalingConfigResponse = {
/**
* @format double
* @default 0.5
*/
minCapacity: number;
/**
* @format double
* @default 4
*/
maxCapacity: number;
};

/**
* @x-internal true
*/
export type MaintenanceConfigResponse = {
/**
* @default false
*/
autoMinorVersionUpgrade: boolean;
/**
* @default false
*/
applyImmediately: boolean;
maintenanceWindow: WeeklyTimeWindow;
backupWindow: DailyTimeWindow;
};

/**
* @x-internal true
*/
export type ClusterConfigurationResponse = {
engineVersion: string;
instanceType: string;
/**
* @format int64
*/
replicas: number;
/**
* @default false
*/
deletionProtection: boolean;
autoscaling?: AutoscalingConfigResponse;
maintenance: MaintenanceConfigResponse;
};

/**
* @x-internal true
*/
Expand All @@ -332,23 +382,22 @@ export type ClusterMetadata = {
* @format int64
*/
branches: number;
configuration?: ClusterConfiguration;
configuration: ClusterConfigurationResponse;
};

/**
* @x-internal true
*/
export type ClusterUpdateDetails = {
command: string;
};

/**
* @x-internal true
*/
export type ClusterUpdateMetadata = {
id: ClusterID;
/**
* @maxLength 63
* @minLength 1
* @pattern [a-zA-Z0-9_-~:]+
*/
name?: string;
configuration?: ClusterConfiguration;
state?: string;
region?: string;
state: string;
};

/**
Expand Down

0 comments on commit c445e9b

Please sign in to comment.