Skip to content

Commit c581f16

Browse files
author
qovery
committed
See Qovery/qovery-openapi-spec@66865fa from refs/heads/main
1 parent 04d8295 commit c581f16

File tree

2 files changed

+99
-16
lines changed

2 files changed

+99
-16
lines changed

api.ts

Lines changed: 98 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -614,17 +614,23 @@ export interface AlertRuleEditRequest {
614614
export interface AlertRuleList {
615615
/**
616616
*
617-
* @type {Array<AlertRuleResponse>}
617+
* @type {Array<AlertRuleListResultsInner>}
618618
* @memberof AlertRuleList
619619
*/
620-
'results': Array<AlertRuleResponse>;
620+
'results': Array<AlertRuleListResultsInner>;
621621
}
622+
/**
623+
* @type AlertRuleListResultsInner
624+
* @export
625+
*/
626+
export type AlertRuleListResultsInner = { source: 'GHOST' } & GhostAlertRuleResponse | { source: 'MANAGED' } & AlertRuleResponse;
627+
622628
/**
623629
*
624630
* @export
625631
* @interface AlertRuleResponse
626632
*/
627-
export interface AlertRuleResponse {
633+
export interface AlertRuleResponse extends AlertRuleResponseBase {
628634
/**
629635
*
630636
* @type {string}
@@ -655,12 +661,6 @@ export interface AlertRuleResponse {
655661
* @memberof AlertRuleResponse
656662
*/
657663
'cluster_id': string;
658-
/**
659-
* Name of the alert rule
660-
* @type {string}
661-
* @memberof AlertRuleResponse
662-
*/
663-
'name': string;
664664
/**
665665
* Description of what the alert monitors
666666
* @type {string}
@@ -715,12 +715,6 @@ export interface AlertRuleResponse {
715715
* @memberof AlertRuleResponse
716716
*/
717717
'target': AlertTarget;
718-
/**
719-
*
720-
* @type {AlertRuleState}
721-
* @memberof AlertRuleResponse
722-
*/
723-
'state': AlertRuleState;
724718
/**
725719
* Indicates whether the current version of the alert has been synced with the alerting system. If false, an outdated version is currently deployed.
726720
* @type {boolean}
@@ -736,6 +730,47 @@ export interface AlertRuleResponse {
736730
}
737731

738732

733+
/**
734+
* Base schema for alert rule responses with discriminator
735+
* @export
736+
* @interface AlertRuleResponseBase
737+
*/
738+
export interface AlertRuleResponseBase {
739+
/**
740+
*
741+
* @type {AlertRuleSource}
742+
* @memberof AlertRuleResponseBase
743+
*/
744+
'source': AlertRuleSource;
745+
/**
746+
* Name of the alert rule
747+
* @type {string}
748+
* @memberof AlertRuleResponseBase
749+
*/
750+
'name': string;
751+
/**
752+
*
753+
* @type {AlertRuleState}
754+
* @memberof AlertRuleResponseBase
755+
*/
756+
'state': AlertRuleState;
757+
}
758+
759+
760+
/**
761+
* Source of the alert rule: - MANAGED: Alert rule created and managed through the Qovery API - GHOST: Alert rule that exists in Prometheus but has been deleted from the database
762+
* @export
763+
* @enum {string}
764+
*/
765+
766+
export const AlertRuleSource = {
767+
MANAGED: 'MANAGED',
768+
GHOST: 'GHOST'
769+
} as const;
770+
771+
export type AlertRuleSource = typeof AlertRuleSource[keyof typeof AlertRuleSource];
772+
773+
739774
/**
740775
*
741776
* @export
@@ -9868,6 +9903,54 @@ export interface GetClusterTokenByClusterId200ResponseStatus {
98689903
*/
98699904
'expirationTimestamp': string;
98709905
}
9906+
/**
9907+
* Response for ghost alerts that exist in Prometheus but have been deleted from the database
9908+
* @export
9909+
* @interface GhostAlertRuleResponse
9910+
*/
9911+
export interface GhostAlertRuleResponse extends AlertRuleResponseBase {
9912+
/**
9913+
*
9914+
* @type {GhostAlertRuleResponseAllOfTarget}
9915+
* @memberof GhostAlertRuleResponse
9916+
*/
9917+
'target'?: GhostAlertRuleResponseAllOfTarget;
9918+
/**
9919+
* When the ghost alert started firing
9920+
* @type {string}
9921+
* @memberof GhostAlertRuleResponse
9922+
*/
9923+
'starts_at'?: string | null;
9924+
}
9925+
9926+
9927+
/**
9928+
* May be null if target info couldn\'t be extracted from Prometheus
9929+
* @export
9930+
* @interface GhostAlertRuleResponseAllOfTarget
9931+
*/
9932+
export interface GhostAlertRuleResponseAllOfTarget {
9933+
/**
9934+
*
9935+
* @type {AlertTargetType}
9936+
* @memberof GhostAlertRuleResponseAllOfTarget
9937+
*/
9938+
'target_type': AlertTargetType;
9939+
/**
9940+
*
9941+
* @type {string}
9942+
* @memberof GhostAlertRuleResponseAllOfTarget
9943+
*/
9944+
'target_id': string;
9945+
/**
9946+
*
9947+
* @type {ServiceLightResponse}
9948+
* @memberof GhostAlertRuleResponseAllOfTarget
9949+
*/
9950+
'service'?: ServiceLightResponse;
9951+
}
9952+
9953+
98719954
/**
98729955
*
98739956
* @export

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "qovery-typescript-axios",
3-
"version": "v1.1.770",
3+
"version": "1.0.4",
44
"description": "OpenAPI client for qovery-typescript-axios",
55
"author": "OpenAPI-Generator Contributors",
66
"repository": {

0 commit comments

Comments
 (0)