qovery-typescript-axios 1.1.768 → 1.1.771

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/api.ts CHANGED
@@ -231,6 +231,25 @@ export interface AlertReceiverCreationRequest {
231
231
  }
232
232
 
233
233
 
234
+ /**
235
+ *
236
+ * @export
237
+ * @interface AlertReceiverCreationValidationRequest
238
+ */
239
+ export interface AlertReceiverCreationValidationRequest {
240
+ /**
241
+ *
242
+ * @type {AlertReceiverCreationRequest}
243
+ * @memberof AlertReceiverCreationValidationRequest
244
+ */
245
+ 'alertReceiver': AlertReceiverCreationRequest;
246
+ /**
247
+ *
248
+ * @type {string}
249
+ * @memberof AlertReceiverCreationValidationRequest
250
+ */
251
+ 'message'?: string;
252
+ }
234
253
  /**
235
254
  *
236
255
  * @export
@@ -341,6 +360,19 @@ export const AlertReceiverType = {
341
360
  export type AlertReceiverType = typeof AlertReceiverType[keyof typeof AlertReceiverType];
342
361
 
343
362
 
363
+ /**
364
+ *
365
+ * @export
366
+ * @interface AlertReceiverValidationRequest
367
+ */
368
+ export interface AlertReceiverValidationRequest {
369
+ /**
370
+ *
371
+ * @type {string}
372
+ * @memberof AlertReceiverValidationRequest
373
+ */
374
+ 'message'?: string;
375
+ }
344
376
  /**
345
377
  *
346
378
  * @export
@@ -582,17 +614,23 @@ export interface AlertRuleEditRequest {
582
614
  export interface AlertRuleList {
583
615
  /**
584
616
  *
585
- * @type {Array<AlertRuleResponse>}
617
+ * @type {Array<AlertRuleListResultsInner>}
586
618
  * @memberof AlertRuleList
587
619
  */
588
- 'results': Array<AlertRuleResponse>;
620
+ 'results': Array<AlertRuleListResultsInner>;
589
621
  }
622
+ /**
623
+ * @type AlertRuleListResultsInner
624
+ * @export
625
+ */
626
+ export type AlertRuleListResultsInner = { source: 'GHOST' } & GhostAlertRuleResponse | { source: 'MANAGED' } & AlertRuleResponse;
627
+
590
628
  /**
591
629
  *
592
630
  * @export
593
631
  * @interface AlertRuleResponse
594
632
  */
595
- export interface AlertRuleResponse {
633
+ export interface AlertRuleResponse extends AlertRuleResponseBase {
596
634
  /**
597
635
  *
598
636
  * @type {string}
@@ -623,12 +661,6 @@ export interface AlertRuleResponse {
623
661
  * @memberof AlertRuleResponse
624
662
  */
625
663
  'cluster_id': string;
626
- /**
627
- * Name of the alert rule
628
- * @type {string}
629
- * @memberof AlertRuleResponse
630
- */
631
- 'name': string;
632
664
  /**
633
665
  * Description of what the alert monitors
634
666
  * @type {string}
@@ -683,12 +715,6 @@ export interface AlertRuleResponse {
683
715
  * @memberof AlertRuleResponse
684
716
  */
685
717
  'target': AlertTarget;
686
- /**
687
- *
688
- * @type {AlertRuleState}
689
- * @memberof AlertRuleResponse
690
- */
691
- 'state': AlertRuleState;
692
718
  /**
693
719
  * Indicates whether the current version of the alert has been synced with the alerting system. If false, an outdated version is currently deployed.
694
720
  * @type {boolean}
@@ -704,6 +730,47 @@ export interface AlertRuleResponse {
704
730
  }
705
731
 
706
732
 
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
+
707
774
  /**
708
775
  *
709
776
  * @export
@@ -9836,6 +9903,54 @@ export interface GetClusterTokenByClusterId200ResponseStatus {
9836
9903
  */
9837
9904
  'expirationTimestamp': string;
9838
9905
  }
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
+
9839
9954
  /**
9840
9955
  *
9841
9956
  * @export
@@ -15284,8 +15399,11 @@ export interface OrganizationEventResponseListLinks {
15284
15399
 
15285
15400
  export const OrganizationEventSubTargetType = {
15286
15401
  ADVANCED_SETTINGS: 'ADVANCED_SETTINGS',
15402
+ ALERT_RULE: 'ALERT_RULE',
15403
+ ANNOTATIONS_GROUP: 'ANNOTATIONS_GROUP',
15287
15404
  API_TOKEN: 'API_TOKEN',
15288
15405
  BILLING_INFO: 'BILLING_INFO',
15406
+ BILLING_USAGE_REPORT: 'BILLING_USAGE_REPORT',
15289
15407
  CLOUD_PROVIDER_CREDENTIALS: 'CLOUD_PROVIDER_CREDENTIALS',
15290
15408
  CLUSTER_CREDENTIALS: 'CLUSTER_CREDENTIALS',
15291
15409
  CLUSTER_ROUTING_TABLE: 'CLUSTER_ROUTING_TABLE',
@@ -15300,9 +15418,14 @@ export const OrganizationEventSubTargetType = {
15300
15418
  GIT_REPOSITORY: 'GIT_REPOSITORY',
15301
15419
  GIT_TOKEN: 'GIT_TOKEN',
15302
15420
  INVITATION: 'INVITATION',
15421
+ KUBERNETES_CONFIGURATION: 'KUBERNETES_CONFIGURATION',
15422
+ KUBERNETES_CREDENTIALS: 'KUBERNETES_CREDENTIALS',
15423
+ LABELS_GROUP: 'LABELS_GROUP',
15303
15424
  MEMBER_ROLE: 'MEMBER_ROLE',
15304
15425
  PLAN: 'PLAN',
15426
+ REMOTE_ACCESS: 'REMOTE_ACCESS',
15305
15427
  SECRET: 'SECRET',
15428
+ SSO: 'SSO',
15306
15429
  TERRAFORM: 'TERRAFORM',
15307
15430
  TRANSFER_OWNERSHIP: 'TRANSFER_OWNERSHIP',
15308
15431
  VARIABLE: 'VARIABLE'
@@ -15354,6 +15477,7 @@ export const OrganizationEventTargetType = {
15354
15477
  ENVIRONMENT: 'ENVIRONMENT',
15355
15478
  JOB: 'JOB',
15356
15479
  HELM: 'HELM',
15480
+ HELM_REPOSITORY: 'HELM_REPOSITORY',
15357
15481
  MEMBERS_AND_ROLES: 'MEMBERS_AND_ROLES',
15358
15482
  ORGANIZATION: 'ORGANIZATION',
15359
15483
  PROJECT: 'PROJECT',
@@ -20369,6 +20493,92 @@ export const AlertReceiversApiAxiosParamCreator = function (configuration?: Conf
20369
20493
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
20370
20494
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
20371
20495
 
20496
+ return {
20497
+ url: toPathString(localVarUrlObj),
20498
+ options: localVarRequestOptions,
20499
+ };
20500
+ },
20501
+ /**
20502
+ * Validate an existing alert receiver by sending a test message for example
20503
+ * @summary Validate Existing Alert Receiver
20504
+ * @param {string} alertReceiverId Alert Receiver ID
20505
+ * @param {AlertReceiverValidationRequest} [alertReceiverValidationRequest]
20506
+ * @param {*} [options] Override http request option.
20507
+ * @throws {RequiredError}
20508
+ */
20509
+ validateExistingAlertReceiver: async (alertReceiverId: string, alertReceiverValidationRequest?: AlertReceiverValidationRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
20510
+ // verify required parameter 'alertReceiverId' is not null or undefined
20511
+ assertParamExists('validateExistingAlertReceiver', 'alertReceiverId', alertReceiverId)
20512
+ const localVarPath = `/alert-receivers/{alertReceiverId}/validate`
20513
+ .replace(`{${"alertReceiverId"}}`, encodeURIComponent(String(alertReceiverId)));
20514
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
20515
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
20516
+ let baseOptions;
20517
+ if (configuration) {
20518
+ baseOptions = configuration.baseOptions;
20519
+ }
20520
+
20521
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
20522
+ const localVarHeaderParameter = {} as any;
20523
+ const localVarQueryParameter = {} as any;
20524
+
20525
+ // authentication ApiKeyAuth required
20526
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
20527
+
20528
+ // authentication bearerAuth required
20529
+ // http bearer authentication required
20530
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
20531
+
20532
+
20533
+
20534
+ localVarHeaderParameter['Content-Type'] = 'application/json';
20535
+
20536
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
20537
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
20538
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
20539
+ localVarRequestOptions.data = serializeDataIfNeeded(alertReceiverValidationRequest, localVarRequestOptions, configuration)
20540
+
20541
+ return {
20542
+ url: toPathString(localVarUrlObj),
20543
+ options: localVarRequestOptions,
20544
+ };
20545
+ },
20546
+ /**
20547
+ * Validate a future alert receiver by sending a test message for example
20548
+ * @summary Validate New Alert Receiver
20549
+ * @param {AlertReceiverCreationValidationRequest} [alertReceiverCreationValidationRequest]
20550
+ * @param {*} [options] Override http request option.
20551
+ * @throws {RequiredError}
20552
+ */
20553
+ validateNewAlertReceiver: async (alertReceiverCreationValidationRequest?: AlertReceiverCreationValidationRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
20554
+ const localVarPath = `/alert-receivers/validate`;
20555
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
20556
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
20557
+ let baseOptions;
20558
+ if (configuration) {
20559
+ baseOptions = configuration.baseOptions;
20560
+ }
20561
+
20562
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
20563
+ const localVarHeaderParameter = {} as any;
20564
+ const localVarQueryParameter = {} as any;
20565
+
20566
+ // authentication ApiKeyAuth required
20567
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
20568
+
20569
+ // authentication bearerAuth required
20570
+ // http bearer authentication required
20571
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
20572
+
20573
+
20574
+
20575
+ localVarHeaderParameter['Content-Type'] = 'application/json';
20576
+
20577
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
20578
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
20579
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
20580
+ localVarRequestOptions.data = serializeDataIfNeeded(alertReceiverCreationValidationRequest, localVarRequestOptions, configuration)
20581
+
20372
20582
  return {
20373
20583
  url: toPathString(localVarUrlObj),
20374
20584
  options: localVarRequestOptions,
@@ -20450,6 +20660,33 @@ export const AlertReceiversApiFp = function(configuration?: Configuration) {
20450
20660
  const localVarOperationServerBasePath = operationServerMap['AlertReceiversApi.getAlertReceivers']?.[localVarOperationServerIndex]?.url;
20451
20661
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
20452
20662
  },
20663
+ /**
20664
+ * Validate an existing alert receiver by sending a test message for example
20665
+ * @summary Validate Existing Alert Receiver
20666
+ * @param {string} alertReceiverId Alert Receiver ID
20667
+ * @param {AlertReceiverValidationRequest} [alertReceiverValidationRequest]
20668
+ * @param {*} [options] Override http request option.
20669
+ * @throws {RequiredError}
20670
+ */
20671
+ async validateExistingAlertReceiver(alertReceiverId: string, alertReceiverValidationRequest?: AlertReceiverValidationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
20672
+ const localVarAxiosArgs = await localVarAxiosParamCreator.validateExistingAlertReceiver(alertReceiverId, alertReceiverValidationRequest, options);
20673
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
20674
+ const localVarOperationServerBasePath = operationServerMap['AlertReceiversApi.validateExistingAlertReceiver']?.[localVarOperationServerIndex]?.url;
20675
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
20676
+ },
20677
+ /**
20678
+ * Validate a future alert receiver by sending a test message for example
20679
+ * @summary Validate New Alert Receiver
20680
+ * @param {AlertReceiverCreationValidationRequest} [alertReceiverCreationValidationRequest]
20681
+ * @param {*} [options] Override http request option.
20682
+ * @throws {RequiredError}
20683
+ */
20684
+ async validateNewAlertReceiver(alertReceiverCreationValidationRequest?: AlertReceiverCreationValidationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
20685
+ const localVarAxiosArgs = await localVarAxiosParamCreator.validateNewAlertReceiver(alertReceiverCreationValidationRequest, options);
20686
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
20687
+ const localVarOperationServerBasePath = operationServerMap['AlertReceiversApi.validateNewAlertReceiver']?.[localVarOperationServerIndex]?.url;
20688
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
20689
+ },
20453
20690
  }
20454
20691
  };
20455
20692
 
@@ -20511,6 +20748,27 @@ export const AlertReceiversApiFactory = function (configuration?: Configuration,
20511
20748
  getAlertReceivers(organizationId: string, options?: RawAxiosRequestConfig): AxiosPromise<AlertReceiverList> {
20512
20749
  return localVarFp.getAlertReceivers(organizationId, options).then((request) => request(axios, basePath));
20513
20750
  },
20751
+ /**
20752
+ * Validate an existing alert receiver by sending a test message for example
20753
+ * @summary Validate Existing Alert Receiver
20754
+ * @param {string} alertReceiverId Alert Receiver ID
20755
+ * @param {AlertReceiverValidationRequest} [alertReceiverValidationRequest]
20756
+ * @param {*} [options] Override http request option.
20757
+ * @throws {RequiredError}
20758
+ */
20759
+ validateExistingAlertReceiver(alertReceiverId: string, alertReceiverValidationRequest?: AlertReceiverValidationRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
20760
+ return localVarFp.validateExistingAlertReceiver(alertReceiverId, alertReceiverValidationRequest, options).then((request) => request(axios, basePath));
20761
+ },
20762
+ /**
20763
+ * Validate a future alert receiver by sending a test message for example
20764
+ * @summary Validate New Alert Receiver
20765
+ * @param {AlertReceiverCreationValidationRequest} [alertReceiverCreationValidationRequest]
20766
+ * @param {*} [options] Override http request option.
20767
+ * @throws {RequiredError}
20768
+ */
20769
+ validateNewAlertReceiver(alertReceiverCreationValidationRequest?: AlertReceiverCreationValidationRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
20770
+ return localVarFp.validateNewAlertReceiver(alertReceiverCreationValidationRequest, options).then((request) => request(axios, basePath));
20771
+ },
20514
20772
  };
20515
20773
  };
20516
20774
 
@@ -20581,6 +20839,31 @@ export class AlertReceiversApi extends BaseAPI {
20581
20839
  public getAlertReceivers(organizationId: string, options?: RawAxiosRequestConfig) {
20582
20840
  return AlertReceiversApiFp(this.configuration).getAlertReceivers(organizationId, options).then((request) => request(this.axios, this.basePath));
20583
20841
  }
20842
+
20843
+ /**
20844
+ * Validate an existing alert receiver by sending a test message for example
20845
+ * @summary Validate Existing Alert Receiver
20846
+ * @param {string} alertReceiverId Alert Receiver ID
20847
+ * @param {AlertReceiverValidationRequest} [alertReceiverValidationRequest]
20848
+ * @param {*} [options] Override http request option.
20849
+ * @throws {RequiredError}
20850
+ * @memberof AlertReceiversApi
20851
+ */
20852
+ public validateExistingAlertReceiver(alertReceiverId: string, alertReceiverValidationRequest?: AlertReceiverValidationRequest, options?: RawAxiosRequestConfig) {
20853
+ return AlertReceiversApiFp(this.configuration).validateExistingAlertReceiver(alertReceiverId, alertReceiverValidationRequest, options).then((request) => request(this.axios, this.basePath));
20854
+ }
20855
+
20856
+ /**
20857
+ * Validate a future alert receiver by sending a test message for example
20858
+ * @summary Validate New Alert Receiver
20859
+ * @param {AlertReceiverCreationValidationRequest} [alertReceiverCreationValidationRequest]
20860
+ * @param {*} [options] Override http request option.
20861
+ * @throws {RequiredError}
20862
+ * @memberof AlertReceiversApi
20863
+ */
20864
+ public validateNewAlertReceiver(alertReceiverCreationValidationRequest?: AlertReceiverCreationValidationRequest, options?: RawAxiosRequestConfig) {
20865
+ return AlertReceiversApiFp(this.configuration).validateNewAlertReceiver(alertReceiverCreationValidationRequest, options).then((request) => request(this.axios, this.basePath));
20866
+ }
20584
20867
  }
20585
20868
 
20586
20869