qovery-typescript-axios 1.1.1000 → 1.1.1002

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
@@ -4451,6 +4451,33 @@ export interface BlueprintCreationResponse {
4451
4451
  */
4452
4452
  'execution_id': string;
4453
4453
  }
4454
+ /**
4455
+ * Database a blueprint manages
4456
+ * @export
4457
+ * @interface BlueprintDatabaseResponse
4458
+ */
4459
+ export interface BlueprintDatabaseResponse {
4460
+ /**
4461
+ *
4462
+ * @type {DatabaseTypeEnum}
4463
+ * @memberof BlueprintDatabaseResponse
4464
+ */
4465
+ 'kind': DatabaseTypeEnum;
4466
+ /**
4467
+ * Terraform service the blueprint created; null before its first dispatch
4468
+ * @type {string}
4469
+ * @memberof BlueprintDatabaseResponse
4470
+ */
4471
+ 'service_id': string | null;
4472
+ /**
4473
+ * Null until a deploy has reported the database endpoint
4474
+ * @type {DatabaseEndpointsResponse}
4475
+ * @memberof BlueprintDatabaseResponse
4476
+ */
4477
+ 'endpoint': DatabaseEndpointsResponse | null;
4478
+ }
4479
+
4480
+
4454
4481
  /**
4455
4482
  *
4456
4483
  * @export
@@ -11799,6 +11826,25 @@ export const DatabaseEditRequestDiskTypeEnum = {
11799
11826
 
11800
11827
  export type DatabaseEditRequestDiskTypeEnum = typeof DatabaseEditRequestDiskTypeEnum[keyof typeof DatabaseEditRequestDiskTypeEnum];
11801
11828
 
11829
+ /**
11830
+ * Endpoint of a database
11831
+ * @export
11832
+ * @interface DatabaseEndpointsResponse
11833
+ */
11834
+ export interface DatabaseEndpointsResponse {
11835
+ /**
11836
+ * Database hostname, from the DB_ADDRESS terraform output
11837
+ * @type {string}
11838
+ * @memberof DatabaseEndpointsResponse
11839
+ */
11840
+ 'host': string;
11841
+ /**
11842
+ * Database port, from the DB_PORT terraform output; null when none is reported
11843
+ * @type {number}
11844
+ * @memberof DatabaseEndpointsResponse
11845
+ */
11846
+ 'port'?: number | null;
11847
+ }
11802
11848
  /**
11803
11849
  *
11804
11850
  * @export
@@ -38338,6 +38384,47 @@ export const BlueprintMainCallsApiAxiosParamCreator = function (configuration?:
38338
38384
 
38339
38385
 
38340
38386
 
38387
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
38388
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
38389
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
38390
+
38391
+ return {
38392
+ url: toPathString(localVarUrlObj),
38393
+ options: localVarRequestOptions,
38394
+ };
38395
+ },
38396
+ /**
38397
+ * Returns the kind of database a blueprint manages and its endpoint, read from the `DB_ADDRESS` and `DB_PORT` outputs of its terraform service. `endpoint` is null until a deploy has reported it. Port-forward dials this endpoint to reach a blueprint database.
38398
+ * @summary Get the database a blueprint manages
38399
+ * @param {string} blueprintId Blueprint ID
38400
+ * @param {*} [options] Override http request option.
38401
+ * @throws {RequiredError}
38402
+ */
38403
+ getBlueprintDatabase: async (blueprintId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
38404
+ // verify required parameter 'blueprintId' is not null or undefined
38405
+ assertParamExists('getBlueprintDatabase', 'blueprintId', blueprintId)
38406
+ const localVarPath = `/blueprint/{blueprintId}/database`
38407
+ .replace(`{${"blueprintId"}}`, encodeURIComponent(String(blueprintId)));
38408
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
38409
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
38410
+ let baseOptions;
38411
+ if (configuration) {
38412
+ baseOptions = configuration.baseOptions;
38413
+ }
38414
+
38415
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
38416
+ const localVarHeaderParameter = {} as any;
38417
+ const localVarQueryParameter = {} as any;
38418
+
38419
+ // authentication ApiKeyAuth required
38420
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
38421
+
38422
+ // authentication bearerAuth required
38423
+ // http bearer authentication required
38424
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
38425
+
38426
+
38427
+
38341
38428
  setSearchParams(localVarUrlObj, localVarQueryParameter);
38342
38429
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
38343
38430
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -38574,6 +38661,19 @@ export const BlueprintMainCallsApiFp = function(configuration?: Configuration) {
38574
38661
  const localVarOperationServerBasePath = operationServerMap['BlueprintMainCallsApi.getBlueprintCatalog']?.[localVarOperationServerIndex]?.url;
38575
38662
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
38576
38663
  },
38664
+ /**
38665
+ * Returns the kind of database a blueprint manages and its endpoint, read from the `DB_ADDRESS` and `DB_PORT` outputs of its terraform service. `endpoint` is null until a deploy has reported it. Port-forward dials this endpoint to reach a blueprint database.
38666
+ * @summary Get the database a blueprint manages
38667
+ * @param {string} blueprintId Blueprint ID
38668
+ * @param {*} [options] Override http request option.
38669
+ * @throws {RequiredError}
38670
+ */
38671
+ async getBlueprintDatabase(blueprintId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BlueprintDatabaseResponse>> {
38672
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getBlueprintDatabase(blueprintId, options);
38673
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
38674
+ const localVarOperationServerBasePath = operationServerMap['BlueprintMainCallsApi.getBlueprintDatabase']?.[localVarOperationServerIndex]?.url;
38675
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
38676
+ },
38577
38677
  /**
38578
38678
  * Returns the persisted variables for a blueprint. Secret variables are identified by `is_secret` and never include their value.
38579
38679
  * @summary Get persisted blueprint variables
@@ -38689,6 +38789,16 @@ export const BlueprintMainCallsApiFactory = function (configuration?: Configurat
38689
38789
  getBlueprintCatalog(organizationId: string, options?: RawAxiosRequestConfig): AxiosPromise<BlueprintCatalogResponse> {
38690
38790
  return localVarFp.getBlueprintCatalog(organizationId, options).then((request) => request(axios, basePath));
38691
38791
  },
38792
+ /**
38793
+ * Returns the kind of database a blueprint manages and its endpoint, read from the `DB_ADDRESS` and `DB_PORT` outputs of its terraform service. `endpoint` is null until a deploy has reported it. Port-forward dials this endpoint to reach a blueprint database.
38794
+ * @summary Get the database a blueprint manages
38795
+ * @param {string} blueprintId Blueprint ID
38796
+ * @param {*} [options] Override http request option.
38797
+ * @throws {RequiredError}
38798
+ */
38799
+ getBlueprintDatabase(blueprintId: string, options?: RawAxiosRequestConfig): AxiosPromise<BlueprintDatabaseResponse> {
38800
+ return localVarFp.getBlueprintDatabase(blueprintId, options).then((request) => request(axios, basePath));
38801
+ },
38692
38802
  /**
38693
38803
  * Returns the persisted variables for a blueprint. Secret variables are identified by `is_secret` and never include their value.
38694
38804
  * @summary Get persisted blueprint variables
@@ -38807,6 +38917,18 @@ export class BlueprintMainCallsApi extends BaseAPI {
38807
38917
  return BlueprintMainCallsApiFp(this.configuration).getBlueprintCatalog(organizationId, options).then((request) => request(this.axios, this.basePath));
38808
38918
  }
38809
38919
 
38920
+ /**
38921
+ * Returns the kind of database a blueprint manages and its endpoint, read from the `DB_ADDRESS` and `DB_PORT` outputs of its terraform service. `endpoint` is null until a deploy has reported it. Port-forward dials this endpoint to reach a blueprint database.
38922
+ * @summary Get the database a blueprint manages
38923
+ * @param {string} blueprintId Blueprint ID
38924
+ * @param {*} [options] Override http request option.
38925
+ * @throws {RequiredError}
38926
+ * @memberof BlueprintMainCallsApi
38927
+ */
38928
+ public getBlueprintDatabase(blueprintId: string, options?: RawAxiosRequestConfig) {
38929
+ return BlueprintMainCallsApiFp(this.configuration).getBlueprintDatabase(blueprintId, options).then((request) => request(this.axios, this.basePath));
38930
+ }
38931
+
38810
38932
  /**
38811
38933
  * Returns the persisted variables for a blueprint. Secret variables are identified by `is_secret` and never include their value.
38812
38934
  * @summary Get persisted blueprint variables
package/common.ts CHANGED
@@ -145,6 +145,6 @@ export const toPathString = function (url: URL) {
145
145
  export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
146
146
  return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
147
147
  const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};
148
- return axios.request<T, R>(axiosRequestArgs);
148
+ return axios.request<T, R>(axiosRequestArgs) as Promise<R>;
149
149
  };
150
150
  }