diff --git a/README.md b/README.md index a5f5823..dfe088e 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ This GitHub action allows you to dynamically create and deleted preview environm ## Outputs * `environment-url` : Rendered URL of the preview environment. +* `humanitec-env`: Id of the created environment. ## Example usage diff --git a/action.yaml b/action.yaml index 32b191e..a998500 100644 --- a/action.yaml +++ b/action.yaml @@ -28,9 +28,15 @@ inputs: environment-url-template: description: 'Provide a custom mustache template for the environment url, "https://app.humanitec.io/orgs/{{orgId}}/apps/{{appId}}/envs/{{envId}}" by default.' required: false + create-automation-rule: + description: 'Automatically create an automation rule for the environment, "true" by default.' + required: false + default: 'true' outputs: environment-url: description: 'URL where the running application can be accessed' + humanitec-env: + description: 'The id of the created environment' runs: using: 'node16' main: 'dist/index.js' diff --git a/dist/index.js b/dist/index.js index 03bcd77..2c237de 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1989,7 +1989,7 @@ exports.checkBypass = checkBypass; * Humanitec API * # Introduction The *Humanitec API* allows you to automate and integrate Humanitec into your developer and operational workflows. The API is a REST based API. It is based around a set of concepts: * Core * External Resources * Sets and Deltas ## Authentication Almost all requests made to the Humanitec API require Authentication. Humanitec provides 2 ways of authenticating with the API: `Bearer` and `JWT`. ### Bearer Authentication This form of authentication makes use of a **static token**. It is intended to be used when machines interact with the Humanitec API. Bearer tokens should be used for very narrow purposes. This allows for the token to be revoked if it is compromised and so limit the scope of exposure. New Bearer tokens can be obtained via the UI: 1. Log into Humanitec at https://app.humanitec.io 1. Go to **Organization Settings** 1. Select **API tokens** 1. Enter a *name* for the new token and click on **Generate new token** The token is passed to the API via the `Authorization` header. Assuming the issued token is `HUMANITEC_TOKEN`, the request could be made as follows: ``` curl -H \'Authorization: Bearer HUMANITEC_TOKEN\' https://api.humanitec.io/orgs/my-org/apps ``` ### JWT Authentication This form of authentication makes use of a **JSON Web Token (JWT)**. It is intended to be used when humans interact with the Humanitec API. JWTs expire after a period of time. This means that a new JWT will need to be generated regularly. This makes them well suited to working in short sessions, but not for automation. (See Bearer Authentication.) The token is passed to the API via the `Authorization` header. Assuming the issued token is `HUMANITEC_JWT`, the request could be made as follows: ``` curl -H \'Authorization: JWT HUMANITEC_JWT\' https://api.humanitec.io/orgs/my-org/apps ``` ## Content Types All of the Humanitec API unless explicitly only accepts content types of `application/json` and will always return valid `application/json` or an empty response. ## Response Codes ### Success Any response code in the `2xx` range should be regarded as success. | **Code** | **Meaning** | | --- | --- | | `200` | Success | | `201` | Success (In future, `201` will be replaced by `200`) | | `204` | Success, but no content in response | _Note: We plan to simplify the interface by replacing 201 with 200 status codes._ ### Failure Any response code in the `4xx` should be regarded as an error which can be rectified by the client. `5xx` error codes indicate errors that cannot be corrected by the client. | **Code** | **Meaning** | | --- | --- | | `400` | General error. (Body will contain details) | | `401` | Attempt to access protected resource without `Authorization` Header. | | `403` | The `Bearer` or `JWT` does not grant access to the requested resource. | | `404` | Resource not found. | | `405` | Method not allowed | | `409` | Conflict. Usually indicated a resource with that ID already exists. | | `422` | Unprocessable Entity. The body was not valid JSON, was empty or contained an object different from what was expected. | | `429` | Too many requests - request rate limit has been reached. | | `500` | Internal Error. If it occurs repeatedly, contact support. | * - * The version of the OpenAPI document: 0.20.9 + * The version of the OpenAPI document: 0.21.0 * Contact: apiteam@humanitec.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -2000,15 +2000,66 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ImageApiFp = exports.ImageApiAxiosParamCreator = exports.EventApi = exports.EventApiFactory = exports.EventApiFp = exports.EventApiAxiosParamCreator = exports.EnvironmentTypeApi = exports.EnvironmentTypeApiFactory = exports.EnvironmentTypeApiFp = exports.EnvironmentTypeApiAxiosParamCreator = exports.EnvironmentApi = exports.EnvironmentApiFactory = exports.EnvironmentApiFp = exports.EnvironmentApiAxiosParamCreator = exports.DriverDefinitionApi = exports.DriverDefinitionApiFactory = exports.DriverDefinitionApiFp = exports.DriverDefinitionApiAxiosParamCreator = exports.DeploymentApi = exports.DeploymentApiFactory = exports.DeploymentApiFp = exports.DeploymentApiAxiosParamCreator = exports.DeltaApi = exports.DeltaApiFactory = exports.DeltaApiFp = exports.DeltaApiAxiosParamCreator = exports.AutomationRuleApi = exports.AutomationRuleApiFactory = exports.AutomationRuleApiFp = exports.AutomationRuleApiAxiosParamCreator = exports.ArtefactVersionApi = exports.ArtefactVersionApiFactory = exports.ArtefactVersionApiFp = exports.ArtefactVersionApiAxiosParamCreator = exports.ArtefactApi = exports.ArtefactApiFactory = exports.ArtefactApiFp = exports.ArtefactApiAxiosParamCreator = exports.ApplicationApi = exports.ApplicationApiFactory = exports.ApplicationApiFp = exports.ApplicationApiAxiosParamCreator = exports.ActiveResourceApi = exports.ActiveResourceApiFactory = exports.ActiveResourceApiFp = exports.ActiveResourceApiAxiosParamCreator = exports.AccountTypeApi = exports.AccountTypeApiFactory = exports.AccountTypeApiFp = exports.AccountTypeApiAxiosParamCreator = void 0; -exports.UserRoleApi = exports.UserRoleApiFactory = exports.UserRoleApiFp = exports.UserRoleApiAxiosParamCreator = exports.UserProfileApi = exports.UserProfileApiFactory = exports.UserProfileApiFp = exports.UserProfileApiAxiosParamCreator = exports.UserInviteApi = exports.UserInviteApiFactory = exports.UserInviteApiFp = exports.UserInviteApiAxiosParamCreator = exports.SetApi = exports.SetApiFactory = exports.SetApiFp = exports.SetApiAxiosParamCreator = exports.RuntimeInfoApi = exports.RuntimeInfoApiFactory = exports.RuntimeInfoApiFp = exports.RuntimeInfoApiAxiosParamCreator = exports.ResourceTypeApi = exports.ResourceTypeApiFactory = exports.ResourceTypeApiFp = exports.ResourceTypeApiAxiosParamCreator = exports.ResourceDefinitionApi = exports.ResourceDefinitionApiFactory = exports.ResourceDefinitionApiFp = exports.ResourceDefinitionApiAxiosParamCreator = exports.ResourceAccountApi = exports.ResourceAccountApiFactory = exports.ResourceAccountApiFp = exports.ResourceAccountApiAxiosParamCreator = exports.RegistryApi = exports.RegistryApiFactory = exports.RegistryApiFp = exports.RegistryApiAxiosParamCreator = exports.PublicApi = exports.PublicApiFactory = exports.PublicApiFp = exports.PublicApiAxiosParamCreator = exports.OrganizationApi = exports.OrganizationApiFactory = exports.OrganizationApiFp = exports.OrganizationApiAxiosParamCreator = exports.MatchingCriteriaApi = exports.MatchingCriteriaApiFactory = exports.MatchingCriteriaApiFp = exports.MatchingCriteriaApiAxiosParamCreator = exports.ImageApi = exports.ImageApiFactory = void 0; -exports.WorkloadProfileApi = exports.WorkloadProfileApiFactory = exports.WorkloadProfileApiFp = exports.WorkloadProfileApiAxiosParamCreator = exports.ValueSetVersionApi = exports.ValueSetVersionApiFactory = exports.ValueSetVersionApiFp = exports.ValueSetVersionApiAxiosParamCreator = exports.ValueApi = exports.ValueApiFactory = exports.ValueApiFp = exports.ValueApiAxiosParamCreator = void 0; +exports.EventApiFp = exports.EventApiAxiosParamCreator = exports.EnvironmentTypeApi = exports.EnvironmentTypeApiFactory = exports.EnvironmentTypeApiFp = exports.EnvironmentTypeApiAxiosParamCreator = exports.EnvironmentApi = exports.EnvironmentApiFactory = exports.EnvironmentApiFp = exports.EnvironmentApiAxiosParamCreator = exports.DriverDefinitionApi = exports.DriverDefinitionApiFactory = exports.DriverDefinitionApiFp = exports.DriverDefinitionApiAxiosParamCreator = exports.DeploymentApi = exports.DeploymentApiFactory = exports.DeploymentApiFp = exports.DeploymentApiAxiosParamCreator = exports.DeltaApi = exports.DeltaApiFactory = exports.DeltaApiFp = exports.DeltaApiAxiosParamCreator = exports.AutomationRuleApi = exports.AutomationRuleApiFactory = exports.AutomationRuleApiFp = exports.AutomationRuleApiAxiosParamCreator = exports.ArtefactVersionApi = exports.ArtefactVersionApiFactory = exports.ArtefactVersionApiFp = exports.ArtefactVersionApiAxiosParamCreator = exports.ArtefactApi = exports.ArtefactApiFactory = exports.ArtefactApiFp = exports.ArtefactApiAxiosParamCreator = exports.ApplicationApi = exports.ApplicationApiFactory = exports.ApplicationApiFp = exports.ApplicationApiAxiosParamCreator = exports.ActiveResourceApi = exports.ActiveResourceApiFactory = exports.ActiveResourceApiFp = exports.ActiveResourceApiAxiosParamCreator = exports.AccountTypeApi = exports.AccountTypeApiFactory = exports.AccountTypeApiFp = exports.AccountTypeApiAxiosParamCreator = exports.WorkloadProfileVersionSpecDefinitionRuntimePropertyType = exports.WorkloadProfileVersionSpecDefinitionPropertyType = exports.ValueSource = exports.ValueSetVersionResultOf = void 0; +exports.TokenInfoApi = exports.TokenInfoApiFactory = exports.TokenInfoApiFp = exports.TokenInfoApiAxiosParamCreator = exports.SetApi = exports.SetApiFactory = exports.SetApiFp = exports.SetApiAxiosParamCreator = exports.RuntimeInfoApi = exports.RuntimeInfoApiFactory = exports.RuntimeInfoApiFp = exports.RuntimeInfoApiAxiosParamCreator = exports.ResourceTypeApi = exports.ResourceTypeApiFactory = exports.ResourceTypeApiFp = exports.ResourceTypeApiAxiosParamCreator = exports.ResourceProvisionApi = exports.ResourceProvisionApiFactory = exports.ResourceProvisionApiFp = exports.ResourceProvisionApiAxiosParamCreator = exports.ResourceDefinitionApi = exports.ResourceDefinitionApiFactory = exports.ResourceDefinitionApiFp = exports.ResourceDefinitionApiAxiosParamCreator = exports.ResourceAccountApi = exports.ResourceAccountApiFactory = exports.ResourceAccountApiFp = exports.ResourceAccountApiAxiosParamCreator = exports.RegistryApi = exports.RegistryApiFactory = exports.RegistryApiFp = exports.RegistryApiAxiosParamCreator = exports.PublicApi = exports.PublicApiFactory = exports.PublicApiFp = exports.PublicApiAxiosParamCreator = exports.OrganizationApi = exports.OrganizationApiFactory = exports.OrganizationApiFp = exports.OrganizationApiAxiosParamCreator = exports.MatchingCriteriaApi = exports.MatchingCriteriaApiFactory = exports.MatchingCriteriaApiFp = exports.MatchingCriteriaApiAxiosParamCreator = exports.ImageApi = exports.ImageApiFactory = exports.ImageApiFp = exports.ImageApiAxiosParamCreator = exports.EventApi = exports.EventApiFactory = void 0; +exports.WorkloadProfileApi = exports.WorkloadProfileApiFactory = exports.WorkloadProfileApiFp = exports.WorkloadProfileApiAxiosParamCreator = exports.ValueSetVersionApi = exports.ValueSetVersionApiFactory = exports.ValueSetVersionApiFp = exports.ValueSetVersionApiAxiosParamCreator = exports.ValueApi = exports.ValueApiFactory = exports.ValueApiFp = exports.ValueApiAxiosParamCreator = exports.UserRoleApi = exports.UserRoleApiFactory = exports.UserRoleApiFp = exports.UserRoleApiAxiosParamCreator = exports.UserProfileApi = exports.UserProfileApiFactory = exports.UserProfileApiFp = exports.UserProfileApiAxiosParamCreator = exports.UserInviteApi = exports.UserInviteApiFactory = exports.UserInviteApiFp = exports.UserInviteApiAxiosParamCreator = void 0; const axios_1 = __importDefault(__nccwpck_require__(8757)); +// URLSearchParams not necessarily used +// @ts-ignore +const url_1 = __nccwpck_require__(7310); +const form_data_1 = __importDefault(__nccwpck_require__(4334)); // Some imports not used depending on template conditions // @ts-ignore const common_1 = __nccwpck_require__(8273); // @ts-ignore const base_1 = __nccwpck_require__(980); +/** + * + * @export + * @enum {string} + */ +exports.ValueSetVersionResultOf = { + AppValueCreate: 'app_value_create', + AppValueUpdate: 'app_value_update', + AppValueDelete: 'app_value_delete', + AppValuesDelete: 'app_values_delete', + AppValueSetVersionRestore: 'app_value_set_version_restore', + AppValueSetVersionPurge: 'app_value_set_version_purge', + EnvValueCreate: 'env_value_create', + EnvValueUpdate: 'env_value_update', + EnvValueDelete: 'env_value_delete', + EnvValuesDelete: 'env_values_delete', + EnvValueSetVersionRestore: 'env_value_set_version_restore', + EnvValueSetVersionPurge: 'env_value_set_version_purge' +}; +/** + * Source of the value, \"app\" for app level, \"env\" for app env level. + * @export + * @enum {string} + */ +exports.ValueSource = { + App: 'app', + Env: 'env' +}; +/** + * + * @export + * @enum {string} + */ +exports.WorkloadProfileVersionSpecDefinitionPropertyType = { + Feature: 'feature', + Collection: 'collection', + Schema: 'schema' +}; +/** + * + * @export + * @enum {string} + */ +exports.WorkloadProfileVersionSpecDefinitionRuntimePropertyType = { + Feature: 'feature', + Collection: 'collection' +}; /** * AccountTypeApi - axios parameter creator * @export @@ -2028,7 +2079,7 @@ const AccountTypeApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/resources/account-types` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -2135,7 +2186,7 @@ const ActiveResourceApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -2180,7 +2231,7 @@ const ActiveResourceApiAxiosParamCreator = function (configuration) { .replace(`{${"type"}}`, encodeURIComponent(String(type))) .replace(`{${"resId"}}`, encodeURIComponent(String(resId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -2213,7 +2264,7 @@ const ActiveResourceApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"defId"}}`, encodeURIComponent(String(defId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -2387,7 +2438,7 @@ const ApplicationApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -2420,7 +2471,7 @@ const ApplicationApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -2449,7 +2500,7 @@ const ApplicationApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/apps` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -2469,19 +2520,19 @@ const ApplicationApiAxiosParamCreator = function (configuration) { * Creates a new Application, then adds it to the specified Organization. * @summary Add a new Application to an Organization * @param {string} orgId The Organization ID. - * @param {ApplicationRequest} applicationRequest The request ID and Human-friendly name of the Application. + * @param {ApplicationCreationRequest} applicationCreationRequest The request ID, Human-friendly name and environment of the Application. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsPost: async (orgId, applicationRequest, options = {}) => { + orgsOrgIdAppsPost: async (orgId, applicationCreationRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined (0, common_1.assertParamExists)('orgsOrgIdAppsPost', 'orgId', orgId); - // verify required parameter 'applicationRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsPost', 'applicationRequest', applicationRequest); + // verify required parameter 'applicationCreationRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsPost', 'applicationCreationRequest', applicationCreationRequest); const localVarPath = `/orgs/{orgId}/apps` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -2493,7 +2544,7 @@ const ApplicationApiAxiosParamCreator = function (configuration) { (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(applicationRequest, localVarRequestOptions, configuration); + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(applicationCreationRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, @@ -2548,12 +2599,12 @@ const ApplicationApiFp = function (configuration) { * Creates a new Application, then adds it to the specified Organization. * @summary Add a new Application to an Organization * @param {string} orgId The Organization ID. - * @param {ApplicationRequest} applicationRequest The request ID and Human-friendly name of the Application. + * @param {ApplicationCreationRequest} applicationCreationRequest The request ID, Human-friendly name and environment of the Application. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsPost(orgId, applicationRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsPost(orgId, applicationRequest, options); + async orgsOrgIdAppsPost(orgId, applicationCreationRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsPost(orgId, applicationCreationRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, }; @@ -2604,7 +2655,7 @@ const ApplicationApiFactory = function (configuration, basePath, axios) { * @throws {RequiredError} */ orgsOrgIdAppsPost(requestParameters, options) { - return localVarFp.orgsOrgIdAppsPost(requestParameters.orgId, requestParameters.applicationRequest, options).then((request) => request(axios, basePath)); + return localVarFp.orgsOrgIdAppsPost(requestParameters.orgId, requestParameters.applicationCreationRequest, options).then((request) => request(axios, basePath)); }, }; }; @@ -2658,7 +2709,7 @@ class ApplicationApi extends base_1.BaseAPI { * @memberof ApplicationApi */ orgsOrgIdAppsPost(requestParameters, options) { - return (0, exports.ApplicationApiFp)(this.configuration).orgsOrgIdAppsPost(requestParameters.orgId, requestParameters.applicationRequest, options).then((request) => request(this.axios, this.basePath)); + return (0, exports.ApplicationApiFp)(this.configuration).orgsOrgIdAppsPost(requestParameters.orgId, requestParameters.applicationCreationRequest, options).then((request) => request(this.axios, this.basePath)); } } exports.ApplicationApi = ApplicationApi; @@ -2685,7 +2736,7 @@ const ArtefactApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"artefactId"}}`, encodeURIComponent(String(artefactId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -2716,7 +2767,7 @@ const ArtefactApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/artefacts` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -2843,6 +2894,39 @@ exports.ArtefactApi = ArtefactApi; */ const ArtefactVersionApiAxiosParamCreator = function (configuration) { return { + /** + * Returns a specific Artefact Version. + * @summary Get an Artefacts Versions. + * @param {string} orgId The organization ID. + * @param {string} artefactVersionId The Artefact Version ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdArtefactVersionsArtefactVersionIdGet: async (orgId, artefactVersionId, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdArtefactVersionsArtefactVersionIdGet', 'orgId', orgId); + // verify required parameter 'artefactVersionId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdArtefactVersionsArtefactVersionIdGet', 'artefactVersionId', artefactVersionId); + const localVarPath = `/orgs/{orgId}/artefact-versions/{artefactVersionId}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"artefactVersionId"}}`, encodeURIComponent(String(artefactVersionId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Returns the Artefact Versions registered with your organization. If no elements are found, an empty list is returned. * @summary List all Artefacts Versions. @@ -2859,7 +2943,7 @@ const ArtefactVersionApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/artefact-versions` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -2901,7 +2985,7 @@ const ArtefactVersionApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/artefact-versions` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -2942,7 +3026,7 @@ const ArtefactVersionApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"artefactId"}}`, encodeURIComponent(String(artefactId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -2991,7 +3075,7 @@ const ArtefactVersionApiAxiosParamCreator = function (configuration) { .replace(`{${"artefactId"}}`, encodeURIComponent(String(artefactId))) .replace(`{${"versionId"}}`, encodeURIComponent(String(versionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -3019,6 +3103,18 @@ exports.ArtefactVersionApiAxiosParamCreator = ArtefactVersionApiAxiosParamCreato const ArtefactVersionApiFp = function (configuration) { const localVarAxiosParamCreator = (0, exports.ArtefactVersionApiAxiosParamCreator)(configuration); return { + /** + * Returns a specific Artefact Version. + * @summary Get an Artefacts Versions. + * @param {string} orgId The organization ID. + * @param {string} artefactVersionId The Artefact Version ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdArtefactVersionsArtefactVersionIdGet(orgId, artefactVersionId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdArtefactVersionsArtefactVersionIdGet(orgId, artefactVersionId, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, /** * Returns the Artefact Versions registered with your organization. If no elements are found, an empty list is returned. * @summary List all Artefacts Versions. @@ -3085,6 +3181,16 @@ exports.ArtefactVersionApiFp = ArtefactVersionApiFp; const ArtefactVersionApiFactory = function (configuration, basePath, axios) { const localVarFp = (0, exports.ArtefactVersionApiFp)(configuration); return { + /** + * Returns a specific Artefact Version. + * @summary Get an Artefacts Versions. + * @param {ArtefactVersionApiOrgsOrgIdArtefactVersionsArtefactVersionIdGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdArtefactVersionsArtefactVersionIdGet(requestParameters, options) { + return localVarFp.orgsOrgIdArtefactVersionsArtefactVersionIdGet(requestParameters.orgId, requestParameters.artefactVersionId, options).then((request) => request(axios, basePath)); + }, /** * Returns the Artefact Versions registered with your organization. If no elements are found, an empty list is returned. * @summary List all Artefacts Versions. @@ -3135,6 +3241,17 @@ exports.ArtefactVersionApiFactory = ArtefactVersionApiFactory; * @extends {BaseAPI} */ class ArtefactVersionApi extends base_1.BaseAPI { + /** + * Returns a specific Artefact Version. + * @summary Get an Artefacts Versions. + * @param {ArtefactVersionApiOrgsOrgIdArtefactVersionsArtefactVersionIdGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ArtefactVersionApi + */ + orgsOrgIdArtefactVersionsArtefactVersionIdGet(requestParameters, options) { + return (0, exports.ArtefactVersionApiFp)(this.configuration).orgsOrgIdArtefactVersionsArtefactVersionIdGet(requestParameters.orgId, requestParameters.artefactVersionId, options).then((request) => request(this.axios, this.basePath)); + } /** * Returns the Artefact Versions registered with your organization. If no elements are found, an empty list is returned. * @summary List all Artefacts Versions. @@ -3208,7 +3325,7 @@ const AutomationRuleApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -3248,7 +3365,7 @@ const AutomationRuleApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -3291,7 +3408,7 @@ const AutomationRuleApiAxiosParamCreator = function (configuration) { .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) .replace(`{${"ruleId"}}`, encodeURIComponent(String(ruleId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -3332,7 +3449,7 @@ const AutomationRuleApiAxiosParamCreator = function (configuration) { .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) .replace(`{${"ruleId"}}`, encodeURIComponent(String(ruleId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -3376,7 +3493,7 @@ const AutomationRuleApiAxiosParamCreator = function (configuration) { .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) .replace(`{${"ruleId"}}`, encodeURIComponent(String(ruleId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -3628,7 +3745,7 @@ const DeltaApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"deltaId"}}`, encodeURIComponent(String(deltaId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -3668,7 +3785,7 @@ const DeltaApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"deltaId"}}`, encodeURIComponent(String(deltaId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -3710,7 +3827,7 @@ const DeltaApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"deltaId"}}`, encodeURIComponent(String(deltaId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -3752,7 +3869,7 @@ const DeltaApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"deltaId"}}`, encodeURIComponent(String(deltaId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -3794,7 +3911,7 @@ const DeltaApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"deltaId"}}`, encodeURIComponent(String(deltaId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -3831,7 +3948,7 @@ const DeltaApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -3873,7 +3990,7 @@ const DeltaApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -3915,7 +4032,7 @@ const DeltaApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"deltaId"}}`, encodeURIComponent(String(deltaId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -4274,7 +4391,7 @@ const DeploymentApiAxiosParamCreator = function (configuration) { .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) .replace(`{${"deployId"}}`, encodeURIComponent(String(deployId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -4315,7 +4432,7 @@ const DeploymentApiAxiosParamCreator = function (configuration) { .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) .replace(`{${"deployId"}}`, encodeURIComponent(String(deployId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -4352,7 +4469,7 @@ const DeploymentApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -4392,7 +4509,7 @@ const DeploymentApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -4604,7 +4721,7 @@ const DriverDefinitionApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"driverId"}}`, encodeURIComponent(String(driverId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -4637,7 +4754,7 @@ const DriverDefinitionApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"driverId"}}`, encodeURIComponent(String(driverId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -4673,7 +4790,7 @@ const DriverDefinitionApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"driverId"}}`, encodeURIComponent(String(driverId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -4704,7 +4821,7 @@ const DriverDefinitionApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/resources/drivers` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -4736,7 +4853,7 @@ const DriverDefinitionApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/resources/drivers` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -4978,7 +5095,7 @@ const EnvironmentApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -5018,7 +5135,7 @@ const EnvironmentApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -5057,7 +5174,7 @@ const EnvironmentApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -5090,7 +5207,7 @@ const EnvironmentApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -5126,7 +5243,7 @@ const EnvironmentApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -5369,7 +5486,7 @@ const EnvironmentTypeApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"envTypeId"}}`, encodeURIComponent(String(envTypeId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -5402,7 +5519,7 @@ const EnvironmentTypeApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"envTypeId"}}`, encodeURIComponent(String(envTypeId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -5431,7 +5548,7 @@ const EnvironmentTypeApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/env-types` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -5463,7 +5580,7 @@ const EnvironmentTypeApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/env-types` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -5667,7 +5784,7 @@ const EventApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -5700,7 +5817,7 @@ const EventApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -5737,7 +5854,7 @@ const EventApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"jobId"}}`, encodeURIComponent(String(jobId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -5774,7 +5891,7 @@ const EventApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"jobId"}}`, encodeURIComponent(String(jobId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -5800,26 +5917,26 @@ const EventApiAxiosParamCreator = function (configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdWebhooksJobIdPost: async (orgId, appId, jobId, webhookRequest, options = {}) => { + orgsOrgIdAppsAppIdWebhooksJobIdPatch: async (orgId, appId, jobId, webhookRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdWebhooksJobIdPost', 'orgId', orgId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdWebhooksJobIdPatch', 'orgId', orgId); // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdWebhooksJobIdPost', 'appId', appId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdWebhooksJobIdPatch', 'appId', appId); // verify required parameter 'jobId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdWebhooksJobIdPost', 'jobId', jobId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdWebhooksJobIdPatch', 'jobId', jobId); // verify required parameter 'webhookRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdWebhooksJobIdPost', 'webhookRequest', webhookRequest); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdWebhooksJobIdPatch', 'webhookRequest', webhookRequest); const localVarPath = `/orgs/{orgId}/apps/{appId}/webhooks/{jobId}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"jobId"}}`, encodeURIComponent(String(jobId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -5852,7 +5969,7 @@ const EventApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -5883,7 +6000,7 @@ const EventApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/events` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -5969,8 +6086,8 @@ const EventApiFp = function (configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdWebhooksJobIdPost(orgId, appId, jobId, webhookRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdWebhooksJobIdPost(orgId, appId, jobId, webhookRequest, options); + async orgsOrgIdAppsAppIdWebhooksJobIdPatch(orgId, appId, jobId, webhookRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdWebhooksJobIdPatch(orgId, appId, jobId, webhookRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** @@ -6050,12 +6167,12 @@ const EventApiFactory = function (configuration, basePath, axios) { /** * * @summary Update a Webhook - * @param {EventApiOrgsOrgIdAppsAppIdWebhooksJobIdPostRequest} requestParameters Request parameters. + * @param {EventApiOrgsOrgIdAppsAppIdWebhooksJobIdPatchRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdWebhooksJobIdPost(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdWebhooksJobIdPost(requestParameters.orgId, requestParameters.appId, requestParameters.jobId, requestParameters.webhookRequest, options).then((request) => request(axios, basePath)); + orgsOrgIdAppsAppIdWebhooksJobIdPatch(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdWebhooksJobIdPatch(requestParameters.orgId, requestParameters.appId, requestParameters.jobId, requestParameters.webhookRequest, options).then((request) => request(axios, basePath)); }, /** * @@ -6134,13 +6251,13 @@ class EventApi extends base_1.BaseAPI { /** * * @summary Update a Webhook - * @param {EventApiOrgsOrgIdAppsAppIdWebhooksJobIdPostRequest} requestParameters Request parameters. + * @param {EventApiOrgsOrgIdAppsAppIdWebhooksJobIdPatchRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof EventApi */ - orgsOrgIdAppsAppIdWebhooksJobIdPost(requestParameters, options) { - return (0, exports.EventApiFp)(this.configuration).orgsOrgIdAppsAppIdWebhooksJobIdPost(requestParameters.orgId, requestParameters.appId, requestParameters.jobId, requestParameters.webhookRequest, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdWebhooksJobIdPatch(requestParameters, options) { + return (0, exports.EventApiFp)(this.configuration).orgsOrgIdAppsAppIdWebhooksJobIdPatch(requestParameters.orgId, requestParameters.appId, requestParameters.jobId, requestParameters.webhookRequest, options).then((request) => request(this.axios, this.basePath)); } /** * @@ -6185,7 +6302,7 @@ const ImageApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/images` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -6218,7 +6335,7 @@ const ImageApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"imageId"}}`, encodeURIComponent(String(imageId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -6254,7 +6371,7 @@ const ImageApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"imageId"}}`, encodeURIComponent(String(imageId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -6289,7 +6406,7 @@ const ImageApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"imageId"}}`, encodeURIComponent(String(imageId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -6497,7 +6614,7 @@ const MatchingCriteriaApiAxiosParamCreator = function (configuration) { .replace(`{${"defId"}}`, encodeURIComponent(String(defId))) .replace(`{${"criteriaId"}}`, encodeURIComponent(String(criteriaId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -6536,7 +6653,7 @@ const MatchingCriteriaApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"defId"}}`, encodeURIComponent(String(defId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -6670,7 +6787,7 @@ const OrganizationApiAxiosParamCreator = function (configuration) { orgsGet: async (options = {}) => { const localVarPath = `/orgs`; // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -6699,7 +6816,7 @@ const OrganizationApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -6823,7 +6940,7 @@ const PublicApiAxiosParamCreator = function (configuration) { currentUserGet: async (options = {}) => { const localVarPath = `/current-user`; // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -6851,7 +6968,7 @@ const PublicApiAxiosParamCreator = function (configuration) { (0, common_1.assertParamExists)('currentUserPatch', 'userProfileExtendedRequest', userProfileExtendedRequest); const localVarPath = `/current-user`; // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -6890,7 +7007,40 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"deltaId"}}`, encodeURIComponent(String(deltaId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Latest version of the given workload profile with optional constraint. + * @param {string} orgId The Organization ID. + * @param {string} profileQid The Workload profile qualified ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLatestWorkloadProfileVersion: async (orgId, profileQid, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('getLatestWorkloadProfileVersion', 'orgId', orgId); + // verify required parameter 'profileQid' is not null or undefined + (0, common_1.assertParamExists)('getLatestWorkloadProfileVersion', 'profileQid', profileQid); + const localVarPath = `/orgs/{orgId}/workload-profiles/{profileQid}/versions/latest` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"profileQid"}}`, encodeURIComponent(String(profileQid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -6923,7 +7073,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -6948,7 +7098,7 @@ const PublicApiAxiosParamCreator = function (configuration) { orgsGet: async (options = {}) => { const localVarPath = `/orgs`; // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -6981,7 +7131,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7021,7 +7171,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"deltaId"}}`, encodeURIComponent(String(deltaId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7063,7 +7213,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"deltaId"}}`, encodeURIComponent(String(deltaId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7105,7 +7255,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"deltaId"}}`, encodeURIComponent(String(deltaId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7147,7 +7297,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"deltaId"}}`, encodeURIComponent(String(deltaId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7184,7 +7334,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7226,7 +7376,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7265,7 +7415,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7306,7 +7456,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) .replace(`{${"deployId"}}`, encodeURIComponent(String(deployId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7347,7 +7497,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) .replace(`{${"deployId"}}`, encodeURIComponent(String(deployId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7384,7 +7534,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7424,7 +7574,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7466,7 +7616,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7505,7 +7655,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7542,7 +7692,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7558,6 +7708,48 @@ const PublicApiAxiosParamCreator = function (configuration) { options: localVarRequestOptions, }; }, + /** + * + * @summary Lists the resource objects that hold the information needed to provision the resources specified in the request and the resources they depend on. + * @param {string} orgId The Organization ID. + * @param {string} appId The Application ID. + * @param {string} envId The Environment ID. + * @param {Array} resourceProvisionRequestRequest Resources to provision. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost: async (orgId, appId, envId, resourceProvisionRequestRequest, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost', 'orgId', orgId); + // verify required parameter 'appId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost', 'appId', appId); + // verify required parameter 'envId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost', 'envId', envId); + // verify required parameter 'resourceProvisionRequestRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost', 'resourceProvisionRequestRequest', resourceProvisionRequestRequest); + const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/resources/graph` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) + .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(resourceProvisionRequestRequest, localVarRequestOptions, configuration); + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * * @summary Delete Active Resources. @@ -7587,7 +7779,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"type"}}`, encodeURIComponent(String(type))) .replace(`{${"resId"}}`, encodeURIComponent(String(resId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7624,7 +7816,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7664,7 +7856,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7707,7 +7899,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) .replace(`{${"ruleId"}}`, encodeURIComponent(String(ruleId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7748,7 +7940,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) .replace(`{${"ruleId"}}`, encodeURIComponent(String(ruleId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7792,7 +7984,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) .replace(`{${"ruleId"}}`, encodeURIComponent(String(ruleId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7831,7 +8023,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7871,7 +8063,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7913,7 +8105,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7953,7 +8145,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -7997,7 +8189,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8014,8 +8206,8 @@ const PublicApiAxiosParamCreator = function (configuration) { }; }, /** - * - * @summary Purge the value of a specific key Value Set Version in an Environment of an App + * Purging permanently removes the value of a specific Shared Value in an application. A purged value is no longer accessible, can\'t be restored and can\'t be used by deployments referencing a Value Set Version where the value was present. Learn more about purging in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#purge). + * @summary Purge the value of a specific Shared Value from the App Environment Version history. * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. * @param {string} envId The Environment ID. @@ -8045,7 +8237,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))) .replace(`{${"key"}}`, encodeURIComponent(String(key))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8064,8 +8256,8 @@ const PublicApiAxiosParamCreator = function (configuration) { }; }, /** - * - * @summary Restore a specific key Value Set Version in an Environment of an App + * Restore the values of a single Shared Value in an Environment from a specific version. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a specific key from the Value Set Version in an Environment of an App * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. * @param {string} envId The Environment ID. @@ -8095,7 +8287,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))) .replace(`{${"key"}}`, encodeURIComponent(String(key))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8114,7 +8306,7 @@ const PublicApiAxiosParamCreator = function (configuration) { }; }, /** - * + * Restore the values of all Shared Values in an environment from a specific version. Keys not existing in the selected version are deleted. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). * @summary Restore a Value Set Version in an Environment of an App * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. @@ -8141,7 +8333,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8180,7 +8372,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8217,7 +8409,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8258,7 +8450,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) .replace(`{${"key"}}`, encodeURIComponent(String(key))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8302,7 +8494,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) .replace(`{${"key"}}`, encodeURIComponent(String(key))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8348,7 +8540,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) .replace(`{${"key"}}`, encodeURIComponent(String(key))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8390,7 +8582,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8425,7 +8617,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8461,7 +8653,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8496,7 +8688,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8529,7 +8721,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8563,7 +8755,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8607,7 +8799,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"setId"}}`, encodeURIComponent(String(setId))) .replace(`{${"sourceSetId"}}`, encodeURIComponent(String(sourceSetId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8645,7 +8837,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"setId"}}`, encodeURIComponent(String(setId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8688,7 +8880,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"setId"}}`, encodeURIComponent(String(setId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8723,7 +8915,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8759,7 +8951,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8777,6 +8969,43 @@ const PublicApiAxiosParamCreator = function (configuration) { options: localVarRequestOptions, }; }, + /** + * + * @summary Remove the role of a User on an Application + * @param {string} orgId The Organization ID. + * @param {string} appId The Application ID. + * @param {string} userId The User ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdUsersUserIdDelete: async (orgId, appId, userId, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersUserIdDelete', 'orgId', orgId); + // verify required parameter 'appId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersUserIdDelete', 'appId', appId); + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersUserIdDelete', 'userId', userId); + const localVarPath = `/orgs/{orgId}/apps/{appId}/users/{userId}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * * @summary Get the role of a User on an Application @@ -8798,7 +9027,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8814,6 +9043,48 @@ const PublicApiAxiosParamCreator = function (configuration) { options: localVarRequestOptions, }; }, + /** + * + * @summary Update the role of a User on an Application + * @param {string} orgId The Organization ID. + * @param {string} appId The Application ID. + * @param {string} userId The User ID + * @param {RoleRequest} roleRequest The new user role + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdUsersUserIdPatch: async (orgId, appId, userId, roleRequest, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersUserIdPatch', 'orgId', orgId); + // verify required parameter 'appId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersUserIdPatch', 'appId', appId); + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersUserIdPatch', 'userId', userId); + // verify required parameter 'roleRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersUserIdPatch', 'roleRequest', roleRequest); + const localVarPath = `/orgs/{orgId}/apps/{appId}/users/{userId}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(roleRequest, localVarRequestOptions, configuration); + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * A new Value Set Version is created on every modification of a Value inside the app. * @summary List Value Set Versions in the App @@ -8832,7 +9103,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8872,7 +9143,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8889,8 +9160,8 @@ const PublicApiAxiosParamCreator = function (configuration) { }; }, /** - * - * @summary Purge the value of a specific key Value Set Version in an App + * Purging permanently removes the value of a specific Shared Value in an Application. A purged value is no longer accessible, can\'t be restored and can\'t be used by deployments referencing a Value Set Version where the value was present. Learn more about purging in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#purge). + * @summary Purge the value of a specific Shared Value from the App Version history. * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. * @param {string} valueSetVersionId The ValueSetVersion ID. @@ -8916,7 +9187,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))) .replace(`{${"key"}}`, encodeURIComponent(String(key))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8935,8 +9206,8 @@ const PublicApiAxiosParamCreator = function (configuration) { }; }, /** - * - * @summary Restore a specific key Value Set Version in an App + * Restore the values of a single Shared Value in an application from a specific version. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a specific key from the Value Set Version in an App * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. * @param {string} valueSetVersionId The ValueSetVersion ID. @@ -8962,7 +9233,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))) .replace(`{${"key"}}`, encodeURIComponent(String(key))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -8981,7 +9252,7 @@ const PublicApiAxiosParamCreator = function (configuration) { }; }, /** - * + * Restore the values of all Shared Values in an application from a specific version. Keys not existing in the selected version are deleted. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). * @summary Restore a Value Set Version in an App * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. @@ -9004,7 +9275,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9039,7 +9310,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9072,7 +9343,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9109,7 +9380,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"key"}}`, encodeURIComponent(String(key))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9149,7 +9420,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"key"}}`, encodeURIComponent(String(key))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9191,7 +9462,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"key"}}`, encodeURIComponent(String(key))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9229,7 +9500,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9264,7 +9535,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9301,7 +9572,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"jobId"}}`, encodeURIComponent(String(jobId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9338,7 +9609,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"jobId"}}`, encodeURIComponent(String(jobId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9364,26 +9635,26 @@ const PublicApiAxiosParamCreator = function (configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdWebhooksJobIdPost: async (orgId, appId, jobId, webhookRequest, options = {}) => { + orgsOrgIdAppsAppIdWebhooksJobIdPatch: async (orgId, appId, jobId, webhookRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdWebhooksJobIdPost', 'orgId', orgId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdWebhooksJobIdPatch', 'orgId', orgId); // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdWebhooksJobIdPost', 'appId', appId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdWebhooksJobIdPatch', 'appId', appId); // verify required parameter 'jobId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdWebhooksJobIdPost', 'jobId', jobId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdWebhooksJobIdPatch', 'jobId', jobId); // verify required parameter 'webhookRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdWebhooksJobIdPost', 'webhookRequest', webhookRequest); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdWebhooksJobIdPatch', 'webhookRequest', webhookRequest); const localVarPath = `/orgs/{orgId}/apps/{appId}/webhooks/{jobId}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"jobId"}}`, encodeURIComponent(String(jobId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -9416,7 +9687,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9447,7 +9718,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/apps` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9467,19 +9738,19 @@ const PublicApiAxiosParamCreator = function (configuration) { * Creates a new Application, then adds it to the specified Organization. * @summary Add a new Application to an Organization * @param {string} orgId The Organization ID. - * @param {ApplicationRequest} applicationRequest The request ID and Human-friendly name of the Application. + * @param {ApplicationCreationRequest} applicationCreationRequest The request ID, Human-friendly name and environment of the Application. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsPost: async (orgId, applicationRequest, options = {}) => { + orgsOrgIdAppsPost: async (orgId, applicationCreationRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined (0, common_1.assertParamExists)('orgsOrgIdAppsPost', 'orgId', orgId); - // verify required parameter 'applicationRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsPost', 'applicationRequest', applicationRequest); + // verify required parameter 'applicationCreationRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsPost', 'applicationCreationRequest', applicationCreationRequest); const localVarPath = `/orgs/{orgId}/apps` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9491,7 +9762,40 @@ const PublicApiAxiosParamCreator = function (configuration) { (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(applicationRequest, localVarRequestOptions, configuration); + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(applicationCreationRequest, localVarRequestOptions, configuration); + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a specific Artefact Version. + * @summary Get an Artefacts Versions. + * @param {string} orgId The organization ID. + * @param {string} artefactVersionId The Artefact Version ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdArtefactVersionsArtefactVersionIdGet: async (orgId, artefactVersionId, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdArtefactVersionsArtefactVersionIdGet', 'orgId', orgId); + // verify required parameter 'artefactVersionId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdArtefactVersionsArtefactVersionIdGet', 'artefactVersionId', artefactVersionId); + const localVarPath = `/orgs/{orgId}/artefact-versions/{artefactVersionId}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"artefactVersionId"}}`, encodeURIComponent(String(artefactVersionId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, @@ -9513,7 +9817,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/artefact-versions` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9555,7 +9859,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/artefact-versions` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9593,7 +9897,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"artefactId"}}`, encodeURIComponent(String(artefactId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9629,7 +9933,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"artefactId"}}`, encodeURIComponent(String(artefactId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9678,7 +9982,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"artefactId"}}`, encodeURIComponent(String(artefactId))) .replace(`{${"versionId"}}`, encodeURIComponent(String(versionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9711,7 +10015,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/artefacts` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9733,43 +10037,6 @@ const PublicApiAxiosParamCreator = function (configuration) { options: localVarRequestOptions, }; }, - /** - * - * @summary Get the role of a User on an Environment Type - * @param {string} orgId The Organization ID. - * @param {string} envType The Environment Type. - * @param {string} userId The User ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - orgsOrgIdEnvTypeEnvTypeUsersUserIdGet: async (orgId, envType, userId, options = {}) => { - // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdEnvTypeEnvTypeUsersUserIdGet', 'orgId', orgId); - // verify required parameter 'envType' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdEnvTypeEnvTypeUsersUserIdGet', 'envType', envType); - // verify required parameter 'userId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdEnvTypeEnvTypeUsersUserIdGet', 'userId', userId); - const localVarPath = `/orgs/{orgId}/env-type/{envType}/users/{userId}` - .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"envType"}}`, encodeURIComponent(String(envType))) - .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }, /** * Deletes a specific Environment Type from an Organization. If there are Environments with this Type in the Organization, the operation will fail. * @summary Deletes an Environment Type @@ -9787,7 +10054,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"envTypeId"}}`, encodeURIComponent(String(envTypeId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9820,7 +10087,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"envTypeId"}}`, encodeURIComponent(String(envTypeId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9837,24 +10104,178 @@ const PublicApiAxiosParamCreator = function (configuration) { }; }, /** - * Lists all Environment Types in an Organization. - * @summary List all Environment Types + * + * @summary Adds a User to an Environment Type with a Role * @param {string} orgId The Organization ID. + * @param {string} envType The Environment Type. + * @param {UserRoleRequest} userRoleRequest The user ID and the role * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdEnvTypesGet: async (orgId, options = {}) => { + orgsOrgIdEnvTypesEnvTypeUsersPost: async (orgId, envType, userRoleRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdEnvTypesGet', 'orgId', orgId); - const localVarPath = `/orgs/{orgId}/env-types` - .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersPost', 'orgId', orgId); + // verify required parameter 'envType' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersPost', 'envType', envType); + // verify required parameter 'userRoleRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersPost', 'userRoleRequest', userRoleRequest); + const localVarPath = `/orgs/{orgId}/env-types/{envType}/users` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"envType"}}`, encodeURIComponent(String(envType))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(userRoleRequest, localVarRequestOptions, configuration); + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Remove the role of a User on an Environment Type + * @param {string} orgId The Organization ID. + * @param {string} envType The Environment Type. + * @param {string} userId The User ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdEnvTypesEnvTypeUsersUserIdDelete: async (orgId, envType, userId, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersUserIdDelete', 'orgId', orgId); + // verify required parameter 'envType' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersUserIdDelete', 'envType', envType); + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersUserIdDelete', 'userId', userId); + const localVarPath = `/orgs/{orgId}/env-types/{envType}/users/{userId}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"envType"}}`, encodeURIComponent(String(envType))) + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get the role of a User on an Environment Type + * @param {string} orgId The Organization ID. + * @param {string} envType The Environment Type. + * @param {string} userId The User ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdEnvTypesEnvTypeUsersUserIdGet: async (orgId, envType, userId, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersUserIdGet', 'orgId', orgId); + // verify required parameter 'envType' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersUserIdGet', 'envType', envType); + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersUserIdGet', 'userId', userId); + const localVarPath = `/orgs/{orgId}/env-types/{envType}/users/{userId}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"envType"}}`, encodeURIComponent(String(envType))) + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Update the role of a User on an Environment Type + * @param {string} orgId The Organization ID. + * @param {string} envType The Environment Type. + * @param {string} userId The User ID + * @param {RoleRequest} roleRequest The new user role + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch: async (orgId, envType, userId, roleRequest, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch', 'orgId', orgId); + // verify required parameter 'envType' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch', 'envType', envType); + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch', 'userId', userId); + // verify required parameter 'roleRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch', 'roleRequest', roleRequest); + const localVarPath = `/orgs/{orgId}/env-types/{envType}/users/{userId}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"envType"}}`, encodeURIComponent(String(envType))) + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(roleRequest, localVarRequestOptions, configuration); + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Lists all Environment Types in an Organization. + * @summary List all Environment Types + * @param {string} orgId The Organization ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdEnvTypesGet: async (orgId, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesGet', 'orgId', orgId); + const localVarPath = `/orgs/{orgId}/env-types` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); @@ -9881,7 +10302,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/env-types` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9912,7 +10333,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/events` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9941,7 +10362,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -9970,7 +10391,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/images` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10003,7 +10424,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"imageId"}}`, encodeURIComponent(String(imageId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10039,7 +10460,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"imageId"}}`, encodeURIComponent(String(imageId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10074,7 +10495,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"imageId"}}`, encodeURIComponent(String(imageId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10103,7 +10524,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/invitations` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10135,7 +10556,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/invitations` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10166,7 +10587,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/registries` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10198,7 +10619,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/registries` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10233,7 +10654,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"regId"}}`, encodeURIComponent(String(regId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10266,7 +10687,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"regId"}}`, encodeURIComponent(String(regId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10299,7 +10720,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"regId"}}`, encodeURIComponent(String(regId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10335,7 +10756,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"regId"}}`, encodeURIComponent(String(regId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10366,7 +10787,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/resources/account-types` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10382,6 +10803,39 @@ const PublicApiAxiosParamCreator = function (configuration) { options: localVarRequestOptions, }; }, + /** + * + * @summary Delete an unused Resource Account. + * @param {string} orgId The Organization ID. + * @param {string} accId The Resource Account ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdResourcesAccountsAccIdDelete: async (orgId, accId, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdResourcesAccountsAccIdDelete', 'orgId', orgId); + // verify required parameter 'accId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdResourcesAccountsAccIdDelete', 'accId', accId); + const localVarPath = `/orgs/{orgId}/resources/accounts/{accId}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"accId"}}`, encodeURIComponent(String(accId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * * @summary Get a Resource Account. @@ -10399,7 +10853,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"accId"}}`, encodeURIComponent(String(accId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10435,7 +10889,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"accId"}}`, encodeURIComponent(String(accId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10466,7 +10920,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/resources/accounts` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10498,7 +10952,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/resources/accounts` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10538,7 +10992,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"defId"}}`, encodeURIComponent(String(defId))) .replace(`{${"criteriaId"}}`, encodeURIComponent(String(criteriaId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10577,7 +11031,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"defId"}}`, encodeURIComponent(String(defId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10613,7 +11067,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"defId"}}`, encodeURIComponent(String(defId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10649,7 +11103,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"defId"}}`, encodeURIComponent(String(defId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10670,22 +11124,22 @@ const PublicApiAxiosParamCreator = function (configuration) { * @summary Update a Resource Definition. * @param {string} orgId The Organization ID. * @param {string} defId The Resource Definition ID. - * @param {UpdateResourceDefinitionRequestRequest} updateResourceDefinitionRequestRequest The Resource Definition record details. The PATCH operation would change the value of the property if it is included in the request payload JSON, and not `null`. Missing and `null` properties are ignored. For the map properties, such as UpdateResourceDefinitionRequest.DriverInputs, the merge operation is applied. Merge rules are as follows: - If a map property has a value, it is replaced (or added). - If a map property is set to `null`, it is removed. - If a map property is not included (missing in JSON), it remains unchanged. + * @param {PatchResourceDefinitionRequestRequest} patchResourceDefinitionRequestRequest The Resource Definition record details. The PATCH operation would change the value of the property if it is included in the request payload JSON, and not `null`. Missing and `null` properties are ignored. For the map properties, such as PatchResourceDefinitionRequest.DriverInputs, the merge operation is applied. Merge rules are as follows: - If a map property has a value, it is replaced (or added). - If a map property is set to `null`, it is removed. - If a map property is not included (missing in JSON), it remains unchanged. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdResourcesDefsDefIdPatch: async (orgId, defId, updateResourceDefinitionRequestRequest, options = {}) => { + orgsOrgIdResourcesDefsDefIdPatch: async (orgId, defId, patchResourceDefinitionRequestRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined (0, common_1.assertParamExists)('orgsOrgIdResourcesDefsDefIdPatch', 'orgId', orgId); // verify required parameter 'defId' is not null or undefined (0, common_1.assertParamExists)('orgsOrgIdResourcesDefsDefIdPatch', 'defId', defId); - // verify required parameter 'updateResourceDefinitionRequestRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdResourcesDefsDefIdPatch', 'updateResourceDefinitionRequestRequest', updateResourceDefinitionRequestRequest); + // verify required parameter 'patchResourceDefinitionRequestRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdResourcesDefsDefIdPatch', 'patchResourceDefinitionRequestRequest', patchResourceDefinitionRequestRequest); const localVarPath = `/orgs/{orgId}/resources/defs/{defId}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"defId"}}`, encodeURIComponent(String(defId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10697,6 +11151,44 @@ const PublicApiAxiosParamCreator = function (configuration) { (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(patchResourceDefinitionRequestRequest, localVarRequestOptions, configuration); + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Update a Resource Definition. + * @param {string} orgId The Organization ID. + * @param {string} defId The Resource Definition ID. + * @param {UpdateResourceDefinitionRequestRequest} updateResourceDefinitionRequestRequest The Resource Definition record details. The PUT operation updates a resource definition using the provided payload. An empty driver_account or driver_inputs property will unset the existing values. Currently the resource and driver types can\'t be changed. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdResourcesDefsDefIdPut: async (orgId, defId, updateResourceDefinitionRequestRequest, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdResourcesDefsDefIdPut', 'orgId', orgId); + // verify required parameter 'defId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdResourcesDefsDefIdPut', 'defId', defId); + // verify required parameter 'updateResourceDefinitionRequestRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdResourcesDefsDefIdPut', 'updateResourceDefinitionRequestRequest', updateResourceDefinitionRequestRequest); + const localVarPath = `/orgs/{orgId}/resources/defs/{defId}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"defId"}}`, encodeURIComponent(String(defId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateResourceDefinitionRequestRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), @@ -10720,7 +11212,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"defId"}}`, encodeURIComponent(String(defId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10754,7 +11246,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/resources/defs` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10801,7 +11293,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/resources/defs` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10836,7 +11328,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"driverId"}}`, encodeURIComponent(String(driverId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10869,7 +11361,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"driverId"}}`, encodeURIComponent(String(driverId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10905,7 +11397,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"driverId"}}`, encodeURIComponent(String(driverId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10936,7 +11428,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/resources/drivers` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10968,7 +11460,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/resources/drivers` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -10999,7 +11491,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/resources/types` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -11028,7 +11520,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/users` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -11048,19 +11540,19 @@ const PublicApiAxiosParamCreator = function (configuration) { * * @summary Creates a new service user. * @param {string} orgId The Organization ID. - * @param {UserProfileExtendedRequest} userProfileExtendedRequest The user ID and the role + * @param {NewServiceUserRequest} newServiceUserRequest The user ID and the role * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdUsersPost: async (orgId, userProfileExtendedRequest, options = {}) => { + orgsOrgIdUsersPost: async (orgId, newServiceUserRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined (0, common_1.assertParamExists)('orgsOrgIdUsersPost', 'orgId', orgId); - // verify required parameter 'userProfileExtendedRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdUsersPost', 'userProfileExtendedRequest', userProfileExtendedRequest); + // verify required parameter 'newServiceUserRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdUsersPost', 'newServiceUserRequest', newServiceUserRequest); const localVarPath = `/orgs/{orgId}/users` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -11072,7 +11564,7 @@ const PublicApiAxiosParamCreator = function (configuration) { (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(userProfileExtendedRequest, localVarRequestOptions, configuration); + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(newServiceUserRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, @@ -11080,23 +11572,27 @@ const PublicApiAxiosParamCreator = function (configuration) { }, /** * - * @summary List workload profiles available to the organization. + * @summary Remove the role of a User on an Organization * @param {string} orgId The Organization ID. + * @param {string} userId The User ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesGet: async (orgId, options = {}) => { + orgsOrgIdUsersUserIdDelete: async (orgId, userId, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesGet', 'orgId', orgId); - const localVarPath = `/orgs/{orgId}/workload-profiles` - .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); + (0, common_1.assertParamExists)('orgsOrgIdUsersUserIdDelete', 'orgId', orgId); + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdUsersUserIdDelete', 'userId', userId); + const localVarPath = `/orgs/{orgId}/users/{userId}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); @@ -11109,110 +11605,99 @@ const PublicApiAxiosParamCreator = function (configuration) { }, /** * - * @summary Create new Workload Profile + * @summary Get the role of a User on an Organization * @param {string} orgId The Organization ID. - * @param {WorkloadProfileRequest} workloadProfileRequest Workload profile details. + * @param {string} userId The User ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesPost: async (orgId, workloadProfileRequest, options = {}) => { + orgsOrgIdUsersUserIdGet: async (orgId, userId, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesPost', 'orgId', orgId); - // verify required parameter 'workloadProfileRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesPost', 'workloadProfileRequest', workloadProfileRequest); - const localVarPath = `/orgs/{orgId}/workload-profiles` - .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); + (0, common_1.assertParamExists)('orgsOrgIdUsersUserIdGet', 'orgId', orgId); + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdUsersUserIdGet', 'userId', userId); + const localVarPath = `/orgs/{orgId}/users/{userId}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; - localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(workloadProfileRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** - * This will also delete all versions of a workload profile. It is not possible to delete profiles of other organizations. - * @summary Delete a Workload Profile + * + * @summary Update the role of a User on an Organization * @param {string} orgId The Organization ID. - * @param {string} profileId The Workload profile ID. + * @param {string} userId The User ID + * @param {RoleRequest} roleRequest The new user the role * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesProfileIdDelete: async (orgId, profileId, options = {}) => { + orgsOrgIdUsersUserIdPatch: async (orgId, userId, roleRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileIdDelete', 'orgId', orgId); - // verify required parameter 'profileId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileIdDelete', 'profileId', profileId); - const localVarPath = `/orgs/{orgId}/workload-profiles/{profileId}` + (0, common_1.assertParamExists)('orgsOrgIdUsersUserIdPatch', 'orgId', orgId); + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdUsersUserIdPatch', 'userId', userId); + // verify required parameter 'roleRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdUsersUserIdPatch', 'roleRequest', roleRequest); + const localVarPath = `/orgs/{orgId}/users/{userId}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"profileId"}}`, encodeURIComponent(String(profileId))); + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(roleRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** - * Creates a Workload Profile Version from the uploaded Helm chart. The version is retrieved from the chart\'s metadata (Charts.yaml file). The request has content type `multipart/form-data` and the request body includes two parts: 1. `file` with `application/x-gzip` content type which is an archive containing a Helm chart. 2. `metadata` with `application/json` content type which defines the version\'s metadata. Request body example: Content-Type: multipart/form-data; boundary=----boundary ----boundary Content-Disposition: form-data; name=\"metadata\" Content-Type: application/json; charset=UTF-8 { \"features\": { \"humanitec/service\": {}, \"humanitec/volumes\": {}, \"custom\": {\"schema\": {}} }, \"notes\": \"Notes related to this version of the profile\" } ----boundary Content-Disposition: form-data; name=\"file\"; filename=\"my-workload-1.0.1.tgz\" Content-Type: application/x-gzip [TGZ_DATA] ----boundary **NOTE:** A Workload Profile must be created before a version can be added to it. - * @summary Add new Version of the Workload Profile + * + * @summary List workload profiles available to the organization. * @param {string} orgId The Organization ID. - * @param {string} profileId The Workload Profile ID. - * @param {WorkloadProfileVersionRequest} [metadata] - * @param {File} [file] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesProfileIdVersionsPost: async (orgId, profileId, metadata, file, options = {}) => { + orgsOrgIdWorkloadProfilesGet: async (orgId, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileIdVersionsPost', 'orgId', orgId); - // verify required parameter 'profileId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileIdVersionsPost', 'profileId', profileId); - const localVarPath = `/orgs/{orgId}/workload-profiles/{profileId}/versions` - .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"profileId"}}`, encodeURIComponent(String(profileId))); + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesGet', 'orgId', orgId); + const localVarPath = `/orgs/{orgId}/workload-profiles` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; - const localVarFormParams = new ((configuration && configuration.formDataCtor) || base_1.FormData)(); - if (metadata !== undefined) { - localVarFormParams.append('metadata', new Blob([JSON.stringify(metadata)], { type: "application/json", })); - } - if (file !== undefined) { - localVarFormParams.append('file', file); - } - localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = localVarFormParams; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, @@ -11220,26 +11705,93 @@ const PublicApiAxiosParamCreator = function (configuration) { }, /** * - * @summary Delete a Workload Profile Version + * @summary Create new Workload Profile * @param {string} orgId The Organization ID. - * @param {string} profileId The Workload profile ID. - * @param {string} version The Version. + * @param {WorkloadProfileRequest} workloadProfileRequest Workload profile details. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete: async (orgId, profileId, version, options = {}) => { + orgsOrgIdWorkloadProfilesPost: async (orgId, workloadProfileRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete', 'orgId', orgId); - // verify required parameter 'profileId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete', 'profileId', profileId); - // verify required parameter 'version' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesPost', 'orgId', orgId); + // verify required parameter 'workloadProfileRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesPost', 'workloadProfileRequest', workloadProfileRequest); + const localVarPath = `/orgs/{orgId}/workload-profiles` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(workloadProfileRequest, localVarRequestOptions, configuration); + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Delete a Workload Profile Version + * @param {string} orgId The Organization ID. + * @param {string} profileId The Workload profile ID. + * @param {string} version The Version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete: async (orgId, profileId, version, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete', 'orgId', orgId); + // verify required parameter 'profileId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete', 'profileId', profileId); + // verify required parameter 'version' is not null or undefined (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete', 'version', version); const localVarPath = `/orgs/{orgId}/workload-profiles/{profileId}/versions/{version}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"profileId"}}`, encodeURIComponent(String(profileId))) .replace(`{${"version"}}`, encodeURIComponent(String(version))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This will also delete all versions of a workload profile. It is not possible to delete profiles of other organizations. + * @summary Delete a Workload Profile + * @param {string} orgId The Organization ID. + * @param {string} profileQid The Workload profile ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdWorkloadProfilesProfileQidDelete: async (orgId, profileQid, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileQidDelete', 'orgId', orgId); + // verify required parameter 'profileQid' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileQidDelete', 'profileQid', profileQid); + const localVarPath = `/orgs/{orgId}/workload-profiles/{profileQid}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"profileQid"}}`, encodeURIComponent(String(profileQid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -11272,7 +11824,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"profileQid"}}`, encodeURIComponent(String(profileQid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -11306,7 +11858,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"profileQid"}}`, encodeURIComponent(String(profileQid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -11325,6 +11877,50 @@ const PublicApiAxiosParamCreator = function (configuration) { options: localVarRequestOptions, }; }, + /** + * Creates a Workload Profile Version from the uploaded Helm chart. The version is retrieved from the chart\'s metadata (Charts.yaml file). The request has content type `multipart/form-data` and the request body includes two parts: 1. `file` with `application/x-gzip` content type which is an archive containing a Helm chart. 2. `metadata` with `application/json` content type which defines the version\'s metadata. Request body example: Content-Type: multipart/form-data; boundary=----boundary ----boundary Content-Disposition: form-data; name=\"metadata\" Content-Type: application/json; charset=UTF-8 { \"features\": { \"humanitec/service\": {}, \"humanitec/volumes\": {}, \"custom\": {\"schema\": {}} }, \"notes\": \"Notes related to this version of the profile\" } ----boundary Content-Disposition: form-data; name=\"file\"; filename=\"my-workload-1.0.1.tgz\" Content-Type: application/x-gzip [TGZ_DATA] ----boundary **NOTE:** A Workload Profile must be created before a version can be added to it. + * @summary Add new Version of the Workload Profile + * @param {string} orgId The Organization ID. + * @param {string} profileQid The Workload Profile ID. + * @param {WorkloadProfileVersionRequest} [metadata] + * @param {File} [file] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdWorkloadProfilesProfileQidVersionsPost: async (orgId, profileQid, metadata, file, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileQidVersionsPost', 'orgId', orgId); + // verify required parameter 'profileQid' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileQidVersionsPost', 'profileQid', profileQid); + const localVarPath = `/orgs/{orgId}/workload-profiles/{profileQid}/versions` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"profileQid"}}`, encodeURIComponent(String(profileQid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + const localVarFormParams = new ((configuration && configuration.formDataCtor) || form_data_1.default)(); + if (metadata !== undefined) { + localVarFormParams.append('metadata', new Blob([JSON.stringify(metadata)], { type: "application/json", })); + } + if (file !== undefined) { + localVarFormParams.append('file', file); + } + localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...localVarFormParams.getHeaders?.(), ...options.headers }; + localVarRequestOptions.data = localVarFormParams; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * * @summary Update an existing Delta @@ -11349,7 +11945,7 @@ const PublicApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"deltaId"}}`, encodeURIComponent(String(deltaId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -11376,7 +11972,7 @@ const PublicApiAxiosParamCreator = function (configuration) { tokensGet: async (options = {}) => { const localVarPath = `/tokens`; // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -11405,7 +12001,7 @@ const PublicApiAxiosParamCreator = function (configuration) { const localVarPath = `/tokens/{tokenId}` .replace(`{${"tokenId"}}`, encodeURIComponent(String(tokenId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -11430,7 +12026,136 @@ const PublicApiAxiosParamCreator = function (configuration) { usersMeGet: async (options = {}) => { const localVarPath = `/users/me`; // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Lists tokens associated with a user + * @param {string} userId The user ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + usersUserIdTokensGet: async (userId, options = {}) => { + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('usersUserIdTokensGet', 'userId', userId); + const localVarPath = `/users/{userId}/tokens` + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This is only supported for users of type `service`. + * @summary Creates a new static token for a user. + * @param {string} userId The user ID. + * @param {TokenDefinitionRequest} tokenDefinitionRequest The definition of the token. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + usersUserIdTokensPost: async (userId, tokenDefinitionRequest, options = {}) => { + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('usersUserIdTokensPost', 'userId', userId); + // verify required parameter 'tokenDefinitionRequest' is not null or undefined + (0, common_1.assertParamExists)('usersUserIdTokensPost', 'tokenDefinitionRequest', tokenDefinitionRequest); + const localVarPath = `/users/{userId}/tokens` + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(tokenDefinitionRequest, localVarRequestOptions, configuration); + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This is only possible for static tokens. To revoke session tokens - use `POST /auth/logout` with the required session token. + * @summary Deletes a specific token associated with a user + * @param {string} userId The user ID. + * @param {string} tokenId The token ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + usersUserIdTokensTokenIdDelete: async (userId, tokenId, options = {}) => { + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('usersUserIdTokensTokenIdDelete', 'userId', userId); + // verify required parameter 'tokenId' is not null or undefined + (0, common_1.assertParamExists)('usersUserIdTokensTokenIdDelete', 'tokenId', tokenId); + const localVarPath = `/users/{userId}/tokens/{tokenId}` + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))) + .replace(`{${"tokenId"}}`, encodeURIComponent(String(tokenId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Gets a specific token associated with a user + * @param {string} userId The user ID. + * @param {string} tokenId The token ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + usersUserIdTokensTokenIdGet: async (userId, tokenId, options = {}) => { + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('usersUserIdTokensTokenIdGet', 'userId', userId); + // verify required parameter 'tokenId' is not null or undefined + (0, common_1.assertParamExists)('usersUserIdTokensTokenIdGet', 'tokenId', tokenId); + const localVarPath = `/users/{userId}/tokens/{tokenId}` + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))) + .replace(`{${"tokenId"}}`, encodeURIComponent(String(tokenId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -11490,6 +12215,18 @@ const PublicApiFp = function (configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.getDelta(orgId, appId, deltaId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, + /** + * + * @summary Latest version of the given workload profile with optional constraint. + * @param {string} orgId The Organization ID. + * @param {string} profileQid The Workload profile qualified ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLatestWorkloadProfileVersion(orgId, profileQid, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLatestWorkloadProfileVersion(orgId, profileQid, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, /** * * @summary Get all Deployment Sets @@ -11715,6 +12452,20 @@ const PublicApiFp = function (configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdResourcesGet(orgId, appId, envId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, + /** + * + * @summary Lists the resource objects that hold the information needed to provision the resources specified in the request and the resources they depend on. + * @param {string} orgId The Organization ID. + * @param {string} appId The Application ID. + * @param {string} envId The Environment ID. + * @param {Array} resourceProvisionRequestRequest Resources to provision. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost(orgId, appId, envId, resourceProvisionRequestRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost(orgId, appId, envId, resourceProvisionRequestRequest, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, /** * * @summary Delete Active Resources. @@ -11870,8 +12621,8 @@ const PublicApiFp = function (configuration) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * - * @summary Purge the value of a specific key Value Set Version in an Environment of an App + * Purging permanently removes the value of a specific Shared Value in an application. A purged value is no longer accessible, can\'t be restored and can\'t be used by deployments referencing a Value Set Version where the value was present. Learn more about purging in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#purge). + * @summary Purge the value of a specific Shared Value from the App Environment Version history. * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. * @param {string} envId The Environment ID. @@ -11886,8 +12637,8 @@ const PublicApiFp = function (configuration) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * - * @summary Restore a specific key Value Set Version in an Environment of an App + * Restore the values of a single Shared Value in an Environment from a specific version. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a specific key from the Value Set Version in an Environment of an App * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. * @param {string} envId The Environment ID. @@ -11902,7 +12653,7 @@ const PublicApiFp = function (configuration) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * + * Restore the values of all Shared Values in an environment from a specific version. Keys not existing in the selected version are deleted. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). * @summary Restore a Value Set Version in an Environment of an App * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. @@ -12129,6 +12880,19 @@ const PublicApiFp = function (configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdUsersPost(orgId, appId, userRoleRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, + /** + * + * @summary Remove the role of a User on an Application + * @param {string} orgId The Organization ID. + * @param {string} appId The Application ID. + * @param {string} userId The User ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdAppsAppIdUsersUserIdDelete(orgId, appId, userId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdUsersUserIdDelete(orgId, appId, userId, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, /** * * @summary Get the role of a User on an Application @@ -12142,6 +12906,20 @@ const PublicApiFp = function (configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdUsersUserIdGet(orgId, appId, userId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, + /** + * + * @summary Update the role of a User on an Application + * @param {string} orgId The Organization ID. + * @param {string} appId The Application ID. + * @param {string} userId The User ID + * @param {RoleRequest} roleRequest The new user role + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdAppsAppIdUsersUserIdPatch(orgId, appId, userId, roleRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdUsersUserIdPatch(orgId, appId, userId, roleRequest, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, /** * A new Value Set Version is created on every modification of a Value inside the app. * @summary List Value Set Versions in the App @@ -12169,8 +12947,8 @@ const PublicApiFp = function (configuration) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * - * @summary Purge the value of a specific key Value Set Version in an App + * Purging permanently removes the value of a specific Shared Value in an Application. A purged value is no longer accessible, can\'t be restored and can\'t be used by deployments referencing a Value Set Version where the value was present. Learn more about purging in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#purge). + * @summary Purge the value of a specific Shared Value from the App Version history. * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. * @param {string} valueSetVersionId The ValueSetVersion ID. @@ -12184,8 +12962,8 @@ const PublicApiFp = function (configuration) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * - * @summary Restore a specific key Value Set Version in an App + * Restore the values of a single Shared Value in an application from a specific version. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a specific key from the Value Set Version in an App * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. * @param {string} valueSetVersionId The ValueSetVersion ID. @@ -12199,7 +12977,7 @@ const PublicApiFp = function (configuration) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * + * Restore the values of all Shared Values in an application from a specific version. Keys not existing in the selected version are deleted. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). * @summary Restore a Value Set Version in an App * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. @@ -12338,8 +13116,8 @@ const PublicApiFp = function (configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdWebhooksJobIdPost(orgId, appId, jobId, webhookRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdWebhooksJobIdPost(orgId, appId, jobId, webhookRequest, options); + async orgsOrgIdAppsAppIdWebhooksJobIdPatch(orgId, appId, jobId, webhookRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdWebhooksJobIdPatch(orgId, appId, jobId, webhookRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** @@ -12370,12 +13148,24 @@ const PublicApiFp = function (configuration) { * Creates a new Application, then adds it to the specified Organization. * @summary Add a new Application to an Organization * @param {string} orgId The Organization ID. - * @param {ApplicationRequest} applicationRequest The request ID and Human-friendly name of the Application. + * @param {ApplicationCreationRequest} applicationCreationRequest The request ID, Human-friendly name and environment of the Application. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdAppsPost(orgId, applicationCreationRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsPost(orgId, applicationCreationRequest, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + /** + * Returns a specific Artefact Version. + * @summary Get an Artefacts Versions. + * @param {string} orgId The organization ID. + * @param {string} artefactVersionId The Artefact Version ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsPost(orgId, applicationRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsPost(orgId, applicationRequest, options); + async orgsOrgIdArtefactVersionsArtefactVersionIdGet(orgId, artefactVersionId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdArtefactVersionsArtefactVersionIdGet(orgId, artefactVersionId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** @@ -12460,23 +13250,10 @@ const PublicApiFp = function (configuration) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * - * @summary Get the role of a User on an Environment Type + * Deletes a specific Environment Type from an Organization. If there are Environments with this Type in the Organization, the operation will fail. + * @summary Deletes an Environment Type * @param {string} orgId The Organization ID. - * @param {string} envType The Environment Type. - * @param {string} userId The User ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async orgsOrgIdEnvTypeEnvTypeUsersUserIdGet(orgId, envType, userId, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdEnvTypeEnvTypeUsersUserIdGet(orgId, envType, userId, options); - return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); - }, - /** - * Deletes a specific Environment Type from an Organization. If there are Environments with this Type in the Organization, the operation will fail. - * @summary Deletes an Environment Type - * @param {string} orgId The Organization ID. - * @param {string} envTypeId ID of the Environment Type. + * @param {string} envTypeId ID of the Environment Type. * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -12496,6 +13273,59 @@ const PublicApiFp = function (configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdEnvTypesEnvTypeIdGet(orgId, envTypeId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, + /** + * + * @summary Adds a User to an Environment Type with a Role + * @param {string} orgId The Organization ID. + * @param {string} envType The Environment Type. + * @param {UserRoleRequest} userRoleRequest The user ID and the role + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdEnvTypesEnvTypeUsersPost(orgId, envType, userRoleRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdEnvTypesEnvTypeUsersPost(orgId, envType, userRoleRequest, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + /** + * + * @summary Remove the role of a User on an Environment Type + * @param {string} orgId The Organization ID. + * @param {string} envType The Environment Type. + * @param {string} userId The User ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdEnvTypesEnvTypeUsersUserIdDelete(orgId, envType, userId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdEnvTypesEnvTypeUsersUserIdDelete(orgId, envType, userId, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + /** + * + * @summary Get the role of a User on an Environment Type + * @param {string} orgId The Organization ID. + * @param {string} envType The Environment Type. + * @param {string} userId The User ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdEnvTypesEnvTypeUsersUserIdGet(orgId, envType, userId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdEnvTypesEnvTypeUsersUserIdGet(orgId, envType, userId, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + /** + * + * @summary Update the role of a User on an Environment Type + * @param {string} orgId The Organization ID. + * @param {string} envType The Environment Type. + * @param {string} userId The User ID + * @param {RoleRequest} roleRequest The new user role + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch(orgId, envType, userId, roleRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch(orgId, envType, userId, roleRequest, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, /** * Lists all Environment Types in an Organization. * @summary List all Environment Types @@ -12695,6 +13525,18 @@ const PublicApiFp = function (configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdResourcesAccountTypesGet(orgId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, + /** + * + * @summary Delete an unused Resource Account. + * @param {string} orgId The Organization ID. + * @param {string} accId The Resource Account ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdResourcesAccountsAccIdDelete(orgId, accId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdResourcesAccountsAccIdDelete(orgId, accId, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, /** * * @summary Get a Resource Account. @@ -12800,12 +13642,25 @@ const PublicApiFp = function (configuration) { * @summary Update a Resource Definition. * @param {string} orgId The Organization ID. * @param {string} defId The Resource Definition ID. - * @param {UpdateResourceDefinitionRequestRequest} updateResourceDefinitionRequestRequest The Resource Definition record details. The PATCH operation would change the value of the property if it is included in the request payload JSON, and not `null`. Missing and `null` properties are ignored. For the map properties, such as UpdateResourceDefinitionRequest.DriverInputs, the merge operation is applied. Merge rules are as follows: - If a map property has a value, it is replaced (or added). - If a map property is set to `null`, it is removed. - If a map property is not included (missing in JSON), it remains unchanged. + * @param {PatchResourceDefinitionRequestRequest} patchResourceDefinitionRequestRequest The Resource Definition record details. The PATCH operation would change the value of the property if it is included in the request payload JSON, and not `null`. Missing and `null` properties are ignored. For the map properties, such as PatchResourceDefinitionRequest.DriverInputs, the merge operation is applied. Merge rules are as follows: - If a map property has a value, it is replaced (or added). - If a map property is set to `null`, it is removed. - If a map property is not included (missing in JSON), it remains unchanged. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdResourcesDefsDefIdPatch(orgId, defId, patchResourceDefinitionRequestRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdResourcesDefsDefIdPatch(orgId, defId, patchResourceDefinitionRequestRequest, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + /** + * + * @summary Update a Resource Definition. + * @param {string} orgId The Organization ID. + * @param {string} defId The Resource Definition ID. + * @param {UpdateResourceDefinitionRequestRequest} updateResourceDefinitionRequestRequest The Resource Definition record details. The PUT operation updates a resource definition using the provided payload. An empty driver_account or driver_inputs property will unset the existing values. Currently the resource and driver types can\'t be changed. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdResourcesDefsDefIdPatch(orgId, defId, updateResourceDefinitionRequestRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdResourcesDefsDefIdPatch(orgId, defId, updateResourceDefinitionRequestRequest, options); + async orgsOrgIdResourcesDefsDefIdPut(orgId, defId, updateResourceDefinitionRequestRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdResourcesDefsDefIdPut(orgId, defId, updateResourceDefinitionRequestRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** @@ -12934,61 +13789,72 @@ const PublicApiFp = function (configuration) { * * @summary Creates a new service user. * @param {string} orgId The Organization ID. - * @param {UserProfileExtendedRequest} userProfileExtendedRequest The user ID and the role + * @param {NewServiceUserRequest} newServiceUserRequest The user ID and the role * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdUsersPost(orgId, userProfileExtendedRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdUsersPost(orgId, userProfileExtendedRequest, options); + async orgsOrgIdUsersPost(orgId, newServiceUserRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdUsersPost(orgId, newServiceUserRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * - * @summary List workload profiles available to the organization. + * @summary Remove the role of a User on an Organization * @param {string} orgId The Organization ID. + * @param {string} userId The User ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdWorkloadProfilesGet(orgId, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesGet(orgId, options); + async orgsOrgIdUsersUserIdDelete(orgId, userId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdUsersUserIdDelete(orgId, userId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * - * @summary Create new Workload Profile + * @summary Get the role of a User on an Organization * @param {string} orgId The Organization ID. - * @param {WorkloadProfileRequest} workloadProfileRequest Workload profile details. + * @param {string} userId The User ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdWorkloadProfilesPost(orgId, workloadProfileRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesPost(orgId, workloadProfileRequest, options); + async orgsOrgIdUsersUserIdGet(orgId, userId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdUsersUserIdGet(orgId, userId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * This will also delete all versions of a workload profile. It is not possible to delete profiles of other organizations. - * @summary Delete a Workload Profile + * + * @summary Update the role of a User on an Organization * @param {string} orgId The Organization ID. - * @param {string} profileId The Workload profile ID. + * @param {string} userId The User ID + * @param {RoleRequest} roleRequest The new user the role * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdWorkloadProfilesProfileIdDelete(orgId, profileId, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesProfileIdDelete(orgId, profileId, options); + async orgsOrgIdUsersUserIdPatch(orgId, userId, roleRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdUsersUserIdPatch(orgId, userId, roleRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * Creates a Workload Profile Version from the uploaded Helm chart. The version is retrieved from the chart\'s metadata (Charts.yaml file). The request has content type `multipart/form-data` and the request body includes two parts: 1. `file` with `application/x-gzip` content type which is an archive containing a Helm chart. 2. `metadata` with `application/json` content type which defines the version\'s metadata. Request body example: Content-Type: multipart/form-data; boundary=----boundary ----boundary Content-Disposition: form-data; name=\"metadata\" Content-Type: application/json; charset=UTF-8 { \"features\": { \"humanitec/service\": {}, \"humanitec/volumes\": {}, \"custom\": {\"schema\": {}} }, \"notes\": \"Notes related to this version of the profile\" } ----boundary Content-Disposition: form-data; name=\"file\"; filename=\"my-workload-1.0.1.tgz\" Content-Type: application/x-gzip [TGZ_DATA] ----boundary **NOTE:** A Workload Profile must be created before a version can be added to it. - * @summary Add new Version of the Workload Profile + * + * @summary List workload profiles available to the organization. * @param {string} orgId The Organization ID. - * @param {string} profileId The Workload Profile ID. - * @param {WorkloadProfileVersionRequest} [metadata] - * @param {File} [file] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdWorkloadProfilesProfileIdVersionsPost(orgId, profileId, metadata, file, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesProfileIdVersionsPost(orgId, profileId, metadata, file, options); + async orgsOrgIdWorkloadProfilesGet(orgId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesGet(orgId, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + /** + * + * @summary Create new Workload Profile + * @param {string} orgId The Organization ID. + * @param {WorkloadProfileRequest} workloadProfileRequest Workload profile details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdWorkloadProfilesPost(orgId, workloadProfileRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesPost(orgId, workloadProfileRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** @@ -13004,6 +13870,18 @@ const PublicApiFp = function (configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete(orgId, profileId, version, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, + /** + * This will also delete all versions of a workload profile. It is not possible to delete profiles of other organizations. + * @summary Delete a Workload Profile + * @param {string} orgId The Organization ID. + * @param {string} profileQid The Workload profile ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdWorkloadProfilesProfileQidDelete(orgId, profileQid, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesProfileQidDelete(orgId, profileQid, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, /** * * @summary Get a Workload Profile @@ -13029,6 +13907,20 @@ const PublicApiFp = function (configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesProfileQidVersionsGet(orgId, profileQid, version, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, + /** + * Creates a Workload Profile Version from the uploaded Helm chart. The version is retrieved from the chart\'s metadata (Charts.yaml file). The request has content type `multipart/form-data` and the request body includes two parts: 1. `file` with `application/x-gzip` content type which is an archive containing a Helm chart. 2. `metadata` with `application/json` content type which defines the version\'s metadata. Request body example: Content-Type: multipart/form-data; boundary=----boundary ----boundary Content-Disposition: form-data; name=\"metadata\" Content-Type: application/json; charset=UTF-8 { \"features\": { \"humanitec/service\": {}, \"humanitec/volumes\": {}, \"custom\": {\"schema\": {}} }, \"notes\": \"Notes related to this version of the profile\" } ----boundary Content-Disposition: form-data; name=\"file\"; filename=\"my-workload-1.0.1.tgz\" Content-Type: application/x-gzip [TGZ_DATA] ----boundary **NOTE:** A Workload Profile must be created before a version can be added to it. + * @summary Add new Version of the Workload Profile + * @param {string} orgId The Organization ID. + * @param {string} profileQid The Workload Profile ID. + * @param {WorkloadProfileVersionRequest} [metadata] + * @param {File} [file] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdWorkloadProfilesProfileQidVersionsPost(orgId, profileQid, metadata, file, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesProfileQidVersionsPost(orgId, profileQid, metadata, file, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, /** * * @summary Update an existing Delta @@ -13074,6 +13966,53 @@ const PublicApiFp = function (configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.usersMeGet(options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, + /** + * + * @summary Lists tokens associated with a user + * @param {string} userId The user ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async usersUserIdTokensGet(userId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserIdTokensGet(userId, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + /** + * This is only supported for users of type `service`. + * @summary Creates a new static token for a user. + * @param {string} userId The user ID. + * @param {TokenDefinitionRequest} tokenDefinitionRequest The definition of the token. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async usersUserIdTokensPost(userId, tokenDefinitionRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserIdTokensPost(userId, tokenDefinitionRequest, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + /** + * This is only possible for static tokens. To revoke session tokens - use `POST /auth/logout` with the required session token. + * @summary Deletes a specific token associated with a user + * @param {string} userId The user ID. + * @param {string} tokenId The token ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async usersUserIdTokensTokenIdDelete(userId, tokenId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserIdTokensTokenIdDelete(userId, tokenId, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + /** + * + * @summary Gets a specific token associated with a user + * @param {string} userId The user ID. + * @param {string} tokenId The token ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async usersUserIdTokensTokenIdGet(userId, tokenId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserIdTokensTokenIdGet(userId, tokenId, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, }; }; exports.PublicApiFp = PublicApiFp; @@ -13113,6 +14052,16 @@ const PublicApiFactory = function (configuration, basePath, axios) { getDelta(requestParameters, options) { return localVarFp.getDelta(requestParameters.orgId, requestParameters.appId, requestParameters.deltaId, options).then((request) => request(axios, basePath)); }, + /** + * + * @summary Latest version of the given workload profile with optional constraint. + * @param {PublicApiGetLatestWorkloadProfileVersionRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLatestWorkloadProfileVersion(requestParameters, options) { + return localVarFp.getLatestWorkloadProfileVersion(requestParameters.orgId, requestParameters.profileQid, options).then((request) => request(axios, basePath)); + }, /** * * @summary Get all Deployment Sets @@ -13282,6 +14231,16 @@ const PublicApiFactory = function (configuration, basePath, axios) { orgsOrgIdAppsAppIdEnvsEnvIdResourcesGet(requestParameters, options) { return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdResourcesGet(requestParameters.orgId, requestParameters.appId, requestParameters.envId, options).then((request) => request(axios, basePath)); }, + /** + * + * @summary Lists the resource objects that hold the information needed to provision the resources specified in the request and the resources they depend on. + * @param {PublicApiOrgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.resourceProvisionRequestRequest, options).then((request) => request(axios, basePath)); + }, /** * * @summary Delete Active Resources. @@ -13393,8 +14352,8 @@ const PublicApiFactory = function (configuration, basePath, axios) { return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, options).then((request) => request(axios, basePath)); }, /** - * - * @summary Purge the value of a specific key Value Set Version in an Environment of an App + * Purging permanently removes the value of a specific Shared Value in an application. A purged value is no longer accessible, can\'t be restored and can\'t be used by deployments referencing a Value Set Version where the value was present. Learn more about purging in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#purge). + * @summary Purge the value of a specific Shared Value from the App Environment Version history. * @param {PublicApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -13403,8 +14362,8 @@ const PublicApiFactory = function (configuration, basePath, axios) { return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(axios, basePath)); }, /** - * - * @summary Restore a specific key Value Set Version in an Environment of an App + * Restore the values of a single Shared Value in an Environment from a specific version. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a specific key from the Value Set Version in an Environment of an App * @param {PublicApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -13413,7 +14372,7 @@ const PublicApiFactory = function (configuration, basePath, axios) { return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(axios, basePath)); }, /** - * + * Restore the values of all Shared Values in an environment from a specific version. Keys not existing in the selected version are deleted. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). * @summary Restore a Value Set Version in an Environment of an App * @param {PublicApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. @@ -13582,6 +14541,16 @@ const PublicApiFactory = function (configuration, basePath, axios) { orgsOrgIdAppsAppIdUsersPost(requestParameters, options) { return localVarFp.orgsOrgIdAppsAppIdUsersPost(requestParameters.orgId, requestParameters.appId, requestParameters.userRoleRequest, options).then((request) => request(axios, basePath)); }, + /** + * + * @summary Remove the role of a User on an Application + * @param {PublicApiOrgsOrgIdAppsAppIdUsersUserIdDeleteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdUsersUserIdDelete(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdUsersUserIdDelete(requestParameters.orgId, requestParameters.appId, requestParameters.userId, options).then((request) => request(axios, basePath)); + }, /** * * @summary Get the role of a User on an Application @@ -13592,6 +14561,16 @@ const PublicApiFactory = function (configuration, basePath, axios) { orgsOrgIdAppsAppIdUsersUserIdGet(requestParameters, options) { return localVarFp.orgsOrgIdAppsAppIdUsersUserIdGet(requestParameters.orgId, requestParameters.appId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, + /** + * + * @summary Update the role of a User on an Application + * @param {PublicApiOrgsOrgIdAppsAppIdUsersUserIdPatchRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdUsersUserIdPatch(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdUsersUserIdPatch(requestParameters.orgId, requestParameters.appId, requestParameters.userId, requestParameters.roleRequest, options).then((request) => request(axios, basePath)); + }, /** * A new Value Set Version is created on every modification of a Value inside the app. * @summary List Value Set Versions in the App @@ -13613,8 +14592,8 @@ const PublicApiFactory = function (configuration, basePath, axios) { return localVarFp.orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, options).then((request) => request(axios, basePath)); }, /** - * - * @summary Purge the value of a specific key Value Set Version in an App + * Purging permanently removes the value of a specific Shared Value in an Application. A purged value is no longer accessible, can\'t be restored and can\'t be used by deployments referencing a Value Set Version where the value was present. Learn more about purging in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#purge). + * @summary Purge the value of a specific Shared Value from the App Version history. * @param {PublicApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -13623,8 +14602,8 @@ const PublicApiFactory = function (configuration, basePath, axios) { return localVarFp.orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(axios, basePath)); }, /** - * - * @summary Restore a specific key Value Set Version in an App + * Restore the values of a single Shared Value in an application from a specific version. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a specific key from the Value Set Version in an App * @param {PublicApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -13633,7 +14612,7 @@ const PublicApiFactory = function (configuration, basePath, axios) { return localVarFp.orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(axios, basePath)); }, /** - * + * Restore the values of all Shared Values in an application from a specific version. Keys not existing in the selected version are deleted. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). * @summary Restore a Value Set Version in an App * @param {PublicApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. @@ -13735,12 +14714,12 @@ const PublicApiFactory = function (configuration, basePath, axios) { /** * * @summary Update a Webhook - * @param {PublicApiOrgsOrgIdAppsAppIdWebhooksJobIdPostRequest} requestParameters Request parameters. + * @param {PublicApiOrgsOrgIdAppsAppIdWebhooksJobIdPatchRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdWebhooksJobIdPost(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdWebhooksJobIdPost(requestParameters.orgId, requestParameters.appId, requestParameters.jobId, requestParameters.webhookRequest, options).then((request) => request(axios, basePath)); + orgsOrgIdAppsAppIdWebhooksJobIdPatch(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdWebhooksJobIdPatch(requestParameters.orgId, requestParameters.appId, requestParameters.jobId, requestParameters.webhookRequest, options).then((request) => request(axios, basePath)); }, /** * @@ -13770,7 +14749,17 @@ const PublicApiFactory = function (configuration, basePath, axios) { * @throws {RequiredError} */ orgsOrgIdAppsPost(requestParameters, options) { - return localVarFp.orgsOrgIdAppsPost(requestParameters.orgId, requestParameters.applicationRequest, options).then((request) => request(axios, basePath)); + return localVarFp.orgsOrgIdAppsPost(requestParameters.orgId, requestParameters.applicationCreationRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a specific Artefact Version. + * @summary Get an Artefacts Versions. + * @param {PublicApiOrgsOrgIdArtefactVersionsArtefactVersionIdGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdArtefactVersionsArtefactVersionIdGet(requestParameters, options) { + return localVarFp.orgsOrgIdArtefactVersionsArtefactVersionIdGet(requestParameters.orgId, requestParameters.artefactVersionId, options).then((request) => request(axios, basePath)); }, /** * Returns the Artefact Versions registered with your organization. If no elements are found, an empty list is returned. @@ -13832,16 +14821,6 @@ const PublicApiFactory = function (configuration, basePath, axios) { orgsOrgIdArtefactsGet(requestParameters, options) { return localVarFp.orgsOrgIdArtefactsGet(requestParameters.orgId, requestParameters.type, requestParameters.name, options).then((request) => request(axios, basePath)); }, - /** - * - * @summary Get the role of a User on an Environment Type - * @param {PublicApiOrgsOrgIdEnvTypeEnvTypeUsersUserIdGetRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - orgsOrgIdEnvTypeEnvTypeUsersUserIdGet(requestParameters, options) { - return localVarFp.orgsOrgIdEnvTypeEnvTypeUsersUserIdGet(requestParameters.orgId, requestParameters.envType, requestParameters.userId, options).then((request) => request(axios, basePath)); - }, /** * Deletes a specific Environment Type from an Organization. If there are Environments with this Type in the Organization, the operation will fail. * @summary Deletes an Environment Type @@ -13862,6 +14841,46 @@ const PublicApiFactory = function (configuration, basePath, axios) { orgsOrgIdEnvTypesEnvTypeIdGet(requestParameters, options) { return localVarFp.orgsOrgIdEnvTypesEnvTypeIdGet(requestParameters.orgId, requestParameters.envTypeId, options).then((request) => request(axios, basePath)); }, + /** + * + * @summary Adds a User to an Environment Type with a Role + * @param {PublicApiOrgsOrgIdEnvTypesEnvTypeUsersPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdEnvTypesEnvTypeUsersPost(requestParameters, options) { + return localVarFp.orgsOrgIdEnvTypesEnvTypeUsersPost(requestParameters.orgId, requestParameters.envType, requestParameters.userRoleRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Remove the role of a User on an Environment Type + * @param {PublicApiOrgsOrgIdEnvTypesEnvTypeUsersUserIdDeleteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdEnvTypesEnvTypeUsersUserIdDelete(requestParameters, options) { + return localVarFp.orgsOrgIdEnvTypesEnvTypeUsersUserIdDelete(requestParameters.orgId, requestParameters.envType, requestParameters.userId, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get the role of a User on an Environment Type + * @param {PublicApiOrgsOrgIdEnvTypesEnvTypeUsersUserIdGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdEnvTypesEnvTypeUsersUserIdGet(requestParameters, options) { + return localVarFp.orgsOrgIdEnvTypesEnvTypeUsersUserIdGet(requestParameters.orgId, requestParameters.envType, requestParameters.userId, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Update the role of a User on an Environment Type + * @param {PublicApiOrgsOrgIdEnvTypesEnvTypeUsersUserIdPatchRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch(requestParameters, options) { + return localVarFp.orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch(requestParameters.orgId, requestParameters.envType, requestParameters.userId, requestParameters.roleRequest, options).then((request) => request(axios, basePath)); + }, /** * Lists all Environment Types in an Organization. * @summary List all Environment Types @@ -14032,6 +15051,16 @@ const PublicApiFactory = function (configuration, basePath, axios) { orgsOrgIdResourcesAccountTypesGet(requestParameters, options) { return localVarFp.orgsOrgIdResourcesAccountTypesGet(requestParameters.orgId, options).then((request) => request(axios, basePath)); }, + /** + * + * @summary Delete an unused Resource Account. + * @param {PublicApiOrgsOrgIdResourcesAccountsAccIdDeleteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdResourcesAccountsAccIdDelete(requestParameters, options) { + return localVarFp.orgsOrgIdResourcesAccountsAccIdDelete(requestParameters.orgId, requestParameters.accId, options).then((request) => request(axios, basePath)); + }, /** * * @summary Get a Resource Account. @@ -14120,7 +15149,17 @@ const PublicApiFactory = function (configuration, basePath, axios) { * @throws {RequiredError} */ orgsOrgIdResourcesDefsDefIdPatch(requestParameters, options) { - return localVarFp.orgsOrgIdResourcesDefsDefIdPatch(requestParameters.orgId, requestParameters.defId, requestParameters.updateResourceDefinitionRequestRequest, options).then((request) => request(axios, basePath)); + return localVarFp.orgsOrgIdResourcesDefsDefIdPatch(requestParameters.orgId, requestParameters.defId, requestParameters.patchResourceDefinitionRequestRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Update a Resource Definition. + * @param {PublicApiOrgsOrgIdResourcesDefsDefIdPutRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdResourcesDefsDefIdPut(requestParameters, options) { + return localVarFp.orgsOrgIdResourcesDefsDefIdPut(requestParameters.orgId, requestParameters.defId, requestParameters.updateResourceDefinitionRequestRequest, options).then((request) => request(axios, basePath)); }, /** * @@ -14230,61 +15269,81 @@ const PublicApiFactory = function (configuration, basePath, axios) { * @throws {RequiredError} */ orgsOrgIdUsersPost(requestParameters, options) { - return localVarFp.orgsOrgIdUsersPost(requestParameters.orgId, requestParameters.userProfileExtendedRequest, options).then((request) => request(axios, basePath)); + return localVarFp.orgsOrgIdUsersPost(requestParameters.orgId, requestParameters.newServiceUserRequest, options).then((request) => request(axios, basePath)); }, /** * - * @summary List workload profiles available to the organization. - * @param {PublicApiOrgsOrgIdWorkloadProfilesGetRequest} requestParameters Request parameters. + * @summary Remove the role of a User on an Organization + * @param {PublicApiOrgsOrgIdUsersUserIdDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesGet(requestParameters, options) { - return localVarFp.orgsOrgIdWorkloadProfilesGet(requestParameters.orgId, options).then((request) => request(axios, basePath)); + orgsOrgIdUsersUserIdDelete(requestParameters, options) { + return localVarFp.orgsOrgIdUsersUserIdDelete(requestParameters.orgId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * - * @summary Create new Workload Profile - * @param {PublicApiOrgsOrgIdWorkloadProfilesPostRequest} requestParameters Request parameters. + * @summary Get the role of a User on an Organization + * @param {PublicApiOrgsOrgIdUsersUserIdGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesPost(requestParameters, options) { - return localVarFp.orgsOrgIdWorkloadProfilesPost(requestParameters.orgId, requestParameters.workloadProfileRequest, options).then((request) => request(axios, basePath)); + orgsOrgIdUsersUserIdGet(requestParameters, options) { + return localVarFp.orgsOrgIdUsersUserIdGet(requestParameters.orgId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** - * This will also delete all versions of a workload profile. It is not possible to delete profiles of other organizations. - * @summary Delete a Workload Profile - * @param {PublicApiOrgsOrgIdWorkloadProfilesProfileIdDeleteRequest} requestParameters Request parameters. + * + * @summary Update the role of a User on an Organization + * @param {PublicApiOrgsOrgIdUsersUserIdPatchRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesProfileIdDelete(requestParameters, options) { - return localVarFp.orgsOrgIdWorkloadProfilesProfileIdDelete(requestParameters.orgId, requestParameters.profileId, options).then((request) => request(axios, basePath)); + orgsOrgIdUsersUserIdPatch(requestParameters, options) { + return localVarFp.orgsOrgIdUsersUserIdPatch(requestParameters.orgId, requestParameters.userId, requestParameters.roleRequest, options).then((request) => request(axios, basePath)); }, /** - * Creates a Workload Profile Version from the uploaded Helm chart. The version is retrieved from the chart\'s metadata (Charts.yaml file). The request has content type `multipart/form-data` and the request body includes two parts: 1. `file` with `application/x-gzip` content type which is an archive containing a Helm chart. 2. `metadata` with `application/json` content type which defines the version\'s metadata. Request body example: Content-Type: multipart/form-data; boundary=----boundary ----boundary Content-Disposition: form-data; name=\"metadata\" Content-Type: application/json; charset=UTF-8 { \"features\": { \"humanitec/service\": {}, \"humanitec/volumes\": {}, \"custom\": {\"schema\": {}} }, \"notes\": \"Notes related to this version of the profile\" } ----boundary Content-Disposition: form-data; name=\"file\"; filename=\"my-workload-1.0.1.tgz\" Content-Type: application/x-gzip [TGZ_DATA] ----boundary **NOTE:** A Workload Profile must be created before a version can be added to it. - * @summary Add new Version of the Workload Profile - * @param {PublicApiOrgsOrgIdWorkloadProfilesProfileIdVersionsPostRequest} requestParameters Request parameters. + * + * @summary List workload profiles available to the organization. + * @param {PublicApiOrgsOrgIdWorkloadProfilesGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesProfileIdVersionsPost(requestParameters, options) { - return localVarFp.orgsOrgIdWorkloadProfilesProfileIdVersionsPost(requestParameters.orgId, requestParameters.profileId, requestParameters.metadata, requestParameters.file, options).then((request) => request(axios, basePath)); + orgsOrgIdWorkloadProfilesGet(requestParameters, options) { + return localVarFp.orgsOrgIdWorkloadProfilesGet(requestParameters.orgId, options).then((request) => request(axios, basePath)); }, /** * - * @summary Delete a Workload Profile Version - * @param {PublicApiOrgsOrgIdWorkloadProfilesProfileIdVersionsVersionDeleteRequest} requestParameters Request parameters. + * @summary Create new Workload Profile + * @param {PublicApiOrgsOrgIdWorkloadProfilesPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete(requestParameters, options) { - return localVarFp.orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete(requestParameters.orgId, requestParameters.profileId, requestParameters.version, options).then((request) => request(axios, basePath)); + orgsOrgIdWorkloadProfilesPost(requestParameters, options) { + return localVarFp.orgsOrgIdWorkloadProfilesPost(requestParameters.orgId, requestParameters.workloadProfileRequest, options).then((request) => request(axios, basePath)); }, /** * - * @summary Get a Workload Profile + * @summary Delete a Workload Profile Version + * @param {PublicApiOrgsOrgIdWorkloadProfilesProfileIdVersionsVersionDeleteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete(requestParameters, options) { + return localVarFp.orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete(requestParameters.orgId, requestParameters.profileId, requestParameters.version, options).then((request) => request(axios, basePath)); + }, + /** + * This will also delete all versions of a workload profile. It is not possible to delete profiles of other organizations. + * @summary Delete a Workload Profile + * @param {PublicApiOrgsOrgIdWorkloadProfilesProfileQidDeleteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdWorkloadProfilesProfileQidDelete(requestParameters, options) { + return localVarFp.orgsOrgIdWorkloadProfilesProfileQidDelete(requestParameters.orgId, requestParameters.profileQid, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get a Workload Profile * @param {PublicApiOrgsOrgIdWorkloadProfilesProfileQidGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -14302,6 +15361,16 @@ const PublicApiFactory = function (configuration, basePath, axios) { orgsOrgIdWorkloadProfilesProfileQidVersionsGet(requestParameters, options) { return localVarFp.orgsOrgIdWorkloadProfilesProfileQidVersionsGet(requestParameters.orgId, requestParameters.profileQid, requestParameters.version, options).then((request) => request(axios, basePath)); }, + /** + * Creates a Workload Profile Version from the uploaded Helm chart. The version is retrieved from the chart\'s metadata (Charts.yaml file). The request has content type `multipart/form-data` and the request body includes two parts: 1. `file` with `application/x-gzip` content type which is an archive containing a Helm chart. 2. `metadata` with `application/json` content type which defines the version\'s metadata. Request body example: Content-Type: multipart/form-data; boundary=----boundary ----boundary Content-Disposition: form-data; name=\"metadata\" Content-Type: application/json; charset=UTF-8 { \"features\": { \"humanitec/service\": {}, \"humanitec/volumes\": {}, \"custom\": {\"schema\": {}} }, \"notes\": \"Notes related to this version of the profile\" } ----boundary Content-Disposition: form-data; name=\"file\"; filename=\"my-workload-1.0.1.tgz\" Content-Type: application/x-gzip [TGZ_DATA] ----boundary **NOTE:** A Workload Profile must be created before a version can be added to it. + * @summary Add new Version of the Workload Profile + * @param {PublicApiOrgsOrgIdWorkloadProfilesProfileQidVersionsPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdWorkloadProfilesProfileQidVersionsPost(requestParameters, options) { + return localVarFp.orgsOrgIdWorkloadProfilesProfileQidVersionsPost(requestParameters.orgId, requestParameters.profileQid, requestParameters.metadata, requestParameters.file, options).then((request) => request(axios, basePath)); + }, /** * * @summary Update an existing Delta @@ -14340,6 +15409,46 @@ const PublicApiFactory = function (configuration, basePath, axios) { usersMeGet(options) { return localVarFp.usersMeGet(options).then((request) => request(axios, basePath)); }, + /** + * + * @summary Lists tokens associated with a user + * @param {PublicApiUsersUserIdTokensGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + usersUserIdTokensGet(requestParameters, options) { + return localVarFp.usersUserIdTokensGet(requestParameters.userId, options).then((request) => request(axios, basePath)); + }, + /** + * This is only supported for users of type `service`. + * @summary Creates a new static token for a user. + * @param {PublicApiUsersUserIdTokensPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + usersUserIdTokensPost(requestParameters, options) { + return localVarFp.usersUserIdTokensPost(requestParameters.userId, requestParameters.tokenDefinitionRequest, options).then((request) => request(axios, basePath)); + }, + /** + * This is only possible for static tokens. To revoke session tokens - use `POST /auth/logout` with the required session token. + * @summary Deletes a specific token associated with a user + * @param {PublicApiUsersUserIdTokensTokenIdDeleteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + usersUserIdTokensTokenIdDelete(requestParameters, options) { + return localVarFp.usersUserIdTokensTokenIdDelete(requestParameters.userId, requestParameters.tokenId, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Gets a specific token associated with a user + * @param {PublicApiUsersUserIdTokensTokenIdGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + usersUserIdTokensTokenIdGet(requestParameters, options) { + return localVarFp.usersUserIdTokensTokenIdGet(requestParameters.userId, requestParameters.tokenId, options).then((request) => request(axios, basePath)); + }, }; }; exports.PublicApiFactory = PublicApiFactory; @@ -14382,6 +15491,17 @@ class PublicApi extends base_1.BaseAPI { getDelta(requestParameters, options) { return (0, exports.PublicApiFp)(this.configuration).getDelta(requestParameters.orgId, requestParameters.appId, requestParameters.deltaId, options).then((request) => request(this.axios, this.basePath)); } + /** + * + * @summary Latest version of the given workload profile with optional constraint. + * @param {PublicApiGetLatestWorkloadProfileVersionRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PublicApi + */ + getLatestWorkloadProfileVersion(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).getLatestWorkloadProfileVersion(requestParameters.orgId, requestParameters.profileQid, options).then((request) => request(this.axios, this.basePath)); + } /** * * @summary Get all Deployment Sets @@ -14568,6 +15688,17 @@ class PublicApi extends base_1.BaseAPI { orgsOrgIdAppsAppIdEnvsEnvIdResourcesGet(requestParameters, options) { return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdResourcesGet(requestParameters.orgId, requestParameters.appId, requestParameters.envId, options).then((request) => request(this.axios, this.basePath)); } + /** + * + * @summary Lists the resource objects that hold the information needed to provision the resources specified in the request and the resources they depend on. + * @param {PublicApiOrgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PublicApi + */ + orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.resourceProvisionRequestRequest, options).then((request) => request(this.axios, this.basePath)); + } /** * * @summary Delete Active Resources. @@ -14690,8 +15821,8 @@ class PublicApi extends base_1.BaseAPI { return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Purge the value of a specific key Value Set Version in an Environment of an App + * Purging permanently removes the value of a specific Shared Value in an application. A purged value is no longer accessible, can\'t be restored and can\'t be used by deployments referencing a Value Set Version where the value was present. Learn more about purging in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#purge). + * @summary Purge the value of a specific Shared Value from the App Environment Version history. * @param {PublicApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -14701,8 +15832,8 @@ class PublicApi extends base_1.BaseAPI { return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Restore a specific key Value Set Version in an Environment of an App + * Restore the values of a single Shared Value in an Environment from a specific version. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a specific key from the Value Set Version in an Environment of an App * @param {PublicApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -14712,7 +15843,7 @@ class PublicApi extends base_1.BaseAPI { return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * + * Restore the values of all Shared Values in an environment from a specific version. Keys not existing in the selected version are deleted. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). * @summary Restore a Value Set Version in an Environment of an App * @param {PublicApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. @@ -14898,6 +16029,17 @@ class PublicApi extends base_1.BaseAPI { orgsOrgIdAppsAppIdUsersPost(requestParameters, options) { return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdAppsAppIdUsersPost(requestParameters.orgId, requestParameters.appId, requestParameters.userRoleRequest, options).then((request) => request(this.axios, this.basePath)); } + /** + * + * @summary Remove the role of a User on an Application + * @param {PublicApiOrgsOrgIdAppsAppIdUsersUserIdDeleteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PublicApi + */ + orgsOrgIdAppsAppIdUsersUserIdDelete(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdAppsAppIdUsersUserIdDelete(requestParameters.orgId, requestParameters.appId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); + } /** * * @summary Get the role of a User on an Application @@ -14909,6 +16051,17 @@ class PublicApi extends base_1.BaseAPI { orgsOrgIdAppsAppIdUsersUserIdGet(requestParameters, options) { return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdAppsAppIdUsersUserIdGet(requestParameters.orgId, requestParameters.appId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } + /** + * + * @summary Update the role of a User on an Application + * @param {PublicApiOrgsOrgIdAppsAppIdUsersUserIdPatchRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PublicApi + */ + orgsOrgIdAppsAppIdUsersUserIdPatch(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdAppsAppIdUsersUserIdPatch(requestParameters.orgId, requestParameters.appId, requestParameters.userId, requestParameters.roleRequest, options).then((request) => request(this.axios, this.basePath)); + } /** * A new Value Set Version is created on every modification of a Value inside the app. * @summary List Value Set Versions in the App @@ -14932,8 +16085,8 @@ class PublicApi extends base_1.BaseAPI { return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Purge the value of a specific key Value Set Version in an App + * Purging permanently removes the value of a specific Shared Value in an Application. A purged value is no longer accessible, can\'t be restored and can\'t be used by deployments referencing a Value Set Version where the value was present. Learn more about purging in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#purge). + * @summary Purge the value of a specific Shared Value from the App Version history. * @param {PublicApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -14943,8 +16096,8 @@ class PublicApi extends base_1.BaseAPI { return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Restore a specific key Value Set Version in an App + * Restore the values of a single Shared Value in an application from a specific version. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a specific key from the Value Set Version in an App * @param {PublicApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -14954,7 +16107,7 @@ class PublicApi extends base_1.BaseAPI { return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * + * Restore the values of all Shared Values in an application from a specific version. Keys not existing in the selected version are deleted. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). * @summary Restore a Value Set Version in an App * @param {PublicApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. @@ -15066,13 +16219,13 @@ class PublicApi extends base_1.BaseAPI { /** * * @summary Update a Webhook - * @param {PublicApiOrgsOrgIdAppsAppIdWebhooksJobIdPostRequest} requestParameters Request parameters. + * @param {PublicApiOrgsOrgIdAppsAppIdWebhooksJobIdPatchRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ - orgsOrgIdAppsAppIdWebhooksJobIdPost(requestParameters, options) { - return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdAppsAppIdWebhooksJobIdPost(requestParameters.orgId, requestParameters.appId, requestParameters.jobId, requestParameters.webhookRequest, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdWebhooksJobIdPatch(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdAppsAppIdWebhooksJobIdPatch(requestParameters.orgId, requestParameters.appId, requestParameters.jobId, requestParameters.webhookRequest, options).then((request) => request(this.axios, this.basePath)); } /** * @@ -15105,7 +16258,18 @@ class PublicApi extends base_1.BaseAPI { * @memberof PublicApi */ orgsOrgIdAppsPost(requestParameters, options) { - return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdAppsPost(requestParameters.orgId, requestParameters.applicationRequest, options).then((request) => request(this.axios, this.basePath)); + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdAppsPost(requestParameters.orgId, requestParameters.applicationCreationRequest, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Returns a specific Artefact Version. + * @summary Get an Artefacts Versions. + * @param {PublicApiOrgsOrgIdArtefactVersionsArtefactVersionIdGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PublicApi + */ + orgsOrgIdArtefactVersionsArtefactVersionIdGet(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdArtefactVersionsArtefactVersionIdGet(requestParameters.orgId, requestParameters.artefactVersionId, options).then((request) => request(this.axios, this.basePath)); } /** * Returns the Artefact Versions registered with your organization. If no elements are found, an empty list is returned. @@ -15173,17 +16337,6 @@ class PublicApi extends base_1.BaseAPI { orgsOrgIdArtefactsGet(requestParameters, options) { return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdArtefactsGet(requestParameters.orgId, requestParameters.type, requestParameters.name, options).then((request) => request(this.axios, this.basePath)); } - /** - * - * @summary Get the role of a User on an Environment Type - * @param {PublicApiOrgsOrgIdEnvTypeEnvTypeUsersUserIdGetRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PublicApi - */ - orgsOrgIdEnvTypeEnvTypeUsersUserIdGet(requestParameters, options) { - return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdEnvTypeEnvTypeUsersUserIdGet(requestParameters.orgId, requestParameters.envType, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); - } /** * Deletes a specific Environment Type from an Organization. If there are Environments with this Type in the Organization, the operation will fail. * @summary Deletes an Environment Type @@ -15206,6 +16359,50 @@ class PublicApi extends base_1.BaseAPI { orgsOrgIdEnvTypesEnvTypeIdGet(requestParameters, options) { return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdEnvTypesEnvTypeIdGet(requestParameters.orgId, requestParameters.envTypeId, options).then((request) => request(this.axios, this.basePath)); } + /** + * + * @summary Adds a User to an Environment Type with a Role + * @param {PublicApiOrgsOrgIdEnvTypesEnvTypeUsersPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PublicApi + */ + orgsOrgIdEnvTypesEnvTypeUsersPost(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdEnvTypesEnvTypeUsersPost(requestParameters.orgId, requestParameters.envType, requestParameters.userRoleRequest, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary Remove the role of a User on an Environment Type + * @param {PublicApiOrgsOrgIdEnvTypesEnvTypeUsersUserIdDeleteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PublicApi + */ + orgsOrgIdEnvTypesEnvTypeUsersUserIdDelete(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdEnvTypesEnvTypeUsersUserIdDelete(requestParameters.orgId, requestParameters.envType, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary Get the role of a User on an Environment Type + * @param {PublicApiOrgsOrgIdEnvTypesEnvTypeUsersUserIdGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PublicApi + */ + orgsOrgIdEnvTypesEnvTypeUsersUserIdGet(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdEnvTypesEnvTypeUsersUserIdGet(requestParameters.orgId, requestParameters.envType, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary Update the role of a User on an Environment Type + * @param {PublicApiOrgsOrgIdEnvTypesEnvTypeUsersUserIdPatchRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PublicApi + */ + orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch(requestParameters.orgId, requestParameters.envType, requestParameters.userId, requestParameters.roleRequest, options).then((request) => request(this.axios, this.basePath)); + } /** * Lists all Environment Types in an Organization. * @summary List all Environment Types @@ -15393,6 +16590,17 @@ class PublicApi extends base_1.BaseAPI { orgsOrgIdResourcesAccountTypesGet(requestParameters, options) { return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdResourcesAccountTypesGet(requestParameters.orgId, options).then((request) => request(this.axios, this.basePath)); } + /** + * + * @summary Delete an unused Resource Account. + * @param {PublicApiOrgsOrgIdResourcesAccountsAccIdDeleteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PublicApi + */ + orgsOrgIdResourcesAccountsAccIdDelete(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdResourcesAccountsAccIdDelete(requestParameters.orgId, requestParameters.accId, options).then((request) => request(this.axios, this.basePath)); + } /** * * @summary Get a Resource Account. @@ -15490,7 +16698,18 @@ class PublicApi extends base_1.BaseAPI { * @memberof PublicApi */ orgsOrgIdResourcesDefsDefIdPatch(requestParameters, options) { - return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdResourcesDefsDefIdPatch(requestParameters.orgId, requestParameters.defId, requestParameters.updateResourceDefinitionRequestRequest, options).then((request) => request(this.axios, this.basePath)); + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdResourcesDefsDefIdPatch(requestParameters.orgId, requestParameters.defId, requestParameters.patchResourceDefinitionRequestRequest, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary Update a Resource Definition. + * @param {PublicApiOrgsOrgIdResourcesDefsDefIdPutRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PublicApi + */ + orgsOrgIdResourcesDefsDefIdPut(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdResourcesDefsDefIdPut(requestParameters.orgId, requestParameters.defId, requestParameters.updateResourceDefinitionRequestRequest, options).then((request) => request(this.axios, this.basePath)); } /** * @@ -15611,51 +16830,62 @@ class PublicApi extends base_1.BaseAPI { * @memberof PublicApi */ orgsOrgIdUsersPost(requestParameters, options) { - return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdUsersPost(requestParameters.orgId, requestParameters.userProfileExtendedRequest, options).then((request) => request(this.axios, this.basePath)); + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdUsersPost(requestParameters.orgId, requestParameters.newServiceUserRequest, options).then((request) => request(this.axios, this.basePath)); } /** * - * @summary List workload profiles available to the organization. - * @param {PublicApiOrgsOrgIdWorkloadProfilesGetRequest} requestParameters Request parameters. + * @summary Remove the role of a User on an Organization + * @param {PublicApiOrgsOrgIdUsersUserIdDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ - orgsOrgIdWorkloadProfilesGet(requestParameters, options) { - return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdWorkloadProfilesGet(requestParameters.orgId, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdUsersUserIdDelete(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdUsersUserIdDelete(requestParameters.orgId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * - * @summary Create new Workload Profile - * @param {PublicApiOrgsOrgIdWorkloadProfilesPostRequest} requestParameters Request parameters. + * @summary Get the role of a User on an Organization + * @param {PublicApiOrgsOrgIdUsersUserIdGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ - orgsOrgIdWorkloadProfilesPost(requestParameters, options) { - return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdWorkloadProfilesPost(requestParameters.orgId, requestParameters.workloadProfileRequest, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdUsersUserIdGet(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdUsersUserIdGet(requestParameters.orgId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** - * This will also delete all versions of a workload profile. It is not possible to delete profiles of other organizations. - * @summary Delete a Workload Profile - * @param {PublicApiOrgsOrgIdWorkloadProfilesProfileIdDeleteRequest} requestParameters Request parameters. + * + * @summary Update the role of a User on an Organization + * @param {PublicApiOrgsOrgIdUsersUserIdPatchRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ - orgsOrgIdWorkloadProfilesProfileIdDelete(requestParameters, options) { - return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdWorkloadProfilesProfileIdDelete(requestParameters.orgId, requestParameters.profileId, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdUsersUserIdPatch(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdUsersUserIdPatch(requestParameters.orgId, requestParameters.userId, requestParameters.roleRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * Creates a Workload Profile Version from the uploaded Helm chart. The version is retrieved from the chart\'s metadata (Charts.yaml file). The request has content type `multipart/form-data` and the request body includes two parts: 1. `file` with `application/x-gzip` content type which is an archive containing a Helm chart. 2. `metadata` with `application/json` content type which defines the version\'s metadata. Request body example: Content-Type: multipart/form-data; boundary=----boundary ----boundary Content-Disposition: form-data; name=\"metadata\" Content-Type: application/json; charset=UTF-8 { \"features\": { \"humanitec/service\": {}, \"humanitec/volumes\": {}, \"custom\": {\"schema\": {}} }, \"notes\": \"Notes related to this version of the profile\" } ----boundary Content-Disposition: form-data; name=\"file\"; filename=\"my-workload-1.0.1.tgz\" Content-Type: application/x-gzip [TGZ_DATA] ----boundary **NOTE:** A Workload Profile must be created before a version can be added to it. - * @summary Add new Version of the Workload Profile - * @param {PublicApiOrgsOrgIdWorkloadProfilesProfileIdVersionsPostRequest} requestParameters Request parameters. + * + * @summary List workload profiles available to the organization. + * @param {PublicApiOrgsOrgIdWorkloadProfilesGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PublicApi + */ + orgsOrgIdWorkloadProfilesGet(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdWorkloadProfilesGet(requestParameters.orgId, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary Create new Workload Profile + * @param {PublicApiOrgsOrgIdWorkloadProfilesPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi */ - orgsOrgIdWorkloadProfilesProfileIdVersionsPost(requestParameters, options) { - return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdWorkloadProfilesProfileIdVersionsPost(requestParameters.orgId, requestParameters.profileId, requestParameters.metadata, requestParameters.file, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdWorkloadProfilesPost(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdWorkloadProfilesPost(requestParameters.orgId, requestParameters.workloadProfileRequest, options).then((request) => request(this.axios, this.basePath)); } /** * @@ -15668,6 +16898,17 @@ class PublicApi extends base_1.BaseAPI { orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete(requestParameters, options) { return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete(requestParameters.orgId, requestParameters.profileId, requestParameters.version, options).then((request) => request(this.axios, this.basePath)); } + /** + * This will also delete all versions of a workload profile. It is not possible to delete profiles of other organizations. + * @summary Delete a Workload Profile + * @param {PublicApiOrgsOrgIdWorkloadProfilesProfileQidDeleteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PublicApi + */ + orgsOrgIdWorkloadProfilesProfileQidDelete(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdWorkloadProfilesProfileQidDelete(requestParameters.orgId, requestParameters.profileQid, options).then((request) => request(this.axios, this.basePath)); + } /** * * @summary Get a Workload Profile @@ -15690,6 +16931,17 @@ class PublicApi extends base_1.BaseAPI { orgsOrgIdWorkloadProfilesProfileQidVersionsGet(requestParameters, options) { return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdWorkloadProfilesProfileQidVersionsGet(requestParameters.orgId, requestParameters.profileQid, requestParameters.version, options).then((request) => request(this.axios, this.basePath)); } + /** + * Creates a Workload Profile Version from the uploaded Helm chart. The version is retrieved from the chart\'s metadata (Charts.yaml file). The request has content type `multipart/form-data` and the request body includes two parts: 1. `file` with `application/x-gzip` content type which is an archive containing a Helm chart. 2. `metadata` with `application/json` content type which defines the version\'s metadata. Request body example: Content-Type: multipart/form-data; boundary=----boundary ----boundary Content-Disposition: form-data; name=\"metadata\" Content-Type: application/json; charset=UTF-8 { \"features\": { \"humanitec/service\": {}, \"humanitec/volumes\": {}, \"custom\": {\"schema\": {}} }, \"notes\": \"Notes related to this version of the profile\" } ----boundary Content-Disposition: form-data; name=\"file\"; filename=\"my-workload-1.0.1.tgz\" Content-Type: application/x-gzip [TGZ_DATA] ----boundary **NOTE:** A Workload Profile must be created before a version can be added to it. + * @summary Add new Version of the Workload Profile + * @param {PublicApiOrgsOrgIdWorkloadProfilesProfileQidVersionsPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PublicApi + */ + orgsOrgIdWorkloadProfilesProfileQidVersionsPost(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).orgsOrgIdWorkloadProfilesProfileQidVersionsPost(requestParameters.orgId, requestParameters.profileQid, requestParameters.metadata, requestParameters.file, options).then((request) => request(this.axios, this.basePath)); + } /** * * @summary Update an existing Delta @@ -15732,6 +16984,50 @@ class PublicApi extends base_1.BaseAPI { usersMeGet(options) { return (0, exports.PublicApiFp)(this.configuration).usersMeGet(options).then((request) => request(this.axios, this.basePath)); } + /** + * + * @summary Lists tokens associated with a user + * @param {PublicApiUsersUserIdTokensGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PublicApi + */ + usersUserIdTokensGet(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).usersUserIdTokensGet(requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); + } + /** + * This is only supported for users of type `service`. + * @summary Creates a new static token for a user. + * @param {PublicApiUsersUserIdTokensPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PublicApi + */ + usersUserIdTokensPost(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).usersUserIdTokensPost(requestParameters.userId, requestParameters.tokenDefinitionRequest, options).then((request) => request(this.axios, this.basePath)); + } + /** + * This is only possible for static tokens. To revoke session tokens - use `POST /auth/logout` with the required session token. + * @summary Deletes a specific token associated with a user + * @param {PublicApiUsersUserIdTokensTokenIdDeleteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PublicApi + */ + usersUserIdTokensTokenIdDelete(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).usersUserIdTokensTokenIdDelete(requestParameters.userId, requestParameters.tokenId, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary Gets a specific token associated with a user + * @param {PublicApiUsersUserIdTokensTokenIdGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PublicApi + */ + usersUserIdTokensTokenIdGet(requestParameters, options) { + return (0, exports.PublicApiFp)(this.configuration).usersUserIdTokensTokenIdGet(requestParameters.userId, requestParameters.tokenId, options).then((request) => request(this.axios, this.basePath)); + } } exports.PublicApi = PublicApi; /** @@ -15753,7 +17049,7 @@ const RegistryApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/registries` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -15785,7 +17081,7 @@ const RegistryApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/registries` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -15820,7 +17116,7 @@ const RegistryApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"regId"}}`, encodeURIComponent(String(regId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -15853,7 +17149,7 @@ const RegistryApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"regId"}}`, encodeURIComponent(String(regId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -15886,7 +17182,7 @@ const RegistryApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"regId"}}`, encodeURIComponent(String(regId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -15922,7 +17218,7 @@ const RegistryApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"regId"}}`, encodeURIComponent(String(regId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -16176,6 +17472,39 @@ exports.RegistryApi = RegistryApi; */ const ResourceAccountApiAxiosParamCreator = function (configuration) { return { + /** + * + * @summary Delete an unused Resource Account. + * @param {string} orgId The Organization ID. + * @param {string} accId The Resource Account ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdResourcesAccountsAccIdDelete: async (orgId, accId, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdResourcesAccountsAccIdDelete', 'orgId', orgId); + // verify required parameter 'accId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdResourcesAccountsAccIdDelete', 'accId', accId); + const localVarPath = `/orgs/{orgId}/resources/accounts/{accId}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"accId"}}`, encodeURIComponent(String(accId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * * @summary Get a Resource Account. @@ -16193,7 +17522,7 @@ const ResourceAccountApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"accId"}}`, encodeURIComponent(String(accId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -16229,7 +17558,7 @@ const ResourceAccountApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"accId"}}`, encodeURIComponent(String(accId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -16260,7 +17589,7 @@ const ResourceAccountApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/resources/accounts` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -16292,7 +17621,7 @@ const ResourceAccountApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/resources/accounts` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -16320,6 +17649,18 @@ exports.ResourceAccountApiAxiosParamCreator = ResourceAccountApiAxiosParamCreato const ResourceAccountApiFp = function (configuration) { const localVarAxiosParamCreator = (0, exports.ResourceAccountApiAxiosParamCreator)(configuration); return { + /** + * + * @summary Delete an unused Resource Account. + * @param {string} orgId The Organization ID. + * @param {string} accId The Resource Account ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdResourcesAccountsAccIdDelete(orgId, accId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdResourcesAccountsAccIdDelete(orgId, accId, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, /** * * @summary Get a Resource Account. @@ -16378,6 +17719,16 @@ exports.ResourceAccountApiFp = ResourceAccountApiFp; const ResourceAccountApiFactory = function (configuration, basePath, axios) { const localVarFp = (0, exports.ResourceAccountApiFp)(configuration); return { + /** + * + * @summary Delete an unused Resource Account. + * @param {ResourceAccountApiOrgsOrgIdResourcesAccountsAccIdDeleteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdResourcesAccountsAccIdDelete(requestParameters, options) { + return localVarFp.orgsOrgIdResourcesAccountsAccIdDelete(requestParameters.orgId, requestParameters.accId, options).then((request) => request(axios, basePath)); + }, /** * * @summary Get a Resource Account. @@ -16430,13 +17781,24 @@ exports.ResourceAccountApiFactory = ResourceAccountApiFactory; class ResourceAccountApi extends base_1.BaseAPI { /** * - * @summary Get a Resource Account. - * @param {ResourceAccountApiOrgsOrgIdResourcesAccountsAccIdGetRequest} requestParameters Request parameters. + * @summary Delete an unused Resource Account. + * @param {ResourceAccountApiOrgsOrgIdResourcesAccountsAccIdDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ResourceAccountApi */ - orgsOrgIdResourcesAccountsAccIdGet(requestParameters, options) { + orgsOrgIdResourcesAccountsAccIdDelete(requestParameters, options) { + return (0, exports.ResourceAccountApiFp)(this.configuration).orgsOrgIdResourcesAccountsAccIdDelete(requestParameters.orgId, requestParameters.accId, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary Get a Resource Account. + * @param {ResourceAccountApiOrgsOrgIdResourcesAccountsAccIdGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ResourceAccountApi + */ + orgsOrgIdResourcesAccountsAccIdGet(requestParameters, options) { return (0, exports.ResourceAccountApiFp)(this.configuration).orgsOrgIdResourcesAccountsAccIdGet(requestParameters.orgId, requestParameters.accId, options).then((request) => request(this.axios, this.basePath)); } /** @@ -16502,7 +17864,7 @@ const ResourceDefinitionApiAxiosParamCreator = function (configuration) { .replace(`{${"defId"}}`, encodeURIComponent(String(defId))) .replace(`{${"criteriaId"}}`, encodeURIComponent(String(criteriaId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -16541,7 +17903,7 @@ const ResourceDefinitionApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"defId"}}`, encodeURIComponent(String(defId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -16577,7 +17939,7 @@ const ResourceDefinitionApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"defId"}}`, encodeURIComponent(String(defId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -16613,7 +17975,7 @@ const ResourceDefinitionApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"defId"}}`, encodeURIComponent(String(defId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -16634,22 +17996,22 @@ const ResourceDefinitionApiAxiosParamCreator = function (configuration) { * @summary Update a Resource Definition. * @param {string} orgId The Organization ID. * @param {string} defId The Resource Definition ID. - * @param {UpdateResourceDefinitionRequestRequest} updateResourceDefinitionRequestRequest The Resource Definition record details. The PATCH operation would change the value of the property if it is included in the request payload JSON, and not `null`. Missing and `null` properties are ignored. For the map properties, such as UpdateResourceDefinitionRequest.DriverInputs, the merge operation is applied. Merge rules are as follows: - If a map property has a value, it is replaced (or added). - If a map property is set to `null`, it is removed. - If a map property is not included (missing in JSON), it remains unchanged. + * @param {PatchResourceDefinitionRequestRequest} patchResourceDefinitionRequestRequest The Resource Definition record details. The PATCH operation would change the value of the property if it is included in the request payload JSON, and not `null`. Missing and `null` properties are ignored. For the map properties, such as PatchResourceDefinitionRequest.DriverInputs, the merge operation is applied. Merge rules are as follows: - If a map property has a value, it is replaced (or added). - If a map property is set to `null`, it is removed. - If a map property is not included (missing in JSON), it remains unchanged. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdResourcesDefsDefIdPatch: async (orgId, defId, updateResourceDefinitionRequestRequest, options = {}) => { + orgsOrgIdResourcesDefsDefIdPatch: async (orgId, defId, patchResourceDefinitionRequestRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined (0, common_1.assertParamExists)('orgsOrgIdResourcesDefsDefIdPatch', 'orgId', orgId); // verify required parameter 'defId' is not null or undefined (0, common_1.assertParamExists)('orgsOrgIdResourcesDefsDefIdPatch', 'defId', defId); - // verify required parameter 'updateResourceDefinitionRequestRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdResourcesDefsDefIdPatch', 'updateResourceDefinitionRequestRequest', updateResourceDefinitionRequestRequest); + // verify required parameter 'patchResourceDefinitionRequestRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdResourcesDefsDefIdPatch', 'patchResourceDefinitionRequestRequest', patchResourceDefinitionRequestRequest); const localVarPath = `/orgs/{orgId}/resources/defs/{defId}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"defId"}}`, encodeURIComponent(String(defId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -16661,6 +18023,44 @@ const ResourceDefinitionApiAxiosParamCreator = function (configuration) { (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(patchResourceDefinitionRequestRequest, localVarRequestOptions, configuration); + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Update a Resource Definition. + * @param {string} orgId The Organization ID. + * @param {string} defId The Resource Definition ID. + * @param {UpdateResourceDefinitionRequestRequest} updateResourceDefinitionRequestRequest The Resource Definition record details. The PUT operation updates a resource definition using the provided payload. An empty driver_account or driver_inputs property will unset the existing values. Currently the resource and driver types can\'t be changed. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdResourcesDefsDefIdPut: async (orgId, defId, updateResourceDefinitionRequestRequest, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdResourcesDefsDefIdPut', 'orgId', orgId); + // verify required parameter 'defId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdResourcesDefsDefIdPut', 'defId', defId); + // verify required parameter 'updateResourceDefinitionRequestRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdResourcesDefsDefIdPut', 'updateResourceDefinitionRequestRequest', updateResourceDefinitionRequestRequest); + const localVarPath = `/orgs/{orgId}/resources/defs/{defId}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"defId"}}`, encodeURIComponent(String(defId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateResourceDefinitionRequestRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), @@ -16684,7 +18084,7 @@ const ResourceDefinitionApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"defId"}}`, encodeURIComponent(String(defId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -16718,7 +18118,7 @@ const ResourceDefinitionApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/resources/defs` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -16765,7 +18165,7 @@ const ResourceDefinitionApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/resources/defs` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -16850,12 +18250,25 @@ const ResourceDefinitionApiFp = function (configuration) { * @summary Update a Resource Definition. * @param {string} orgId The Organization ID. * @param {string} defId The Resource Definition ID. - * @param {UpdateResourceDefinitionRequestRequest} updateResourceDefinitionRequestRequest The Resource Definition record details. The PATCH operation would change the value of the property if it is included in the request payload JSON, and not `null`. Missing and `null` properties are ignored. For the map properties, such as UpdateResourceDefinitionRequest.DriverInputs, the merge operation is applied. Merge rules are as follows: - If a map property has a value, it is replaced (or added). - If a map property is set to `null`, it is removed. - If a map property is not included (missing in JSON), it remains unchanged. + * @param {PatchResourceDefinitionRequestRequest} patchResourceDefinitionRequestRequest The Resource Definition record details. The PATCH operation would change the value of the property if it is included in the request payload JSON, and not `null`. Missing and `null` properties are ignored. For the map properties, such as PatchResourceDefinitionRequest.DriverInputs, the merge operation is applied. Merge rules are as follows: - If a map property has a value, it is replaced (or added). - If a map property is set to `null`, it is removed. - If a map property is not included (missing in JSON), it remains unchanged. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdResourcesDefsDefIdPatch(orgId, defId, patchResourceDefinitionRequestRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdResourcesDefsDefIdPatch(orgId, defId, patchResourceDefinitionRequestRequest, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + /** + * + * @summary Update a Resource Definition. + * @param {string} orgId The Organization ID. + * @param {string} defId The Resource Definition ID. + * @param {UpdateResourceDefinitionRequestRequest} updateResourceDefinitionRequestRequest The Resource Definition record details. The PUT operation updates a resource definition using the provided payload. An empty driver_account or driver_inputs property will unset the existing values. Currently the resource and driver types can\'t be changed. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdResourcesDefsDefIdPatch(orgId, defId, updateResourceDefinitionRequestRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdResourcesDefsDefIdPatch(orgId, defId, updateResourceDefinitionRequestRequest, options); + async orgsOrgIdResourcesDefsDefIdPut(orgId, defId, updateResourceDefinitionRequestRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdResourcesDefsDefIdPut(orgId, defId, updateResourceDefinitionRequestRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** @@ -16956,7 +18369,17 @@ const ResourceDefinitionApiFactory = function (configuration, basePath, axios) { * @throws {RequiredError} */ orgsOrgIdResourcesDefsDefIdPatch(requestParameters, options) { - return localVarFp.orgsOrgIdResourcesDefsDefIdPatch(requestParameters.orgId, requestParameters.defId, requestParameters.updateResourceDefinitionRequestRequest, options).then((request) => request(axios, basePath)); + return localVarFp.orgsOrgIdResourcesDefsDefIdPatch(requestParameters.orgId, requestParameters.defId, requestParameters.patchResourceDefinitionRequestRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Update a Resource Definition. + * @param {ResourceDefinitionApiOrgsOrgIdResourcesDefsDefIdPutRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdResourcesDefsDefIdPut(requestParameters, options) { + return localVarFp.orgsOrgIdResourcesDefsDefIdPut(requestParameters.orgId, requestParameters.defId, requestParameters.updateResourceDefinitionRequestRequest, options).then((request) => request(axios, basePath)); }, /** * @@ -17051,7 +18474,18 @@ class ResourceDefinitionApi extends base_1.BaseAPI { * @memberof ResourceDefinitionApi */ orgsOrgIdResourcesDefsDefIdPatch(requestParameters, options) { - return (0, exports.ResourceDefinitionApiFp)(this.configuration).orgsOrgIdResourcesDefsDefIdPatch(requestParameters.orgId, requestParameters.defId, requestParameters.updateResourceDefinitionRequestRequest, options).then((request) => request(this.axios, this.basePath)); + return (0, exports.ResourceDefinitionApiFp)(this.configuration).orgsOrgIdResourcesDefsDefIdPatch(requestParameters.orgId, requestParameters.defId, requestParameters.patchResourceDefinitionRequestRequest, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary Update a Resource Definition. + * @param {ResourceDefinitionApiOrgsOrgIdResourcesDefsDefIdPutRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ResourceDefinitionApi + */ + orgsOrgIdResourcesDefsDefIdPut(requestParameters, options) { + return (0, exports.ResourceDefinitionApiFp)(this.configuration).orgsOrgIdResourcesDefsDefIdPut(requestParameters.orgId, requestParameters.defId, requestParameters.updateResourceDefinitionRequestRequest, options).then((request) => request(this.axios, this.basePath)); } /** * @@ -17088,6 +18522,121 @@ class ResourceDefinitionApi extends base_1.BaseAPI { } } exports.ResourceDefinitionApi = ResourceDefinitionApi; +/** + * ResourceProvisionApi - axios parameter creator + * @export + */ +const ResourceProvisionApiAxiosParamCreator = function (configuration) { + return { + /** + * + * @summary Lists the resource objects that hold the information needed to provision the resources specified in the request and the resources they depend on. + * @param {string} orgId The Organization ID. + * @param {string} appId The Application ID. + * @param {string} envId The Environment ID. + * @param {Array} resourceProvisionRequestRequest Resources to provision. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost: async (orgId, appId, envId, resourceProvisionRequestRequest, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost', 'orgId', orgId); + // verify required parameter 'appId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost', 'appId', appId); + // verify required parameter 'envId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost', 'envId', envId); + // verify required parameter 'resourceProvisionRequestRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost', 'resourceProvisionRequestRequest', resourceProvisionRequestRequest); + const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/resources/graph` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) + .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(resourceProvisionRequestRequest, localVarRequestOptions, configuration); + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; +exports.ResourceProvisionApiAxiosParamCreator = ResourceProvisionApiAxiosParamCreator; +/** + * ResourceProvisionApi - functional programming interface + * @export + */ +const ResourceProvisionApiFp = function (configuration) { + const localVarAxiosParamCreator = (0, exports.ResourceProvisionApiAxiosParamCreator)(configuration); + return { + /** + * + * @summary Lists the resource objects that hold the information needed to provision the resources specified in the request and the resources they depend on. + * @param {string} orgId The Organization ID. + * @param {string} appId The Application ID. + * @param {string} envId The Environment ID. + * @param {Array} resourceProvisionRequestRequest Resources to provision. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost(orgId, appId, envId, resourceProvisionRequestRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost(orgId, appId, envId, resourceProvisionRequestRequest, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + }; +}; +exports.ResourceProvisionApiFp = ResourceProvisionApiFp; +/** + * ResourceProvisionApi - factory interface + * @export + */ +const ResourceProvisionApiFactory = function (configuration, basePath, axios) { + const localVarFp = (0, exports.ResourceProvisionApiFp)(configuration); + return { + /** + * + * @summary Lists the resource objects that hold the information needed to provision the resources specified in the request and the resources they depend on. + * @param {ResourceProvisionApiOrgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.resourceProvisionRequestRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; +exports.ResourceProvisionApiFactory = ResourceProvisionApiFactory; +/** + * ResourceProvisionApi - object-oriented interface + * @export + * @class ResourceProvisionApi + * @extends {BaseAPI} + */ +class ResourceProvisionApi extends base_1.BaseAPI { + /** + * + * @summary Lists the resource objects that hold the information needed to provision the resources specified in the request and the resources they depend on. + * @param {ResourceProvisionApiOrgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ResourceProvisionApi + */ + orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost(requestParameters, options) { + return (0, exports.ResourceProvisionApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdResourcesGraphPost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.resourceProvisionRequestRequest, options).then((request) => request(this.axios, this.basePath)); + } +} +exports.ResourceProvisionApi = ResourceProvisionApi; /** * ResourceTypeApi - axios parameter creator * @export @@ -17107,7 +18656,7 @@ const ResourceTypeApiAxiosParamCreator = function (configuration) { const localVarPath = `/orgs/{orgId}/resources/types` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -17214,7 +18763,7 @@ const RuntimeInfoApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -17254,7 +18803,7 @@ const RuntimeInfoApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -17296,7 +18845,7 @@ const RuntimeInfoApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -17332,7 +18881,7 @@ const RuntimeInfoApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -17544,7 +19093,7 @@ const SetApiAxiosParamCreator = function (configuration) { .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -17585,7 +19134,7 @@ const SetApiAxiosParamCreator = function (configuration) { .replace(`{${"setId"}}`, encodeURIComponent(String(setId))) .replace(`{${"sourceSetId"}}`, encodeURIComponent(String(sourceSetId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -17623,7 +19172,7 @@ const SetApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"setId"}}`, encodeURIComponent(String(setId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -17666,7 +19215,7 @@ const SetApiAxiosParamCreator = function (configuration) { .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"setId"}}`, encodeURIComponent(String(setId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -17855,25 +19404,25 @@ class SetApi extends base_1.BaseAPI { } exports.SetApi = SetApi; /** - * UserInviteApi - axios parameter creator + * TokenInfoApi - axios parameter creator * @export */ -const UserInviteApiAxiosParamCreator = function (configuration) { +const TokenInfoApiAxiosParamCreator = function (configuration) { return { /** * - * @summary List the invites issued for the organization. - * @param {string} orgId The Organization ID. + * @summary Lists tokens associated with a user + * @param {string} userId The user ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdInvitationsGet: async (orgId, options = {}) => { - // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdInvitationsGet', 'orgId', orgId); - const localVarPath = `/orgs/{orgId}/invitations` - .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); + usersUserIdTokensGet: async (userId, options = {}) => { + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('usersUserIdTokensGet', 'userId', userId); + const localVarPath = `/users/{userId}/tokens` + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -17889,126 +19438,68 @@ const UserInviteApiAxiosParamCreator = function (configuration) { options: localVarRequestOptions, }; }, - }; -}; -exports.UserInviteApiAxiosParamCreator = UserInviteApiAxiosParamCreator; -/** - * UserInviteApi - functional programming interface - * @export - */ -const UserInviteApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.UserInviteApiAxiosParamCreator)(configuration); - return { - /** - * - * @summary List the invites issued for the organization. - * @param {string} orgId The Organization ID. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async orgsOrgIdInvitationsGet(orgId, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdInvitationsGet(orgId, options); - return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); - }, - }; -}; -exports.UserInviteApiFp = UserInviteApiFp; -/** - * UserInviteApi - factory interface - * @export - */ -const UserInviteApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.UserInviteApiFp)(configuration); - return { - /** - * - * @summary List the invites issued for the organization. - * @param {UserInviteApiOrgsOrgIdInvitationsGetRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - orgsOrgIdInvitationsGet(requestParameters, options) { - return localVarFp.orgsOrgIdInvitationsGet(requestParameters.orgId, options).then((request) => request(axios, basePath)); - }, - }; -}; -exports.UserInviteApiFactory = UserInviteApiFactory; -/** - * UserInviteApi - object-oriented interface - * @export - * @class UserInviteApi - * @extends {BaseAPI} - */ -class UserInviteApi extends base_1.BaseAPI { - /** - * - * @summary List the invites issued for the organization. - * @param {UserInviteApiOrgsOrgIdInvitationsGetRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserInviteApi - */ - orgsOrgIdInvitationsGet(requestParameters, options) { - return (0, exports.UserInviteApiFp)(this.configuration).orgsOrgIdInvitationsGet(requestParameters.orgId, options).then((request) => request(this.axios, this.basePath)); - } -} -exports.UserInviteApi = UserInviteApi; -/** - * UserProfileApi - axios parameter creator - * @export - */ -const UserProfileApiAxiosParamCreator = function (configuration) { - return { /** - * - * @summary Gets the extended profile of the current user + * This is only supported for users of type `service`. + * @summary Creates a new static token for a user. + * @param {string} userId The user ID. + * @param {TokenDefinitionRequest} tokenDefinitionRequest The definition of the token. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - currentUserGet: async (options = {}) => { - const localVarPath = `/current-user`; + usersUserIdTokensPost: async (userId, tokenDefinitionRequest, options = {}) => { + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('usersUserIdTokensPost', 'userId', userId); + // verify required parameter 'tokenDefinitionRequest' is not null or undefined + (0, common_1.assertParamExists)('usersUserIdTokensPost', 'tokenDefinitionRequest', tokenDefinitionRequest); + const localVarPath = `/users/{userId}/tokens` + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(tokenDefinitionRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** - * - * @summary Updates the extended profile of the current user. - * @param {UserProfileExtendedRequest} userProfileExtendedRequest + * This is only possible for static tokens. To revoke session tokens - use `POST /auth/logout` with the required session token. + * @summary Deletes a specific token associated with a user + * @param {string} userId The user ID. + * @param {string} tokenId The token ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - currentUserPatch: async (userProfileExtendedRequest, options = {}) => { - // verify required parameter 'userProfileExtendedRequest' is not null or undefined - (0, common_1.assertParamExists)('currentUserPatch', 'userProfileExtendedRequest', userProfileExtendedRequest); - const localVarPath = `/current-user`; + usersUserIdTokensTokenIdDelete: async (userId, tokenId, options = {}) => { + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('usersUserIdTokensTokenIdDelete', 'userId', userId); + // verify required parameter 'tokenId' is not null or undefined + (0, common_1.assertParamExists)('usersUserIdTokensTokenIdDelete', 'tokenId', tokenId); + const localVarPath = `/users/{userId}/tokens/{tokenId}` + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))) + .replace(`{${"tokenId"}}`, encodeURIComponent(String(tokenId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; - localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(userProfileExtendedRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, @@ -18016,102 +19507,22 @@ const UserProfileApiAxiosParamCreator = function (configuration) { }, /** * - * @summary Creates a new service user. - * @param {string} orgId The Organization ID. - * @param {UserProfileExtendedRequest} userProfileExtendedRequest The user ID and the role + * @summary Gets a specific token associated with a user + * @param {string} userId The user ID. + * @param {string} tokenId The token ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdUsersPost: async (orgId, userProfileExtendedRequest, options = {}) => { - // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdUsersPost', 'orgId', orgId); - // verify required parameter 'userProfileExtendedRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdUsersPost', 'userProfileExtendedRequest', userProfileExtendedRequest); - const localVarPath = `/orgs/{orgId}/users` - .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - localVarHeaderParameter['Content-Type'] = 'application/json'; - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(userProfileExtendedRequest, localVarRequestOptions, configuration); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary DEPRECATED - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - tokensGet: async (options = {}) => { - const localVarPath = `/tokens`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary DEPRECATED - * @param {string} tokenId The token ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - tokensTokenIdDelete: async (tokenId, options = {}) => { + usersUserIdTokensTokenIdGet: async (userId, tokenId, options = {}) => { + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('usersUserIdTokensTokenIdGet', 'userId', userId); // verify required parameter 'tokenId' is not null or undefined - (0, common_1.assertParamExists)('tokensTokenIdDelete', 'tokenId', tokenId); - const localVarPath = `/tokens/{tokenId}` + (0, common_1.assertParamExists)('usersUserIdTokensTokenIdGet', 'tokenId', tokenId); + const localVarPath = `/users/{userId}/tokens/{tokenId}` + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))) .replace(`{${"tokenId"}}`, encodeURIComponent(String(tokenId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary DEPRECATED - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersMeGet: async (options = {}) => { - const localVarPath = `/users/me`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -18129,244 +19540,187 @@ const UserProfileApiAxiosParamCreator = function (configuration) { }, }; }; -exports.UserProfileApiAxiosParamCreator = UserProfileApiAxiosParamCreator; +exports.TokenInfoApiAxiosParamCreator = TokenInfoApiAxiosParamCreator; /** - * UserProfileApi - functional programming interface + * TokenInfoApi - functional programming interface * @export */ -const UserProfileApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.UserProfileApiAxiosParamCreator)(configuration); +const TokenInfoApiFp = function (configuration) { + const localVarAxiosParamCreator = (0, exports.TokenInfoApiAxiosParamCreator)(configuration); return { /** * - * @summary Gets the extended profile of the current user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async currentUserGet(options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.currentUserGet(options); - return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); - }, - /** - * - * @summary Updates the extended profile of the current user. - * @param {UserProfileExtendedRequest} userProfileExtendedRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async currentUserPatch(userProfileExtendedRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.currentUserPatch(userProfileExtendedRequest, options); - return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); - }, - /** - * - * @summary Creates a new service user. - * @param {string} orgId The Organization ID. - * @param {UserProfileExtendedRequest} userProfileExtendedRequest The user ID and the role + * @summary Lists tokens associated with a user + * @param {string} userId The user ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdUsersPost(orgId, userProfileExtendedRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdUsersPost(orgId, userProfileExtendedRequest, options); + async usersUserIdTokensGet(userId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserIdTokensGet(userId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * - * @summary DEPRECATED + * This is only supported for users of type `service`. + * @summary Creates a new static token for a user. + * @param {string} userId The user ID. + * @param {TokenDefinitionRequest} tokenDefinitionRequest The definition of the token. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async tokensGet(options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.tokensGet(options); + async usersUserIdTokensPost(userId, tokenDefinitionRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserIdTokensPost(userId, tokenDefinitionRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * - * @summary DEPRECATED - * @param {string} tokenId The token ID + * This is only possible for static tokens. To revoke session tokens - use `POST /auth/logout` with the required session token. + * @summary Deletes a specific token associated with a user + * @param {string} userId The user ID. + * @param {string} tokenId The token ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async tokensTokenIdDelete(tokenId, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.tokensTokenIdDelete(tokenId, options); + async usersUserIdTokensTokenIdDelete(userId, tokenId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserIdTokensTokenIdDelete(userId, tokenId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * - * @summary DEPRECATED + * @summary Gets a specific token associated with a user + * @param {string} userId The user ID. + * @param {string} tokenId The token ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async usersMeGet(options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersMeGet(options); + async usersUserIdTokensTokenIdGet(userId, tokenId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.usersUserIdTokensTokenIdGet(userId, tokenId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, }; }; -exports.UserProfileApiFp = UserProfileApiFp; +exports.TokenInfoApiFp = TokenInfoApiFp; /** - * UserProfileApi - factory interface + * TokenInfoApi - factory interface * @export */ -const UserProfileApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.UserProfileApiFp)(configuration); +const TokenInfoApiFactory = function (configuration, basePath, axios) { + const localVarFp = (0, exports.TokenInfoApiFp)(configuration); return { /** * - * @summary Gets the extended profile of the current user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - currentUserGet(options) { - return localVarFp.currentUserGet(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Updates the extended profile of the current user. - * @param {UserProfileApiCurrentUserPatchRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - currentUserPatch(requestParameters, options) { - return localVarFp.currentUserPatch(requestParameters.userProfileExtendedRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Creates a new service user. - * @param {UserProfileApiOrgsOrgIdUsersPostRequest} requestParameters Request parameters. + * @summary Lists tokens associated with a user + * @param {TokenInfoApiUsersUserIdTokensGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdUsersPost(requestParameters, options) { - return localVarFp.orgsOrgIdUsersPost(requestParameters.orgId, requestParameters.userProfileExtendedRequest, options).then((request) => request(axios, basePath)); + usersUserIdTokensGet(requestParameters, options) { + return localVarFp.usersUserIdTokensGet(requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** - * - * @summary DEPRECATED + * This is only supported for users of type `service`. + * @summary Creates a new static token for a user. + * @param {TokenInfoApiUsersUserIdTokensPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - tokensGet(options) { - return localVarFp.tokensGet(options).then((request) => request(axios, basePath)); + usersUserIdTokensPost(requestParameters, options) { + return localVarFp.usersUserIdTokensPost(requestParameters.userId, requestParameters.tokenDefinitionRequest, options).then((request) => request(axios, basePath)); }, /** - * - * @summary DEPRECATED - * @param {UserProfileApiTokensTokenIdDeleteRequest} requestParameters Request parameters. + * This is only possible for static tokens. To revoke session tokens - use `POST /auth/logout` with the required session token. + * @summary Deletes a specific token associated with a user + * @param {TokenInfoApiUsersUserIdTokensTokenIdDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - tokensTokenIdDelete(requestParameters, options) { - return localVarFp.tokensTokenIdDelete(requestParameters.tokenId, options).then((request) => request(axios, basePath)); + usersUserIdTokensTokenIdDelete(requestParameters, options) { + return localVarFp.usersUserIdTokensTokenIdDelete(requestParameters.userId, requestParameters.tokenId, options).then((request) => request(axios, basePath)); }, /** * - * @summary DEPRECATED + * @summary Gets a specific token associated with a user + * @param {TokenInfoApiUsersUserIdTokensTokenIdGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - usersMeGet(options) { - return localVarFp.usersMeGet(options).then((request) => request(axios, basePath)); + usersUserIdTokensTokenIdGet(requestParameters, options) { + return localVarFp.usersUserIdTokensTokenIdGet(requestParameters.userId, requestParameters.tokenId, options).then((request) => request(axios, basePath)); }, }; }; -exports.UserProfileApiFactory = UserProfileApiFactory; +exports.TokenInfoApiFactory = TokenInfoApiFactory; /** - * UserProfileApi - object-oriented interface + * TokenInfoApi - object-oriented interface * @export - * @class UserProfileApi + * @class TokenInfoApi * @extends {BaseAPI} */ -class UserProfileApi extends base_1.BaseAPI { - /** - * - * @summary Gets the extended profile of the current user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserProfileApi - */ - currentUserGet(options) { - return (0, exports.UserProfileApiFp)(this.configuration).currentUserGet(options).then((request) => request(this.axios, this.basePath)); - } - /** - * - * @summary Updates the extended profile of the current user. - * @param {UserProfileApiCurrentUserPatchRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserProfileApi - */ - currentUserPatch(requestParameters, options) { - return (0, exports.UserProfileApiFp)(this.configuration).currentUserPatch(requestParameters.userProfileExtendedRequest, options).then((request) => request(this.axios, this.basePath)); - } +class TokenInfoApi extends base_1.BaseAPI { /** * - * @summary Creates a new service user. - * @param {UserProfileApiOrgsOrgIdUsersPostRequest} requestParameters Request parameters. + * @summary Lists tokens associated with a user + * @param {TokenInfoApiUsersUserIdTokensGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UserProfileApi + * @memberof TokenInfoApi */ - orgsOrgIdUsersPost(requestParameters, options) { - return (0, exports.UserProfileApiFp)(this.configuration).orgsOrgIdUsersPost(requestParameters.orgId, requestParameters.userProfileExtendedRequest, options).then((request) => request(this.axios, this.basePath)); + usersUserIdTokensGet(requestParameters, options) { + return (0, exports.TokenInfoApiFp)(this.configuration).usersUserIdTokensGet(requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary DEPRECATED + * This is only supported for users of type `service`. + * @summary Creates a new static token for a user. + * @param {TokenInfoApiUsersUserIdTokensPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UserProfileApi + * @memberof TokenInfoApi */ - tokensGet(options) { - return (0, exports.UserProfileApiFp)(this.configuration).tokensGet(options).then((request) => request(this.axios, this.basePath)); + usersUserIdTokensPost(requestParameters, options) { + return (0, exports.TokenInfoApiFp)(this.configuration).usersUserIdTokensPost(requestParameters.userId, requestParameters.tokenDefinitionRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary DEPRECATED - * @param {UserProfileApiTokensTokenIdDeleteRequest} requestParameters Request parameters. + * This is only possible for static tokens. To revoke session tokens - use `POST /auth/logout` with the required session token. + * @summary Deletes a specific token associated with a user + * @param {TokenInfoApiUsersUserIdTokensTokenIdDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UserProfileApi + * @memberof TokenInfoApi */ - tokensTokenIdDelete(requestParameters, options) { - return (0, exports.UserProfileApiFp)(this.configuration).tokensTokenIdDelete(requestParameters.tokenId, options).then((request) => request(this.axios, this.basePath)); + usersUserIdTokensTokenIdDelete(requestParameters, options) { + return (0, exports.TokenInfoApiFp)(this.configuration).usersUserIdTokensTokenIdDelete(requestParameters.userId, requestParameters.tokenId, options).then((request) => request(this.axios, this.basePath)); } /** * - * @summary DEPRECATED + * @summary Gets a specific token associated with a user + * @param {TokenInfoApiUsersUserIdTokensTokenIdGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UserProfileApi + * @memberof TokenInfoApi */ - usersMeGet(options) { - return (0, exports.UserProfileApiFp)(this.configuration).usersMeGet(options).then((request) => request(this.axios, this.basePath)); + usersUserIdTokensTokenIdGet(requestParameters, options) { + return (0, exports.TokenInfoApiFp)(this.configuration).usersUserIdTokensTokenIdGet(requestParameters.userId, requestParameters.tokenId, options).then((request) => request(this.axios, this.basePath)); } } -exports.UserProfileApi = UserProfileApi; +exports.TokenInfoApi = TokenInfoApi; /** - * UserRoleApi - axios parameter creator + * UserInviteApi - axios parameter creator * @export */ -const UserRoleApiAxiosParamCreator = function (configuration) { +const UserInviteApiAxiosParamCreator = function (configuration) { return { /** * - * @summary List Users with roles in an App + * @summary List the invites issued for the organization. * @param {string} orgId The Organization ID. - * @param {string} appId The Application ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdUsersGet: async (orgId, appId, options = {}) => { + orgsOrgIdInvitationsGet: async (orgId, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersGet', 'orgId', orgId); - // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersGet', 'appId', appId); - const localVarPath = `/orgs/{orgId}/apps/{appId}/users` - .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); + (0, common_1.assertParamExists)('orgsOrgIdInvitationsGet', 'orgId', orgId); + const localVarPath = `/orgs/{orgId}/invitations` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -18382,66 +19736,86 @@ const UserRoleApiAxiosParamCreator = function (configuration) { options: localVarRequestOptions, }; }, + }; +}; +exports.UserInviteApiAxiosParamCreator = UserInviteApiAxiosParamCreator; +/** + * UserInviteApi - functional programming interface + * @export + */ +const UserInviteApiFp = function (configuration) { + const localVarAxiosParamCreator = (0, exports.UserInviteApiAxiosParamCreator)(configuration); + return { /** * - * @summary Adds a User to an Application with a Role + * @summary List the invites issued for the organization. * @param {string} orgId The Organization ID. - * @param {string} appId The Application ID. - * @param {UserRoleRequest} userRoleRequest The user ID and the role * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdUsersPost: async (orgId, appId, userRoleRequest, options = {}) => { - // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersPost', 'orgId', orgId); - // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersPost', 'appId', appId); - // verify required parameter 'userRoleRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersPost', 'userRoleRequest', userRoleRequest); - const localVarPath = `/orgs/{orgId}/apps/{appId}/users` - .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - localVarHeaderParameter['Content-Type'] = 'application/json'; - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(userRoleRequest, localVarRequestOptions, configuration); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; + async orgsOrgIdInvitationsGet(orgId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdInvitationsGet(orgId, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, + }; +}; +exports.UserInviteApiFp = UserInviteApiFp; +/** + * UserInviteApi - factory interface + * @export + */ +const UserInviteApiFactory = function (configuration, basePath, axios) { + const localVarFp = (0, exports.UserInviteApiFp)(configuration); + return { /** * - * @summary Get the role of a User on an Application - * @param {string} orgId The Organization ID. - * @param {string} appId The Application ID. - * @param {string} userId The User ID + * @summary List the invites issued for the organization. + * @param {UserInviteApiOrgsOrgIdInvitationsGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdUsersUserIdGet: async (orgId, appId, userId, options = {}) => { - // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersUserIdGet', 'orgId', orgId); - // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersUserIdGet', 'appId', appId); - // verify required parameter 'userId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersUserIdGet', 'userId', userId); - const localVarPath = `/orgs/{orgId}/apps/{appId}/users/{userId}` - .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) - .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); + orgsOrgIdInvitationsGet(requestParameters, options) { + return localVarFp.orgsOrgIdInvitationsGet(requestParameters.orgId, options).then((request) => request(axios, basePath)); + }, + }; +}; +exports.UserInviteApiFactory = UserInviteApiFactory; +/** + * UserInviteApi - object-oriented interface + * @export + * @class UserInviteApi + * @extends {BaseAPI} + */ +class UserInviteApi extends base_1.BaseAPI { + /** + * + * @summary List the invites issued for the organization. + * @param {UserInviteApiOrgsOrgIdInvitationsGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserInviteApi + */ + orgsOrgIdInvitationsGet(requestParameters, options) { + return (0, exports.UserInviteApiFp)(this.configuration).orgsOrgIdInvitationsGet(requestParameters.orgId, options).then((request) => request(this.axios, this.basePath)); + } +} +exports.UserInviteApi = UserInviteApi; +/** + * UserProfileApi - axios parameter creator + * @export + */ +const UserProfileApiAxiosParamCreator = function (configuration) { + return { + /** + * + * @summary Gets the extended profile of the current user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + currentUserGet: async (options = {}) => { + const localVarPath = `/current-user`; // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -18459,36 +19833,29 @@ const UserRoleApiAxiosParamCreator = function (configuration) { }, /** * - * @summary Get the role of a User on an Environment Type - * @param {string} orgId The Organization ID. - * @param {string} envType The Environment Type. - * @param {string} userId The User ID + * @summary Updates the extended profile of the current user. + * @param {UserProfileExtendedRequest} userProfileExtendedRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdEnvTypeEnvTypeUsersUserIdGet: async (orgId, envType, userId, options = {}) => { - // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdEnvTypeEnvTypeUsersUserIdGet', 'orgId', orgId); - // verify required parameter 'envType' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdEnvTypeEnvTypeUsersUserIdGet', 'envType', envType); - // verify required parameter 'userId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdEnvTypeEnvTypeUsersUserIdGet', 'userId', userId); - const localVarPath = `/orgs/{orgId}/env-type/{envType}/users/{userId}` - .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"envType"}}`, encodeURIComponent(String(envType))) - .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); + currentUserPatch: async (userProfileExtendedRequest, options = {}) => { + // verify required parameter 'userProfileExtendedRequest' is not null or undefined + (0, common_1.assertParamExists)('currentUserPatch', 'userProfileExtendedRequest', userProfileExtendedRequest); + const localVarPath = `/current-user`; // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(userProfileExtendedRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, @@ -18496,21 +19863,21 @@ const UserRoleApiAxiosParamCreator = function (configuration) { }, /** * - * @summary Invites a user to an Organization with a specified role. + * @summary Creates a new service user. * @param {string} orgId The Organization ID. - * @param {UserInviteRequestRequest} userInviteRequestRequest The email and the desired role + * @param {NewServiceUserRequest} newServiceUserRequest The user ID and the role * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdInvitationsPost: async (orgId, userInviteRequestRequest, options = {}) => { + orgsOrgIdUsersPost: async (orgId, newServiceUserRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdInvitationsPost', 'orgId', orgId); - // verify required parameter 'userInviteRequestRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdInvitationsPost', 'userInviteRequestRequest', userInviteRequestRequest); - const localVarPath = `/orgs/{orgId}/invitations` + (0, common_1.assertParamExists)('orgsOrgIdUsersPost', 'orgId', orgId); + // verify required parameter 'newServiceUserRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdUsersPost', 'newServiceUserRequest', newServiceUserRequest); + const localVarPath = `/orgs/{orgId}/users` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -18522,7 +19889,7 @@ const UserRoleApiAxiosParamCreator = function (configuration) { (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(userInviteRequestRequest, localVarRequestOptions, configuration); + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(newServiceUserRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, @@ -18530,18 +19897,68 @@ const UserRoleApiAxiosParamCreator = function (configuration) { }, /** * - * @summary List Users with roles in an Organization - * @param {string} orgId The Organization ID. + * @summary DEPRECATED * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdUsersGet: async (orgId, options = {}) => { - // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdUsersGet', 'orgId', orgId); - const localVarPath = `/orgs/{orgId}/users` - .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); + tokensGet: async (options = {}) => { + const localVarPath = `/tokens`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary DEPRECATED + * @param {string} tokenId The token ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + tokensTokenIdDelete: async (tokenId, options = {}) => { + // verify required parameter 'tokenId' is not null or undefined + (0, common_1.assertParamExists)('tokensTokenIdDelete', 'tokenId', tokenId); + const localVarPath = `/tokens/{tokenId}` + .replace(`{${"tokenId"}}`, encodeURIComponent(String(tokenId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary DEPRECATED + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + usersMeGet: async (options = {}) => { + const localVarPath = `/users/me`; // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -18559,269 +19976,249 @@ const UserRoleApiAxiosParamCreator = function (configuration) { }, }; }; -exports.UserRoleApiAxiosParamCreator = UserRoleApiAxiosParamCreator; +exports.UserProfileApiAxiosParamCreator = UserProfileApiAxiosParamCreator; /** - * UserRoleApi - functional programming interface + * UserProfileApi - functional programming interface * @export */ -const UserRoleApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.UserRoleApiAxiosParamCreator)(configuration); +const UserProfileApiFp = function (configuration) { + const localVarAxiosParamCreator = (0, exports.UserProfileApiAxiosParamCreator)(configuration); return { /** * - * @summary List Users with roles in an App - * @param {string} orgId The Organization ID. - * @param {string} appId The Application ID. + * @summary Gets the extended profile of the current user * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdUsersGet(orgId, appId, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdUsersGet(orgId, appId, options); + async currentUserGet(options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.currentUserGet(options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * - * @summary Adds a User to an Application with a Role - * @param {string} orgId The Organization ID. - * @param {string} appId The Application ID. - * @param {UserRoleRequest} userRoleRequest The user ID and the role + * @summary Updates the extended profile of the current user. + * @param {UserProfileExtendedRequest} userProfileExtendedRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdUsersPost(orgId, appId, userRoleRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdUsersPost(orgId, appId, userRoleRequest, options); + async currentUserPatch(userProfileExtendedRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.currentUserPatch(userProfileExtendedRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * - * @summary Get the role of a User on an Application + * @summary Creates a new service user. * @param {string} orgId The Organization ID. - * @param {string} appId The Application ID. - * @param {string} userId The User ID + * @param {NewServiceUserRequest} newServiceUserRequest The user ID and the role * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdUsersUserIdGet(orgId, appId, userId, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdUsersUserIdGet(orgId, appId, userId, options); + async orgsOrgIdUsersPost(orgId, newServiceUserRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdUsersPost(orgId, newServiceUserRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * - * @summary Get the role of a User on an Environment Type - * @param {string} orgId The Organization ID. - * @param {string} envType The Environment Type. - * @param {string} userId The User ID + * @summary DEPRECATED * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdEnvTypeEnvTypeUsersUserIdGet(orgId, envType, userId, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdEnvTypeEnvTypeUsersUserIdGet(orgId, envType, userId, options); + async tokensGet(options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.tokensGet(options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * - * @summary Invites a user to an Organization with a specified role. - * @param {string} orgId The Organization ID. - * @param {UserInviteRequestRequest} userInviteRequestRequest The email and the desired role + * @summary DEPRECATED + * @param {string} tokenId The token ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdInvitationsPost(orgId, userInviteRequestRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdInvitationsPost(orgId, userInviteRequestRequest, options); + async tokensTokenIdDelete(tokenId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.tokensTokenIdDelete(tokenId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * - * @summary List Users with roles in an Organization - * @param {string} orgId The Organization ID. + * @summary DEPRECATED * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdUsersGet(orgId, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdUsersGet(orgId, options); + async usersMeGet(options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.usersMeGet(options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, }; }; -exports.UserRoleApiFp = UserRoleApiFp; +exports.UserProfileApiFp = UserProfileApiFp; /** - * UserRoleApi - factory interface + * UserProfileApi - factory interface * @export */ -const UserRoleApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.UserRoleApiFp)(configuration); +const UserProfileApiFactory = function (configuration, basePath, axios) { + const localVarFp = (0, exports.UserProfileApiFp)(configuration); return { /** * - * @summary List Users with roles in an App - * @param {UserRoleApiOrgsOrgIdAppsAppIdUsersGetRequest} requestParameters Request parameters. + * @summary Gets the extended profile of the current user * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdUsersGet(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdUsersGet(requestParameters.orgId, requestParameters.appId, options).then((request) => request(axios, basePath)); + currentUserGet(options) { + return localVarFp.currentUserGet(options).then((request) => request(axios, basePath)); }, /** * - * @summary Adds a User to an Application with a Role - * @param {UserRoleApiOrgsOrgIdAppsAppIdUsersPostRequest} requestParameters Request parameters. + * @summary Updates the extended profile of the current user. + * @param {UserProfileApiCurrentUserPatchRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdUsersPost(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdUsersPost(requestParameters.orgId, requestParameters.appId, requestParameters.userRoleRequest, options).then((request) => request(axios, basePath)); + currentUserPatch(requestParameters, options) { + return localVarFp.currentUserPatch(requestParameters.userProfileExtendedRequest, options).then((request) => request(axios, basePath)); }, /** * - * @summary Get the role of a User on an Application - * @param {UserRoleApiOrgsOrgIdAppsAppIdUsersUserIdGetRequest} requestParameters Request parameters. + * @summary Creates a new service user. + * @param {UserProfileApiOrgsOrgIdUsersPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdUsersUserIdGet(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdUsersUserIdGet(requestParameters.orgId, requestParameters.appId, requestParameters.userId, options).then((request) => request(axios, basePath)); + orgsOrgIdUsersPost(requestParameters, options) { + return localVarFp.orgsOrgIdUsersPost(requestParameters.orgId, requestParameters.newServiceUserRequest, options).then((request) => request(axios, basePath)); }, /** * - * @summary Get the role of a User on an Environment Type - * @param {UserRoleApiOrgsOrgIdEnvTypeEnvTypeUsersUserIdGetRequest} requestParameters Request parameters. + * @summary DEPRECATED * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdEnvTypeEnvTypeUsersUserIdGet(requestParameters, options) { - return localVarFp.orgsOrgIdEnvTypeEnvTypeUsersUserIdGet(requestParameters.orgId, requestParameters.envType, requestParameters.userId, options).then((request) => request(axios, basePath)); + tokensGet(options) { + return localVarFp.tokensGet(options).then((request) => request(axios, basePath)); }, /** * - * @summary Invites a user to an Organization with a specified role. - * @param {UserRoleApiOrgsOrgIdInvitationsPostRequest} requestParameters Request parameters. + * @summary DEPRECATED + * @param {UserProfileApiTokensTokenIdDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdInvitationsPost(requestParameters, options) { - return localVarFp.orgsOrgIdInvitationsPost(requestParameters.orgId, requestParameters.userInviteRequestRequest, options).then((request) => request(axios, basePath)); + tokensTokenIdDelete(requestParameters, options) { + return localVarFp.tokensTokenIdDelete(requestParameters.tokenId, options).then((request) => request(axios, basePath)); }, /** * - * @summary List Users with roles in an Organization - * @param {UserRoleApiOrgsOrgIdUsersGetRequest} requestParameters Request parameters. + * @summary DEPRECATED * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdUsersGet(requestParameters, options) { - return localVarFp.orgsOrgIdUsersGet(requestParameters.orgId, options).then((request) => request(axios, basePath)); + usersMeGet(options) { + return localVarFp.usersMeGet(options).then((request) => request(axios, basePath)); }, }; }; -exports.UserRoleApiFactory = UserRoleApiFactory; +exports.UserProfileApiFactory = UserProfileApiFactory; /** - * UserRoleApi - object-oriented interface + * UserProfileApi - object-oriented interface * @export - * @class UserRoleApi + * @class UserProfileApi * @extends {BaseAPI} */ -class UserRoleApi extends base_1.BaseAPI { +class UserProfileApi extends base_1.BaseAPI { /** * - * @summary List Users with roles in an App - * @param {UserRoleApiOrgsOrgIdAppsAppIdUsersGetRequest} requestParameters Request parameters. + * @summary Gets the extended profile of the current user * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UserRoleApi + * @memberof UserProfileApi */ - orgsOrgIdAppsAppIdUsersGet(requestParameters, options) { - return (0, exports.UserRoleApiFp)(this.configuration).orgsOrgIdAppsAppIdUsersGet(requestParameters.orgId, requestParameters.appId, options).then((request) => request(this.axios, this.basePath)); + currentUserGet(options) { + return (0, exports.UserProfileApiFp)(this.configuration).currentUserGet(options).then((request) => request(this.axios, this.basePath)); } /** * - * @summary Adds a User to an Application with a Role - * @param {UserRoleApiOrgsOrgIdAppsAppIdUsersPostRequest} requestParameters Request parameters. + * @summary Updates the extended profile of the current user. + * @param {UserProfileApiCurrentUserPatchRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UserRoleApi + * @memberof UserProfileApi */ - orgsOrgIdAppsAppIdUsersPost(requestParameters, options) { - return (0, exports.UserRoleApiFp)(this.configuration).orgsOrgIdAppsAppIdUsersPost(requestParameters.orgId, requestParameters.appId, requestParameters.userRoleRequest, options).then((request) => request(this.axios, this.basePath)); + currentUserPatch(requestParameters, options) { + return (0, exports.UserProfileApiFp)(this.configuration).currentUserPatch(requestParameters.userProfileExtendedRequest, options).then((request) => request(this.axios, this.basePath)); } /** * - * @summary Get the role of a User on an Application - * @param {UserRoleApiOrgsOrgIdAppsAppIdUsersUserIdGetRequest} requestParameters Request parameters. + * @summary Creates a new service user. + * @param {UserProfileApiOrgsOrgIdUsersPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UserRoleApi + * @memberof UserProfileApi */ - orgsOrgIdAppsAppIdUsersUserIdGet(requestParameters, options) { - return (0, exports.UserRoleApiFp)(this.configuration).orgsOrgIdAppsAppIdUsersUserIdGet(requestParameters.orgId, requestParameters.appId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdUsersPost(requestParameters, options) { + return (0, exports.UserProfileApiFp)(this.configuration).orgsOrgIdUsersPost(requestParameters.orgId, requestParameters.newServiceUserRequest, options).then((request) => request(this.axios, this.basePath)); } /** * - * @summary Get the role of a User on an Environment Type - * @param {UserRoleApiOrgsOrgIdEnvTypeEnvTypeUsersUserIdGetRequest} requestParameters Request parameters. + * @summary DEPRECATED * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UserRoleApi + * @memberof UserProfileApi */ - orgsOrgIdEnvTypeEnvTypeUsersUserIdGet(requestParameters, options) { - return (0, exports.UserRoleApiFp)(this.configuration).orgsOrgIdEnvTypeEnvTypeUsersUserIdGet(requestParameters.orgId, requestParameters.envType, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); + tokensGet(options) { + return (0, exports.UserProfileApiFp)(this.configuration).tokensGet(options).then((request) => request(this.axios, this.basePath)); } /** * - * @summary Invites a user to an Organization with a specified role. - * @param {UserRoleApiOrgsOrgIdInvitationsPostRequest} requestParameters Request parameters. + * @summary DEPRECATED + * @param {UserProfileApiTokensTokenIdDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UserRoleApi + * @memberof UserProfileApi */ - orgsOrgIdInvitationsPost(requestParameters, options) { - return (0, exports.UserRoleApiFp)(this.configuration).orgsOrgIdInvitationsPost(requestParameters.orgId, requestParameters.userInviteRequestRequest, options).then((request) => request(this.axios, this.basePath)); + tokensTokenIdDelete(requestParameters, options) { + return (0, exports.UserProfileApiFp)(this.configuration).tokensTokenIdDelete(requestParameters.tokenId, options).then((request) => request(this.axios, this.basePath)); } /** * - * @summary List Users with roles in an Organization - * @param {UserRoleApiOrgsOrgIdUsersGetRequest} requestParameters Request parameters. + * @summary DEPRECATED * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UserRoleApi + * @memberof UserProfileApi */ - orgsOrgIdUsersGet(requestParameters, options) { - return (0, exports.UserRoleApiFp)(this.configuration).orgsOrgIdUsersGet(requestParameters.orgId, options).then((request) => request(this.axios, this.basePath)); + usersMeGet(options) { + return (0, exports.UserProfileApiFp)(this.configuration).usersMeGet(options).then((request) => request(this.axios, this.basePath)); } } -exports.UserRoleApi = UserRoleApi; +exports.UserProfileApi = UserProfileApi; /** - * ValueApi - axios parameter creator + * UserRoleApi - axios parameter creator * @export */ -const ValueApiAxiosParamCreator = function (configuration) { +const UserRoleApiAxiosParamCreator = function (configuration) { return { /** - * All Shared Values will be deleted. If the Shared Values are marked as a secret, they will also be deleted. - * @summary Delete all Shared Value for an Environment + * + * @summary List Users with roles in an App * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. - * @param {string} envId The Environment ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValuesDelete: async (orgId, appId, envId, options = {}) => { + orgsOrgIdAppsAppIdUsersGet: async (orgId, appId, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesDelete', 'orgId', orgId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersGet', 'orgId', orgId); // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesDelete', 'appId', appId); - // verify required parameter 'envId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesDelete', 'envId', envId); - const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/values` + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersGet', 'appId', appId); + const localVarPath = `/orgs/{orgId}/apps/{appId}/users` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) - .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); @@ -18833,68 +20230,65 @@ const ValueApiAxiosParamCreator = function (configuration) { }; }, /** - * The returned values will be the base Application values with the Environment overrides where applicable. The `source` field will specify the level from which the value is from. - * @summary List Shared Values in an Environment + * + * @summary Adds a User to an Application with a Role * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. - * @param {string} envId The Environment ID. + * @param {UserRoleRequest} userRoleRequest The user ID and the role * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValuesGet: async (orgId, appId, envId, options = {}) => { + orgsOrgIdAppsAppIdUsersPost: async (orgId, appId, userRoleRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesGet', 'orgId', orgId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersPost', 'orgId', orgId); // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesGet', 'appId', appId); - // verify required parameter 'envId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesGet', 'envId', envId); - const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/values` + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersPost', 'appId', appId); + // verify required parameter 'userRoleRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersPost', 'userRoleRequest', userRoleRequest); + const localVarPath = `/orgs/{orgId}/apps/{appId}/users` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) - .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(userRoleRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** - * The specified Shared Value will be permanently deleted. If the Shared Value is marked as a secret, it will also be permanently deleted. - * @summary Delete Shared Value for an Environment + * + * @summary Remove the role of a User on an Application * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. - * @param {string} envId The Environment ID. - * @param {string} key The key to update. + * @param {string} userId The User ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete: async (orgId, appId, envId, key, options = {}) => { + orgsOrgIdAppsAppIdUsersUserIdDelete: async (orgId, appId, userId, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete', 'orgId', orgId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersUserIdDelete', 'orgId', orgId); // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete', 'appId', appId); - // verify required parameter 'envId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete', 'envId', envId); - // verify required parameter 'key' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete', 'key', key); - const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/values/{key}` + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersUserIdDelete', 'appId', appId); + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersUserIdDelete', 'userId', userId); + const localVarPath = `/orgs/{orgId}/apps/{appId}/users/{userId}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) - .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) - .replace(`{${"key"}}`, encodeURIComponent(String(key))); + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -18911,122 +20305,105 @@ const ValueApiAxiosParamCreator = function (configuration) { }; }, /** - * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. - * @summary Update Shared Value for an Environment + * + * @summary Get the role of a User on an Application * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. - * @param {string} envId The Environment ID. - * @param {string} key The key to update. - * @param {ValuePatchPayloadRequest} valuePatchPayloadRequest At least `value` or `description` must be supplied. All other fields will be ignored. + * @param {string} userId The User ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch: async (orgId, appId, envId, key, valuePatchPayloadRequest, options = {}) => { + orgsOrgIdAppsAppIdUsersUserIdGet: async (orgId, appId, userId, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch', 'orgId', orgId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersUserIdGet', 'orgId', orgId); // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch', 'appId', appId); - // verify required parameter 'envId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch', 'envId', envId); - // verify required parameter 'key' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch', 'key', key); - // verify required parameter 'valuePatchPayloadRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch', 'valuePatchPayloadRequest', valuePatchPayloadRequest); - const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/values/{key}` + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersUserIdGet', 'appId', appId); + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersUserIdGet', 'userId', userId); + const localVarPath = `/orgs/{orgId}/apps/{appId}/users/{userId}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) - .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) - .replace(`{${"key"}}`, encodeURIComponent(String(key))); + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; - localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valuePatchPayloadRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** - * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. - * @summary Update Shared Value for an Environment + * + * @summary Update the role of a User on an Application * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. - * @param {string} envId The Environment ID. - * @param {string} key The key to update. - * @param {ValueEditPayloadRequest} valueEditPayloadRequest Both `value` and `description` must be supplied. All other fields will be ignored. + * @param {string} userId The User ID + * @param {RoleRequest} roleRequest The new user role * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut: async (orgId, appId, envId, key, valueEditPayloadRequest, options = {}) => { + orgsOrgIdAppsAppIdUsersUserIdPatch: async (orgId, appId, userId, roleRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut', 'orgId', orgId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersUserIdPatch', 'orgId', orgId); // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut', 'appId', appId); - // verify required parameter 'envId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut', 'envId', envId); - // verify required parameter 'key' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut', 'key', key); - // verify required parameter 'valueEditPayloadRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut', 'valueEditPayloadRequest', valueEditPayloadRequest); - const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/values/{key}` + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersUserIdPatch', 'appId', appId); + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersUserIdPatch', 'userId', userId); + // verify required parameter 'roleRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdUsersUserIdPatch', 'roleRequest', roleRequest); + const localVarPath = `/orgs/{orgId}/apps/{appId}/users/{userId}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) - .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) - .replace(`{${"key"}}`, encodeURIComponent(String(key))); + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valueEditPayloadRequest, localVarRequestOptions, configuration); + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(roleRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** - * The Shared Value created will only be available to the specific Environment. If a Value is marked as a secret, it will be securely stored. It will not be possible to retrieve the value again through the API. The value of the secret can however be updated. - * @summary Create a Shared Value for an Environment + * + * @summary Adds a User to an Environment Type with a Role * @param {string} orgId The Organization ID. - * @param {string} appId The Application ID. - * @param {string} envId The Environment ID. - * @param {ValueCreatePayloadRequest} valueCreatePayloadRequest Definition of the new Shared Value. + * @param {string} envType The Environment Type. + * @param {UserRoleRequest} userRoleRequest The user ID and the role * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValuesPost: async (orgId, appId, envId, valueCreatePayloadRequest, options = {}) => { + orgsOrgIdEnvTypesEnvTypeUsersPost: async (orgId, envType, userRoleRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesPost', 'orgId', orgId); - // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesPost', 'appId', appId); - // verify required parameter 'envId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesPost', 'envId', envId); - // verify required parameter 'valueCreatePayloadRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesPost', 'valueCreatePayloadRequest', valueCreatePayloadRequest); - const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/values` + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersPost', 'orgId', orgId); + // verify required parameter 'envType' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersPost', 'envType', envType); + // verify required parameter 'userRoleRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersPost', 'userRoleRequest', userRoleRequest); + const localVarPath = `/orgs/{orgId}/env-types/{envType}/users` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) - .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); + .replace(`{${"envType"}}`, encodeURIComponent(String(envType))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -19038,30 +20415,34 @@ const ValueApiAxiosParamCreator = function (configuration) { (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valueCreatePayloadRequest, localVarRequestOptions, configuration); + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(userRoleRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** - * All Shared Values will be deleted. If the Shared Values are marked as a secret, they will also be deleted. - * @summary Delete all Shared Value for an App + * + * @summary Remove the role of a User on an Environment Type * @param {string} orgId The Organization ID. - * @param {string} appId The Application ID. + * @param {string} envType The Environment Type. + * @param {string} userId The User ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValuesDelete: async (orgId, appId, options = {}) => { + orgsOrgIdEnvTypesEnvTypeUsersUserIdDelete: async (orgId, envType, userId, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesDelete', 'orgId', orgId); - // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesDelete', 'appId', appId); - const localVarPath = `/orgs/{orgId}/apps/{appId}/values` + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersUserIdDelete', 'orgId', orgId); + // verify required parameter 'envType' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersUserIdDelete', 'envType', envType); + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersUserIdDelete', 'userId', userId); + const localVarPath = `/orgs/{orgId}/env-types/{envType}/users/{userId}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); + .replace(`{${"envType"}}`, encodeURIComponent(String(envType))) + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -19078,23 +20459,27 @@ const ValueApiAxiosParamCreator = function (configuration) { }; }, /** - * The returned values will be the \"base\" values for the Application. The overridden value for the Environment can be retrieved via the `/orgs/{orgId}/apps/{appId}/envs/{envId}/values` endpoint. - * @summary List Shared Values in an Application + * + * @summary Get the role of a User on an Environment Type * @param {string} orgId The Organization ID. - * @param {string} appId The Application ID. + * @param {string} envType The Environment Type. + * @param {string} userId The User ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValuesGet: async (orgId, appId, options = {}) => { + orgsOrgIdEnvTypesEnvTypeUsersUserIdGet: async (orgId, envType, userId, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesGet', 'orgId', orgId); - // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesGet', 'appId', appId); - const localVarPath = `/orgs/{orgId}/apps/{appId}/values` + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersUserIdGet', 'orgId', orgId); + // verify required parameter 'envType' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersUserIdGet', 'envType', envType); + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersUserIdGet', 'userId', userId); + const localVarPath = `/orgs/{orgId}/env-types/{envType}/users/{userId}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); + .replace(`{${"envType"}}`, encodeURIComponent(String(envType))) + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -19111,159 +20496,209 @@ const ValueApiAxiosParamCreator = function (configuration) { }; }, /** - * The specified Shared Value will be permanently deleted. If the Shared Value is marked as a secret, it will also be permanently deleted. - * @summary Delete Shared Value for an Application + * + * @summary Update the role of a User on an Environment Type * @param {string} orgId The Organization ID. - * @param {string} appId The Application ID. - * @param {string} key The key to update. + * @param {string} envType The Environment Type. + * @param {string} userId The User ID + * @param {RoleRequest} roleRequest The new user role * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValuesKeyDelete: async (orgId, appId, key, options = {}) => { + orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch: async (orgId, envType, userId, roleRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyDelete', 'orgId', orgId); - // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyDelete', 'appId', appId); - // verify required parameter 'key' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyDelete', 'key', key); - const localVarPath = `/orgs/{orgId}/apps/{appId}/values/{key}` + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch', 'orgId', orgId); + // verify required parameter 'envType' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch', 'envType', envType); + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch', 'userId', userId); + // verify required parameter 'roleRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch', 'roleRequest', roleRequest); + const localVarPath = `/orgs/{orgId}/env-types/{envType}/users/{userId}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) - .replace(`{${"key"}}`, encodeURIComponent(String(key))); + .replace(`{${"envType"}}`, encodeURIComponent(String(envType))) + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(roleRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** - * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. - * @summary Update Shared Value for an Application + * + * @summary Invites a user to an Organization with a specified role. * @param {string} orgId The Organization ID. - * @param {string} appId The Application ID. - * @param {string} key The key to update. - * @param {ValuePatchPayloadRequest} valuePatchPayloadRequest At least `value` or `description` must be supplied. All other fields will be ignored. + * @param {UserInviteRequestRequest} userInviteRequestRequest The email and the desired role * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValuesKeyPatch: async (orgId, appId, key, valuePatchPayloadRequest, options = {}) => { + orgsOrgIdInvitationsPost: async (orgId, userInviteRequestRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyPatch', 'orgId', orgId); - // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyPatch', 'appId', appId); - // verify required parameter 'key' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyPatch', 'key', key); - // verify required parameter 'valuePatchPayloadRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyPatch', 'valuePatchPayloadRequest', valuePatchPayloadRequest); - const localVarPath = `/orgs/{orgId}/apps/{appId}/values/{key}` - .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) - .replace(`{${"key"}}`, encodeURIComponent(String(key))); + (0, common_1.assertParamExists)('orgsOrgIdInvitationsPost', 'orgId', orgId); + // verify required parameter 'userInviteRequestRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdInvitationsPost', 'userInviteRequestRequest', userInviteRequestRequest); + const localVarPath = `/orgs/{orgId}/invitations` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valuePatchPayloadRequest, localVarRequestOptions, configuration); + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(userInviteRequestRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** - * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. - * @summary Update Shared Value for an Application + * + * @summary List Users with roles in an Organization * @param {string} orgId The Organization ID. - * @param {string} appId The Application ID. - * @param {string} key The key to update. - * @param {ValueEditPayloadRequest} valueEditPayloadRequest Both `value` and `description` must be supplied. All other fields will be ignored. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValuesKeyPut: async (orgId, appId, key, valueEditPayloadRequest, options = {}) => { + orgsOrgIdUsersGet: async (orgId, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyPut', 'orgId', orgId); - // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyPut', 'appId', appId); - // verify required parameter 'key' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyPut', 'key', key); - // verify required parameter 'valueEditPayloadRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyPut', 'valueEditPayloadRequest', valueEditPayloadRequest); - const localVarPath = `/orgs/{orgId}/apps/{appId}/values/{key}` + (0, common_1.assertParamExists)('orgsOrgIdUsersGet', 'orgId', orgId); + const localVarPath = `/orgs/{orgId}/users` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Remove the role of a User on an Organization + * @param {string} orgId The Organization ID. + * @param {string} userId The User ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdUsersUserIdDelete: async (orgId, userId, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdUsersUserIdDelete', 'orgId', orgId); + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdUsersUserIdDelete', 'userId', userId); + const localVarPath = `/orgs/{orgId}/users/{userId}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) - .replace(`{${"key"}}`, encodeURIComponent(String(key))); + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; - localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valueEditPayloadRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** - * The Shared Value created will be available to all Environments in that Application. If a Value is marked as a secret, it will be securely stored. It will not be possible to retrieve the value again through the API. The value of the secret can however be updated. - * @summary Create a Shared Value for an Application + * + * @summary Get the role of a User on an Organization * @param {string} orgId The Organization ID. - * @param {string} appId The Application ID. - * @param {ValueCreatePayloadRequest} valueCreatePayloadRequest Definition of the new Shared Value. + * @param {string} userId The User ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValuesPost: async (orgId, appId, valueCreatePayloadRequest, options = {}) => { + orgsOrgIdUsersUserIdGet: async (orgId, userId, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesPost', 'orgId', orgId); - // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesPost', 'appId', appId); - // verify required parameter 'valueCreatePayloadRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesPost', 'valueCreatePayloadRequest', valueCreatePayloadRequest); - const localVarPath = `/orgs/{orgId}/apps/{appId}/values` + (0, common_1.assertParamExists)('orgsOrgIdUsersUserIdGet', 'orgId', orgId); + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdUsersUserIdGet', 'userId', userId); + const localVarPath = `/orgs/{orgId}/users/{userId}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Update the role of a User on an Organization + * @param {string} orgId The Organization ID. + * @param {string} userId The User ID + * @param {RoleRequest} roleRequest The new user the role + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdUsersUserIdPatch: async (orgId, userId, roleRequest, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdUsersUserIdPatch', 'orgId', orgId); + // verify required parameter 'userId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdUsersUserIdPatch', 'userId', userId); + // verify required parameter 'roleRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdUsersUserIdPatch', 'roleRequest', roleRequest); + const localVarPath = `/orgs/{orgId}/users/{userId}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"userId"}}`, encodeURIComponent(String(userId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valueCreatePayloadRequest, localVarRequestOptions, configuration); + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(roleRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, @@ -19271,489 +20706,543 @@ const ValueApiAxiosParamCreator = function (configuration) { }, }; }; -exports.ValueApiAxiosParamCreator = ValueApiAxiosParamCreator; +exports.UserRoleApiAxiosParamCreator = UserRoleApiAxiosParamCreator; /** - * ValueApi - functional programming interface + * UserRoleApi - functional programming interface * @export */ -const ValueApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.ValueApiAxiosParamCreator)(configuration); +const UserRoleApiFp = function (configuration) { + const localVarAxiosParamCreator = (0, exports.UserRoleApiAxiosParamCreator)(configuration); return { /** - * All Shared Values will be deleted. If the Shared Values are marked as a secret, they will also be deleted. - * @summary Delete all Shared Value for an Environment + * + * @summary List Users with roles in an App * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. - * @param {string} envId The Environment ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdEnvsEnvIdValuesDelete(orgId, appId, envId, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValuesDelete(orgId, appId, envId, options); + async orgsOrgIdAppsAppIdUsersGet(orgId, appId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdUsersGet(orgId, appId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * The returned values will be the base Application values with the Environment overrides where applicable. The `source` field will specify the level from which the value is from. - * @summary List Shared Values in an Environment + * + * @summary Adds a User to an Application with a Role * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. - * @param {string} envId The Environment ID. + * @param {UserRoleRequest} userRoleRequest The user ID and the role * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdEnvsEnvIdValuesGet(orgId, appId, envId, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValuesGet(orgId, appId, envId, options); + async orgsOrgIdAppsAppIdUsersPost(orgId, appId, userRoleRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdUsersPost(orgId, appId, userRoleRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * The specified Shared Value will be permanently deleted. If the Shared Value is marked as a secret, it will also be permanently deleted. - * @summary Delete Shared Value for an Environment + * + * @summary Remove the role of a User on an Application * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. - * @param {string} envId The Environment ID. - * @param {string} key The key to update. + * @param {string} userId The User ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete(orgId, appId, envId, key, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete(orgId, appId, envId, key, options); + async orgsOrgIdAppsAppIdUsersUserIdDelete(orgId, appId, userId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdUsersUserIdDelete(orgId, appId, userId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. - * @summary Update Shared Value for an Environment + * + * @summary Get the role of a User on an Application * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. - * @param {string} envId The Environment ID. - * @param {string} key The key to update. - * @param {ValuePatchPayloadRequest} valuePatchPayloadRequest At least `value` or `description` must be supplied. All other fields will be ignored. + * @param {string} userId The User ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch(orgId, appId, envId, key, valuePatchPayloadRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch(orgId, appId, envId, key, valuePatchPayloadRequest, options); + async orgsOrgIdAppsAppIdUsersUserIdGet(orgId, appId, userId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdUsersUserIdGet(orgId, appId, userId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. - * @summary Update Shared Value for an Environment + * + * @summary Update the role of a User on an Application * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. - * @param {string} envId The Environment ID. - * @param {string} key The key to update. - * @param {ValueEditPayloadRequest} valueEditPayloadRequest Both `value` and `description` must be supplied. All other fields will be ignored. + * @param {string} userId The User ID + * @param {RoleRequest} roleRequest The new user role * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut(orgId, appId, envId, key, valueEditPayloadRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut(orgId, appId, envId, key, valueEditPayloadRequest, options); + async orgsOrgIdAppsAppIdUsersUserIdPatch(orgId, appId, userId, roleRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdUsersUserIdPatch(orgId, appId, userId, roleRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * The Shared Value created will only be available to the specific Environment. If a Value is marked as a secret, it will be securely stored. It will not be possible to retrieve the value again through the API. The value of the secret can however be updated. - * @summary Create a Shared Value for an Environment + * + * @summary Adds a User to an Environment Type with a Role * @param {string} orgId The Organization ID. - * @param {string} appId The Application ID. - * @param {string} envId The Environment ID. - * @param {ValueCreatePayloadRequest} valueCreatePayloadRequest Definition of the new Shared Value. + * @param {string} envType The Environment Type. + * @param {UserRoleRequest} userRoleRequest The user ID and the role * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdEnvsEnvIdValuesPost(orgId, appId, envId, valueCreatePayloadRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValuesPost(orgId, appId, envId, valueCreatePayloadRequest, options); + async orgsOrgIdEnvTypesEnvTypeUsersPost(orgId, envType, userRoleRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdEnvTypesEnvTypeUsersPost(orgId, envType, userRoleRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * All Shared Values will be deleted. If the Shared Values are marked as a secret, they will also be deleted. - * @summary Delete all Shared Value for an App + * + * @summary Remove the role of a User on an Environment Type * @param {string} orgId The Organization ID. - * @param {string} appId The Application ID. + * @param {string} envType The Environment Type. + * @param {string} userId The User ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdValuesDelete(orgId, appId, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValuesDelete(orgId, appId, options); + async orgsOrgIdEnvTypesEnvTypeUsersUserIdDelete(orgId, envType, userId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdEnvTypesEnvTypeUsersUserIdDelete(orgId, envType, userId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * The returned values will be the \"base\" values for the Application. The overridden value for the Environment can be retrieved via the `/orgs/{orgId}/apps/{appId}/envs/{envId}/values` endpoint. - * @summary List Shared Values in an Application + * + * @summary Get the role of a User on an Environment Type * @param {string} orgId The Organization ID. - * @param {string} appId The Application ID. + * @param {string} envType The Environment Type. + * @param {string} userId The User ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdValuesGet(orgId, appId, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValuesGet(orgId, appId, options); + async orgsOrgIdEnvTypesEnvTypeUsersUserIdGet(orgId, envType, userId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdEnvTypesEnvTypeUsersUserIdGet(orgId, envType, userId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * The specified Shared Value will be permanently deleted. If the Shared Value is marked as a secret, it will also be permanently deleted. - * @summary Delete Shared Value for an Application + * + * @summary Update the role of a User on an Environment Type * @param {string} orgId The Organization ID. - * @param {string} appId The Application ID. - * @param {string} key The key to update. + * @param {string} envType The Environment Type. + * @param {string} userId The User ID + * @param {RoleRequest} roleRequest The new user role * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdValuesKeyDelete(orgId, appId, key, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValuesKeyDelete(orgId, appId, key, options); + async orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch(orgId, envType, userId, roleRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch(orgId, envType, userId, roleRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. - * @summary Update Shared Value for an Application + * + * @summary Invites a user to an Organization with a specified role. * @param {string} orgId The Organization ID. - * @param {string} appId The Application ID. - * @param {string} key The key to update. - * @param {ValuePatchPayloadRequest} valuePatchPayloadRequest At least `value` or `description` must be supplied. All other fields will be ignored. + * @param {UserInviteRequestRequest} userInviteRequestRequest The email and the desired role * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdValuesKeyPatch(orgId, appId, key, valuePatchPayloadRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValuesKeyPatch(orgId, appId, key, valuePatchPayloadRequest, options); + async orgsOrgIdInvitationsPost(orgId, userInviteRequestRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdInvitationsPost(orgId, userInviteRequestRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. - * @summary Update Shared Value for an Application - * @param {string} orgId The Organization ID. - * @param {string} appId The Application ID. - * @param {string} key The key to update. - * @param {ValueEditPayloadRequest} valueEditPayloadRequest Both `value` and `description` must be supplied. All other fields will be ignored. + * + * @summary List Users with roles in an Organization + * @param {string} orgId The Organization ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdValuesKeyPut(orgId, appId, key, valueEditPayloadRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValuesKeyPut(orgId, appId, key, valueEditPayloadRequest, options); + async orgsOrgIdUsersGet(orgId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdUsersGet(orgId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * The Shared Value created will be available to all Environments in that Application. If a Value is marked as a secret, it will be securely stored. It will not be possible to retrieve the value again through the API. The value of the secret can however be updated. - * @summary Create a Shared Value for an Application + * + * @summary Remove the role of a User on an Organization * @param {string} orgId The Organization ID. - * @param {string} appId The Application ID. - * @param {ValueCreatePayloadRequest} valueCreatePayloadRequest Definition of the new Shared Value. + * @param {string} userId The User ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdValuesPost(orgId, appId, valueCreatePayloadRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValuesPost(orgId, appId, valueCreatePayloadRequest, options); + async orgsOrgIdUsersUserIdDelete(orgId, userId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdUsersUserIdDelete(orgId, userId, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + /** + * + * @summary Get the role of a User on an Organization + * @param {string} orgId The Organization ID. + * @param {string} userId The User ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdUsersUserIdGet(orgId, userId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdUsersUserIdGet(orgId, userId, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + /** + * + * @summary Update the role of a User on an Organization + * @param {string} orgId The Organization ID. + * @param {string} userId The User ID + * @param {RoleRequest} roleRequest The new user the role + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdUsersUserIdPatch(orgId, userId, roleRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdUsersUserIdPatch(orgId, userId, roleRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, }; }; -exports.ValueApiFp = ValueApiFp; +exports.UserRoleApiFp = UserRoleApiFp; /** - * ValueApi - factory interface + * UserRoleApi - factory interface * @export */ -const ValueApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.ValueApiFp)(configuration); +const UserRoleApiFactory = function (configuration, basePath, axios) { + const localVarFp = (0, exports.UserRoleApiFp)(configuration); return { /** - * All Shared Values will be deleted. If the Shared Values are marked as a secret, they will also be deleted. - * @summary Delete all Shared Value for an Environment - * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesDeleteRequest} requestParameters Request parameters. + * + * @summary List Users with roles in an App + * @param {UserRoleApiOrgsOrgIdAppsAppIdUsersGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValuesDelete(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValuesDelete(requestParameters.orgId, requestParameters.appId, requestParameters.envId, options).then((request) => request(axios, basePath)); + orgsOrgIdAppsAppIdUsersGet(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdUsersGet(requestParameters.orgId, requestParameters.appId, options).then((request) => request(axios, basePath)); }, /** - * The returned values will be the base Application values with the Environment overrides where applicable. The `source` field will specify the level from which the value is from. - * @summary List Shared Values in an Environment - * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesGetRequest} requestParameters Request parameters. + * + * @summary Adds a User to an Application with a Role + * @param {UserRoleApiOrgsOrgIdAppsAppIdUsersPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValuesGet(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValuesGet(requestParameters.orgId, requestParameters.appId, requestParameters.envId, options).then((request) => request(axios, basePath)); + orgsOrgIdAppsAppIdUsersPost(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdUsersPost(requestParameters.orgId, requestParameters.appId, requestParameters.userRoleRequest, options).then((request) => request(axios, basePath)); }, /** - * The specified Shared Value will be permanently deleted. If the Shared Value is marked as a secret, it will also be permanently deleted. - * @summary Delete Shared Value for an Environment - * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDeleteRequest} requestParameters Request parameters. + * + * @summary Remove the role of a User on an Application + * @param {UserRoleApiOrgsOrgIdAppsAppIdUsersUserIdDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.key, options).then((request) => request(axios, basePath)); + orgsOrgIdAppsAppIdUsersUserIdDelete(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdUsersUserIdDelete(requestParameters.orgId, requestParameters.appId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** - * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. - * @summary Update Shared Value for an Environment - * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatchRequest} requestParameters Request parameters. + * + * @summary Get the role of a User on an Application + * @param {UserRoleApiOrgsOrgIdAppsAppIdUsersUserIdGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.key, requestParameters.valuePatchPayloadRequest, options).then((request) => request(axios, basePath)); + orgsOrgIdAppsAppIdUsersUserIdGet(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdUsersUserIdGet(requestParameters.orgId, requestParameters.appId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** - * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. - * @summary Update Shared Value for an Environment - * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPutRequest} requestParameters Request parameters. + * + * @summary Update the role of a User on an Application + * @param {UserRoleApiOrgsOrgIdAppsAppIdUsersUserIdPatchRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.key, requestParameters.valueEditPayloadRequest, options).then((request) => request(axios, basePath)); + orgsOrgIdAppsAppIdUsersUserIdPatch(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdUsersUserIdPatch(requestParameters.orgId, requestParameters.appId, requestParameters.userId, requestParameters.roleRequest, options).then((request) => request(axios, basePath)); }, /** - * The Shared Value created will only be available to the specific Environment. If a Value is marked as a secret, it will be securely stored. It will not be possible to retrieve the value again through the API. The value of the secret can however be updated. - * @summary Create a Shared Value for an Environment - * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesPostRequest} requestParameters Request parameters. + * + * @summary Adds a User to an Environment Type with a Role + * @param {UserRoleApiOrgsOrgIdEnvTypesEnvTypeUsersPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValuesPost(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValuesPost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueCreatePayloadRequest, options).then((request) => request(axios, basePath)); + orgsOrgIdEnvTypesEnvTypeUsersPost(requestParameters, options) { + return localVarFp.orgsOrgIdEnvTypesEnvTypeUsersPost(requestParameters.orgId, requestParameters.envType, requestParameters.userRoleRequest, options).then((request) => request(axios, basePath)); }, /** - * All Shared Values will be deleted. If the Shared Values are marked as a secret, they will also be deleted. - * @summary Delete all Shared Value for an App - * @param {ValueApiOrgsOrgIdAppsAppIdValuesDeleteRequest} requestParameters Request parameters. + * + * @summary Remove the role of a User on an Environment Type + * @param {UserRoleApiOrgsOrgIdEnvTypesEnvTypeUsersUserIdDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValuesDelete(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdValuesDelete(requestParameters.orgId, requestParameters.appId, options).then((request) => request(axios, basePath)); + orgsOrgIdEnvTypesEnvTypeUsersUserIdDelete(requestParameters, options) { + return localVarFp.orgsOrgIdEnvTypesEnvTypeUsersUserIdDelete(requestParameters.orgId, requestParameters.envType, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** - * The returned values will be the \"base\" values for the Application. The overridden value for the Environment can be retrieved via the `/orgs/{orgId}/apps/{appId}/envs/{envId}/values` endpoint. - * @summary List Shared Values in an Application - * @param {ValueApiOrgsOrgIdAppsAppIdValuesGetRequest} requestParameters Request parameters. + * + * @summary Get the role of a User on an Environment Type + * @param {UserRoleApiOrgsOrgIdEnvTypesEnvTypeUsersUserIdGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValuesGet(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdValuesGet(requestParameters.orgId, requestParameters.appId, options).then((request) => request(axios, basePath)); + orgsOrgIdEnvTypesEnvTypeUsersUserIdGet(requestParameters, options) { + return localVarFp.orgsOrgIdEnvTypesEnvTypeUsersUserIdGet(requestParameters.orgId, requestParameters.envType, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** - * The specified Shared Value will be permanently deleted. If the Shared Value is marked as a secret, it will also be permanently deleted. - * @summary Delete Shared Value for an Application - * @param {ValueApiOrgsOrgIdAppsAppIdValuesKeyDeleteRequest} requestParameters Request parameters. + * + * @summary Update the role of a User on an Environment Type + * @param {UserRoleApiOrgsOrgIdEnvTypesEnvTypeUsersUserIdPatchRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValuesKeyDelete(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdValuesKeyDelete(requestParameters.orgId, requestParameters.appId, requestParameters.key, options).then((request) => request(axios, basePath)); + orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch(requestParameters, options) { + return localVarFp.orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch(requestParameters.orgId, requestParameters.envType, requestParameters.userId, requestParameters.roleRequest, options).then((request) => request(axios, basePath)); }, /** - * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. - * @summary Update Shared Value for an Application - * @param {ValueApiOrgsOrgIdAppsAppIdValuesKeyPatchRequest} requestParameters Request parameters. + * + * @summary Invites a user to an Organization with a specified role. + * @param {UserRoleApiOrgsOrgIdInvitationsPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValuesKeyPatch(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdValuesKeyPatch(requestParameters.orgId, requestParameters.appId, requestParameters.key, requestParameters.valuePatchPayloadRequest, options).then((request) => request(axios, basePath)); + orgsOrgIdInvitationsPost(requestParameters, options) { + return localVarFp.orgsOrgIdInvitationsPost(requestParameters.orgId, requestParameters.userInviteRequestRequest, options).then((request) => request(axios, basePath)); }, /** - * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. - * @summary Update Shared Value for an Application - * @param {ValueApiOrgsOrgIdAppsAppIdValuesKeyPutRequest} requestParameters Request parameters. + * + * @summary List Users with roles in an Organization + * @param {UserRoleApiOrgsOrgIdUsersGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValuesKeyPut(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdValuesKeyPut(requestParameters.orgId, requestParameters.appId, requestParameters.key, requestParameters.valueEditPayloadRequest, options).then((request) => request(axios, basePath)); + orgsOrgIdUsersGet(requestParameters, options) { + return localVarFp.orgsOrgIdUsersGet(requestParameters.orgId, options).then((request) => request(axios, basePath)); }, /** - * The Shared Value created will be available to all Environments in that Application. If a Value is marked as a secret, it will be securely stored. It will not be possible to retrieve the value again through the API. The value of the secret can however be updated. - * @summary Create a Shared Value for an Application - * @param {ValueApiOrgsOrgIdAppsAppIdValuesPostRequest} requestParameters Request parameters. + * + * @summary Remove the role of a User on an Organization + * @param {UserRoleApiOrgsOrgIdUsersUserIdDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValuesPost(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdValuesPost(requestParameters.orgId, requestParameters.appId, requestParameters.valueCreatePayloadRequest, options).then((request) => request(axios, basePath)); + orgsOrgIdUsersUserIdDelete(requestParameters, options) { + return localVarFp.orgsOrgIdUsersUserIdDelete(requestParameters.orgId, requestParameters.userId, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get the role of a User on an Organization + * @param {UserRoleApiOrgsOrgIdUsersUserIdGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdUsersUserIdGet(requestParameters, options) { + return localVarFp.orgsOrgIdUsersUserIdGet(requestParameters.orgId, requestParameters.userId, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Update the role of a User on an Organization + * @param {UserRoleApiOrgsOrgIdUsersUserIdPatchRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdUsersUserIdPatch(requestParameters, options) { + return localVarFp.orgsOrgIdUsersUserIdPatch(requestParameters.orgId, requestParameters.userId, requestParameters.roleRequest, options).then((request) => request(axios, basePath)); }, }; }; -exports.ValueApiFactory = ValueApiFactory; +exports.UserRoleApiFactory = UserRoleApiFactory; /** - * ValueApi - object-oriented interface + * UserRoleApi - object-oriented interface * @export - * @class ValueApi + * @class UserRoleApi * @extends {BaseAPI} */ -class ValueApi extends base_1.BaseAPI { +class UserRoleApi extends base_1.BaseAPI { /** - * All Shared Values will be deleted. If the Shared Values are marked as a secret, they will also be deleted. - * @summary Delete all Shared Value for an Environment - * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesDeleteRequest} requestParameters Request parameters. + * + * @summary List Users with roles in an App + * @param {UserRoleApiOrgsOrgIdAppsAppIdUsersGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueApi + * @memberof UserRoleApi */ - orgsOrgIdAppsAppIdEnvsEnvIdValuesDelete(requestParameters, options) { - return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValuesDelete(requestParameters.orgId, requestParameters.appId, requestParameters.envId, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdUsersGet(requestParameters, options) { + return (0, exports.UserRoleApiFp)(this.configuration).orgsOrgIdAppsAppIdUsersGet(requestParameters.orgId, requestParameters.appId, options).then((request) => request(this.axios, this.basePath)); } /** - * The returned values will be the base Application values with the Environment overrides where applicable. The `source` field will specify the level from which the value is from. - * @summary List Shared Values in an Environment - * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesGetRequest} requestParameters Request parameters. + * + * @summary Adds a User to an Application with a Role + * @param {UserRoleApiOrgsOrgIdAppsAppIdUsersPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueApi + * @memberof UserRoleApi */ - orgsOrgIdAppsAppIdEnvsEnvIdValuesGet(requestParameters, options) { - return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValuesGet(requestParameters.orgId, requestParameters.appId, requestParameters.envId, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdUsersPost(requestParameters, options) { + return (0, exports.UserRoleApiFp)(this.configuration).orgsOrgIdAppsAppIdUsersPost(requestParameters.orgId, requestParameters.appId, requestParameters.userRoleRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * The specified Shared Value will be permanently deleted. If the Shared Value is marked as a secret, it will also be permanently deleted. - * @summary Delete Shared Value for an Environment - * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDeleteRequest} requestParameters Request parameters. + * + * @summary Remove the role of a User on an Application + * @param {UserRoleApiOrgsOrgIdAppsAppIdUsersUserIdDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueApi + * @memberof UserRoleApi */ - orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete(requestParameters, options) { - return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdUsersUserIdDelete(requestParameters, options) { + return (0, exports.UserRoleApiFp)(this.configuration).orgsOrgIdAppsAppIdUsersUserIdDelete(requestParameters.orgId, requestParameters.appId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** - * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. - * @summary Update Shared Value for an Environment - * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatchRequest} requestParameters Request parameters. + * + * @summary Get the role of a User on an Application + * @param {UserRoleApiOrgsOrgIdAppsAppIdUsersUserIdGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueApi + * @memberof UserRoleApi */ - orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch(requestParameters, options) { - return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.key, requestParameters.valuePatchPayloadRequest, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdUsersUserIdGet(requestParameters, options) { + return (0, exports.UserRoleApiFp)(this.configuration).orgsOrgIdAppsAppIdUsersUserIdGet(requestParameters.orgId, requestParameters.appId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** - * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. - * @summary Update Shared Value for an Environment - * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPutRequest} requestParameters Request parameters. + * + * @summary Update the role of a User on an Application + * @param {UserRoleApiOrgsOrgIdAppsAppIdUsersUserIdPatchRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueApi + * @memberof UserRoleApi */ - orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut(requestParameters, options) { - return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.key, requestParameters.valueEditPayloadRequest, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdUsersUserIdPatch(requestParameters, options) { + return (0, exports.UserRoleApiFp)(this.configuration).orgsOrgIdAppsAppIdUsersUserIdPatch(requestParameters.orgId, requestParameters.appId, requestParameters.userId, requestParameters.roleRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * The Shared Value created will only be available to the specific Environment. If a Value is marked as a secret, it will be securely stored. It will not be possible to retrieve the value again through the API. The value of the secret can however be updated. - * @summary Create a Shared Value for an Environment - * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesPostRequest} requestParameters Request parameters. + * + * @summary Adds a User to an Environment Type with a Role + * @param {UserRoleApiOrgsOrgIdEnvTypesEnvTypeUsersPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueApi + * @memberof UserRoleApi */ - orgsOrgIdAppsAppIdEnvsEnvIdValuesPost(requestParameters, options) { - return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValuesPost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueCreatePayloadRequest, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdEnvTypesEnvTypeUsersPost(requestParameters, options) { + return (0, exports.UserRoleApiFp)(this.configuration).orgsOrgIdEnvTypesEnvTypeUsersPost(requestParameters.orgId, requestParameters.envType, requestParameters.userRoleRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * All Shared Values will be deleted. If the Shared Values are marked as a secret, they will also be deleted. - * @summary Delete all Shared Value for an App - * @param {ValueApiOrgsOrgIdAppsAppIdValuesDeleteRequest} requestParameters Request parameters. + * + * @summary Remove the role of a User on an Environment Type + * @param {UserRoleApiOrgsOrgIdEnvTypesEnvTypeUsersUserIdDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueApi + * @memberof UserRoleApi */ - orgsOrgIdAppsAppIdValuesDelete(requestParameters, options) { - return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdValuesDelete(requestParameters.orgId, requestParameters.appId, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdEnvTypesEnvTypeUsersUserIdDelete(requestParameters, options) { + return (0, exports.UserRoleApiFp)(this.configuration).orgsOrgIdEnvTypesEnvTypeUsersUserIdDelete(requestParameters.orgId, requestParameters.envType, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** - * The returned values will be the \"base\" values for the Application. The overridden value for the Environment can be retrieved via the `/orgs/{orgId}/apps/{appId}/envs/{envId}/values` endpoint. - * @summary List Shared Values in an Application - * @param {ValueApiOrgsOrgIdAppsAppIdValuesGetRequest} requestParameters Request parameters. + * + * @summary Get the role of a User on an Environment Type + * @param {UserRoleApiOrgsOrgIdEnvTypesEnvTypeUsersUserIdGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueApi + * @memberof UserRoleApi */ - orgsOrgIdAppsAppIdValuesGet(requestParameters, options) { - return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdValuesGet(requestParameters.orgId, requestParameters.appId, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdEnvTypesEnvTypeUsersUserIdGet(requestParameters, options) { + return (0, exports.UserRoleApiFp)(this.configuration).orgsOrgIdEnvTypesEnvTypeUsersUserIdGet(requestParameters.orgId, requestParameters.envType, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** - * The specified Shared Value will be permanently deleted. If the Shared Value is marked as a secret, it will also be permanently deleted. - * @summary Delete Shared Value for an Application - * @param {ValueApiOrgsOrgIdAppsAppIdValuesKeyDeleteRequest} requestParameters Request parameters. + * + * @summary Update the role of a User on an Environment Type + * @param {UserRoleApiOrgsOrgIdEnvTypesEnvTypeUsersUserIdPatchRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueApi + * @memberof UserRoleApi */ - orgsOrgIdAppsAppIdValuesKeyDelete(requestParameters, options) { - return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdValuesKeyDelete(requestParameters.orgId, requestParameters.appId, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch(requestParameters, options) { + return (0, exports.UserRoleApiFp)(this.configuration).orgsOrgIdEnvTypesEnvTypeUsersUserIdPatch(requestParameters.orgId, requestParameters.envType, requestParameters.userId, requestParameters.roleRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. - * @summary Update Shared Value for an Application - * @param {ValueApiOrgsOrgIdAppsAppIdValuesKeyPatchRequest} requestParameters Request parameters. + * + * @summary Invites a user to an Organization with a specified role. + * @param {UserRoleApiOrgsOrgIdInvitationsPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueApi + * @memberof UserRoleApi */ - orgsOrgIdAppsAppIdValuesKeyPatch(requestParameters, options) { - return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdValuesKeyPatch(requestParameters.orgId, requestParameters.appId, requestParameters.key, requestParameters.valuePatchPayloadRequest, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdInvitationsPost(requestParameters, options) { + return (0, exports.UserRoleApiFp)(this.configuration).orgsOrgIdInvitationsPost(requestParameters.orgId, requestParameters.userInviteRequestRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. - * @summary Update Shared Value for an Application - * @param {ValueApiOrgsOrgIdAppsAppIdValuesKeyPutRequest} requestParameters Request parameters. + * + * @summary List Users with roles in an Organization + * @param {UserRoleApiOrgsOrgIdUsersGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueApi + * @memberof UserRoleApi */ - orgsOrgIdAppsAppIdValuesKeyPut(requestParameters, options) { - return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdValuesKeyPut(requestParameters.orgId, requestParameters.appId, requestParameters.key, requestParameters.valueEditPayloadRequest, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdUsersGet(requestParameters, options) { + return (0, exports.UserRoleApiFp)(this.configuration).orgsOrgIdUsersGet(requestParameters.orgId, options).then((request) => request(this.axios, this.basePath)); } /** - * The Shared Value created will be available to all Environments in that Application. If a Value is marked as a secret, it will be securely stored. It will not be possible to retrieve the value again through the API. The value of the secret can however be updated. - * @summary Create a Shared Value for an Application - * @param {ValueApiOrgsOrgIdAppsAppIdValuesPostRequest} requestParameters Request parameters. + * + * @summary Remove the role of a User on an Organization + * @param {UserRoleApiOrgsOrgIdUsersUserIdDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueApi + * @memberof UserRoleApi */ - orgsOrgIdAppsAppIdValuesPost(requestParameters, options) { - return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdValuesPost(requestParameters.orgId, requestParameters.appId, requestParameters.valueCreatePayloadRequest, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdUsersUserIdDelete(requestParameters, options) { + return (0, exports.UserRoleApiFp)(this.configuration).orgsOrgIdUsersUserIdDelete(requestParameters.orgId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary Get the role of a User on an Organization + * @param {UserRoleApiOrgsOrgIdUsersUserIdGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserRoleApi + */ + orgsOrgIdUsersUserIdGet(requestParameters, options) { + return (0, exports.UserRoleApiFp)(this.configuration).orgsOrgIdUsersUserIdGet(requestParameters.orgId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary Update the role of a User on an Organization + * @param {UserRoleApiOrgsOrgIdUsersUserIdPatchRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserRoleApi + */ + orgsOrgIdUsersUserIdPatch(requestParameters, options) { + return (0, exports.UserRoleApiFp)(this.configuration).orgsOrgIdUsersUserIdPatch(requestParameters.orgId, requestParameters.userId, requestParameters.roleRequest, options).then((request) => request(this.axios, this.basePath)); } } -exports.ValueApi = ValueApi; +exports.UserRoleApi = UserRoleApi; /** - * ValueSetVersionApi - axios parameter creator + * ValueApi - axios parameter creator * @export */ -const ValueSetVersionApiAxiosParamCreator = function (configuration) { +const ValueApiAxiosParamCreator = function (configuration) { return { /** - * A new Value Set Version is created on every modification of a Value inside the an Environment of an App. In case this environment has no overrides the response is the same as the App level endpoint. - * @summary List Value Set Versions in an Environment of an App + * All Shared Values will be deleted. If the Shared Values are marked as a secret, they will also be deleted. + * @summary Delete all Shared Value for an Environment * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. * @param {string} envId The Environment ID. - * @param {string} [keyChanged] (Optional) Return only value set version where the specified key changed * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGet: async (orgId, appId, envId, keyChanged, options = {}) => { + orgsOrgIdAppsAppIdEnvsEnvIdValuesDelete: async (orgId, appId, envId, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGet', 'orgId', orgId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesDelete', 'orgId', orgId); // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGet', 'appId', appId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesDelete', 'appId', appId); // verify required parameter 'envId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGet', 'envId', envId); - const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/value-set-versions` + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesDelete', 'envId', envId); + const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/values` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; - if (keyChanged !== undefined) { - localVarQueryParameter['key_changed'] = keyChanged; - } (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; @@ -19763,31 +21252,27 @@ const ValueSetVersionApiAxiosParamCreator = function (configuration) { }; }, /** - * - * @summary Get a single Value Set Version in an Environment of an App + * The returned values will be the base Application values with the Environment overrides where applicable. The `source` field will specify the level from which the value is from. + * @summary List Shared Values in an Environment * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. * @param {string} envId The Environment ID. - * @param {string} valueSetVersionId The ValueSetVersion ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet: async (orgId, appId, envId, valueSetVersionId, options = {}) => { + orgsOrgIdAppsAppIdEnvsEnvIdValuesGet: async (orgId, appId, envId, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet', 'orgId', orgId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesGet', 'orgId', orgId); // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet', 'appId', appId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesGet', 'appId', appId); // verify required parameter 'envId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet', 'envId', envId); - // verify required parameter 'valueSetVersionId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet', 'valueSetVersionId', valueSetVersionId); - const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/value-set-versions/{valueSetVersionId}` + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesGet', 'envId', envId); + const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/values` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) - .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) - .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))); + .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -19804,215 +21289,203 @@ const ValueSetVersionApiAxiosParamCreator = function (configuration) { }; }, /** - * - * @summary Purge the value of a specific key Value Set Version in an Environment of an App + * The specified Shared Value will be permanently deleted. If the Shared Value is marked as a secret, it will also be permanently deleted. + * @summary Delete Shared Value for an Environment * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. * @param {string} envId The Environment ID. - * @param {string} valueSetVersionId The ValueSetVersion ID. - * @param {string} key Key of the value to be purged. - * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest + * @param {string} key The key to update. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost: async (orgId, appId, envId, valueSetVersionId, key, valueSetActionPayloadRequest, options = {}) => { + orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete: async (orgId, appId, envId, key, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'orgId', orgId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete', 'orgId', orgId); // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'appId', appId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete', 'appId', appId); // verify required parameter 'envId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'envId', envId); - // verify required parameter 'valueSetVersionId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'valueSetVersionId', valueSetVersionId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete', 'envId', envId); // verify required parameter 'key' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'key', key); - // verify required parameter 'valueSetActionPayloadRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'valueSetActionPayloadRequest', valueSetActionPayloadRequest); - const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/value-set-versions/{valueSetVersionId}/purge/{key}` + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete', 'key', key); + const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/values/{key}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) - .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))) .replace(`{${"key"}}`, encodeURIComponent(String(key))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; - localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valueSetActionPayloadRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** - * - * @summary Restore a specific key Value Set Version in an Environment of an App + * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. + * @summary Update Shared Value for an Environment * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. * @param {string} envId The Environment ID. - * @param {string} valueSetVersionId The ValueSetVersion ID. - * @param {string} key Key of the value to be restored. - * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest + * @param {string} key The key to update. + * @param {ValuePatchPayloadRequest} valuePatchPayloadRequest At least `value` or `description` must be supplied. All other fields will be ignored. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost: async (orgId, appId, envId, valueSetVersionId, key, valueSetActionPayloadRequest, options = {}) => { + orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch: async (orgId, appId, envId, key, valuePatchPayloadRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'orgId', orgId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch', 'orgId', orgId); // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'appId', appId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch', 'appId', appId); // verify required parameter 'envId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'envId', envId); - // verify required parameter 'valueSetVersionId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'valueSetVersionId', valueSetVersionId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch', 'envId', envId); // verify required parameter 'key' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'key', key); - // verify required parameter 'valueSetActionPayloadRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'valueSetActionPayloadRequest', valueSetActionPayloadRequest); - const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/value-set-versions/{valueSetVersionId}/restore/{key}` + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch', 'key', key); + // verify required parameter 'valuePatchPayloadRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch', 'valuePatchPayloadRequest', valuePatchPayloadRequest); + const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/values/{key}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) - .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))) .replace(`{${"key"}}`, encodeURIComponent(String(key))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valueSetActionPayloadRequest, localVarRequestOptions, configuration); + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valuePatchPayloadRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** - * - * @summary Restore a Value Set Version in an Environment of an App + * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. + * @summary Update Shared Value for an Environment * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. * @param {string} envId The Environment ID. - * @param {string} valueSetVersionId The ValueSetVersion ID. - * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest + * @param {string} key The key to update. + * @param {ValueEditPayloadRequest} valueEditPayloadRequest Both `value` and `description` must be supplied. All other fields will be ignored. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost: async (orgId, appId, envId, valueSetVersionId, valueSetActionPayloadRequest, options = {}) => { + orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut: async (orgId, appId, envId, key, valueEditPayloadRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost', 'orgId', orgId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut', 'orgId', orgId); // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost', 'appId', appId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut', 'appId', appId); // verify required parameter 'envId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost', 'envId', envId); - // verify required parameter 'valueSetVersionId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost', 'valueSetVersionId', valueSetVersionId); - // verify required parameter 'valueSetActionPayloadRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost', 'valueSetActionPayloadRequest', valueSetActionPayloadRequest); - const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/value-set-versions/{valueSetVersionId}/restore` + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut', 'envId', envId); + // verify required parameter 'key' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut', 'key', key); + // verify required parameter 'valueEditPayloadRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut', 'valueEditPayloadRequest', valueEditPayloadRequest); + const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/values/{key}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) - .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))); + .replace(`{${"key"}}`, encodeURIComponent(String(key))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valueSetActionPayloadRequest, localVarRequestOptions, configuration); + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valueEditPayloadRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** - * A new Value Set Version is created on every modification of a Value inside the app. - * @summary List Value Set Versions in the App + * The Shared Value created will only be available to the specific Environment. If a Value is marked as a secret, it will be securely stored. It will not be possible to retrieve the value again through the API. The value of the secret can however be updated. + * @summary Create a Shared Value for an Environment * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. - * @param {string} [keyChanged] (Optional) Return only value set version where the specified key changed + * @param {string} envId The Environment ID. + * @param {ValueCreatePayloadRequest} valueCreatePayloadRequest Definition of the new Shared Value. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValueSetVersionsGet: async (orgId, appId, keyChanged, options = {}) => { + orgsOrgIdAppsAppIdEnvsEnvIdValuesPost: async (orgId, appId, envId, valueCreatePayloadRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsGet', 'orgId', orgId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesPost', 'orgId', orgId); // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsGet', 'appId', appId); - const localVarPath = `/orgs/{orgId}/apps/{appId}/value-set-versions` + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesPost', 'appId', appId); + // verify required parameter 'envId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesPost', 'envId', envId); + // verify required parameter 'valueCreatePayloadRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValuesPost', 'valueCreatePayloadRequest', valueCreatePayloadRequest); + const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/values` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) + .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; - if (keyChanged !== undefined) { - localVarQueryParameter['key_changed'] = keyChanged; - } + localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valueCreatePayloadRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** - * - * @summary Get a single Value Set Version from the App + * All Shared Values will be deleted. If the Shared Values are marked as a secret, they will also be deleted. + * @summary Delete all Shared Value for an App * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. - * @param {string} valueSetVersionId The ValueSetVersion ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet: async (orgId, appId, valueSetVersionId, options = {}) => { + orgsOrgIdAppsAppIdValuesDelete: async (orgId, appId, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet', 'orgId', orgId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesDelete', 'orgId', orgId); // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet', 'appId', appId); - // verify required parameter 'valueSetVersionId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet', 'valueSetVersionId', valueSetVersionId); - const localVarPath = `/orgs/{orgId}/apps/{appId}/value-set-versions/{valueSetVersionId}` + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesDelete', 'appId', appId); + const localVarPath = `/orgs/{orgId}/apps/{appId}/values` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) - .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))); + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); @@ -20024,122 +21497,180 @@ const ValueSetVersionApiAxiosParamCreator = function (configuration) { }; }, /** - * - * @summary Purge the value of a specific key Value Set Version in an App + * The returned values will be the \"base\" values for the Application. The overridden value for the Environment can be retrieved via the `/orgs/{orgId}/apps/{appId}/envs/{envId}/values` endpoint. + * @summary List Shared Values in an Application * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. - * @param {string} valueSetVersionId The ValueSetVersion ID. - * @param {string} key Key of the value to be purged. - * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost: async (orgId, appId, valueSetVersionId, key, valueSetActionPayloadRequest, options = {}) => { + orgsOrgIdAppsAppIdValuesGet: async (orgId, appId, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'orgId', orgId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesGet', 'orgId', orgId); // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'appId', appId); - // verify required parameter 'valueSetVersionId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'valueSetVersionId', valueSetVersionId); - // verify required parameter 'key' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'key', key); - // verify required parameter 'valueSetActionPayloadRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'valueSetActionPayloadRequest', valueSetActionPayloadRequest); - const localVarPath = `/orgs/{orgId}/apps/{appId}/value-set-versions/{valueSetVersionId}/purge/{key}` + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesGet', 'appId', appId); + const localVarPath = `/orgs/{orgId}/apps/{appId}/values` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) - .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))) - .replace(`{${"key"}}`, encodeURIComponent(String(key))); + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; - localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valueSetActionPayloadRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** - * - * @summary Restore a specific key Value Set Version in an App + * The specified Shared Value will be permanently deleted. If the Shared Value is marked as a secret, it will also be permanently deleted. + * @summary Delete Shared Value for an Application * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. - * @param {string} valueSetVersionId The ValueSetVersion ID. - * @param {string} key Key of the value to be restored. - * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest + * @param {string} key The key to update. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost: async (orgId, appId, valueSetVersionId, key, valueSetActionPayloadRequest, options = {}) => { + orgsOrgIdAppsAppIdValuesKeyDelete: async (orgId, appId, key, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'orgId', orgId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyDelete', 'orgId', orgId); // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'appId', appId); - // verify required parameter 'valueSetVersionId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'valueSetVersionId', valueSetVersionId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyDelete', 'appId', appId); // verify required parameter 'key' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'key', key); - // verify required parameter 'valueSetActionPayloadRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'valueSetActionPayloadRequest', valueSetActionPayloadRequest); - const localVarPath = `/orgs/{orgId}/apps/{appId}/value-set-versions/{valueSetVersionId}/restore/{key}` + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyDelete', 'key', key); + const localVarPath = `/orgs/{orgId}/apps/{appId}/values/{key}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) - .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))) .replace(`{${"key"}}`, encodeURIComponent(String(key))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. + * @summary Update Shared Value for an Application + * @param {string} orgId The Organization ID. + * @param {string} appId The Application ID. + * @param {string} key The key to update. + * @param {ValuePatchPayloadRequest} valuePatchPayloadRequest At least `value` or `description` must be supplied. All other fields will be ignored. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdValuesKeyPatch: async (orgId, appId, key, valuePatchPayloadRequest, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyPatch', 'orgId', orgId); + // verify required parameter 'appId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyPatch', 'appId', appId); + // verify required parameter 'key' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyPatch', 'key', key); + // verify required parameter 'valuePatchPayloadRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyPatch', 'valuePatchPayloadRequest', valuePatchPayloadRequest); + const localVarPath = `/orgs/{orgId}/apps/{appId}/values/{key}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) + .replace(`{${"key"}}`, encodeURIComponent(String(key))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valueSetActionPayloadRequest, localVarRequestOptions, configuration); + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valuePatchPayloadRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** - * - * @summary Restore a Value Set Version in an App + * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. + * @summary Update Shared Value for an Application * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. - * @param {string} valueSetVersionId The ValueSetVersion ID. - * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest + * @param {string} key The key to update. + * @param {ValueEditPayloadRequest} valueEditPayloadRequest Both `value` and `description` must be supplied. All other fields will be ignored. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost: async (orgId, appId, valueSetVersionId, valueSetActionPayloadRequest, options = {}) => { + orgsOrgIdAppsAppIdValuesKeyPut: async (orgId, appId, key, valueEditPayloadRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost', 'orgId', orgId); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyPut', 'orgId', orgId); // verify required parameter 'appId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost', 'appId', appId); - // verify required parameter 'valueSetVersionId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost', 'valueSetVersionId', valueSetVersionId); - // verify required parameter 'valueSetActionPayloadRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost', 'valueSetActionPayloadRequest', valueSetActionPayloadRequest); - const localVarPath = `/orgs/{orgId}/apps/{appId}/value-set-versions/{valueSetVersionId}/restore` + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyPut', 'appId', appId); + // verify required parameter 'key' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyPut', 'key', key); + // verify required parameter 'valueEditPayloadRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesKeyPut', 'valueEditPayloadRequest', valueEditPayloadRequest); + const localVarPath = `/orgs/{orgId}/apps/{appId}/values/{key}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) - .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))); + .replace(`{${"key"}}`, encodeURIComponent(String(key))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valueEditPayloadRequest, localVarRequestOptions, configuration); + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * The Shared Value created will be available to all Environments in that Application. If a Value is marked as a secret, it will be securely stored. It will not be possible to retrieve the value again through the API. The value of the secret can however be updated. + * @summary Create a Shared Value for an Application + * @param {string} orgId The Organization ID. + * @param {string} appId The Application ID. + * @param {ValueCreatePayloadRequest} valueCreatePayloadRequest Definition of the new Shared Value. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdValuesPost: async (orgId, appId, valueCreatePayloadRequest, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesPost', 'orgId', orgId); + // verify required parameter 'appId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesPost', 'appId', appId); + // verify required parameter 'valueCreatePayloadRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValuesPost', 'valueCreatePayloadRequest', valueCreatePayloadRequest); + const localVarPath = `/orgs/{orgId}/apps/{appId}/values` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -20151,7 +21682,7 @@ const ValueSetVersionApiAxiosParamCreator = function (configuration) { (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valueSetActionPayloadRequest, localVarRequestOptions, configuration); + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valueCreatePayloadRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, @@ -20159,411 +21690,479 @@ const ValueSetVersionApiAxiosParamCreator = function (configuration) { }, }; }; -exports.ValueSetVersionApiAxiosParamCreator = ValueSetVersionApiAxiosParamCreator; +exports.ValueApiAxiosParamCreator = ValueApiAxiosParamCreator; /** - * ValueSetVersionApi - functional programming interface + * ValueApi - functional programming interface * @export */ -const ValueSetVersionApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.ValueSetVersionApiAxiosParamCreator)(configuration); +const ValueApiFp = function (configuration) { + const localVarAxiosParamCreator = (0, exports.ValueApiAxiosParamCreator)(configuration); return { /** - * A new Value Set Version is created on every modification of a Value inside the an Environment of an App. In case this environment has no overrides the response is the same as the App level endpoint. - * @summary List Value Set Versions in an Environment of an App + * All Shared Values will be deleted. If the Shared Values are marked as a secret, they will also be deleted. + * @summary Delete all Shared Value for an Environment * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. * @param {string} envId The Environment ID. - * @param {string} [keyChanged] (Optional) Return only value set version where the specified key changed * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGet(orgId, appId, envId, keyChanged, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGet(orgId, appId, envId, keyChanged, options); + async orgsOrgIdAppsAppIdEnvsEnvIdValuesDelete(orgId, appId, envId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValuesDelete(orgId, appId, envId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * - * @summary Get a single Value Set Version in an Environment of an App + * The returned values will be the base Application values with the Environment overrides where applicable. The `source` field will specify the level from which the value is from. + * @summary List Shared Values in an Environment * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. * @param {string} envId The Environment ID. - * @param {string} valueSetVersionId The ValueSetVersion ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet(orgId, appId, envId, valueSetVersionId, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet(orgId, appId, envId, valueSetVersionId, options); + async orgsOrgIdAppsAppIdEnvsEnvIdValuesGet(orgId, appId, envId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValuesGet(orgId, appId, envId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * - * @summary Purge the value of a specific key Value Set Version in an Environment of an App + * The specified Shared Value will be permanently deleted. If the Shared Value is marked as a secret, it will also be permanently deleted. + * @summary Delete Shared Value for an Environment * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. * @param {string} envId The Environment ID. - * @param {string} valueSetVersionId The ValueSetVersion ID. - * @param {string} key Key of the value to be purged. - * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest + * @param {string} key The key to update. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost(orgId, appId, envId, valueSetVersionId, key, valueSetActionPayloadRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost(orgId, appId, envId, valueSetVersionId, key, valueSetActionPayloadRequest, options); + async orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete(orgId, appId, envId, key, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete(orgId, appId, envId, key, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * - * @summary Restore a specific key Value Set Version in an Environment of an App + * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. + * @summary Update Shared Value for an Environment * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. * @param {string} envId The Environment ID. - * @param {string} valueSetVersionId The ValueSetVersion ID. - * @param {string} key Key of the value to be restored. - * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest + * @param {string} key The key to update. + * @param {ValuePatchPayloadRequest} valuePatchPayloadRequest At least `value` or `description` must be supplied. All other fields will be ignored. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost(orgId, appId, envId, valueSetVersionId, key, valueSetActionPayloadRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost(orgId, appId, envId, valueSetVersionId, key, valueSetActionPayloadRequest, options); + async orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch(orgId, appId, envId, key, valuePatchPayloadRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch(orgId, appId, envId, key, valuePatchPayloadRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * - * @summary Restore a Value Set Version in an Environment of an App + * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. + * @summary Update Shared Value for an Environment * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. * @param {string} envId The Environment ID. - * @param {string} valueSetVersionId The ValueSetVersion ID. - * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest + * @param {string} key The key to update. + * @param {ValueEditPayloadRequest} valueEditPayloadRequest Both `value` and `description` must be supplied. All other fields will be ignored. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost(orgId, appId, envId, valueSetVersionId, valueSetActionPayloadRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost(orgId, appId, envId, valueSetVersionId, valueSetActionPayloadRequest, options); + async orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut(orgId, appId, envId, key, valueEditPayloadRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut(orgId, appId, envId, key, valueEditPayloadRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * A new Value Set Version is created on every modification of a Value inside the app. - * @summary List Value Set Versions in the App + * The Shared Value created will only be available to the specific Environment. If a Value is marked as a secret, it will be securely stored. It will not be possible to retrieve the value again through the API. The value of the secret can however be updated. + * @summary Create a Shared Value for an Environment * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. - * @param {string} [keyChanged] (Optional) Return only value set version where the specified key changed + * @param {string} envId The Environment ID. + * @param {ValueCreatePayloadRequest} valueCreatePayloadRequest Definition of the new Shared Value. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdValueSetVersionsGet(orgId, appId, keyChanged, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValueSetVersionsGet(orgId, appId, keyChanged, options); + async orgsOrgIdAppsAppIdEnvsEnvIdValuesPost(orgId, appId, envId, valueCreatePayloadRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValuesPost(orgId, appId, envId, valueCreatePayloadRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * - * @summary Get a single Value Set Version from the App + * All Shared Values will be deleted. If the Shared Values are marked as a secret, they will also be deleted. + * @summary Delete all Shared Value for an App * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. - * @param {string} valueSetVersionId The ValueSetVersion ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet(orgId, appId, valueSetVersionId, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet(orgId, appId, valueSetVersionId, options); + async orgsOrgIdAppsAppIdValuesDelete(orgId, appId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValuesDelete(orgId, appId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * - * @summary Purge the value of a specific key Value Set Version in an App + * The returned values will be the \"base\" values for the Application. The overridden value for the Environment can be retrieved via the `/orgs/{orgId}/apps/{appId}/envs/{envId}/values` endpoint. + * @summary List Shared Values in an Application * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. - * @param {string} valueSetVersionId The ValueSetVersion ID. - * @param {string} key Key of the value to be purged. - * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost(orgId, appId, valueSetVersionId, key, valueSetActionPayloadRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost(orgId, appId, valueSetVersionId, key, valueSetActionPayloadRequest, options); + async orgsOrgIdAppsAppIdValuesGet(orgId, appId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValuesGet(orgId, appId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * - * @summary Restore a specific key Value Set Version in an App + * The specified Shared Value will be permanently deleted. If the Shared Value is marked as a secret, it will also be permanently deleted. + * @summary Delete Shared Value for an Application * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. - * @param {string} valueSetVersionId The ValueSetVersion ID. - * @param {string} key Key of the value to be restored. - * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest + * @param {string} key The key to update. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost(orgId, appId, valueSetVersionId, key, valueSetActionPayloadRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost(orgId, appId, valueSetVersionId, key, valueSetActionPayloadRequest, options); + async orgsOrgIdAppsAppIdValuesKeyDelete(orgId, appId, key, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValuesKeyDelete(orgId, appId, key, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * - * @summary Restore a Value Set Version in an App + * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. + * @summary Update Shared Value for an Application * @param {string} orgId The Organization ID. * @param {string} appId The Application ID. - * @param {string} valueSetVersionId The ValueSetVersion ID. - * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest + * @param {string} key The key to update. + * @param {ValuePatchPayloadRequest} valuePatchPayloadRequest At least `value` or `description` must be supplied. All other fields will be ignored. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost(orgId, appId, valueSetVersionId, valueSetActionPayloadRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost(orgId, appId, valueSetVersionId, valueSetActionPayloadRequest, options); + async orgsOrgIdAppsAppIdValuesKeyPatch(orgId, appId, key, valuePatchPayloadRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValuesKeyPatch(orgId, appId, key, valuePatchPayloadRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, - }; -}; -exports.ValueSetVersionApiFp = ValueSetVersionApiFp; -/** - * ValueSetVersionApi - factory interface - * @export - */ -const ValueSetVersionApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.ValueSetVersionApiFp)(configuration); - return { /** - * A new Value Set Version is created on every modification of a Value inside the an Environment of an App. In case this environment has no overrides the response is the same as the App level endpoint. - * @summary List Value Set Versions in an Environment of an App - * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGetRequest} requestParameters Request parameters. + * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. + * @summary Update Shared Value for an Application + * @param {string} orgId The Organization ID. + * @param {string} appId The Application ID. + * @param {string} key The key to update. + * @param {ValueEditPayloadRequest} valueEditPayloadRequest Both `value` and `description` must be supplied. All other fields will be ignored. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGet(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGet(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.keyChanged, options).then((request) => request(axios, basePath)); - }, + async orgsOrgIdAppsAppIdValuesKeyPut(orgId, appId, key, valueEditPayloadRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValuesKeyPut(orgId, appId, key, valueEditPayloadRequest, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, /** - * - * @summary Get a single Value Set Version in an Environment of an App - * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGetRequest} requestParameters Request parameters. + * The Shared Value created will be available to all Environments in that Application. If a Value is marked as a secret, it will be securely stored. It will not be possible to retrieve the value again through the API. The value of the secret can however be updated. + * @summary Create a Shared Value for an Application + * @param {string} orgId The Organization ID. + * @param {string} appId The Application ID. + * @param {ValueCreatePayloadRequest} valueCreatePayloadRequest Definition of the new Shared Value. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, options).then((request) => request(axios, basePath)); + async orgsOrgIdAppsAppIdValuesPost(orgId, appId, valueCreatePayloadRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValuesPost(orgId, appId, valueCreatePayloadRequest, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, + }; +}; +exports.ValueApiFp = ValueApiFp; +/** + * ValueApi - factory interface + * @export + */ +const ValueApiFactory = function (configuration, basePath, axios) { + const localVarFp = (0, exports.ValueApiFp)(configuration); + return { /** - * - * @summary Purge the value of a specific key Value Set Version in an Environment of an App - * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPostRequest} requestParameters Request parameters. + * All Shared Values will be deleted. If the Shared Values are marked as a secret, they will also be deleted. + * @summary Delete all Shared Value for an Environment + * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(axios, basePath)); + orgsOrgIdAppsAppIdEnvsEnvIdValuesDelete(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValuesDelete(requestParameters.orgId, requestParameters.appId, requestParameters.envId, options).then((request) => request(axios, basePath)); }, /** - * - * @summary Restore a specific key Value Set Version in an Environment of an App - * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPostRequest} requestParameters Request parameters. + * The returned values will be the base Application values with the Environment overrides where applicable. The `source` field will specify the level from which the value is from. + * @summary List Shared Values in an Environment + * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(axios, basePath)); + orgsOrgIdAppsAppIdEnvsEnvIdValuesGet(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValuesGet(requestParameters.orgId, requestParameters.appId, requestParameters.envId, options).then((request) => request(axios, basePath)); }, /** - * - * @summary Restore a Value Set Version in an Environment of an App - * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePostRequest} requestParameters Request parameters. + * The specified Shared Value will be permanently deleted. If the Shared Value is marked as a secret, it will also be permanently deleted. + * @summary Delete Shared Value for an Environment + * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(axios, basePath)); + orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.key, options).then((request) => request(axios, basePath)); }, /** - * A new Value Set Version is created on every modification of a Value inside the app. - * @summary List Value Set Versions in the App - * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdValueSetVersionsGetRequest} requestParameters Request parameters. + * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. + * @summary Update Shared Value for an Environment + * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatchRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValueSetVersionsGet(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdValueSetVersionsGet(requestParameters.orgId, requestParameters.appId, requestParameters.keyChanged, options).then((request) => request(axios, basePath)); + orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.key, requestParameters.valuePatchPayloadRequest, options).then((request) => request(axios, basePath)); }, /** - * - * @summary Get a single Value Set Version from the App - * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGetRequest} requestParameters Request parameters. + * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. + * @summary Update Shared Value for an Environment + * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPutRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, options).then((request) => request(axios, basePath)); + orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.key, requestParameters.valueEditPayloadRequest, options).then((request) => request(axios, basePath)); }, /** - * - * @summary Purge the value of a specific key Value Set Version in an App - * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPostRequest} requestParameters Request parameters. + * The Shared Value created will only be available to the specific Environment. If a Value is marked as a secret, it will be securely stored. It will not be possible to retrieve the value again through the API. The value of the secret can however be updated. + * @summary Create a Shared Value for an Environment + * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(axios, basePath)); + orgsOrgIdAppsAppIdEnvsEnvIdValuesPost(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValuesPost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueCreatePayloadRequest, options).then((request) => request(axios, basePath)); }, /** - * - * @summary Restore a specific key Value Set Version in an App - * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPostRequest} requestParameters Request parameters. + * All Shared Values will be deleted. If the Shared Values are marked as a secret, they will also be deleted. + * @summary Delete all Shared Value for an App + * @param {ValueApiOrgsOrgIdAppsAppIdValuesDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(axios, basePath)); + orgsOrgIdAppsAppIdValuesDelete(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdValuesDelete(requestParameters.orgId, requestParameters.appId, options).then((request) => request(axios, basePath)); }, /** - * - * @summary Restore a Value Set Version in an App - * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePostRequest} requestParameters Request parameters. + * The returned values will be the \"base\" values for the Application. The overridden value for the Environment can be retrieved via the `/orgs/{orgId}/apps/{appId}/envs/{envId}/values` endpoint. + * @summary List Shared Values in an Application + * @param {ValueApiOrgsOrgIdAppsAppIdValuesGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost(requestParameters, options) { - return localVarFp.orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(axios, basePath)); + orgsOrgIdAppsAppIdValuesGet(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdValuesGet(requestParameters.orgId, requestParameters.appId, options).then((request) => request(axios, basePath)); + }, + /** + * The specified Shared Value will be permanently deleted. If the Shared Value is marked as a secret, it will also be permanently deleted. + * @summary Delete Shared Value for an Application + * @param {ValueApiOrgsOrgIdAppsAppIdValuesKeyDeleteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdValuesKeyDelete(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdValuesKeyDelete(requestParameters.orgId, requestParameters.appId, requestParameters.key, options).then((request) => request(axios, basePath)); + }, + /** + * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. + * @summary Update Shared Value for an Application + * @param {ValueApiOrgsOrgIdAppsAppIdValuesKeyPatchRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdValuesKeyPatch(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdValuesKeyPatch(requestParameters.orgId, requestParameters.appId, requestParameters.key, requestParameters.valuePatchPayloadRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. + * @summary Update Shared Value for an Application + * @param {ValueApiOrgsOrgIdAppsAppIdValuesKeyPutRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdValuesKeyPut(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdValuesKeyPut(requestParameters.orgId, requestParameters.appId, requestParameters.key, requestParameters.valueEditPayloadRequest, options).then((request) => request(axios, basePath)); + }, + /** + * The Shared Value created will be available to all Environments in that Application. If a Value is marked as a secret, it will be securely stored. It will not be possible to retrieve the value again through the API. The value of the secret can however be updated. + * @summary Create a Shared Value for an Application + * @param {ValueApiOrgsOrgIdAppsAppIdValuesPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdValuesPost(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdValuesPost(requestParameters.orgId, requestParameters.appId, requestParameters.valueCreatePayloadRequest, options).then((request) => request(axios, basePath)); }, }; }; -exports.ValueSetVersionApiFactory = ValueSetVersionApiFactory; +exports.ValueApiFactory = ValueApiFactory; /** - * ValueSetVersionApi - object-oriented interface + * ValueApi - object-oriented interface * @export - * @class ValueSetVersionApi + * @class ValueApi * @extends {BaseAPI} */ -class ValueSetVersionApi extends base_1.BaseAPI { +class ValueApi extends base_1.BaseAPI { /** - * A new Value Set Version is created on every modification of a Value inside the an Environment of an App. In case this environment has no overrides the response is the same as the App level endpoint. - * @summary List Value Set Versions in an Environment of an App - * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGetRequest} requestParameters Request parameters. + * All Shared Values will be deleted. If the Shared Values are marked as a secret, they will also be deleted. + * @summary Delete all Shared Value for an Environment + * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueSetVersionApi + * @memberof ValueApi */ - orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGet(requestParameters, options) { - return (0, exports.ValueSetVersionApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGet(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.keyChanged, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdEnvsEnvIdValuesDelete(requestParameters, options) { + return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValuesDelete(requestParameters.orgId, requestParameters.appId, requestParameters.envId, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Get a single Value Set Version in an Environment of an App - * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGetRequest} requestParameters Request parameters. + * The returned values will be the base Application values with the Environment overrides where applicable. The `source` field will specify the level from which the value is from. + * @summary List Shared Values in an Environment + * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueSetVersionApi + * @memberof ValueApi */ - orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet(requestParameters, options) { - return (0, exports.ValueSetVersionApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdEnvsEnvIdValuesGet(requestParameters, options) { + return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValuesGet(requestParameters.orgId, requestParameters.appId, requestParameters.envId, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Purge the value of a specific key Value Set Version in an Environment of an App - * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPostRequest} requestParameters Request parameters. + * The specified Shared Value will be permanently deleted. If the Shared Value is marked as a secret, it will also be permanently deleted. + * @summary Delete Shared Value for an Environment + * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueSetVersionApi + * @memberof ValueApi */ - orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost(requestParameters, options) { - return (0, exports.ValueSetVersionApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete(requestParameters, options) { + return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyDelete(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Restore a specific key Value Set Version in an Environment of an App - * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPostRequest} requestParameters Request parameters. + * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. + * @summary Update Shared Value for an Environment + * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatchRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueSetVersionApi + * @memberof ValueApi */ - orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost(requestParameters, options) { - return (0, exports.ValueSetVersionApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch(requestParameters, options) { + return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPatch(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.key, requestParameters.valuePatchPayloadRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Restore a Value Set Version in an Environment of an App - * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePostRequest} requestParameters Request parameters. + * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. + * @summary Update Shared Value for an Environment + * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPutRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueSetVersionApi + * @memberof ValueApi */ - orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost(requestParameters, options) { - return (0, exports.ValueSetVersionApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut(requestParameters, options) { + return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValuesKeyPut(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.key, requestParameters.valueEditPayloadRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * A new Value Set Version is created on every modification of a Value inside the app. - * @summary List Value Set Versions in the App - * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdValueSetVersionsGetRequest} requestParameters Request parameters. + * The Shared Value created will only be available to the specific Environment. If a Value is marked as a secret, it will be securely stored. It will not be possible to retrieve the value again through the API. The value of the secret can however be updated. + * @summary Create a Shared Value for an Environment + * @param {ValueApiOrgsOrgIdAppsAppIdEnvsEnvIdValuesPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueSetVersionApi + * @memberof ValueApi */ - orgsOrgIdAppsAppIdValueSetVersionsGet(requestParameters, options) { - return (0, exports.ValueSetVersionApiFp)(this.configuration).orgsOrgIdAppsAppIdValueSetVersionsGet(requestParameters.orgId, requestParameters.appId, requestParameters.keyChanged, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdEnvsEnvIdValuesPost(requestParameters, options) { + return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValuesPost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueCreatePayloadRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Get a single Value Set Version from the App - * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGetRequest} requestParameters Request parameters. + * All Shared Values will be deleted. If the Shared Values are marked as a secret, they will also be deleted. + * @summary Delete all Shared Value for an App + * @param {ValueApiOrgsOrgIdAppsAppIdValuesDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueSetVersionApi + * @memberof ValueApi */ - orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet(requestParameters, options) { - return (0, exports.ValueSetVersionApiFp)(this.configuration).orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdValuesDelete(requestParameters, options) { + return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdValuesDelete(requestParameters.orgId, requestParameters.appId, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Purge the value of a specific key Value Set Version in an App - * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPostRequest} requestParameters Request parameters. + * The returned values will be the \"base\" values for the Application. The overridden value for the Environment can be retrieved via the `/orgs/{orgId}/apps/{appId}/envs/{envId}/values` endpoint. + * @summary List Shared Values in an Application + * @param {ValueApiOrgsOrgIdAppsAppIdValuesGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueSetVersionApi + * @memberof ValueApi */ - orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost(requestParameters, options) { - return (0, exports.ValueSetVersionApiFp)(this.configuration).orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdValuesGet(requestParameters, options) { + return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdValuesGet(requestParameters.orgId, requestParameters.appId, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Restore a specific key Value Set Version in an App - * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPostRequest} requestParameters Request parameters. + * The specified Shared Value will be permanently deleted. If the Shared Value is marked as a secret, it will also be permanently deleted. + * @summary Delete Shared Value for an Application + * @param {ValueApiOrgsOrgIdAppsAppIdValuesKeyDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueSetVersionApi + * @memberof ValueApi */ - orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost(requestParameters, options) { - return (0, exports.ValueSetVersionApiFp)(this.configuration).orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdValuesKeyDelete(requestParameters, options) { + return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdValuesKeyDelete(requestParameters.orgId, requestParameters.appId, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Restore a Value Set Version in an App - * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePostRequest} requestParameters Request parameters. + * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. + * @summary Update Shared Value for an Application + * @param {ValueApiOrgsOrgIdAppsAppIdValuesKeyPatchRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ValueSetVersionApi + * @memberof ValueApi */ - orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost(requestParameters, options) { - return (0, exports.ValueSetVersionApiFp)(this.configuration).orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdValuesKeyPatch(requestParameters, options) { + return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdValuesKeyPatch(requestParameters.orgId, requestParameters.appId, requestParameters.key, requestParameters.valuePatchPayloadRequest, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Update the value or description of the Shared Value. Shared Values marked as secret can also be updated. + * @summary Update Shared Value for an Application + * @param {ValueApiOrgsOrgIdAppsAppIdValuesKeyPutRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ValueApi + */ + orgsOrgIdAppsAppIdValuesKeyPut(requestParameters, options) { + return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdValuesKeyPut(requestParameters.orgId, requestParameters.appId, requestParameters.key, requestParameters.valueEditPayloadRequest, options).then((request) => request(this.axios, this.basePath)); + } + /** + * The Shared Value created will be available to all Environments in that Application. If a Value is marked as a secret, it will be securely stored. It will not be possible to retrieve the value again through the API. The value of the secret can however be updated. + * @summary Create a Shared Value for an Application + * @param {ValueApiOrgsOrgIdAppsAppIdValuesPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ValueApi + */ + orgsOrgIdAppsAppIdValuesPost(requestParameters, options) { + return (0, exports.ValueApiFp)(this.configuration).orgsOrgIdAppsAppIdValuesPost(requestParameters.orgId, requestParameters.appId, requestParameters.valueCreatePayloadRequest, options).then((request) => request(this.axios, this.basePath)); } } -exports.ValueSetVersionApi = ValueSetVersionApi; +exports.ValueApi = ValueApi; /** - * WorkloadProfileApi - axios parameter creator + * ValueSetVersionApi - axios parameter creator * @export */ -const WorkloadProfileApiAxiosParamCreator = function (configuration) { +const ValueSetVersionApiAxiosParamCreator = function (configuration) { return { /** - * - * @summary List workload profiles available to the organization. + * A new Value Set Version is created on every modification of a Value inside the an Environment of an App. In case this environment has no overrides the response is the same as the App level endpoint. + * @summary List Value Set Versions in an Environment of an App * @param {string} orgId The Organization ID. + * @param {string} appId The Application ID. + * @param {string} envId The Environment ID. + * @param {string} [keyChanged] (Optional) Return only value set version where the specified key changed * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesGet: async (orgId, options = {}) => { + orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGet: async (orgId, appId, envId, keyChanged, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesGet', 'orgId', orgId); - const localVarPath = `/orgs/{orgId}/workload-profiles` - .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGet', 'orgId', orgId); + // verify required parameter 'appId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGet', 'appId', appId); + // verify required parameter 'envId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGet', 'envId', envId); + const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/value-set-versions` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) + .replace(`{${"envId"}}`, encodeURIComponent(String(envId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -20571,6 +22170,9 @@ const WorkloadProfileApiAxiosParamCreator = function (configuration) { const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; + if (keyChanged !== undefined) { + localVarQueryParameter['key_changed'] = keyChanged; + } (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; @@ -20581,91 +22183,128 @@ const WorkloadProfileApiAxiosParamCreator = function (configuration) { }, /** * - * @summary Create new Workload Profile + * @summary Get a single Value Set Version in an Environment of an App * @param {string} orgId The Organization ID. - * @param {WorkloadProfileRequest} workloadProfileRequest Workload profile details. + * @param {string} appId The Application ID. + * @param {string} envId The Environment ID. + * @param {string} valueSetVersionId The ValueSetVersion ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesPost: async (orgId, workloadProfileRequest, options = {}) => { + orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet: async (orgId, appId, envId, valueSetVersionId, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesPost', 'orgId', orgId); - // verify required parameter 'workloadProfileRequest' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesPost', 'workloadProfileRequest', workloadProfileRequest); - const localVarPath = `/orgs/{orgId}/workload-profiles` - .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet', 'orgId', orgId); + // verify required parameter 'appId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet', 'appId', appId); + // verify required parameter 'envId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet', 'envId', envId); + // verify required parameter 'valueSetVersionId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet', 'valueSetVersionId', valueSetVersionId); + const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/value-set-versions/{valueSetVersionId}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) + .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) + .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; - localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(workloadProfileRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** - * This will also delete all versions of a workload profile. It is not possible to delete profiles of other organizations. - * @summary Delete a Workload Profile + * Purging permanently removes the value of a specific Shared Value in an application. A purged value is no longer accessible, can\'t be restored and can\'t be used by deployments referencing a Value Set Version where the value was present. Learn more about purging in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#purge). + * @summary Purge the value of a specific Shared Value from the App Environment Version history. * @param {string} orgId The Organization ID. - * @param {string} profileId The Workload profile ID. + * @param {string} appId The Application ID. + * @param {string} envId The Environment ID. + * @param {string} valueSetVersionId The ValueSetVersion ID. + * @param {string} key Key of the value to be purged. + * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesProfileIdDelete: async (orgId, profileId, options = {}) => { + orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost: async (orgId, appId, envId, valueSetVersionId, key, valueSetActionPayloadRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileIdDelete', 'orgId', orgId); - // verify required parameter 'profileId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileIdDelete', 'profileId', profileId); - const localVarPath = `/orgs/{orgId}/workload-profiles/{profileId}` + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'orgId', orgId); + // verify required parameter 'appId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'appId', appId); + // verify required parameter 'envId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'envId', envId); + // verify required parameter 'valueSetVersionId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'valueSetVersionId', valueSetVersionId); + // verify required parameter 'key' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'key', key); + // verify required parameter 'valueSetActionPayloadRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'valueSetActionPayloadRequest', valueSetActionPayloadRequest); + const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/value-set-versions/{valueSetVersionId}/purge/{key}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"profileId"}}`, encodeURIComponent(String(profileId))); + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) + .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) + .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))) + .replace(`{${"key"}}`, encodeURIComponent(String(key))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valueSetActionPayloadRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** - * Creates a Workload Profile Version from the uploaded Helm chart. The version is retrieved from the chart\'s metadata (Charts.yaml file). The request has content type `multipart/form-data` and the request body includes two parts: 1. `file` with `application/x-gzip` content type which is an archive containing a Helm chart. 2. `metadata` with `application/json` content type which defines the version\'s metadata. Request body example: Content-Type: multipart/form-data; boundary=----boundary ----boundary Content-Disposition: form-data; name=\"metadata\" Content-Type: application/json; charset=UTF-8 { \"features\": { \"humanitec/service\": {}, \"humanitec/volumes\": {}, \"custom\": {\"schema\": {}} }, \"notes\": \"Notes related to this version of the profile\" } ----boundary Content-Disposition: form-data; name=\"file\"; filename=\"my-workload-1.0.1.tgz\" Content-Type: application/x-gzip [TGZ_DATA] ----boundary **NOTE:** A Workload Profile must be created before a version can be added to it. - * @summary Add new Version of the Workload Profile + * Restore the values of a single Shared Value in an Environment from a specific version. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a specific key from the Value Set Version in an Environment of an App * @param {string} orgId The Organization ID. - * @param {string} profileId The Workload Profile ID. - * @param {WorkloadProfileVersionRequest} [metadata] - * @param {File} [file] + * @param {string} appId The Application ID. + * @param {string} envId The Environment ID. + * @param {string} valueSetVersionId The ValueSetVersion ID. + * @param {string} key Key of the value to be restored. + * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesProfileIdVersionsPost: async (orgId, profileId, metadata, file, options = {}) => { + orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost: async (orgId, appId, envId, valueSetVersionId, key, valueSetActionPayloadRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileIdVersionsPost', 'orgId', orgId); - // verify required parameter 'profileId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileIdVersionsPost', 'profileId', profileId); - const localVarPath = `/orgs/{orgId}/workload-profiles/{profileId}/versions` + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'orgId', orgId); + // verify required parameter 'appId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'appId', appId); + // verify required parameter 'envId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'envId', envId); + // verify required parameter 'valueSetVersionId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'valueSetVersionId', valueSetVersionId); + // verify required parameter 'key' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'key', key); + // verify required parameter 'valueSetActionPayloadRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'valueSetActionPayloadRequest', valueSetActionPayloadRequest); + const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/value-set-versions/{valueSetVersionId}/restore/{key}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"profileId"}}`, encodeURIComponent(String(profileId))); + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) + .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) + .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))) + .replace(`{${"key"}}`, encodeURIComponent(String(key))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -20673,78 +22312,81 @@ const WorkloadProfileApiAxiosParamCreator = function (configuration) { const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; - const localVarFormParams = new ((configuration && configuration.formDataCtor) || base_1.FormData)(); - if (metadata !== undefined) { - localVarFormParams.append('metadata', new Blob([JSON.stringify(metadata)], { type: "application/json", })); - } - if (file !== undefined) { - localVarFormParams.append('file', file); - } - localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; + localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; - localVarRequestOptions.data = localVarFormParams; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valueSetActionPayloadRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** - * - * @summary Delete a Workload Profile Version + * Restore the values of all Shared Values in an environment from a specific version. Keys not existing in the selected version are deleted. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a Value Set Version in an Environment of an App * @param {string} orgId The Organization ID. - * @param {string} profileId The Workload profile ID. - * @param {string} version The Version. + * @param {string} appId The Application ID. + * @param {string} envId The Environment ID. + * @param {string} valueSetVersionId The ValueSetVersion ID. + * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete: async (orgId, profileId, version, options = {}) => { + orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost: async (orgId, appId, envId, valueSetVersionId, valueSetActionPayloadRequest, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete', 'orgId', orgId); - // verify required parameter 'profileId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete', 'profileId', profileId); - // verify required parameter 'version' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete', 'version', version); - const localVarPath = `/orgs/{orgId}/workload-profiles/{profileId}/versions/{version}` + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost', 'orgId', orgId); + // verify required parameter 'appId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost', 'appId', appId); + // verify required parameter 'envId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost', 'envId', envId); + // verify required parameter 'valueSetVersionId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost', 'valueSetVersionId', valueSetVersionId); + // verify required parameter 'valueSetActionPayloadRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost', 'valueSetActionPayloadRequest', valueSetActionPayloadRequest); + const localVarPath = `/orgs/{orgId}/apps/{appId}/envs/{envId}/value-set-versions/{valueSetVersionId}/restore` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"profileId"}}`, encodeURIComponent(String(profileId))) - .replace(`{${"version"}}`, encodeURIComponent(String(version))); + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) + .replace(`{${"envId"}}`, encodeURIComponent(String(envId))) + .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valueSetActionPayloadRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** - * - * @summary Get a Workload Profile + * A new Value Set Version is created on every modification of a Value inside the app. + * @summary List Value Set Versions in the App * @param {string} orgId The Organization ID. - * @param {string} profileQid The fully qualified Workload ID. (If not a profile from the current org, must be prefixed with `{orgId}.` e.g. `humanitec.default-cronjob`) + * @param {string} appId The Application ID. + * @param {string} [keyChanged] (Optional) Return only value set version where the specified key changed * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesProfileQidGet: async (orgId, profileQid, options = {}) => { + orgsOrgIdAppsAppIdValueSetVersionsGet: async (orgId, appId, keyChanged, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileQidGet', 'orgId', orgId); - // verify required parameter 'profileQid' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileQidGet', 'profileQid', profileQid); - const localVarPath = `/orgs/{orgId}/workload-profiles/{profileQid}` + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsGet', 'orgId', orgId); + // verify required parameter 'appId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsGet', 'appId', appId); + const localVarPath = `/orgs/{orgId}/apps/{appId}/value-set-versions` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"profileQid"}}`, encodeURIComponent(String(profileQid))); + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -20752,6 +22394,9 @@ const WorkloadProfileApiAxiosParamCreator = function (configuration) { const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; + if (keyChanged !== undefined) { + localVarQueryParameter['key_changed'] = keyChanged; + } (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; @@ -20762,23 +22407,26 @@ const WorkloadProfileApiAxiosParamCreator = function (configuration) { }, /** * - * @summary List versions of the given workload profile with optional constraint. + * @summary Get a single Value Set Version from the App * @param {string} orgId The Organization ID. - * @param {string} profileQid The Workload profile qualified ID. - * @param {string} [version] Optional query parameter, defines version constraint pattern (https://github.com/Masterminds/semver#checking-version-constraints). + * @param {string} appId The Application ID. + * @param {string} valueSetVersionId The ValueSetVersion ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesProfileQidVersionsGet: async (orgId, profileQid, version, options = {}) => { + orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet: async (orgId, appId, valueSetVersionId, options = {}) => { // verify required parameter 'orgId' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileQidVersionsGet', 'orgId', orgId); - // verify required parameter 'profileQid' is not null or undefined - (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileQidVersionsGet', 'profileQid', profileQid); - const localVarPath = `/orgs/{orgId}/workload-profiles/{profileQid}/versions` + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet', 'orgId', orgId); + // verify required parameter 'appId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet', 'appId', appId); + // verify required parameter 'valueSetVersionId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet', 'valueSetVersionId', valueSetVersionId); + const localVarPath = `/orgs/{orgId}/apps/{appId}/value-set-versions/{valueSetVersionId}` .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) - .replace(`{${"profileQid"}}`, encodeURIComponent(String(profileQid))); + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) + .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; @@ -20786,9 +22434,6 @@ const WorkloadProfileApiAxiosParamCreator = function (configuration) { const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; - if (version !== undefined) { - localVarQueryParameter['version'] = version; - } (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; @@ -20797,314 +22442,1154 @@ const WorkloadProfileApiAxiosParamCreator = function (configuration) { options: localVarRequestOptions, }; }, - }; -}; -exports.WorkloadProfileApiAxiosParamCreator = WorkloadProfileApiAxiosParamCreator; -/** - * WorkloadProfileApi - functional programming interface - * @export - */ -const WorkloadProfileApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.WorkloadProfileApiAxiosParamCreator)(configuration); - return { /** - * - * @summary List workload profiles available to the organization. + * Purging permanently removes the value of a specific Shared Value in an Application. A purged value is no longer accessible, can\'t be restored and can\'t be used by deployments referencing a Value Set Version where the value was present. Learn more about purging in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#purge). + * @summary Purge the value of a specific Shared Value from the App Version history. * @param {string} orgId The Organization ID. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async orgsOrgIdWorkloadProfilesGet(orgId, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesGet(orgId, options); - return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + * @param {string} appId The Application ID. + * @param {string} valueSetVersionId The ValueSetVersion ID. + * @param {string} key Key of the value to be purged. + * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost: async (orgId, appId, valueSetVersionId, key, valueSetActionPayloadRequest, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'orgId', orgId); + // verify required parameter 'appId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'appId', appId); + // verify required parameter 'valueSetVersionId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'valueSetVersionId', valueSetVersionId); + // verify required parameter 'key' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'key', key); + // verify required parameter 'valueSetActionPayloadRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost', 'valueSetActionPayloadRequest', valueSetActionPayloadRequest); + const localVarPath = `/orgs/{orgId}/apps/{appId}/value-set-versions/{valueSetVersionId}/purge/{key}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) + .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))) + .replace(`{${"key"}}`, encodeURIComponent(String(key))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valueSetActionPayloadRequest, localVarRequestOptions, configuration); + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * - * @summary Create new Workload Profile + * Restore the values of a single Shared Value in an application from a specific version. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a specific key from the Value Set Version in an App * @param {string} orgId The Organization ID. - * @param {WorkloadProfileRequest} workloadProfileRequest Workload profile details. + * @param {string} appId The Application ID. + * @param {string} valueSetVersionId The ValueSetVersion ID. + * @param {string} key Key of the value to be restored. + * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdWorkloadProfilesPost(orgId, workloadProfileRequest, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesPost(orgId, workloadProfileRequest, options); - return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost: async (orgId, appId, valueSetVersionId, key, valueSetActionPayloadRequest, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'orgId', orgId); + // verify required parameter 'appId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'appId', appId); + // verify required parameter 'valueSetVersionId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'valueSetVersionId', valueSetVersionId); + // verify required parameter 'key' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'key', key); + // verify required parameter 'valueSetActionPayloadRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost', 'valueSetActionPayloadRequest', valueSetActionPayloadRequest); + const localVarPath = `/orgs/{orgId}/apps/{appId}/value-set-versions/{valueSetVersionId}/restore/{key}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) + .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))) + .replace(`{${"key"}}`, encodeURIComponent(String(key))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valueSetActionPayloadRequest, localVarRequestOptions, configuration); + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * This will also delete all versions of a workload profile. It is not possible to delete profiles of other organizations. - * @summary Delete a Workload Profile + * Restore the values of all Shared Values in an application from a specific version. Keys not existing in the selected version are deleted. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a Value Set Version in an App * @param {string} orgId The Organization ID. - * @param {string} profileId The Workload profile ID. + * @param {string} appId The Application ID. + * @param {string} valueSetVersionId The ValueSetVersion ID. + * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdWorkloadProfilesProfileIdDelete(orgId, profileId, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesProfileIdDelete(orgId, profileId, options); - return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost: async (orgId, appId, valueSetVersionId, valueSetActionPayloadRequest, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost', 'orgId', orgId); + // verify required parameter 'appId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost', 'appId', appId); + // verify required parameter 'valueSetVersionId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost', 'valueSetVersionId', valueSetVersionId); + // verify required parameter 'valueSetActionPayloadRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost', 'valueSetActionPayloadRequest', valueSetActionPayloadRequest); + const localVarPath = `/orgs/{orgId}/apps/{appId}/value-set-versions/{valueSetVersionId}/restore` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"appId"}}`, encodeURIComponent(String(appId))) + .replace(`{${"valueSetVersionId"}}`, encodeURIComponent(String(valueSetVersionId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(valueSetActionPayloadRequest, localVarRequestOptions, configuration); + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; }, + }; +}; +exports.ValueSetVersionApiAxiosParamCreator = ValueSetVersionApiAxiosParamCreator; +/** + * ValueSetVersionApi - functional programming interface + * @export + */ +const ValueSetVersionApiFp = function (configuration) { + const localVarAxiosParamCreator = (0, exports.ValueSetVersionApiAxiosParamCreator)(configuration); + return { /** - * Creates a Workload Profile Version from the uploaded Helm chart. The version is retrieved from the chart\'s metadata (Charts.yaml file). The request has content type `multipart/form-data` and the request body includes two parts: 1. `file` with `application/x-gzip` content type which is an archive containing a Helm chart. 2. `metadata` with `application/json` content type which defines the version\'s metadata. Request body example: Content-Type: multipart/form-data; boundary=----boundary ----boundary Content-Disposition: form-data; name=\"metadata\" Content-Type: application/json; charset=UTF-8 { \"features\": { \"humanitec/service\": {}, \"humanitec/volumes\": {}, \"custom\": {\"schema\": {}} }, \"notes\": \"Notes related to this version of the profile\" } ----boundary Content-Disposition: form-data; name=\"file\"; filename=\"my-workload-1.0.1.tgz\" Content-Type: application/x-gzip [TGZ_DATA] ----boundary **NOTE:** A Workload Profile must be created before a version can be added to it. - * @summary Add new Version of the Workload Profile + * A new Value Set Version is created on every modification of a Value inside the an Environment of an App. In case this environment has no overrides the response is the same as the App level endpoint. + * @summary List Value Set Versions in an Environment of an App * @param {string} orgId The Organization ID. - * @param {string} profileId The Workload Profile ID. - * @param {WorkloadProfileVersionRequest} [metadata] - * @param {File} [file] + * @param {string} appId The Application ID. + * @param {string} envId The Environment ID. + * @param {string} [keyChanged] (Optional) Return only value set version where the specified key changed * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdWorkloadProfilesProfileIdVersionsPost(orgId, profileId, metadata, file, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesProfileIdVersionsPost(orgId, profileId, metadata, file, options); + async orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGet(orgId, appId, envId, keyChanged, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGet(orgId, appId, envId, keyChanged, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * - * @summary Delete a Workload Profile Version + * @summary Get a single Value Set Version in an Environment of an App * @param {string} orgId The Organization ID. - * @param {string} profileId The Workload profile ID. - * @param {string} version The Version. + * @param {string} appId The Application ID. + * @param {string} envId The Environment ID. + * @param {string} valueSetVersionId The ValueSetVersion ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete(orgId, profileId, version, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete(orgId, profileId, version, options); + async orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet(orgId, appId, envId, valueSetVersionId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet(orgId, appId, envId, valueSetVersionId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * - * @summary Get a Workload Profile + * Purging permanently removes the value of a specific Shared Value in an application. A purged value is no longer accessible, can\'t be restored and can\'t be used by deployments referencing a Value Set Version where the value was present. Learn more about purging in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#purge). + * @summary Purge the value of a specific Shared Value from the App Environment Version history. * @param {string} orgId The Organization ID. - * @param {string} profileQid The fully qualified Workload ID. (If not a profile from the current org, must be prefixed with `{orgId}.` e.g. `humanitec.default-cronjob`) + * @param {string} appId The Application ID. + * @param {string} envId The Environment ID. + * @param {string} valueSetVersionId The ValueSetVersion ID. + * @param {string} key Key of the value to be purged. + * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdWorkloadProfilesProfileQidGet(orgId, profileQid, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesProfileQidGet(orgId, profileQid, options); + async orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost(orgId, appId, envId, valueSetVersionId, key, valueSetActionPayloadRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost(orgId, appId, envId, valueSetVersionId, key, valueSetActionPayloadRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * - * @summary List versions of the given workload profile with optional constraint. + * Restore the values of a single Shared Value in an Environment from a specific version. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a specific key from the Value Set Version in an Environment of an App * @param {string} orgId The Organization ID. - * @param {string} profileQid The Workload profile qualified ID. - * @param {string} [version] Optional query parameter, defines version constraint pattern (https://github.com/Masterminds/semver#checking-version-constraints). + * @param {string} appId The Application ID. + * @param {string} envId The Environment ID. + * @param {string} valueSetVersionId The ValueSetVersion ID. + * @param {string} key Key of the value to be restored. + * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async orgsOrgIdWorkloadProfilesProfileQidVersionsGet(orgId, profileQid, version, options) { - const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesProfileQidVersionsGet(orgId, profileQid, version, options); + async orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost(orgId, appId, envId, valueSetVersionId, key, valueSetActionPayloadRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost(orgId, appId, envId, valueSetVersionId, key, valueSetActionPayloadRequest, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, - }; -}; -exports.WorkloadProfileApiFp = WorkloadProfileApiFp; -/** - * WorkloadProfileApi - factory interface - * @export - */ -const WorkloadProfileApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.WorkloadProfileApiFp)(configuration); - return { /** - * - * @summary List workload profiles available to the organization. - * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesGetRequest} requestParameters Request parameters. + * Restore the values of all Shared Values in an environment from a specific version. Keys not existing in the selected version are deleted. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a Value Set Version in an Environment of an App + * @param {string} orgId The Organization ID. + * @param {string} appId The Application ID. + * @param {string} envId The Environment ID. + * @param {string} valueSetVersionId The ValueSetVersion ID. + * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesGet(requestParameters, options) { - return localVarFp.orgsOrgIdWorkloadProfilesGet(requestParameters.orgId, options).then((request) => request(axios, basePath)); + async orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost(orgId, appId, envId, valueSetVersionId, valueSetActionPayloadRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost(orgId, appId, envId, valueSetVersionId, valueSetActionPayloadRequest, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * - * @summary Create new Workload Profile - * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesPostRequest} requestParameters Request parameters. + * A new Value Set Version is created on every modification of a Value inside the app. + * @summary List Value Set Versions in the App + * @param {string} orgId The Organization ID. + * @param {string} appId The Application ID. + * @param {string} [keyChanged] (Optional) Return only value set version where the specified key changed * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesPost(requestParameters, options) { - return localVarFp.orgsOrgIdWorkloadProfilesPost(requestParameters.orgId, requestParameters.workloadProfileRequest, options).then((request) => request(axios, basePath)); + async orgsOrgIdAppsAppIdValueSetVersionsGet(orgId, appId, keyChanged, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValueSetVersionsGet(orgId, appId, keyChanged, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * This will also delete all versions of a workload profile. It is not possible to delete profiles of other organizations. - * @summary Delete a Workload Profile - * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesProfileIdDeleteRequest} requestParameters Request parameters. + * + * @summary Get a single Value Set Version from the App + * @param {string} orgId The Organization ID. + * @param {string} appId The Application ID. + * @param {string} valueSetVersionId The ValueSetVersion ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesProfileIdDelete(requestParameters, options) { - return localVarFp.orgsOrgIdWorkloadProfilesProfileIdDelete(requestParameters.orgId, requestParameters.profileId, options).then((request) => request(axios, basePath)); + async orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet(orgId, appId, valueSetVersionId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet(orgId, appId, valueSetVersionId, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * Creates a Workload Profile Version from the uploaded Helm chart. The version is retrieved from the chart\'s metadata (Charts.yaml file). The request has content type `multipart/form-data` and the request body includes two parts: 1. `file` with `application/x-gzip` content type which is an archive containing a Helm chart. 2. `metadata` with `application/json` content type which defines the version\'s metadata. Request body example: Content-Type: multipart/form-data; boundary=----boundary ----boundary Content-Disposition: form-data; name=\"metadata\" Content-Type: application/json; charset=UTF-8 { \"features\": { \"humanitec/service\": {}, \"humanitec/volumes\": {}, \"custom\": {\"schema\": {}} }, \"notes\": \"Notes related to this version of the profile\" } ----boundary Content-Disposition: form-data; name=\"file\"; filename=\"my-workload-1.0.1.tgz\" Content-Type: application/x-gzip [TGZ_DATA] ----boundary **NOTE:** A Workload Profile must be created before a version can be added to it. - * @summary Add new Version of the Workload Profile - * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesProfileIdVersionsPostRequest} requestParameters Request parameters. + * Purging permanently removes the value of a specific Shared Value in an Application. A purged value is no longer accessible, can\'t be restored and can\'t be used by deployments referencing a Value Set Version where the value was present. Learn more about purging in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#purge). + * @summary Purge the value of a specific Shared Value from the App Version history. + * @param {string} orgId The Organization ID. + * @param {string} appId The Application ID. + * @param {string} valueSetVersionId The ValueSetVersion ID. + * @param {string} key Key of the value to be purged. + * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesProfileIdVersionsPost(requestParameters, options) { - return localVarFp.orgsOrgIdWorkloadProfilesProfileIdVersionsPost(requestParameters.orgId, requestParameters.profileId, requestParameters.metadata, requestParameters.file, options).then((request) => request(axios, basePath)); + async orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost(orgId, appId, valueSetVersionId, key, valueSetActionPayloadRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost(orgId, appId, valueSetVersionId, key, valueSetActionPayloadRequest, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * - * @summary Delete a Workload Profile Version - * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesProfileIdVersionsVersionDeleteRequest} requestParameters Request parameters. + * Restore the values of a single Shared Value in an application from a specific version. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a specific key from the Value Set Version in an App + * @param {string} orgId The Organization ID. + * @param {string} appId The Application ID. + * @param {string} valueSetVersionId The ValueSetVersion ID. + * @param {string} key Key of the value to be restored. + * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete(requestParameters, options) { - return localVarFp.orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete(requestParameters.orgId, requestParameters.profileId, requestParameters.version, options).then((request) => request(axios, basePath)); + async orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost(orgId, appId, valueSetVersionId, key, valueSetActionPayloadRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost(orgId, appId, valueSetVersionId, key, valueSetActionPayloadRequest, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** - * - * @summary Get a Workload Profile - * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesProfileQidGetRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} + * Restore the values of all Shared Values in an application from a specific version. Keys not existing in the selected version are deleted. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a Value Set Version in an App + * @param {string} orgId The Organization ID. + * @param {string} appId The Application ID. + * @param {string} valueSetVersionId The ValueSetVersion ID. + * @param {ValueSetActionPayloadRequest} valueSetActionPayloadRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesProfileQidGet(requestParameters, options) { - return localVarFp.orgsOrgIdWorkloadProfilesProfileQidGet(requestParameters.orgId, requestParameters.profileQid, options).then((request) => request(axios, basePath)); + async orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost(orgId, appId, valueSetVersionId, valueSetActionPayloadRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost(orgId, appId, valueSetVersionId, valueSetActionPayloadRequest, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + }; +}; +exports.ValueSetVersionApiFp = ValueSetVersionApiFp; +/** + * ValueSetVersionApi - factory interface + * @export + */ +const ValueSetVersionApiFactory = function (configuration, basePath, axios) { + const localVarFp = (0, exports.ValueSetVersionApiFp)(configuration); + return { + /** + * A new Value Set Version is created on every modification of a Value inside the an Environment of an App. In case this environment has no overrides the response is the same as the App level endpoint. + * @summary List Value Set Versions in an Environment of an App + * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGet(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGet(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.keyChanged, options).then((request) => request(axios, basePath)); }, /** * - * @summary List versions of the given workload profile with optional constraint. - * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesProfileQidVersionsGetRequest} requestParameters Request parameters. + * @summary Get a single Value Set Version in an Environment of an App + * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - orgsOrgIdWorkloadProfilesProfileQidVersionsGet(requestParameters, options) { - return localVarFp.orgsOrgIdWorkloadProfilesProfileQidVersionsGet(requestParameters.orgId, requestParameters.profileQid, requestParameters.version, options).then((request) => request(axios, basePath)); + orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, options).then((request) => request(axios, basePath)); + }, + /** + * Purging permanently removes the value of a specific Shared Value in an application. A purged value is no longer accessible, can\'t be restored and can\'t be used by deployments referencing a Value Set Version where the value was present. Learn more about purging in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#purge). + * @summary Purge the value of a specific Shared Value from the App Environment Version history. + * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Restore the values of a single Shared Value in an Environment from a specific version. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a specific key from the Value Set Version in an Environment of an App + * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Restore the values of all Shared Values in an environment from a specific version. Keys not existing in the selected version are deleted. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a Value Set Version in an Environment of an App + * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(axios, basePath)); + }, + /** + * A new Value Set Version is created on every modification of a Value inside the app. + * @summary List Value Set Versions in the App + * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdValueSetVersionsGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdValueSetVersionsGet(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdValueSetVersionsGet(requestParameters.orgId, requestParameters.appId, requestParameters.keyChanged, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get a single Value Set Version from the App + * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, options).then((request) => request(axios, basePath)); + }, + /** + * Purging permanently removes the value of a specific Shared Value in an Application. A purged value is no longer accessible, can\'t be restored and can\'t be used by deployments referencing a Value Set Version where the value was present. Learn more about purging in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#purge). + * @summary Purge the value of a specific Shared Value from the App Version history. + * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Restore the values of a single Shared Value in an application from a specific version. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a specific key from the Value Set Version in an App + * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Restore the values of all Shared Values in an application from a specific version. Keys not existing in the selected version are deleted. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a Value Set Version in an App + * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost(requestParameters, options) { + return localVarFp.orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(axios, basePath)); }, }; }; -exports.WorkloadProfileApiFactory = WorkloadProfileApiFactory; +exports.ValueSetVersionApiFactory = ValueSetVersionApiFactory; /** - * WorkloadProfileApi - object-oriented interface + * ValueSetVersionApi - object-oriented interface * @export - * @class WorkloadProfileApi + * @class ValueSetVersionApi * @extends {BaseAPI} */ -class WorkloadProfileApi extends base_1.BaseAPI { +class ValueSetVersionApi extends base_1.BaseAPI { /** - * - * @summary List workload profiles available to the organization. - * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesGetRequest} requestParameters Request parameters. + * A new Value Set Version is created on every modification of a Value inside the an Environment of an App. In case this environment has no overrides the response is the same as the App level endpoint. + * @summary List Value Set Versions in an Environment of an App + * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WorkloadProfileApi + * @memberof ValueSetVersionApi */ - orgsOrgIdWorkloadProfilesGet(requestParameters, options) { - return (0, exports.WorkloadProfileApiFp)(this.configuration).orgsOrgIdWorkloadProfilesGet(requestParameters.orgId, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGet(requestParameters, options) { + return (0, exports.ValueSetVersionApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsGet(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.keyChanged, options).then((request) => request(this.axios, this.basePath)); } /** * - * @summary Create new Workload Profile - * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesPostRequest} requestParameters Request parameters. + * @summary Get a single Value Set Version in an Environment of an App + * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WorkloadProfileApi + * @memberof ValueSetVersionApi */ - orgsOrgIdWorkloadProfilesPost(requestParameters, options) { - return (0, exports.WorkloadProfileApiFp)(this.configuration).orgsOrgIdWorkloadProfilesPost(requestParameters.orgId, requestParameters.workloadProfileRequest, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet(requestParameters, options) { + return (0, exports.ValueSetVersionApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdGet(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, options).then((request) => request(this.axios, this.basePath)); } /** - * This will also delete all versions of a workload profile. It is not possible to delete profiles of other organizations. - * @summary Delete a Workload Profile - * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesProfileIdDeleteRequest} requestParameters Request parameters. + * Purging permanently removes the value of a specific Shared Value in an application. A purged value is no longer accessible, can\'t be restored and can\'t be used by deployments referencing a Value Set Version where the value was present. Learn more about purging in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#purge). + * @summary Purge the value of a specific Shared Value from the App Environment Version history. + * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WorkloadProfileApi + * @memberof ValueSetVersionApi */ - orgsOrgIdWorkloadProfilesProfileIdDelete(requestParameters, options) { - return (0, exports.WorkloadProfileApiFp)(this.configuration).orgsOrgIdWorkloadProfilesProfileIdDelete(requestParameters.orgId, requestParameters.profileId, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost(requestParameters, options) { + return (0, exports.ValueSetVersionApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdPurgeKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * Creates a Workload Profile Version from the uploaded Helm chart. The version is retrieved from the chart\'s metadata (Charts.yaml file). The request has content type `multipart/form-data` and the request body includes two parts: 1. `file` with `application/x-gzip` content type which is an archive containing a Helm chart. 2. `metadata` with `application/json` content type which defines the version\'s metadata. Request body example: Content-Type: multipart/form-data; boundary=----boundary ----boundary Content-Disposition: form-data; name=\"metadata\" Content-Type: application/json; charset=UTF-8 { \"features\": { \"humanitec/service\": {}, \"humanitec/volumes\": {}, \"custom\": {\"schema\": {}} }, \"notes\": \"Notes related to this version of the profile\" } ----boundary Content-Disposition: form-data; name=\"file\"; filename=\"my-workload-1.0.1.tgz\" Content-Type: application/x-gzip [TGZ_DATA] ----boundary **NOTE:** A Workload Profile must be created before a version can be added to it. - * @summary Add new Version of the Workload Profile - * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesProfileIdVersionsPostRequest} requestParameters Request parameters. + * Restore the values of a single Shared Value in an Environment from a specific version. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a specific key from the Value Set Version in an Environment of an App + * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WorkloadProfileApi + * @memberof ValueSetVersionApi */ - orgsOrgIdWorkloadProfilesProfileIdVersionsPost(requestParameters, options) { - return (0, exports.WorkloadProfileApiFp)(this.configuration).orgsOrgIdWorkloadProfilesProfileIdVersionsPost(requestParameters.orgId, requestParameters.profileId, requestParameters.metadata, requestParameters.file, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost(requestParameters, options) { + return (0, exports.ValueSetVersionApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestoreKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Delete a Workload Profile Version - * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesProfileIdVersionsVersionDeleteRequest} requestParameters Request parameters. + * Restore the values of all Shared Values in an environment from a specific version. Keys not existing in the selected version are deleted. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a Value Set Version in an Environment of an App + * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WorkloadProfileApi + * @memberof ValueSetVersionApi */ - orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete(requestParameters, options) { - return (0, exports.WorkloadProfileApiFp)(this.configuration).orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete(requestParameters.orgId, requestParameters.profileId, requestParameters.version, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost(requestParameters, options) { + return (0, exports.ValueSetVersionApiFp)(this.configuration).orgsOrgIdAppsAppIdEnvsEnvIdValueSetVersionsValueSetVersionIdRestorePost(requestParameters.orgId, requestParameters.appId, requestParameters.envId, requestParameters.valueSetVersionId, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Get a Workload Profile - * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesProfileQidGetRequest} requestParameters Request parameters. + * A new Value Set Version is created on every modification of a Value inside the app. + * @summary List Value Set Versions in the App + * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdValueSetVersionsGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WorkloadProfileApi + * @memberof ValueSetVersionApi */ - orgsOrgIdWorkloadProfilesProfileQidGet(requestParameters, options) { - return (0, exports.WorkloadProfileApiFp)(this.configuration).orgsOrgIdWorkloadProfilesProfileQidGet(requestParameters.orgId, requestParameters.profileQid, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdValueSetVersionsGet(requestParameters, options) { + return (0, exports.ValueSetVersionApiFp)(this.configuration).orgsOrgIdAppsAppIdValueSetVersionsGet(requestParameters.orgId, requestParameters.appId, requestParameters.keyChanged, options).then((request) => request(this.axios, this.basePath)); } /** * - * @summary List versions of the given workload profile with optional constraint. - * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesProfileQidVersionsGetRequest} requestParameters Request parameters. + * @summary Get a single Value Set Version from the App + * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WorkloadProfileApi + * @memberof ValueSetVersionApi */ - orgsOrgIdWorkloadProfilesProfileQidVersionsGet(requestParameters, options) { - return (0, exports.WorkloadProfileApiFp)(this.configuration).orgsOrgIdWorkloadProfilesProfileQidVersionsGet(requestParameters.orgId, requestParameters.profileQid, requestParameters.version, options).then((request) => request(this.axios, this.basePath)); + orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet(requestParameters, options) { + return (0, exports.ValueSetVersionApiFp)(this.configuration).orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdGet(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Purging permanently removes the value of a specific Shared Value in an Application. A purged value is no longer accessible, can\'t be restored and can\'t be used by deployments referencing a Value Set Version where the value was present. Learn more about purging in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#purge). + * @summary Purge the value of a specific Shared Value from the App Version history. + * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ValueSetVersionApi + */ + orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost(requestParameters, options) { + return (0, exports.ValueSetVersionApiFp)(this.configuration).orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdPurgeKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Restore the values of a single Shared Value in an application from a specific version. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a specific key from the Value Set Version in an App + * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ValueSetVersionApi + */ + orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost(requestParameters, options) { + return (0, exports.ValueSetVersionApiFp)(this.configuration).orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestoreKeyPost(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, requestParameters.key, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Restore the values of all Shared Values in an application from a specific version. Keys not existing in the selected version are deleted. Learn more about reverting in our [docs](https://docs.humanitec.com/reference/concepts/app-config/shared-app-values#revert). + * @summary Restore a Value Set Version in an App + * @param {ValueSetVersionApiOrgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ValueSetVersionApi + */ + orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost(requestParameters, options) { + return (0, exports.ValueSetVersionApiFp)(this.configuration).orgsOrgIdAppsAppIdValueSetVersionsValueSetVersionIdRestorePost(requestParameters.orgId, requestParameters.appId, requestParameters.valueSetVersionId, requestParameters.valueSetActionPayloadRequest, options).then((request) => request(this.axios, this.basePath)); } } -exports.WorkloadProfileApi = WorkloadProfileApi; - - -/***/ }), - -/***/ 980: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* tslint:disable */ -/* eslint-disable */ -/** - * Humanitec API - * # Introduction The *Humanitec API* allows you to automate and integrate Humanitec into your developer and operational workflows. The API is a REST based API. It is based around a set of concepts: * Core * External Resources * Sets and Deltas ## Authentication Almost all requests made to the Humanitec API require Authentication. Humanitec provides 2 ways of authenticating with the API: `Bearer` and `JWT`. ### Bearer Authentication This form of authentication makes use of a **static token**. It is intended to be used when machines interact with the Humanitec API. Bearer tokens should be used for very narrow purposes. This allows for the token to be revoked if it is compromised and so limit the scope of exposure. New Bearer tokens can be obtained via the UI: 1. Log into Humanitec at https://app.humanitec.io 1. Go to **Organization Settings** 1. Select **API tokens** 1. Enter a *name* for the new token and click on **Generate new token** The token is passed to the API via the `Authorization` header. Assuming the issued token is `HUMANITEC_TOKEN`, the request could be made as follows: ``` curl -H \'Authorization: Bearer HUMANITEC_TOKEN\' https://api.humanitec.io/orgs/my-org/apps ``` ### JWT Authentication This form of authentication makes use of a **JSON Web Token (JWT)**. It is intended to be used when humans interact with the Humanitec API. JWTs expire after a period of time. This means that a new JWT will need to be generated regularly. This makes them well suited to working in short sessions, but not for automation. (See Bearer Authentication.) The token is passed to the API via the `Authorization` header. Assuming the issued token is `HUMANITEC_JWT`, the request could be made as follows: ``` curl -H \'Authorization: JWT HUMANITEC_JWT\' https://api.humanitec.io/orgs/my-org/apps ``` ## Content Types All of the Humanitec API unless explicitly only accepts content types of `application/json` and will always return valid `application/json` or an empty response. ## Response Codes ### Success Any response code in the `2xx` range should be regarded as success. | **Code** | **Meaning** | | --- | --- | | `200` | Success | | `201` | Success (In future, `201` will be replaced by `200`) | | `204` | Success, but no content in response | _Note: We plan to simplify the interface by replacing 201 with 200 status codes._ ### Failure Any response code in the `4xx` should be regarded as an error which can be rectified by the client. `5xx` error codes indicate errors that cannot be corrected by the client. | **Code** | **Meaning** | | --- | --- | | `400` | General error. (Body will contain details) | | `401` | Attempt to access protected resource without `Authorization` Header. | | `403` | The `Bearer` or `JWT` does not grant access to the requested resource. | | `404` | Resource not found. | | `405` | Method not allowed | | `409` | Conflict. Usually indicated a resource with that ID already exists. | | `422` | Unprocessable Entity. The body was not valid JSON, was empty or contained an object different from what was expected. | | `429` | Too many requests - request rate limit has been reached. | | `500` | Internal Error. If it occurs repeatedly, contact support. | - * - * The version of the OpenAPI document: 0.20.9 - * Contact: apiteam@humanitec.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0; -const axios_1 = __importDefault(__nccwpck_require__(8757)); -exports.BASE_PATH = "https://api.humanitec.io".replace(/\/+$/, ""); +exports.ValueSetVersionApi = ValueSetVersionApi; /** - * + * WorkloadProfileApi - axios parameter creator * @export */ -exports.COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; -/** - * - * @export +const WorkloadProfileApiAxiosParamCreator = function (configuration) { + return { + /** + * + * @summary Latest version of the given workload profile with optional constraint. + * @param {string} orgId The Organization ID. + * @param {string} profileQid The Workload profile qualified ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLatestWorkloadProfileVersion: async (orgId, profileQid, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('getLatestWorkloadProfileVersion', 'orgId', orgId); + // verify required parameter 'profileQid' is not null or undefined + (0, common_1.assertParamExists)('getLatestWorkloadProfileVersion', 'profileQid', profileQid); + const localVarPath = `/orgs/{orgId}/workload-profiles/{profileQid}/versions/latest` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"profileQid"}}`, encodeURIComponent(String(profileQid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary List workload profiles available to the organization. + * @param {string} orgId The Organization ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdWorkloadProfilesGet: async (orgId, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesGet', 'orgId', orgId); + const localVarPath = `/orgs/{orgId}/workload-profiles` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Create new Workload Profile + * @param {string} orgId The Organization ID. + * @param {WorkloadProfileRequest} workloadProfileRequest Workload profile details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdWorkloadProfilesPost: async (orgId, workloadProfileRequest, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesPost', 'orgId', orgId); + // verify required parameter 'workloadProfileRequest' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesPost', 'workloadProfileRequest', workloadProfileRequest); + const localVarPath = `/orgs/{orgId}/workload-profiles` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + localVarHeaderParameter['Content-Type'] = 'application/json'; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(workloadProfileRequest, localVarRequestOptions, configuration); + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Delete a Workload Profile Version + * @param {string} orgId The Organization ID. + * @param {string} profileId The Workload profile ID. + * @param {string} version The Version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete: async (orgId, profileId, version, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete', 'orgId', orgId); + // verify required parameter 'profileId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete', 'profileId', profileId); + // verify required parameter 'version' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete', 'version', version); + const localVarPath = `/orgs/{orgId}/workload-profiles/{profileId}/versions/{version}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"profileId"}}`, encodeURIComponent(String(profileId))) + .replace(`{${"version"}}`, encodeURIComponent(String(version))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This will also delete all versions of a workload profile. It is not possible to delete profiles of other organizations. + * @summary Delete a Workload Profile + * @param {string} orgId The Organization ID. + * @param {string} profileQid The Workload profile ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdWorkloadProfilesProfileQidDelete: async (orgId, profileQid, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileQidDelete', 'orgId', orgId); + // verify required parameter 'profileQid' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileQidDelete', 'profileQid', profileQid); + const localVarPath = `/orgs/{orgId}/workload-profiles/{profileQid}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"profileQid"}}`, encodeURIComponent(String(profileQid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get a Workload Profile + * @param {string} orgId The Organization ID. + * @param {string} profileQid The fully qualified Workload ID. (If not a profile from the current org, must be prefixed with `{orgId}.` e.g. `humanitec.default-cronjob`) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdWorkloadProfilesProfileQidGet: async (orgId, profileQid, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileQidGet', 'orgId', orgId); + // verify required parameter 'profileQid' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileQidGet', 'profileQid', profileQid); + const localVarPath = `/orgs/{orgId}/workload-profiles/{profileQid}` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"profileQid"}}`, encodeURIComponent(String(profileQid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary List versions of the given workload profile with optional constraint. + * @param {string} orgId The Organization ID. + * @param {string} profileQid The Workload profile qualified ID. + * @param {string} [version] Optional query parameter, defines version constraint pattern (https://github.com/Masterminds/semver#checking-version-constraints). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdWorkloadProfilesProfileQidVersionsGet: async (orgId, profileQid, version, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileQidVersionsGet', 'orgId', orgId); + // verify required parameter 'profileQid' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileQidVersionsGet', 'profileQid', profileQid); + const localVarPath = `/orgs/{orgId}/workload-profiles/{profileQid}/versions` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"profileQid"}}`, encodeURIComponent(String(profileQid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + if (version !== undefined) { + localVarQueryParameter['version'] = version; + } + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Creates a Workload Profile Version from the uploaded Helm chart. The version is retrieved from the chart\'s metadata (Charts.yaml file). The request has content type `multipart/form-data` and the request body includes two parts: 1. `file` with `application/x-gzip` content type which is an archive containing a Helm chart. 2. `metadata` with `application/json` content type which defines the version\'s metadata. Request body example: Content-Type: multipart/form-data; boundary=----boundary ----boundary Content-Disposition: form-data; name=\"metadata\" Content-Type: application/json; charset=UTF-8 { \"features\": { \"humanitec/service\": {}, \"humanitec/volumes\": {}, \"custom\": {\"schema\": {}} }, \"notes\": \"Notes related to this version of the profile\" } ----boundary Content-Disposition: form-data; name=\"file\"; filename=\"my-workload-1.0.1.tgz\" Content-Type: application/x-gzip [TGZ_DATA] ----boundary **NOTE:** A Workload Profile must be created before a version can be added to it. + * @summary Add new Version of the Workload Profile + * @param {string} orgId The Organization ID. + * @param {string} profileQid The Workload Profile ID. + * @param {WorkloadProfileVersionRequest} [metadata] + * @param {File} [file] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdWorkloadProfilesProfileQidVersionsPost: async (orgId, profileQid, metadata, file, options = {}) => { + // verify required parameter 'orgId' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileQidVersionsPost', 'orgId', orgId); + // verify required parameter 'profileQid' is not null or undefined + (0, common_1.assertParamExists)('orgsOrgIdWorkloadProfilesProfileQidVersionsPost', 'profileQid', profileQid); + const localVarPath = `/orgs/{orgId}/workload-profiles/{profileQid}/versions` + .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId))) + .replace(`{${"profileQid"}}`, encodeURIComponent(String(profileQid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + const localVarFormParams = new ((configuration && configuration.formDataCtor) || form_data_1.default)(); + if (metadata !== undefined) { + localVarFormParams.append('metadata', new Blob([JSON.stringify(metadata)], { type: "application/json", })); + } + if (file !== undefined) { + localVarFormParams.append('file', file); + } + localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; + (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...localVarFormParams.getHeaders?.(), ...options.headers }; + localVarRequestOptions.data = localVarFormParams; + return { + url: (0, common_1.toPathString)(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; +exports.WorkloadProfileApiAxiosParamCreator = WorkloadProfileApiAxiosParamCreator; +/** + * WorkloadProfileApi - functional programming interface + * @export + */ +const WorkloadProfileApiFp = function (configuration) { + const localVarAxiosParamCreator = (0, exports.WorkloadProfileApiAxiosParamCreator)(configuration); + return { + /** + * + * @summary Latest version of the given workload profile with optional constraint. + * @param {string} orgId The Organization ID. + * @param {string} profileQid The Workload profile qualified ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLatestWorkloadProfileVersion(orgId, profileQid, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLatestWorkloadProfileVersion(orgId, profileQid, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + /** + * + * @summary List workload profiles available to the organization. + * @param {string} orgId The Organization ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdWorkloadProfilesGet(orgId, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesGet(orgId, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + /** + * + * @summary Create new Workload Profile + * @param {string} orgId The Organization ID. + * @param {WorkloadProfileRequest} workloadProfileRequest Workload profile details. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdWorkloadProfilesPost(orgId, workloadProfileRequest, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesPost(orgId, workloadProfileRequest, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + /** + * + * @summary Delete a Workload Profile Version + * @param {string} orgId The Organization ID. + * @param {string} profileId The Workload profile ID. + * @param {string} version The Version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete(orgId, profileId, version, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete(orgId, profileId, version, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + /** + * This will also delete all versions of a workload profile. It is not possible to delete profiles of other organizations. + * @summary Delete a Workload Profile + * @param {string} orgId The Organization ID. + * @param {string} profileQid The Workload profile ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdWorkloadProfilesProfileQidDelete(orgId, profileQid, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesProfileQidDelete(orgId, profileQid, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + /** + * + * @summary Get a Workload Profile + * @param {string} orgId The Organization ID. + * @param {string} profileQid The fully qualified Workload ID. (If not a profile from the current org, must be prefixed with `{orgId}.` e.g. `humanitec.default-cronjob`) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdWorkloadProfilesProfileQidGet(orgId, profileQid, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesProfileQidGet(orgId, profileQid, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + /** + * + * @summary List versions of the given workload profile with optional constraint. + * @param {string} orgId The Organization ID. + * @param {string} profileQid The Workload profile qualified ID. + * @param {string} [version] Optional query parameter, defines version constraint pattern (https://github.com/Masterminds/semver#checking-version-constraints). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdWorkloadProfilesProfileQidVersionsGet(orgId, profileQid, version, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesProfileQidVersionsGet(orgId, profileQid, version, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + /** + * Creates a Workload Profile Version from the uploaded Helm chart. The version is retrieved from the chart\'s metadata (Charts.yaml file). The request has content type `multipart/form-data` and the request body includes two parts: 1. `file` with `application/x-gzip` content type which is an archive containing a Helm chart. 2. `metadata` with `application/json` content type which defines the version\'s metadata. Request body example: Content-Type: multipart/form-data; boundary=----boundary ----boundary Content-Disposition: form-data; name=\"metadata\" Content-Type: application/json; charset=UTF-8 { \"features\": { \"humanitec/service\": {}, \"humanitec/volumes\": {}, \"custom\": {\"schema\": {}} }, \"notes\": \"Notes related to this version of the profile\" } ----boundary Content-Disposition: form-data; name=\"file\"; filename=\"my-workload-1.0.1.tgz\" Content-Type: application/x-gzip [TGZ_DATA] ----boundary **NOTE:** A Workload Profile must be created before a version can be added to it. + * @summary Add new Version of the Workload Profile + * @param {string} orgId The Organization ID. + * @param {string} profileQid The Workload Profile ID. + * @param {WorkloadProfileVersionRequest} [metadata] + * @param {File} [file] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async orgsOrgIdWorkloadProfilesProfileQidVersionsPost(orgId, profileQid, metadata, file, options) { + const localVarAxiosArgs = await localVarAxiosParamCreator.orgsOrgIdWorkloadProfilesProfileQidVersionsPost(orgId, profileQid, metadata, file, options); + return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); + }, + }; +}; +exports.WorkloadProfileApiFp = WorkloadProfileApiFp; +/** + * WorkloadProfileApi - factory interface + * @export + */ +const WorkloadProfileApiFactory = function (configuration, basePath, axios) { + const localVarFp = (0, exports.WorkloadProfileApiFp)(configuration); + return { + /** + * + * @summary Latest version of the given workload profile with optional constraint. + * @param {WorkloadProfileApiGetLatestWorkloadProfileVersionRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLatestWorkloadProfileVersion(requestParameters, options) { + return localVarFp.getLatestWorkloadProfileVersion(requestParameters.orgId, requestParameters.profileQid, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary List workload profiles available to the organization. + * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdWorkloadProfilesGet(requestParameters, options) { + return localVarFp.orgsOrgIdWorkloadProfilesGet(requestParameters.orgId, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Create new Workload Profile + * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdWorkloadProfilesPost(requestParameters, options) { + return localVarFp.orgsOrgIdWorkloadProfilesPost(requestParameters.orgId, requestParameters.workloadProfileRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Delete a Workload Profile Version + * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesProfileIdVersionsVersionDeleteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete(requestParameters, options) { + return localVarFp.orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete(requestParameters.orgId, requestParameters.profileId, requestParameters.version, options).then((request) => request(axios, basePath)); + }, + /** + * This will also delete all versions of a workload profile. It is not possible to delete profiles of other organizations. + * @summary Delete a Workload Profile + * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesProfileQidDeleteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdWorkloadProfilesProfileQidDelete(requestParameters, options) { + return localVarFp.orgsOrgIdWorkloadProfilesProfileQidDelete(requestParameters.orgId, requestParameters.profileQid, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get a Workload Profile + * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesProfileQidGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdWorkloadProfilesProfileQidGet(requestParameters, options) { + return localVarFp.orgsOrgIdWorkloadProfilesProfileQidGet(requestParameters.orgId, requestParameters.profileQid, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary List versions of the given workload profile with optional constraint. + * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesProfileQidVersionsGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdWorkloadProfilesProfileQidVersionsGet(requestParameters, options) { + return localVarFp.orgsOrgIdWorkloadProfilesProfileQidVersionsGet(requestParameters.orgId, requestParameters.profileQid, requestParameters.version, options).then((request) => request(axios, basePath)); + }, + /** + * Creates a Workload Profile Version from the uploaded Helm chart. The version is retrieved from the chart\'s metadata (Charts.yaml file). The request has content type `multipart/form-data` and the request body includes two parts: 1. `file` with `application/x-gzip` content type which is an archive containing a Helm chart. 2. `metadata` with `application/json` content type which defines the version\'s metadata. Request body example: Content-Type: multipart/form-data; boundary=----boundary ----boundary Content-Disposition: form-data; name=\"metadata\" Content-Type: application/json; charset=UTF-8 { \"features\": { \"humanitec/service\": {}, \"humanitec/volumes\": {}, \"custom\": {\"schema\": {}} }, \"notes\": \"Notes related to this version of the profile\" } ----boundary Content-Disposition: form-data; name=\"file\"; filename=\"my-workload-1.0.1.tgz\" Content-Type: application/x-gzip [TGZ_DATA] ----boundary **NOTE:** A Workload Profile must be created before a version can be added to it. + * @summary Add new Version of the Workload Profile + * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesProfileQidVersionsPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + orgsOrgIdWorkloadProfilesProfileQidVersionsPost(requestParameters, options) { + return localVarFp.orgsOrgIdWorkloadProfilesProfileQidVersionsPost(requestParameters.orgId, requestParameters.profileQid, requestParameters.metadata, requestParameters.file, options).then((request) => request(axios, basePath)); + }, + }; +}; +exports.WorkloadProfileApiFactory = WorkloadProfileApiFactory; +/** + * WorkloadProfileApi - object-oriented interface + * @export + * @class WorkloadProfileApi + * @extends {BaseAPI} + */ +class WorkloadProfileApi extends base_1.BaseAPI { + /** + * + * @summary Latest version of the given workload profile with optional constraint. + * @param {WorkloadProfileApiGetLatestWorkloadProfileVersionRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkloadProfileApi + */ + getLatestWorkloadProfileVersion(requestParameters, options) { + return (0, exports.WorkloadProfileApiFp)(this.configuration).getLatestWorkloadProfileVersion(requestParameters.orgId, requestParameters.profileQid, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary List workload profiles available to the organization. + * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkloadProfileApi + */ + orgsOrgIdWorkloadProfilesGet(requestParameters, options) { + return (0, exports.WorkloadProfileApiFp)(this.configuration).orgsOrgIdWorkloadProfilesGet(requestParameters.orgId, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary Create new Workload Profile + * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkloadProfileApi + */ + orgsOrgIdWorkloadProfilesPost(requestParameters, options) { + return (0, exports.WorkloadProfileApiFp)(this.configuration).orgsOrgIdWorkloadProfilesPost(requestParameters.orgId, requestParameters.workloadProfileRequest, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary Delete a Workload Profile Version + * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesProfileIdVersionsVersionDeleteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkloadProfileApi + */ + orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete(requestParameters, options) { + return (0, exports.WorkloadProfileApiFp)(this.configuration).orgsOrgIdWorkloadProfilesProfileIdVersionsVersionDelete(requestParameters.orgId, requestParameters.profileId, requestParameters.version, options).then((request) => request(this.axios, this.basePath)); + } + /** + * This will also delete all versions of a workload profile. It is not possible to delete profiles of other organizations. + * @summary Delete a Workload Profile + * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesProfileQidDeleteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkloadProfileApi + */ + orgsOrgIdWorkloadProfilesProfileQidDelete(requestParameters, options) { + return (0, exports.WorkloadProfileApiFp)(this.configuration).orgsOrgIdWorkloadProfilesProfileQidDelete(requestParameters.orgId, requestParameters.profileQid, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary Get a Workload Profile + * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesProfileQidGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkloadProfileApi + */ + orgsOrgIdWorkloadProfilesProfileQidGet(requestParameters, options) { + return (0, exports.WorkloadProfileApiFp)(this.configuration).orgsOrgIdWorkloadProfilesProfileQidGet(requestParameters.orgId, requestParameters.profileQid, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary List versions of the given workload profile with optional constraint. + * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesProfileQidVersionsGetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkloadProfileApi + */ + orgsOrgIdWorkloadProfilesProfileQidVersionsGet(requestParameters, options) { + return (0, exports.WorkloadProfileApiFp)(this.configuration).orgsOrgIdWorkloadProfilesProfileQidVersionsGet(requestParameters.orgId, requestParameters.profileQid, requestParameters.version, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Creates a Workload Profile Version from the uploaded Helm chart. The version is retrieved from the chart\'s metadata (Charts.yaml file). The request has content type `multipart/form-data` and the request body includes two parts: 1. `file` with `application/x-gzip` content type which is an archive containing a Helm chart. 2. `metadata` with `application/json` content type which defines the version\'s metadata. Request body example: Content-Type: multipart/form-data; boundary=----boundary ----boundary Content-Disposition: form-data; name=\"metadata\" Content-Type: application/json; charset=UTF-8 { \"features\": { \"humanitec/service\": {}, \"humanitec/volumes\": {}, \"custom\": {\"schema\": {}} }, \"notes\": \"Notes related to this version of the profile\" } ----boundary Content-Disposition: form-data; name=\"file\"; filename=\"my-workload-1.0.1.tgz\" Content-Type: application/x-gzip [TGZ_DATA] ----boundary **NOTE:** A Workload Profile must be created before a version can be added to it. + * @summary Add new Version of the Workload Profile + * @param {WorkloadProfileApiOrgsOrgIdWorkloadProfilesProfileQidVersionsPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkloadProfileApi + */ + orgsOrgIdWorkloadProfilesProfileQidVersionsPost(requestParameters, options) { + return (0, exports.WorkloadProfileApiFp)(this.configuration).orgsOrgIdWorkloadProfilesProfileQidVersionsPost(requestParameters.orgId, requestParameters.profileQid, requestParameters.metadata, requestParameters.file, options).then((request) => request(this.axios, this.basePath)); + } +} +exports.WorkloadProfileApi = WorkloadProfileApi; + + +/***/ }), + +/***/ 980: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* tslint:disable */ +/* eslint-disable */ +/** + * Humanitec API + * # Introduction The *Humanitec API* allows you to automate and integrate Humanitec into your developer and operational workflows. The API is a REST based API. It is based around a set of concepts: * Core * External Resources * Sets and Deltas ## Authentication Almost all requests made to the Humanitec API require Authentication. Humanitec provides 2 ways of authenticating with the API: `Bearer` and `JWT`. ### Bearer Authentication This form of authentication makes use of a **static token**. It is intended to be used when machines interact with the Humanitec API. Bearer tokens should be used for very narrow purposes. This allows for the token to be revoked if it is compromised and so limit the scope of exposure. New Bearer tokens can be obtained via the UI: 1. Log into Humanitec at https://app.humanitec.io 1. Go to **Organization Settings** 1. Select **API tokens** 1. Enter a *name* for the new token and click on **Generate new token** The token is passed to the API via the `Authorization` header. Assuming the issued token is `HUMANITEC_TOKEN`, the request could be made as follows: ``` curl -H \'Authorization: Bearer HUMANITEC_TOKEN\' https://api.humanitec.io/orgs/my-org/apps ``` ### JWT Authentication This form of authentication makes use of a **JSON Web Token (JWT)**. It is intended to be used when humans interact with the Humanitec API. JWTs expire after a period of time. This means that a new JWT will need to be generated regularly. This makes them well suited to working in short sessions, but not for automation. (See Bearer Authentication.) The token is passed to the API via the `Authorization` header. Assuming the issued token is `HUMANITEC_JWT`, the request could be made as follows: ``` curl -H \'Authorization: JWT HUMANITEC_JWT\' https://api.humanitec.io/orgs/my-org/apps ``` ## Content Types All of the Humanitec API unless explicitly only accepts content types of `application/json` and will always return valid `application/json` or an empty response. ## Response Codes ### Success Any response code in the `2xx` range should be regarded as success. | **Code** | **Meaning** | | --- | --- | | `200` | Success | | `201` | Success (In future, `201` will be replaced by `200`) | | `204` | Success, but no content in response | _Note: We plan to simplify the interface by replacing 201 with 200 status codes._ ### Failure Any response code in the `4xx` should be regarded as an error which can be rectified by the client. `5xx` error codes indicate errors that cannot be corrected by the client. | **Code** | **Meaning** | | --- | --- | | `400` | General error. (Body will contain details) | | `401` | Attempt to access protected resource without `Authorization` Header. | | `403` | The `Bearer` or `JWT` does not grant access to the requested resource. | | `404` | Resource not found. | | `405` | Method not allowed | | `409` | Conflict. Usually indicated a resource with that ID already exists. | | `422` | Unprocessable Entity. The body was not valid JSON, was empty or contained an object different from what was expected. | | `429` | Too many requests - request rate limit has been reached. | | `500` | Internal Error. If it occurs repeatedly, contact support. | + * + * The version of the OpenAPI document: 0.21.0 + * Contact: apiteam@humanitec.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0; +const axios_1 = __importDefault(__nccwpck_require__(8757)); +exports.BASE_PATH = "https://api.humanitec.io".replace(/\/+$/, ""); +/** + * + * @export + */ +exports.COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; +/** + * + * @export * @class BaseAPI */ class BaseAPI { @@ -21148,7 +23633,7 @@ exports.RequiredError = RequiredError; * Humanitec API * # Introduction The *Humanitec API* allows you to automate and integrate Humanitec into your developer and operational workflows. The API is a REST based API. It is based around a set of concepts: * Core * External Resources * Sets and Deltas ## Authentication Almost all requests made to the Humanitec API require Authentication. Humanitec provides 2 ways of authenticating with the API: `Bearer` and `JWT`. ### Bearer Authentication This form of authentication makes use of a **static token**. It is intended to be used when machines interact with the Humanitec API. Bearer tokens should be used for very narrow purposes. This allows for the token to be revoked if it is compromised and so limit the scope of exposure. New Bearer tokens can be obtained via the UI: 1. Log into Humanitec at https://app.humanitec.io 1. Go to **Organization Settings** 1. Select **API tokens** 1. Enter a *name* for the new token and click on **Generate new token** The token is passed to the API via the `Authorization` header. Assuming the issued token is `HUMANITEC_TOKEN`, the request could be made as follows: ``` curl -H \'Authorization: Bearer HUMANITEC_TOKEN\' https://api.humanitec.io/orgs/my-org/apps ``` ### JWT Authentication This form of authentication makes use of a **JSON Web Token (JWT)**. It is intended to be used when humans interact with the Humanitec API. JWTs expire after a period of time. This means that a new JWT will need to be generated regularly. This makes them well suited to working in short sessions, but not for automation. (See Bearer Authentication.) The token is passed to the API via the `Authorization` header. Assuming the issued token is `HUMANITEC_JWT`, the request could be made as follows: ``` curl -H \'Authorization: JWT HUMANITEC_JWT\' https://api.humanitec.io/orgs/my-org/apps ``` ## Content Types All of the Humanitec API unless explicitly only accepts content types of `application/json` and will always return valid `application/json` or an empty response. ## Response Codes ### Success Any response code in the `2xx` range should be regarded as success. | **Code** | **Meaning** | | --- | --- | | `200` | Success | | `201` | Success (In future, `201` will be replaced by `200`) | | `204` | Success, but no content in response | _Note: We plan to simplify the interface by replacing 201 with 200 status codes._ ### Failure Any response code in the `4xx` should be regarded as an error which can be rectified by the client. `5xx` error codes indicate errors that cannot be corrected by the client. | **Code** | **Meaning** | | --- | --- | | `400` | General error. (Body will contain details) | | `401` | Attempt to access protected resource without `Authorization` Header. | | `403` | The `Bearer` or `JWT` does not grant access to the requested resource. | | `404` | Resource not found. | | `405` | Method not allowed | | `409` | Conflict. Usually indicated a resource with that ID already exists. | | `422` | Unprocessable Entity. The body was not valid JSON, was empty or contained an object different from what was expected. | | `429` | Too many requests - request rate limit has been reached. | | `500` | Internal Error. If it occurs repeatedly, contact support. | * - * The version of the OpenAPI document: 0.20.9 + * The version of the OpenAPI document: 0.21.0 * Contact: apiteam@humanitec.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21158,6 +23643,7 @@ exports.RequiredError = RequiredError; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0; const base_1 = __nccwpck_require__(980); +const url_1 = __nccwpck_require__(7310); /** * * @export @@ -21248,7 +23734,7 @@ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") { * @export */ const setSearchParams = function (url, ...objects) { - const searchParams = new URLSearchParams(url.search); + const searchParams = new url_1.URLSearchParams(url.search); setFlattenedQueryParams(searchParams, objects); url.search = searchParams.toString(); }; @@ -21301,7 +23787,7 @@ exports.createRequestFunction = createRequestFunction; * Humanitec API * # Introduction The *Humanitec API* allows you to automate and integrate Humanitec into your developer and operational workflows. The API is a REST based API. It is based around a set of concepts: * Core * External Resources * Sets and Deltas ## Authentication Almost all requests made to the Humanitec API require Authentication. Humanitec provides 2 ways of authenticating with the API: `Bearer` and `JWT`. ### Bearer Authentication This form of authentication makes use of a **static token**. It is intended to be used when machines interact with the Humanitec API. Bearer tokens should be used for very narrow purposes. This allows for the token to be revoked if it is compromised and so limit the scope of exposure. New Bearer tokens can be obtained via the UI: 1. Log into Humanitec at https://app.humanitec.io 1. Go to **Organization Settings** 1. Select **API tokens** 1. Enter a *name* for the new token and click on **Generate new token** The token is passed to the API via the `Authorization` header. Assuming the issued token is `HUMANITEC_TOKEN`, the request could be made as follows: ``` curl -H \'Authorization: Bearer HUMANITEC_TOKEN\' https://api.humanitec.io/orgs/my-org/apps ``` ### JWT Authentication This form of authentication makes use of a **JSON Web Token (JWT)**. It is intended to be used when humans interact with the Humanitec API. JWTs expire after a period of time. This means that a new JWT will need to be generated regularly. This makes them well suited to working in short sessions, but not for automation. (See Bearer Authentication.) The token is passed to the API via the `Authorization` header. Assuming the issued token is `HUMANITEC_JWT`, the request could be made as follows: ``` curl -H \'Authorization: JWT HUMANITEC_JWT\' https://api.humanitec.io/orgs/my-org/apps ``` ## Content Types All of the Humanitec API unless explicitly only accepts content types of `application/json` and will always return valid `application/json` or an empty response. ## Response Codes ### Success Any response code in the `2xx` range should be regarded as success. | **Code** | **Meaning** | | --- | --- | | `200` | Success | | `201` | Success (In future, `201` will be replaced by `200`) | | `204` | Success, but no content in response | _Note: We plan to simplify the interface by replacing 201 with 200 status codes._ ### Failure Any response code in the `4xx` should be regarded as an error which can be rectified by the client. `5xx` error codes indicate errors that cannot be corrected by the client. | **Code** | **Meaning** | | --- | --- | | `400` | General error. (Body will contain details) | | `401` | Attempt to access protected resource without `Authorization` Header. | | `403` | The `Bearer` or `JWT` does not grant access to the requested resource. | | `404` | Resource not found. | | `405` | Method not allowed | | `409` | Conflict. Usually indicated a resource with that ID already exists. | | `422` | Unprocessable Entity. The body was not valid JSON, was empty or contained an object different from what was expected. | | `429` | Too many requests - request rate limit has been reached. | | `500` | Internal Error. If it occurs repeatedly, contact support. | * - * The version of the OpenAPI document: 0.20.9 + * The version of the OpenAPI document: 0.21.0 * Contact: apiteam@humanitec.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21351,7 +23837,7 @@ exports.Configuration = Configuration; * Humanitec API * # Introduction The *Humanitec API* allows you to automate and integrate Humanitec into your developer and operational workflows. The API is a REST based API. It is based around a set of concepts: * Core * External Resources * Sets and Deltas ## Authentication Almost all requests made to the Humanitec API require Authentication. Humanitec provides 2 ways of authenticating with the API: `Bearer` and `JWT`. ### Bearer Authentication This form of authentication makes use of a **static token**. It is intended to be used when machines interact with the Humanitec API. Bearer tokens should be used for very narrow purposes. This allows for the token to be revoked if it is compromised and so limit the scope of exposure. New Bearer tokens can be obtained via the UI: 1. Log into Humanitec at https://app.humanitec.io 1. Go to **Organization Settings** 1. Select **API tokens** 1. Enter a *name* for the new token and click on **Generate new token** The token is passed to the API via the `Authorization` header. Assuming the issued token is `HUMANITEC_TOKEN`, the request could be made as follows: ``` curl -H \'Authorization: Bearer HUMANITEC_TOKEN\' https://api.humanitec.io/orgs/my-org/apps ``` ### JWT Authentication This form of authentication makes use of a **JSON Web Token (JWT)**. It is intended to be used when humans interact with the Humanitec API. JWTs expire after a period of time. This means that a new JWT will need to be generated regularly. This makes them well suited to working in short sessions, but not for automation. (See Bearer Authentication.) The token is passed to the API via the `Authorization` header. Assuming the issued token is `HUMANITEC_JWT`, the request could be made as follows: ``` curl -H \'Authorization: JWT HUMANITEC_JWT\' https://api.humanitec.io/orgs/my-org/apps ``` ## Content Types All of the Humanitec API unless explicitly only accepts content types of `application/json` and will always return valid `application/json` or an empty response. ## Response Codes ### Success Any response code in the `2xx` range should be regarded as success. | **Code** | **Meaning** | | --- | --- | | `200` | Success | | `201` | Success (In future, `201` will be replaced by `200`) | | `204` | Success, but no content in response | _Note: We plan to simplify the interface by replacing 201 with 200 status codes._ ### Failure Any response code in the `4xx` should be regarded as an error which can be rectified by the client. `5xx` error codes indicate errors that cannot be corrected by the client. | **Code** | **Meaning** | | --- | --- | | `400` | General error. (Body will contain details) | | `401` | Attempt to access protected resource without `Authorization` Header. | | `403` | The `Bearer` or `JWT` does not grant access to the requested resource. | | `404` | Resource not found. | | `405` | Method not allowed | | `409` | Conflict. Usually indicated a resource with that ID already exists. | | `422` | Unprocessable Entity. The body was not valid JSON, was empty or contained an object different from what was expected. | | `429` | Too many requests - request rate limit has been reached. | | `500` | Internal Error. If it occurs repeatedly, contact support. | * - * The version of the OpenAPI document: 0.20.9 + * The version of the OpenAPI document: 0.21.0 * Contact: apiteam@humanitec.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21402,7 +23888,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.apiConfig = void 0; const configuration_1 = __nccwpck_require__(8874); __exportStar(__nccwpck_require__(7770), exports); -const defaultAPIHost = 'https://api.humanitec.com'; +const defaultAPIHost = 'https://api.humanitec.io'; const sdk = 'humanitec-ts-autogen'; const sdkVersion = 'latest'; const humanitecUserAgentHeader = ({ sdk, app }) => { @@ -24195,1166 +26681,1221 @@ function serialOrdered(list, iterator, sortMethod, callback) return; } - state.index++; - - // are we there yet? - if (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, iteratorHandler); - return; - } - - // done here - callback(null, state.results); - }); - - return terminator.bind(state, callback); -} - -/* - * -- Sort methods - */ - -/** - * sort helper to sort array elements in ascending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function ascending(a, b) -{ - return a < b ? -1 : a > b ? 1 : 0; -} - -/** - * sort helper to sort array elements in descending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function descending(a, b) -{ - return -1 * ascending(a, b); -} - - -/***/ }), - -/***/ 1403: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var CombinedStream = __nccwpck_require__(5443); -var util = __nccwpck_require__(3837); -var path = __nccwpck_require__(1017); -var http = __nccwpck_require__(3685); -var https = __nccwpck_require__(5687); -var parseUrl = (__nccwpck_require__(7310).parse); -var fs = __nccwpck_require__(7147); -var Stream = (__nccwpck_require__(2781).Stream); -var mime = __nccwpck_require__(3583); -var asynckit = __nccwpck_require__(4812); -var populate = __nccwpck_require__(7027); - -// Public API -module.exports = FormData; - -// make it a Stream -util.inherits(FormData, CombinedStream); - -/** - * Create readable "multipart/form-data" streams. - * Can be used to submit forms - * and file uploads to other web applications. - * - * @constructor - * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream - */ -function FormData(options) { - if (!(this instanceof FormData)) { - return new FormData(options); - } - - this._overheadLength = 0; - this._valueLength = 0; - this._valuesToMeasure = []; - - CombinedStream.call(this); - - options = options || {}; - for (var option in options) { - this[option] = options[option]; - } -} - -FormData.LINE_BREAK = '\r\n'; -FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; - -FormData.prototype.append = function(field, value, options) { - - options = options || {}; + state.index++; - // allow filename as single option - if (typeof options == 'string') { - options = {filename: options}; - } + // are we there yet? + if (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, iteratorHandler); + return; + } - var append = CombinedStream.prototype.append.bind(this); + // done here + callback(null, state.results); + }); - // all that streamy business can't handle numbers - if (typeof value == 'number') { - value = '' + value; - } + return terminator.bind(state, callback); +} - // https://github.com/felixge/node-form-data/issues/38 - if (util.isArray(value)) { - // Please convert your array into string - // the way web server expects it - this._error(new Error('Arrays are not supported.')); - return; - } +/* + * -- Sort methods + */ - var header = this._multiPartHeader(field, value, options); - var footer = this._multiPartFooter(); +/** + * sort helper to sort array elements in ascending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function ascending(a, b) +{ + return a < b ? -1 : a > b ? 1 : 0; +} - append(header); - append(value); - append(footer); +/** + * sort helper to sort array elements in descending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function descending(a, b) +{ + return -1 * ascending(a, b); +} - // pass along options.knownLength - this._trackLength(header, value, options); -}; -FormData.prototype._trackLength = function(header, value, options) { - var valueLength = 0; +/***/ }), - // used w/ getLengthSync(), when length is known. - // e.g. for streaming directly from a remote server, - // w/ a known file a size, and not wanting to wait for - // incoming file to finish to get its size. - if (options.knownLength != null) { - valueLength += +options.knownLength; - } else if (Buffer.isBuffer(value)) { - valueLength = value.length; - } else if (typeof value === 'string') { - valueLength = Buffer.byteLength(value); - } +/***/ 3682: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - this._valueLength += valueLength; +var register = __nccwpck_require__(4670); +var addHook = __nccwpck_require__(5549); +var removeHook = __nccwpck_require__(6819); - // @check why add CRLF? does this account for custom/multiple CRLFs? - this._overheadLength += - Buffer.byteLength(header) + - FormData.LINE_BREAK.length; +// bind with array of arguments: https://stackoverflow.com/a/21792913 +var bind = Function.bind; +var bindable = bind.bind(bind); - // empty or either doesn't have path or not an http response or not a stream - if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) { - return; - } +function bindApi(hook, state, name) { + var removeHookRef = bindable(removeHook, null).apply( + null, + name ? [state, name] : [state] + ); + hook.api = { remove: removeHookRef }; + hook.remove = removeHookRef; + ["before", "error", "after", "wrap"].forEach(function (kind) { + var args = name ? [state, kind, name] : [state, kind]; + hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args); + }); +} - // no need to bother with the length - if (!options.knownLength) { - this._valuesToMeasure.push(value); - } -}; +function HookSingular() { + var singularHookName = "h"; + var singularHookState = { + registry: {}, + }; + var singularHook = register.bind(null, singularHookState, singularHookName); + bindApi(singularHook, singularHookState, singularHookName); + return singularHook; +} -FormData.prototype._lengthRetriever = function(value, callback) { +function HookCollection() { + var state = { + registry: {}, + }; - if (value.hasOwnProperty('fd')) { + var hook = register.bind(null, state); + bindApi(hook, state); - // take read range into a account - // `end` = Infinity –> read file till the end - // - // TODO: Looks like there is bug in Node fs.createReadStream - // it doesn't respect `end` options without `start` options - // Fix it when node fixes it. - // https://github.com/joyent/node/issues/7819 - if (value.end != undefined && value.end != Infinity && value.start != undefined) { + return hook; +} - // when end specified - // no need to calculate range - // inclusive, starts with 0 - callback(null, value.end + 1 - (value.start ? value.start : 0)); +var collectionHookDeprecationMessageDisplayed = false; +function Hook() { + if (!collectionHookDeprecationMessageDisplayed) { + console.warn( + '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4' + ); + collectionHookDeprecationMessageDisplayed = true; + } + return HookCollection(); +} - // not that fast snoopy - } else { - // still need to fetch file size from fs - fs.stat(value.path, function(err, stat) { +Hook.Singular = HookSingular.bind(); +Hook.Collection = HookCollection.bind(); - var fileSize; +module.exports = Hook; +// expose constructors as a named property for TypeScript +module.exports.Hook = Hook; +module.exports.Singular = Hook.Singular; +module.exports.Collection = Hook.Collection; - if (err) { - callback(err); - return; - } - // update final size based on the range options - fileSize = stat.size - (value.start ? value.start : 0); - callback(null, fileSize); - }); - } +/***/ }), - // or http response - } else if (value.hasOwnProperty('httpVersion')) { - callback(null, +value.headers['content-length']); +/***/ 5549: +/***/ ((module) => { - // or request stream http://github.com/mikeal/request - } else if (value.hasOwnProperty('httpModule')) { - // wait till response come back - value.on('response', function(response) { - value.pause(); - callback(null, +response.headers['content-length']); - }); - value.resume(); +module.exports = addHook; - // something else - } else { - callback('Unknown stream'); +function addHook(state, kind, name, hook) { + var orig = hook; + if (!state.registry[name]) { + state.registry[name] = []; } -}; -FormData.prototype._multiPartHeader = function(field, value, options) { - // custom header specified (as string)? - // it becomes responsible for boundary - // (e.g. to handle extra CRLFs on .NET servers) - if (typeof options.header == 'string') { - return options.header; + if (kind === "before") { + hook = function (method, options) { + return Promise.resolve() + .then(orig.bind(null, options)) + .then(method.bind(null, options)); + }; } - var contentDisposition = this._getContentDisposition(value, options); - var contentType = this._getContentType(value, options); - - var contents = ''; - var headers = { - // add custom disposition as third element or keep it two elements if not - 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), - // if no content type. allow it to be empty array - 'Content-Type': [].concat(contentType || []) - }; - - // allow custom headers. - if (typeof options.header == 'object') { - populate(headers, options.header); + if (kind === "after") { + hook = function (method, options) { + var result; + return Promise.resolve() + .then(method.bind(null, options)) + .then(function (result_) { + result = result_; + return orig(result, options); + }) + .then(function () { + return result; + }); + }; } - var header; - for (var prop in headers) { - if (!headers.hasOwnProperty(prop)) continue; - header = headers[prop]; + if (kind === "error") { + hook = function (method, options) { + return Promise.resolve() + .then(method.bind(null, options)) + .catch(function (error) { + return orig(error, options); + }); + }; + } - // skip nullish headers. - if (header == null) { - continue; - } + state.registry[name].push({ + hook: hook, + orig: orig, + }); +} - // convert all headers to arrays. - if (!Array.isArray(header)) { - header = [header]; - } - // add non-empty headers. - if (header.length) { - contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; - } - } +/***/ }), - return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; -}; +/***/ 4670: +/***/ ((module) => { -FormData.prototype._getContentDisposition = function(value, options) { +module.exports = register; - var filename - , contentDisposition - ; +function register(state, name, method, options) { + if (typeof method !== "function") { + throw new Error("method for before hook must be a function"); + } - if (typeof options.filepath === 'string') { - // custom filepath for relative paths - filename = path.normalize(options.filepath).replace(/\\/g, '/'); - } else if (options.filename || value.name || value.path) { - // custom filename take precedence - // formidable and the browser add a name property - // fs- and request- streams have path property - filename = path.basename(options.filename || value.name || value.path); - } else if (value.readable && value.hasOwnProperty('httpVersion')) { - // or try http response - filename = path.basename(value.client._httpMessage.path || ''); + if (!options) { + options = {}; } - if (filename) { - contentDisposition = 'filename="' + filename + '"'; + if (Array.isArray(name)) { + return name.reverse().reduce(function (callback, name) { + return register.bind(null, state, name, callback, options); + }, method)(); } - return contentDisposition; -}; + return Promise.resolve().then(function () { + if (!state.registry[name]) { + return method(options); + } -FormData.prototype._getContentType = function(value, options) { + return state.registry[name].reduce(function (method, registered) { + return registered.hook.bind(null, method, options); + }, method)(); + }); +} - // use custom content-type above all - var contentType = options.contentType; - // or try `name` from formidable, browser - if (!contentType && value.name) { - contentType = mime.lookup(value.name); - } +/***/ }), - // or try `path` from fs-, request- streams - if (!contentType && value.path) { - contentType = mime.lookup(value.path); - } +/***/ 6819: +/***/ ((module) => { - // or if it's http-reponse - if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) { - contentType = value.headers['content-type']; - } +module.exports = removeHook; - // or guess it from the filepath or filename - if (!contentType && (options.filepath || options.filename)) { - contentType = mime.lookup(options.filepath || options.filename); +function removeHook(state, name, method) { + if (!state.registry[name]) { + return; } - // fallback to the default content type if `value` is not simple value - if (!contentType && typeof value == 'object') { - contentType = FormData.DEFAULT_CONTENT_TYPE; - } + var index = state.registry[name] + .map(function (registered) { + return registered.orig; + }) + .indexOf(method); - return contentType; -}; + if (index === -1) { + return; + } -FormData.prototype._multiPartFooter = function() { - return function(next) { - var footer = FormData.LINE_BREAK; + state.registry[name].splice(index, 1); +} - var lastPart = (this._streams.length === 0); - if (lastPart) { - footer += this._lastBoundary(); - } - next(footer); - }.bind(this); -}; +/***/ }), -FormData.prototype._lastBoundary = function() { - return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; -}; +/***/ 5443: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -FormData.prototype.getHeaders = function(userHeaders) { - var header; - var formHeaders = { - 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() - }; +var util = __nccwpck_require__(3837); +var Stream = (__nccwpck_require__(2781).Stream); +var DelayedStream = __nccwpck_require__(8611); - for (header in userHeaders) { - if (userHeaders.hasOwnProperty(header)) { - formHeaders[header.toLowerCase()] = userHeaders[header]; - } - } +module.exports = CombinedStream; +function CombinedStream() { + this.writable = false; + this.readable = true; + this.dataSize = 0; + this.maxDataSize = 2 * 1024 * 1024; + this.pauseStreams = true; - return formHeaders; -}; + this._released = false; + this._streams = []; + this._currentStream = null; + this._insideLoop = false; + this._pendingNext = false; +} +util.inherits(CombinedStream, Stream); -FormData.prototype.setBoundary = function(boundary) { - this._boundary = boundary; -}; +CombinedStream.create = function(options) { + var combinedStream = new this(); -FormData.prototype.getBoundary = function() { - if (!this._boundary) { - this._generateBoundary(); + options = options || {}; + for (var option in options) { + combinedStream[option] = options[option]; } - return this._boundary; + return combinedStream; }; -FormData.prototype.getBuffer = function() { - var dataBuffer = new Buffer.alloc( 0 ); - var boundary = this.getBoundary(); +CombinedStream.isStreamLike = function(stream) { + return (typeof stream !== 'function') + && (typeof stream !== 'string') + && (typeof stream !== 'boolean') + && (typeof stream !== 'number') + && (!Buffer.isBuffer(stream)); +}; - // Create the form content. Add Line breaks to the end of data. - for (var i = 0, len = this._streams.length; i < len; i++) { - if (typeof this._streams[i] !== 'function') { +CombinedStream.prototype.append = function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); - // Add content to the buffer. - if(Buffer.isBuffer(this._streams[i])) { - dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]); - }else { - dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]); - } + if (isStreamLike) { + if (!(stream instanceof DelayedStream)) { + var newStream = DelayedStream.create(stream, { + maxDataSize: Infinity, + pauseStream: this.pauseStreams, + }); + stream.on('data', this._checkDataSize.bind(this)); + stream = newStream; + } - // Add break after content. - if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) { - dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] ); - } + this._handleErrors(stream); + + if (this.pauseStreams) { + stream.pause(); } } - // Add the footer and return the Buffer object. - return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] ); + this._streams.push(stream); + return this; }; -FormData.prototype._generateBoundary = function() { - // This generates a 50 character boundary similar to those used by Firefox. - // They are optimized for boyer-moore parsing. - var boundary = '--------------------------'; - for (var i = 0; i < 24; i++) { - boundary += Math.floor(Math.random() * 10).toString(16); +CombinedStream.prototype.pipe = function(dest, options) { + Stream.prototype.pipe.call(this, dest, options); + this.resume(); + return dest; +}; + +CombinedStream.prototype._getNext = function() { + this._currentStream = null; + + if (this._insideLoop) { + this._pendingNext = true; + return; // defer call } - this._boundary = boundary; + this._insideLoop = true; + try { + do { + this._pendingNext = false; + this._realGetNext(); + } while (this._pendingNext); + } finally { + this._insideLoop = false; + } }; -// Note: getLengthSync DOESN'T calculate streams length -// As workaround one can calculate file size manually -// and add it as knownLength option -FormData.prototype.getLengthSync = function() { - var knownLength = this._overheadLength + this._valueLength; +CombinedStream.prototype._realGetNext = function() { + var stream = this._streams.shift(); - // Don't get confused, there are 3 "internal" streams for each keyval pair - // so it basically checks if there is any value added to the form - if (this._streams.length) { - knownLength += this._lastBoundary().length; + + if (typeof stream == 'undefined') { + this.end(); + return; } - // https://github.com/form-data/form-data/issues/40 - if (!this.hasKnownLength()) { - // Some async length retrievers are present - // therefore synchronous length calculation is false. - // Please use getLength(callback) to get proper length - this._error(new Error('Cannot calculate proper length in synchronous way.')); + if (typeof stream !== 'function') { + this._pipeNext(stream); + return; } - return knownLength; + var getStream = stream; + getStream(function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('data', this._checkDataSize.bind(this)); + this._handleErrors(stream); + } + + this._pipeNext(stream); + }.bind(this)); }; -// Public API to check if length of added values is known -// https://github.com/form-data/form-data/issues/196 -// https://github.com/form-data/form-data/issues/262 -FormData.prototype.hasKnownLength = function() { - var hasKnownLength = true; +CombinedStream.prototype._pipeNext = function(stream) { + this._currentStream = stream; - if (this._valuesToMeasure.length) { - hasKnownLength = false; + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('end', this._getNext.bind(this)); + stream.pipe(this, {end: false}); + return; } - return hasKnownLength; + var value = stream; + this.write(value); + this._getNext(); }; -FormData.prototype.getLength = function(cb) { - var knownLength = this._overheadLength + this._valueLength; +CombinedStream.prototype._handleErrors = function(stream) { + var self = this; + stream.on('error', function(err) { + self._emitError(err); + }); +}; - if (this._streams.length) { - knownLength += this._lastBoundary().length; - } +CombinedStream.prototype.write = function(data) { + this.emit('data', data); +}; - if (!this._valuesToMeasure.length) { - process.nextTick(cb.bind(this, null, knownLength)); +CombinedStream.prototype.pause = function() { + if (!this.pauseStreams) { return; } - asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { - if (err) { - cb(err); - return; - } + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); + this.emit('pause'); +}; - values.forEach(function(length) { - knownLength += length; - }); +CombinedStream.prototype.resume = function() { + if (!this._released) { + this._released = true; + this.writable = true; + this._getNext(); + } - cb(null, knownLength); - }); + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume(); + this.emit('resume'); }; -FormData.prototype.submit = function(params, cb) { - var request - , options - , defaults = {method: 'post'} - ; - - // parse provided url if it's string - // or treat it as options object - if (typeof params == 'string') { +CombinedStream.prototype.end = function() { + this._reset(); + this.emit('end'); +}; - params = parseUrl(params); - options = populate({ - port: params.port, - path: params.pathname, - host: params.hostname, - protocol: params.protocol - }, defaults); +CombinedStream.prototype.destroy = function() { + this._reset(); + this.emit('close'); +}; - // use custom params - } else { +CombinedStream.prototype._reset = function() { + this.writable = false; + this._streams = []; + this._currentStream = null; +}; - options = populate(params, defaults); - // if no port provided use default one - if (!options.port) { - options.port = options.protocol == 'https:' ? 443 : 80; - } +CombinedStream.prototype._checkDataSize = function() { + this._updateDataSize(); + if (this.dataSize <= this.maxDataSize) { + return; } - // put that good code in getHeaders to some use - options.headers = this.getHeaders(params.headers); + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'; + this._emitError(new Error(message)); +}; - // https if specified, fallback to http in any other case - if (options.protocol == 'https:') { - request = https.request(options); - } else { - request = http.request(options); - } +CombinedStream.prototype._updateDataSize = function() { + this.dataSize = 0; - // get content length and fire away - this.getLength(function(err, length) { - if (err && err !== 'Unknown stream') { - this._error(err); + var self = this; + this._streams.forEach(function(stream) { + if (!stream.dataSize) { return; } - // add content length - if (length) { - request.setHeader('Content-Length', length); - } + self.dataSize += stream.dataSize; + }); - this.pipe(request); - if (cb) { - var onResponse; + if (this._currentStream && this._currentStream.dataSize) { + this.dataSize += this._currentStream.dataSize; + } +}; - var callback = function (error, responce) { - request.removeListener('error', callback); - request.removeListener('response', onResponse); +CombinedStream.prototype._emitError = function(err) { + this._reset(); + this.emit('error', err); +}; - return cb.call(this, error, responce); - }; - onResponse = callback.bind(this, null); +/***/ }), - request.on('error', callback); - request.on('response', onResponse); - } - }.bind(this)); +/***/ 8222: +/***/ ((module, exports, __nccwpck_require__) => { - return request; -}; +/* eslint-env browser */ -FormData.prototype._error = function(err) { - if (!this.error) { - this.error = err; - this.pause(); - this.emit('error', err); - } -}; +/** + * This is the web browser implementation of `debug()`. + */ -FormData.prototype.toString = function () { - return '[object FormData]'; -}; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = localstorage(); +exports.destroy = (() => { + let warned = false; + return () => { + if (!warned) { + warned = true; + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + }; +})(); -/***/ }), +/** + * Colors. + */ -/***/ 7027: -/***/ ((module) => { +exports.colors = [ + '#0000CC', + '#0000FF', + '#0033CC', + '#0033FF', + '#0066CC', + '#0066FF', + '#0099CC', + '#0099FF', + '#00CC00', + '#00CC33', + '#00CC66', + '#00CC99', + '#00CCCC', + '#00CCFF', + '#3300CC', + '#3300FF', + '#3333CC', + '#3333FF', + '#3366CC', + '#3366FF', + '#3399CC', + '#3399FF', + '#33CC00', + '#33CC33', + '#33CC66', + '#33CC99', + '#33CCCC', + '#33CCFF', + '#6600CC', + '#6600FF', + '#6633CC', + '#6633FF', + '#66CC00', + '#66CC33', + '#9900CC', + '#9900FF', + '#9933CC', + '#9933FF', + '#99CC00', + '#99CC33', + '#CC0000', + '#CC0033', + '#CC0066', + '#CC0099', + '#CC00CC', + '#CC00FF', + '#CC3300', + '#CC3333', + '#CC3366', + '#CC3399', + '#CC33CC', + '#CC33FF', + '#CC6600', + '#CC6633', + '#CC9900', + '#CC9933', + '#CCCC00', + '#CCCC33', + '#FF0000', + '#FF0033', + '#FF0066', + '#FF0099', + '#FF00CC', + '#FF00FF', + '#FF3300', + '#FF3333', + '#FF3366', + '#FF3399', + '#FF33CC', + '#FF33FF', + '#FF6600', + '#FF6633', + '#FF9900', + '#FF9933', + '#FFCC00', + '#FFCC33' +]; -// populates missing values -module.exports = function(dst, src) { +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ - Object.keys(src).forEach(function(prop) - { - dst[prop] = dst[prop] || src[prop]; - }); +// eslint-disable-next-line complexity +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } - return dst; -}; + // Internet Explorer and Edge do not support colors. + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // Is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // Double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} -/***/ }), +/** + * Colorize log arguments if enabled. + * + * @api public + */ -/***/ 3682: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + + this.namespace + + (this.useColors ? ' %c' : ' ') + + args[0] + + (this.useColors ? '%c ' : ' ') + + '+' + module.exports.humanize(this.diff); -var register = __nccwpck_require__(4670); -var addHook = __nccwpck_require__(5549); -var removeHook = __nccwpck_require__(6819); + if (!this.useColors) { + return; + } -// bind with array of arguments: https://stackoverflow.com/a/21792913 -var bind = Function.bind; -var bindable = bind.bind(bind); + const c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); -function bindApi(hook, state, name) { - var removeHookRef = bindable(removeHook, null).apply( - null, - name ? [state, name] : [state] - ); - hook.api = { remove: removeHookRef }; - hook.remove = removeHookRef; - ["before", "error", "after", "wrap"].forEach(function (kind) { - var args = name ? [state, kind, name] : [state, kind]; - hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args); - }); -} + // The final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, match => { + if (match === '%%') { + return; + } + index++; + if (match === '%c') { + // We only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); -function HookSingular() { - var singularHookName = "h"; - var singularHookState = { - registry: {}, - }; - var singularHook = register.bind(null, singularHookState, singularHookName); - bindApi(singularHook, singularHookState, singularHookName); - return singularHook; + args.splice(lastC, 0, c); } -function HookCollection() { - var state = { - registry: {}, - }; - - var hook = register.bind(null, state); - bindApi(hook, state); - - return hook; -} +/** + * Invokes `console.debug()` when available. + * No-op when `console.debug` is not a "function". + * If `console.debug` is not available, falls back + * to `console.log`. + * + * @api public + */ +exports.log = console.debug || console.log || (() => {}); -var collectionHookDeprecationMessageDisplayed = false; -function Hook() { - if (!collectionHookDeprecationMessageDisplayed) { - console.warn( - '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4' - ); - collectionHookDeprecationMessageDisplayed = true; - } - return HookCollection(); +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } } -Hook.Singular = HookSingular.bind(); -Hook.Collection = HookCollection.bind(); - -module.exports = Hook; -// expose constructors as a named property for TypeScript -module.exports.Hook = Hook; -module.exports.Singular = Hook.Singular; -module.exports.Collection = Hook.Collection; - +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ +function load() { + let r; + try { + r = exports.storage.getItem('debug'); + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } -/***/ }), + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } -/***/ 5549: -/***/ ((module) => { + return r; +} -module.exports = addHook; +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ -function addHook(state, kind, name, hook) { - var orig = hook; - if (!state.registry[name]) { - state.registry[name] = []; - } +function localstorage() { + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} - if (kind === "before") { - hook = function (method, options) { - return Promise.resolve() - .then(orig.bind(null, options)) - .then(method.bind(null, options)); - }; - } +module.exports = __nccwpck_require__(6243)(exports); - if (kind === "after") { - hook = function (method, options) { - var result; - return Promise.resolve() - .then(method.bind(null, options)) - .then(function (result_) { - result = result_; - return orig(result, options); - }) - .then(function () { - return result; - }); - }; - } +const {formatters} = module.exports; - if (kind === "error") { - hook = function (method, options) { - return Promise.resolve() - .then(method.bind(null, options)) - .catch(function (error) { - return orig(error, options); - }); - }; - } +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ - state.registry[name].push({ - hook: hook, - orig: orig, - }); -} +formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } +}; /***/ }), -/***/ 4670: -/***/ ((module) => { - -module.exports = register; - -function register(state, name, method, options) { - if (typeof method !== "function") { - throw new Error("method for before hook must be a function"); - } - - if (!options) { - options = {}; - } +/***/ 6243: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (Array.isArray(name)) { - return name.reverse().reduce(function (callback, name) { - return register.bind(null, state, name, callback, options); - }, method)(); - } - return Promise.resolve().then(function () { - if (!state.registry[name]) { - return method(options); - } +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ - return state.registry[name].reduce(function (method, registered) { - return registered.hook.bind(null, method, options); - }, method)(); - }); -} +function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = __nccwpck_require__(900); + createDebug.destroy = destroy; + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); -/***/ }), + /** + * The currently active debug mode names, and names to skip. + */ -/***/ 6819: -/***/ ((module) => { + createDebug.names = []; + createDebug.skips = []; -module.exports = removeHook; + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; -function removeHook(state, name, method) { - if (!state.registry[name]) { - return; - } + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; - var index = state.registry[name] - .map(function (registered) { - return registered.orig; - }) - .indexOf(method); + for (let i = 0; i < namespace.length; i++) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } - if (index === -1) { - return; - } + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; - state.registry[name].splice(index, 1); -} + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } -/***/ }), + const self = debug; -/***/ 5443: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // Set `diff` timestamp + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; -var util = __nccwpck_require__(3837); -var Stream = (__nccwpck_require__(2781).Stream); -var DelayedStream = __nccwpck_require__(8611); + args[0] = createDebug.coerce(args[0]); -module.exports = CombinedStream; -function CombinedStream() { - this.writable = false; - this.readable = true; - this.dataSize = 0; - this.maxDataSize = 2 * 1024 * 1024; - this.pauseStreams = true; + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } - this._released = false; - this._streams = []; - this._currentStream = null; - this._insideLoop = false; - this._pendingNext = false; -} -util.inherits(CombinedStream, Stream); + // Apply any `formatters` transformations + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return '%'; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const val = args[index]; + match = formatter.call(self, val); -CombinedStream.create = function(options) { - var combinedStream = new this(); + // Now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); - options = options || {}; - for (var option in options) { - combinedStream[option] = options[option]; - } + // Apply env-specific formatting (colors, etc.) + createDebug.formatArgs.call(self, args); - return combinedStream; -}; + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } -CombinedStream.isStreamLike = function(stream) { - return (typeof stream !== 'function') - && (typeof stream !== 'string') - && (typeof stream !== 'boolean') - && (typeof stream !== 'number') - && (!Buffer.isBuffer(stream)); -}; + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. -CombinedStream.prototype.append = function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); + Object.defineProperty(debug, 'enabled', { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } - if (isStreamLike) { - if (!(stream instanceof DelayedStream)) { - var newStream = DelayedStream.create(stream, { - maxDataSize: Infinity, - pauseStream: this.pauseStreams, - }); - stream.on('data', this._checkDataSize.bind(this)); - stream = newStream; - } + return enabledCache; + }, + set: v => { + enableOverride = v; + } + }); - this._handleErrors(stream); + // Env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } - if (this.pauseStreams) { - stream.pause(); - } - } + return debug; + } - this._streams.push(stream); - return this; -}; + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } -CombinedStream.prototype.pipe = function(dest, options) { - Stream.prototype.pipe.call(this, dest, options); - this.resume(); - return dest; -}; + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; -CombinedStream.prototype._getNext = function() { - this._currentStream = null; + createDebug.names = []; + createDebug.skips = []; - if (this._insideLoop) { - this._pendingNext = true; - return; // defer call - } + let i; + const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + const len = split.length; - this._insideLoop = true; - try { - do { - this._pendingNext = false; - this._realGetNext(); - } while (this._pendingNext); - } finally { - this._insideLoop = false; - } -}; + for (i = 0; i < len; i++) { + if (!split[i]) { + // ignore empty strings + continue; + } -CombinedStream.prototype._realGetNext = function() { - var stream = this._streams.shift(); + namespaces = split[i].replace(/\*/g, '.*?'); + if (namespaces[0] === '-') { + createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + } - if (typeof stream == 'undefined') { - this.end(); - return; - } + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) + ].join(','); + createDebug.enable(''); + return namespaces; + } - if (typeof stream !== 'function') { - this._pipeNext(stream); - return; - } + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled(name) { + if (name[name.length - 1] === '*') { + return true; + } - var getStream = stream; - getStream(function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('data', this._checkDataSize.bind(this)); - this._handleErrors(stream); - } + let i; + let len; - this._pipeNext(stream); - }.bind(this)); -}; + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } -CombinedStream.prototype._pipeNext = function(stream) { - this._currentStream = stream; + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('end', this._getNext.bind(this)); - stream.pipe(this, {end: false}); - return; - } + return false; + } - var value = stream; - this.write(value); - this._getNext(); -}; + /** + * Convert regexp to namespace + * + * @param {RegExp} regxep + * @return {String} namespace + * @api private + */ + function toNamespace(regexp) { + return regexp.toString() + .substring(2, regexp.toString().length - 2) + .replace(/\.\*\?$/, '*'); + } -CombinedStream.prototype._handleErrors = function(stream) { - var self = this; - stream.on('error', function(err) { - self._emitError(err); - }); -}; + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } -CombinedStream.prototype.write = function(data) { - this.emit('data', data); -}; + /** + * XXX DO NOT USE. This is a temporary stub function. + * XXX It WILL be removed in the next major release. + */ + function destroy() { + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } -CombinedStream.prototype.pause = function() { - if (!this.pauseStreams) { - return; - } + createDebug.enable(createDebug.load()); - if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); - this.emit('pause'); -}; + return createDebug; +} -CombinedStream.prototype.resume = function() { - if (!this._released) { - this._released = true; - this.writable = true; - this._getNext(); - } +module.exports = setup; - if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume(); - this.emit('resume'); -}; -CombinedStream.prototype.end = function() { - this._reset(); - this.emit('end'); -}; +/***/ }), -CombinedStream.prototype.destroy = function() { - this._reset(); - this.emit('close'); -}; +/***/ 8237: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -CombinedStream.prototype._reset = function() { - this.writable = false; - this._streams = []; - this._currentStream = null; -}; +/** + * Detect Electron renderer / nwjs process, which is node, but we should + * treat as a browser. + */ -CombinedStream.prototype._checkDataSize = function() { - this._updateDataSize(); - if (this.dataSize <= this.maxDataSize) { - return; - } +if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { + module.exports = __nccwpck_require__(8222); +} else { + module.exports = __nccwpck_require__(4874); +} - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'; - this._emitError(new Error(message)); -}; -CombinedStream.prototype._updateDataSize = function() { - this.dataSize = 0; +/***/ }), - var self = this; - this._streams.forEach(function(stream) { - if (!stream.dataSize) { - return; - } +/***/ 4874: +/***/ ((module, exports, __nccwpck_require__) => { - self.dataSize += stream.dataSize; - }); +/** + * Module dependencies. + */ - if (this._currentStream && this._currentStream.dataSize) { - this.dataSize += this._currentStream.dataSize; - } -}; +const tty = __nccwpck_require__(6224); +const util = __nccwpck_require__(3837); -CombinedStream.prototype._emitError = function(err) { - this._reset(); - this.emit('error', err); -}; +/** + * This is the Node.js implementation of `debug()`. + */ + +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.destroy = util.deprecate( + () => {}, + 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' +); +/** + * Colors. + */ -/***/ }), +exports.colors = [6, 2, 3, 4, 5, 1]; -/***/ 8222: -/***/ ((module, exports, __nccwpck_require__) => { +try { + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + const supportsColor = __nccwpck_require__(9318); -/* eslint-env browser */ + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } +} catch (error) { + // Swallow - we only care if `supports-color` is available; it doesn't have to be. +} /** - * This is the web browser implementation of `debug()`. + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js */ -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); -exports.destroy = (() => { - let warned = false; - - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; -})(); +exports.inspectOpts = Object.keys(process.env).filter(key => { + return /^debug_/i.test(key); +}).reduce((obj, key) => { + // Camel-case + const prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); -/** - * Colors. - */ + // Coerce string value into JS value + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } -exports.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' -]; + obj[prop] = val; + return obj; +}, {}); /** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors + * Is stdout a TTY? Colored output is enabled when `true`. */ -// eslint-disable-next-line complexity function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } - - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); + return 'colors' in exports.inspectOpts ? + Boolean(exports.inspectOpts.colors) : + tty.isatty(process.stderr.fd); } /** - * Colorize log arguments if enabled. + * Adds ANSI color escape codes if enabled. * * @api public */ function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); - - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); + const {namespace: name, useColors} = this; - args.splice(lastC, 0, c); + if (useColors) { + const c = this.color; + const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); + const prefix = ` ${colorCode};1m${name} \u001B[0m`; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } +} + +function getDate() { + if (exports.inspectOpts.hideDate) { + return ''; + } + return new Date().toISOString() + ' '; } /** - * Invokes `console.debug()` when available. - * No-op when `console.debug` is not a "function". - * If `console.debug` is not available, falls back - * to `console.log`. - * - * @api public + * Invokes `util.format()` with the specified arguments and writes to stderr. */ -exports.log = console.debug || console.log || (() => {}); + +function log(...args) { + return process.stderr.write(util.format(...args) + '\n'); +} /** * Save `namespaces`. @@ -25363,15 +27904,12 @@ exports.log = console.debug || console.log || (() => {}); * @api private */ function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; } } @@ -25381,42 +27919,24 @@ function save(namespaces) { * @return {String} returns the previously persisted debug modes * @api private */ -function load() { - let r; - try { - r = exports.storage.getItem('debug'); - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - return r; +function load() { + return process.env.DEBUG; } /** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. + * Init logic for `debug` instances. * - * @return {LocalStorage} - * @api private + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. */ -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? +function init(debug) { + debug.inspectOpts = {}; + + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; } } @@ -25425,1376 +27945,1342 @@ module.exports = __nccwpck_require__(6243)(exports); const {formatters} = module.exports; /** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + * Map %o to `util.inspect()`, all on a single line. */ -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } +formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n') + .map(str => str.trim()) + .join(' '); }; - -/***/ }), - -/***/ 6243: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - /** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. + * Map %O to `util.inspect()`, allowing multiple lines if needed. */ -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = __nccwpck_require__(900); - createDebug.destroy = destroy; - - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; +formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; +/***/ }), - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } +/***/ 8611: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; +var Stream = (__nccwpck_require__(2781).Stream); +var util = __nccwpck_require__(3837); - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; +module.exports = DelayedStream; +function DelayedStream() { + this.source = null; + this.dataSize = 0; + this.maxDataSize = 1024 * 1024; + this.pauseStream = true; - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } + this._maxDataSizeExceeded = false; + this._released = false; + this._bufferedEvents = []; +} +util.inherits(DelayedStream, Stream); - const self = debug; +DelayedStream.create = function(source, options) { + var delayedStream = new this(); - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; + options = options || {}; + for (var option in options) { + delayedStream[option] = options[option]; + } - args[0] = createDebug.coerce(args[0]); + delayedStream.source = source; - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } + var realEmit = source.emit; + source.emit = function() { + delayedStream._handleEmit(arguments); + return realEmit.apply(source, arguments); + }; - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); + source.on('error', function() {}); + if (delayedStream.pauseStream) { + source.pause(); + } - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); + return delayedStream; +}; - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); +Object.defineProperty(DelayedStream.prototype, 'readable', { + configurable: true, + enumerable: true, + get: function() { + return this.source.readable; + } +}); - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } +DelayedStream.prototype.setEncoding = function() { + return this.source.setEncoding.apply(this.source, arguments); +}; - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. +DelayedStream.prototype.resume = function() { + if (!this._released) { + this.release(); + } - Object.defineProperty(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } + this.source.resume(); +}; - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); +DelayedStream.prototype.pause = function() { + this.source.pause(); +}; - // Env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } +DelayedStream.prototype.release = function() { + this._released = true; - return debug; - } + this._bufferedEvents.forEach(function(args) { + this.emit.apply(this, args); + }.bind(this)); + this._bufferedEvents = []; +}; - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } +DelayedStream.prototype.pipe = function() { + var r = Stream.prototype.pipe.apply(this, arguments); + this.resume(); + return r; +}; - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; +DelayedStream.prototype._handleEmit = function(args) { + if (this._released) { + this.emit.apply(this, args); + return; + } - createDebug.names = []; - createDebug.skips = []; + if (args[0] === 'data') { + this.dataSize += args[1].length; + this._checkIfMaxDataSizeExceeded(); + } - let i; - const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - const len = split.length; + this._bufferedEvents.push(args); +}; - for (i = 0; i < len; i++) { - if (!split[i]) { - // ignore empty strings - continue; - } +DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { + if (this._maxDataSizeExceeded) { + return; + } - namespaces = split[i].replace(/\*/g, '.*?'); + if (this.dataSize <= this.maxDataSize) { + return; + } - if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } - } - } + this._maxDataSizeExceeded = true; + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' + this.emit('error', new Error(message)); +}; - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names.map(toNamespace), - ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } +/***/ }), - let i; - let len; +/***/ 8932: +/***/ ((__unused_webpack_module, exports) => { - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } +"use strict"; - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } - return false; - } +Object.defineProperty(exports, "__esModule", ({ value: true })); - /** - * Convert regexp to namespace - * - * @param {RegExp} regxep - * @return {String} namespace - * @api private - */ - function toNamespace(regexp) { - return regexp.toString() - .substring(2, regexp.toString().length - 2) - .replace(/\.\*\?$/, '*'); - } +class Deprecation extends Error { + constructor(message) { + super(message); // Maintains proper stack trace (only available on V8) - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } + /* istanbul ignore next */ - /** - * XXX DO NOT USE. This is a temporary stub function. - * XXX It WILL be removed in the next major release. - */ - function destroy() { - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } - createDebug.enable(createDebug.load()); + this.name = 'Deprecation'; + } - return createDebug; } -module.exports = setup; +exports.Deprecation = Deprecation; /***/ }), -/***/ 8237: +/***/ 1133: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ +var debug; -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = __nccwpck_require__(8222); -} else { - module.exports = __nccwpck_require__(4874); -} +module.exports = function () { + if (!debug) { + try { + /* eslint global-require: off */ + debug = __nccwpck_require__(8237)("follow-redirects"); + } + catch (error) { /* */ } + if (typeof debug !== "function") { + debug = function () { /* */ }; + } + } + debug.apply(null, arguments); +}; /***/ }), -/***/ 4874: -/***/ ((module, exports, __nccwpck_require__) => { +/***/ 7707: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var url = __nccwpck_require__(7310); +var URL = url.URL; +var http = __nccwpck_require__(3685); +var https = __nccwpck_require__(5687); +var Writable = (__nccwpck_require__(2781).Writable); +var assert = __nccwpck_require__(9491); +var debug = __nccwpck_require__(1133); + +// Create handlers that pass events from native requests +var events = ["abort", "aborted", "connect", "error", "socket", "timeout"]; +var eventHandlers = Object.create(null); +events.forEach(function (event) { + eventHandlers[event] = function (arg1, arg2, arg3) { + this._redirectable.emit(event, arg1, arg2, arg3); + }; +}); + +var InvalidUrlError = createErrorType( + "ERR_INVALID_URL", + "Invalid URL", + TypeError +); +// Error types with codes +var RedirectionError = createErrorType( + "ERR_FR_REDIRECTION_FAILURE", + "Redirected request failed" +); +var TooManyRedirectsError = createErrorType( + "ERR_FR_TOO_MANY_REDIRECTS", + "Maximum number of redirects exceeded" +); +var MaxBodyLengthExceededError = createErrorType( + "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", + "Request body larger than maxBodyLength limit" +); +var WriteAfterEndError = createErrorType( + "ERR_STREAM_WRITE_AFTER_END", + "write after end" +); -/** - * Module dependencies. - */ +// An HTTP(S) request that can be redirected +function RedirectableRequest(options, responseCallback) { + // Initialize the request + Writable.call(this); + this._sanitizeOptions(options); + this._options = options; + this._ended = false; + this._ending = false; + this._redirectCount = 0; + this._redirects = []; + this._requestBodyLength = 0; + this._requestBodyBuffers = []; -const tty = __nccwpck_require__(6224); -const util = __nccwpck_require__(3837); + // Attach a callback if passed + if (responseCallback) { + this.on("response", responseCallback); + } -/** - * This is the Node.js implementation of `debug()`. - */ + // React to responses of native requests + var self = this; + this._onNativeResponse = function (response) { + self._processResponse(response); + }; -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.destroy = util.deprecate( - () => {}, - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' -); + // Perform the first request + this._performRequest(); +} +RedirectableRequest.prototype = Object.create(Writable.prototype); -/** - * Colors. - */ +RedirectableRequest.prototype.abort = function () { + abortRequest(this._currentRequest); + this.emit("abort"); +}; -exports.colors = [6, 2, 3, 4, 5, 1]; +// Writes buffered data to the current native request +RedirectableRequest.prototype.write = function (data, encoding, callback) { + // Writing is not allowed if end has been called + if (this._ending) { + throw new WriteAfterEndError(); + } -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = __nccwpck_require__(9318); + // Validate input and shift parameters if necessary + if (!isString(data) && !isBuffer(data)) { + throw new TypeError("data should be a string, Buffer or Uint8Array"); + } + if (isFunction(encoding)) { + callback = encoding; + encoding = null; + } - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } -} catch (error) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} + // Ignore empty buffers, since writing them doesn't invoke the callback + // https://github.com/nodejs/node/issues/22066 + if (data.length === 0) { + if (callback) { + callback(); + } + return; + } + // Only write when we don't exceed the maximum body length + if (this._requestBodyLength + data.length <= this._options.maxBodyLength) { + this._requestBodyLength += data.length; + this._requestBodyBuffers.push({ data: data, encoding: encoding }); + this._currentRequest.write(data, encoding, callback); + } + // Error when we exceed the maximum body length + else { + this.emit("error", new MaxBodyLengthExceededError()); + this.abort(); + } +}; -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ +// Ends the current native request +RedirectableRequest.prototype.end = function (data, encoding, callback) { + // Shift parameters if necessary + if (isFunction(data)) { + callback = data; + data = encoding = null; + } + else if (isFunction(encoding)) { + callback = encoding; + encoding = null; + } -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); + // Write data if needed and end + if (!data) { + this._ended = this._ending = true; + this._currentRequest.end(null, null, callback); + } + else { + var self = this; + var currentRequest = this._currentRequest; + this.write(data, encoding, function () { + self._ended = true; + currentRequest.end(null, null, callback); + }); + this._ending = true; + } +}; - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } +// Sets a header value on the current native request +RedirectableRequest.prototype.setHeader = function (name, value) { + this._options.headers[name] = value; + this._currentRequest.setHeader(name, value); +}; - obj[prop] = val; - return obj; -}, {}); +// Clears a header value on the current native request +RedirectableRequest.prototype.removeHeader = function (name) { + delete this._options.headers[name]; + this._currentRequest.removeHeader(name); +}; -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ +// Global timeout for all underlying requests +RedirectableRequest.prototype.setTimeout = function (msecs, callback) { + var self = this; -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} + // Destroys the socket on timeout + function destroyOnTimeout(socket) { + socket.setTimeout(msecs); + socket.removeListener("timeout", socket.destroy); + socket.addListener("timeout", socket.destroy); + } -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ + // Sets up a timer to trigger a timeout event + function startTimer(socket) { + if (self._timeout) { + clearTimeout(self._timeout); + } + self._timeout = setTimeout(function () { + self.emit("timeout"); + clearTimer(); + }, msecs); + destroyOnTimeout(socket); + } -function formatArgs(args) { - const {namespace: name, useColors} = this; + // Stops a timeout from triggering + function clearTimer() { + // Clear the timeout + if (self._timeout) { + clearTimeout(self._timeout); + self._timeout = null; + } - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; + // Clean up all attached listeners + self.removeListener("abort", clearTimer); + self.removeListener("error", clearTimer); + self.removeListener("response", clearTimer); + if (callback) { + self.removeListener("timeout", callback); + } + if (!self.socket) { + self._currentRequest.removeListener("socket", startTimer); + } + } - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} + // Attach callback if passed + if (callback) { + this.on("timeout", callback); + } -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} + // Start the timer if or when the socket is opened + if (this.socket) { + startTimer(this.socket); + } + else { + this._currentRequest.once("socket", startTimer); + } -/** - * Invokes `util.format()` with the specified arguments and writes to stderr. - */ + // Clean up on events + this.on("socket", destroyOnTimeout); + this.on("abort", clearTimer); + this.on("error", clearTimer); + this.on("response", clearTimer); -function log(...args) { - return process.stderr.write(util.format(...args) + '\n'); -} + return this; +}; -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} +// Proxy all other public ClientRequest methods +[ + "flushHeaders", "getHeader", + "setNoDelay", "setSocketKeepAlive", +].forEach(function (method) { + RedirectableRequest.prototype[method] = function (a, b) { + return this._currentRequest[method](a, b); + }; +}); -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ +// Proxy all public ClientRequest properties +["aborted", "connection", "socket"].forEach(function (property) { + Object.defineProperty(RedirectableRequest.prototype, property, { + get: function () { return this._currentRequest[property]; }, + }); +}); -function load() { - return process.env.DEBUG; -} +RedirectableRequest.prototype._sanitizeOptions = function (options) { + // Ensure headers are always present + if (!options.headers) { + options.headers = {}; + } -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ + // Since http.request treats host as an alias of hostname, + // but the url module interprets host as hostname plus port, + // eliminate the host property to avoid confusion. + if (options.host) { + // Use hostname if set, because it has precedence + if (!options.hostname) { + options.hostname = options.host; + } + delete options.host; + } -function init(debug) { - debug.inspectOpts = {}; + // Complete the URL object when necessary + if (!options.pathname && options.path) { + var searchPos = options.path.indexOf("?"); + if (searchPos < 0) { + options.pathname = options.path; + } + else { + options.pathname = options.path.substring(0, searchPos); + options.search = options.path.substring(searchPos); + } + } +}; - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} -module.exports = __nccwpck_require__(6243)(exports); +// Executes the next native request (initial or redirect) +RedirectableRequest.prototype._performRequest = function () { + // Load the native protocol + var protocol = this._options.protocol; + var nativeProtocol = this._options.nativeProtocols[protocol]; + if (!nativeProtocol) { + this.emit("error", new TypeError("Unsupported protocol " + protocol)); + return; + } -const {formatters} = module.exports; + // If specified, use the agent corresponding to the protocol + // (HTTP and HTTPS use different types of agents) + if (this._options.agents) { + var scheme = protocol.slice(0, -1); + this._options.agent = this._options.agents[scheme]; + } -/** - * Map %o to `util.inspect()`, all on a single line. - */ + // Create the native request and set up its event handlers + var request = this._currentRequest = + nativeProtocol.request(this._options, this._onNativeResponse); + request._redirectable = this; + for (var event of events) { + request.on(event, eventHandlers[event]); + } -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n') - .map(str => str.trim()) - .join(' '); + // RFC7230§5.3.1: When making a request directly to an origin server, […] + // a client MUST send only the absolute path […] as the request-target. + this._currentUrl = /^\//.test(this._options.path) ? + url.format(this._options) : + // When making a request to a proxy, […] + // a client MUST send the target URI in absolute-form […]. + this._options.path; + + // End a redirected request + // (The first request must be ended explicitly with RedirectableRequest#end) + if (this._isRedirect) { + // Write the request entity and end + var i = 0; + var self = this; + var buffers = this._requestBodyBuffers; + (function writeNext(error) { + // Only write if this request has not been redirected yet + /* istanbul ignore else */ + if (request === self._currentRequest) { + // Report any write errors + /* istanbul ignore if */ + if (error) { + self.emit("error", error); + } + // Write the next buffer if there are still left + else if (i < buffers.length) { + var buffer = buffers[i++]; + /* istanbul ignore else */ + if (!request.finished) { + request.write(buffer.data, buffer.encoding, writeNext); + } + } + // End the request if `end` has been called on us + else if (self._ended) { + request.end(); + } + } + }()); + } }; -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ +// Processes a response from the current native request +RedirectableRequest.prototype._processResponse = function (response) { + // Store the redirected response + var statusCode = response.statusCode; + if (this._options.trackRedirects) { + this._redirects.push({ + url: this._currentUrl, + headers: response.headers, + statusCode: statusCode, + }); + } -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; + // RFC7231§6.4: The 3xx (Redirection) class of status code indicates + // that further action needs to be taken by the user agent in order to + // fulfill the request. If a Location header field is provided, + // the user agent MAY automatically redirect its request to the URI + // referenced by the Location field value, + // even if the specific status code is not understood. + + // If the response is not a redirect; return it as-is + var location = response.headers.location; + if (!location || this._options.followRedirects === false || + statusCode < 300 || statusCode >= 400) { + response.responseUrl = this._currentUrl; + response.redirects = this._redirects; + this.emit("response", response); + // Clean up + this._requestBodyBuffers = []; + return; + } -/***/ }), + // The response is a redirect, so abort the current request + abortRequest(this._currentRequest); + // Discard the remainder of the response to avoid waiting for data + response.destroy(); -/***/ 8611: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // RFC7231§6.4: A client SHOULD detect and intervene + // in cyclical redirections (i.e., "infinite" redirection loops). + if (++this._redirectCount > this._options.maxRedirects) { + this.emit("error", new TooManyRedirectsError()); + return; + } -var Stream = (__nccwpck_require__(2781).Stream); -var util = __nccwpck_require__(3837); + // Store the request headers if applicable + var requestHeaders; + var beforeRedirect = this._options.beforeRedirect; + if (beforeRedirect) { + requestHeaders = Object.assign({ + // The Host header was set by nativeProtocol.request + Host: response.req.getHeader("host"), + }, this._options.headers); + } -module.exports = DelayedStream; -function DelayedStream() { - this.source = null; - this.dataSize = 0; - this.maxDataSize = 1024 * 1024; - this.pauseStream = true; + // RFC7231§6.4: Automatic redirection needs to done with + // care for methods not known to be safe, […] + // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change + // the request method from POST to GET for the subsequent request. + var method = this._options.method; + if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || + // RFC7231§6.4.4: The 303 (See Other) status code indicates that + // the server is redirecting the user agent to a different resource […] + // A user agent can perform a retrieval request targeting that URI + // (a GET or HEAD request if using HTTP) […] + (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) { + this._options.method = "GET"; + // Drop a possible entity and headers related to it + this._requestBodyBuffers = []; + removeMatchingHeaders(/^content-/i, this._options.headers); + } - this._maxDataSizeExceeded = false; - this._released = false; - this._bufferedEvents = []; -} -util.inherits(DelayedStream, Stream); + // Drop the Host header, as the redirect might lead to a different host + var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); -DelayedStream.create = function(source, options) { - var delayedStream = new this(); + // If the redirect is relative, carry over the host of the last request + var currentUrlParts = url.parse(this._currentUrl); + var currentHost = currentHostHeader || currentUrlParts.host; + var currentUrl = /^\w+:/.test(location) ? this._currentUrl : + url.format(Object.assign(currentUrlParts, { host: currentHost })); - options = options || {}; - for (var option in options) { - delayedStream[option] = options[option]; + // Determine the URL of the redirection + var redirectUrl; + try { + redirectUrl = url.resolve(currentUrl, location); + } + catch (cause) { + this.emit("error", new RedirectionError({ cause: cause })); + return; } - delayedStream.source = source; + // Create the redirected request + debug("redirecting to", redirectUrl); + this._isRedirect = true; + var redirectUrlParts = url.parse(redirectUrl); + Object.assign(this._options, redirectUrlParts); - var realEmit = source.emit; - source.emit = function() { - delayedStream._handleEmit(arguments); - return realEmit.apply(source, arguments); - }; + // Drop confidential headers when redirecting to a less secure protocol + // or to a different domain that is not a superdomain + if (redirectUrlParts.protocol !== currentUrlParts.protocol && + redirectUrlParts.protocol !== "https:" || + redirectUrlParts.host !== currentHost && + !isSubdomain(redirectUrlParts.host, currentHost)) { + removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers); + } - source.on('error', function() {}); - if (delayedStream.pauseStream) { - source.pause(); + // Evaluate the beforeRedirect callback + if (isFunction(beforeRedirect)) { + var responseDetails = { + headers: response.headers, + statusCode: statusCode, + }; + var requestDetails = { + url: currentUrl, + method: method, + headers: requestHeaders, + }; + try { + beforeRedirect(this._options, responseDetails, requestDetails); + } + catch (err) { + this.emit("error", err); + return; + } + this._sanitizeOptions(this._options); } - return delayedStream; + // Perform the redirected request + try { + this._performRequest(); + } + catch (cause) { + this.emit("error", new RedirectionError({ cause: cause })); + } }; -Object.defineProperty(DelayedStream.prototype, 'readable', { - configurable: true, - enumerable: true, - get: function() { - return this.source.readable; - } -}); +// Wraps the key/value object of protocols with redirect functionality +function wrap(protocols) { + // Default settings + var exports = { + maxRedirects: 21, + maxBodyLength: 10 * 1024 * 1024, + }; -DelayedStream.prototype.setEncoding = function() { - return this.source.setEncoding.apply(this.source, arguments); -}; + // Wrap each protocol + var nativeProtocols = {}; + Object.keys(protocols).forEach(function (scheme) { + var protocol = scheme + ":"; + var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; + var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol); -DelayedStream.prototype.resume = function() { - if (!this._released) { - this.release(); - } + // Executes a request, following redirects + function request(input, options, callback) { + // Parse parameters + if (isString(input)) { + var parsed; + try { + parsed = urlToOptions(new URL(input)); + } + catch (err) { + /* istanbul ignore next */ + parsed = url.parse(input); + } + if (!isString(parsed.protocol)) { + throw new InvalidUrlError({ input }); + } + input = parsed; + } + else if (URL && (input instanceof URL)) { + input = urlToOptions(input); + } + else { + callback = options; + options = input; + input = { protocol: protocol }; + } + if (isFunction(options)) { + callback = options; + options = null; + } - this.source.resume(); -}; + // Set defaults + options = Object.assign({ + maxRedirects: exports.maxRedirects, + maxBodyLength: exports.maxBodyLength, + }, input, options); + options.nativeProtocols = nativeProtocols; + if (!isString(options.host) && !isString(options.hostname)) { + options.hostname = "::1"; + } -DelayedStream.prototype.pause = function() { - this.source.pause(); -}; + assert.equal(options.protocol, protocol, "protocol mismatch"); + debug("options", options); + return new RedirectableRequest(options, callback); + } -DelayedStream.prototype.release = function() { - this._released = true; + // Executes a GET request, following redirects + function get(input, options, callback) { + var wrappedRequest = wrappedProtocol.request(input, options, callback); + wrappedRequest.end(); + return wrappedRequest; + } - this._bufferedEvents.forEach(function(args) { - this.emit.apply(this, args); - }.bind(this)); - this._bufferedEvents = []; -}; + // Expose the properties on the wrapped protocol + Object.defineProperties(wrappedProtocol, { + request: { value: request, configurable: true, enumerable: true, writable: true }, + get: { value: get, configurable: true, enumerable: true, writable: true }, + }); + }); + return exports; +} -DelayedStream.prototype.pipe = function() { - var r = Stream.prototype.pipe.apply(this, arguments); - this.resume(); - return r; -}; +/* istanbul ignore next */ +function noop() { /* empty */ } -DelayedStream.prototype._handleEmit = function(args) { - if (this._released) { - this.emit.apply(this, args); - return; +// from https://github.com/nodejs/node/blob/master/lib/internal/url.js +function urlToOptions(urlObject) { + var options = { + protocol: urlObject.protocol, + hostname: urlObject.hostname.startsWith("[") ? + /* istanbul ignore next */ + urlObject.hostname.slice(1, -1) : + urlObject.hostname, + hash: urlObject.hash, + search: urlObject.search, + pathname: urlObject.pathname, + path: urlObject.pathname + urlObject.search, + href: urlObject.href, + }; + if (urlObject.port !== "") { + options.port = Number(urlObject.port); + } + return options; +} + +function removeMatchingHeaders(regex, headers) { + var lastValue; + for (var header in headers) { + if (regex.test(header)) { + lastValue = headers[header]; + delete headers[header]; + } } + return (lastValue === null || typeof lastValue === "undefined") ? + undefined : String(lastValue).trim(); +} - if (args[0] === 'data') { - this.dataSize += args[1].length; - this._checkIfMaxDataSizeExceeded(); +function createErrorType(code, message, baseClass) { + // Create constructor + function CustomError(properties) { + Error.captureStackTrace(this, this.constructor); + Object.assign(this, properties || {}); + this.code = code; + this.message = this.cause ? message + ": " + this.cause.message : message; } - this._bufferedEvents.push(args); -}; + // Attach constructor and set default properties + CustomError.prototype = new (baseClass || Error)(); + CustomError.prototype.constructor = CustomError; + CustomError.prototype.name = "Error [" + code + "]"; + return CustomError; +} -DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { - if (this._maxDataSizeExceeded) { - return; +function abortRequest(request) { + for (var event of events) { + request.removeListener(event, eventHandlers[event]); } + request.on("error", noop); + request.abort(); +} - if (this.dataSize <= this.maxDataSize) { - return; - } +function isSubdomain(subdomain, domain) { + assert(isString(subdomain) && isString(domain)); + var dot = subdomain.length - domain.length - 1; + return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain); +} - this._maxDataSizeExceeded = true; - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' - this.emit('error', new Error(message)); -}; +function isString(value) { + return typeof value === "string" || value instanceof String; +} +function isFunction(value) { + return typeof value === "function"; +} -/***/ }), +function isBuffer(value) { + return typeof value === "object" && ("length" in value); +} -/***/ 8932: -/***/ ((__unused_webpack_module, exports) => { +// Exports +module.exports = wrap({ http: http, https: https }); +module.exports.wrap = wrap; -"use strict"; +/***/ }), -Object.defineProperty(exports, "__esModule", ({ value: true })); +/***/ 4334: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -class Deprecation extends Error { - constructor(message) { - super(message); // Maintains proper stack trace (only available on V8) +var CombinedStream = __nccwpck_require__(5443); +var util = __nccwpck_require__(3837); +var path = __nccwpck_require__(1017); +var http = __nccwpck_require__(3685); +var https = __nccwpck_require__(5687); +var parseUrl = (__nccwpck_require__(7310).parse); +var fs = __nccwpck_require__(7147); +var Stream = (__nccwpck_require__(2781).Stream); +var mime = __nccwpck_require__(3583); +var asynckit = __nccwpck_require__(4812); +var populate = __nccwpck_require__(7142); - /* istanbul ignore next */ +// Public API +module.exports = FormData; - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } +// make it a Stream +util.inherits(FormData, CombinedStream); - this.name = 'Deprecation'; +/** + * Create readable "multipart/form-data" streams. + * Can be used to submit forms + * and file uploads to other web applications. + * + * @constructor + * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream + */ +function FormData(options) { + if (!(this instanceof FormData)) { + return new FormData(options); } + this._overheadLength = 0; + this._valueLength = 0; + this._valuesToMeasure = []; + + CombinedStream.call(this); + + options = options || {}; + for (var option in options) { + this[option] = options[option]; + } } -exports.Deprecation = Deprecation; +FormData.LINE_BREAK = '\r\n'; +FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; +FormData.prototype.append = function(field, value, options) { -/***/ }), + options = options || {}; -/***/ 1133: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // allow filename as single option + if (typeof options == 'string') { + options = {filename: options}; + } -var debug; + var append = CombinedStream.prototype.append.bind(this); -module.exports = function () { - if (!debug) { - try { - /* eslint global-require: off */ - debug = __nccwpck_require__(8237)("follow-redirects"); - } - catch (error) { /* */ } - if (typeof debug !== "function") { - debug = function () { /* */ }; - } + // all that streamy business can't handle numbers + if (typeof value == 'number') { + value = '' + value; } - debug.apply(null, arguments); -}; + // https://github.com/felixge/node-form-data/issues/38 + if (util.isArray(value)) { + // Please convert your array into string + // the way web server expects it + this._error(new Error('Arrays are not supported.')); + return; + } -/***/ }), + var header = this._multiPartHeader(field, value, options); + var footer = this._multiPartFooter(); -/***/ 7707: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + append(header); + append(value); + append(footer); -var url = __nccwpck_require__(7310); -var URL = url.URL; -var http = __nccwpck_require__(3685); -var https = __nccwpck_require__(5687); -var Writable = (__nccwpck_require__(2781).Writable); -var assert = __nccwpck_require__(9491); -var debug = __nccwpck_require__(1133); + // pass along options.knownLength + this._trackLength(header, value, options); +}; -// Create handlers that pass events from native requests -var events = ["abort", "aborted", "connect", "error", "socket", "timeout"]; -var eventHandlers = Object.create(null); -events.forEach(function (event) { - eventHandlers[event] = function (arg1, arg2, arg3) { - this._redirectable.emit(event, arg1, arg2, arg3); - }; -}); +FormData.prototype._trackLength = function(header, value, options) { + var valueLength = 0; -var InvalidUrlError = createErrorType( - "ERR_INVALID_URL", - "Invalid URL", - TypeError -); -// Error types with codes -var RedirectionError = createErrorType( - "ERR_FR_REDIRECTION_FAILURE", - "Redirected request failed" -); -var TooManyRedirectsError = createErrorType( - "ERR_FR_TOO_MANY_REDIRECTS", - "Maximum number of redirects exceeded" -); -var MaxBodyLengthExceededError = createErrorType( - "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", - "Request body larger than maxBodyLength limit" -); -var WriteAfterEndError = createErrorType( - "ERR_STREAM_WRITE_AFTER_END", - "write after end" -); + // used w/ getLengthSync(), when length is known. + // e.g. for streaming directly from a remote server, + // w/ a known file a size, and not wanting to wait for + // incoming file to finish to get its size. + if (options.knownLength != null) { + valueLength += +options.knownLength; + } else if (Buffer.isBuffer(value)) { + valueLength = value.length; + } else if (typeof value === 'string') { + valueLength = Buffer.byteLength(value); + } -// An HTTP(S) request that can be redirected -function RedirectableRequest(options, responseCallback) { - // Initialize the request - Writable.call(this); - this._sanitizeOptions(options); - this._options = options; - this._ended = false; - this._ending = false; - this._redirectCount = 0; - this._redirects = []; - this._requestBodyLength = 0; - this._requestBodyBuffers = []; + this._valueLength += valueLength; - // Attach a callback if passed - if (responseCallback) { - this.on("response", responseCallback); + // @check why add CRLF? does this account for custom/multiple CRLFs? + this._overheadLength += + Buffer.byteLength(header) + + FormData.LINE_BREAK.length; + + // empty or either doesn't have path or not an http response or not a stream + if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) { + return; } - // React to responses of native requests - var self = this; - this._onNativeResponse = function (response) { - self._processResponse(response); - }; + // no need to bother with the length + if (!options.knownLength) { + this._valuesToMeasure.push(value); + } +}; - // Perform the first request - this._performRequest(); -} -RedirectableRequest.prototype = Object.create(Writable.prototype); +FormData.prototype._lengthRetriever = function(value, callback) { + + if (value.hasOwnProperty('fd')) { + + // take read range into a account + // `end` = Infinity –> read file till the end + // + // TODO: Looks like there is bug in Node fs.createReadStream + // it doesn't respect `end` options without `start` options + // Fix it when node fixes it. + // https://github.com/joyent/node/issues/7819 + if (value.end != undefined && value.end != Infinity && value.start != undefined) { -RedirectableRequest.prototype.abort = function () { - abortRequest(this._currentRequest); - this.emit("abort"); -}; + // when end specified + // no need to calculate range + // inclusive, starts with 0 + callback(null, value.end + 1 - (value.start ? value.start : 0)); -// Writes buffered data to the current native request -RedirectableRequest.prototype.write = function (data, encoding, callback) { - // Writing is not allowed if end has been called - if (this._ending) { - throw new WriteAfterEndError(); - } + // not that fast snoopy + } else { + // still need to fetch file size from fs + fs.stat(value.path, function(err, stat) { - // Validate input and shift parameters if necessary - if (!isString(data) && !isBuffer(data)) { - throw new TypeError("data should be a string, Buffer or Uint8Array"); - } - if (isFunction(encoding)) { - callback = encoding; - encoding = null; - } + var fileSize; - // Ignore empty buffers, since writing them doesn't invoke the callback - // https://github.com/nodejs/node/issues/22066 - if (data.length === 0) { - if (callback) { - callback(); + if (err) { + callback(err); + return; + } + + // update final size based on the range options + fileSize = stat.size - (value.start ? value.start : 0); + callback(null, fileSize); + }); } - return; - } - // Only write when we don't exceed the maximum body length - if (this._requestBodyLength + data.length <= this._options.maxBodyLength) { - this._requestBodyLength += data.length; - this._requestBodyBuffers.push({ data: data, encoding: encoding }); - this._currentRequest.write(data, encoding, callback); - } - // Error when we exceed the maximum body length - else { - this.emit("error", new MaxBodyLengthExceededError()); - this.abort(); - } -}; -// Ends the current native request -RedirectableRequest.prototype.end = function (data, encoding, callback) { - // Shift parameters if necessary - if (isFunction(data)) { - callback = data; - data = encoding = null; - } - else if (isFunction(encoding)) { - callback = encoding; - encoding = null; - } + // or http response + } else if (value.hasOwnProperty('httpVersion')) { + callback(null, +value.headers['content-length']); - // Write data if needed and end - if (!data) { - this._ended = this._ending = true; - this._currentRequest.end(null, null, callback); - } - else { - var self = this; - var currentRequest = this._currentRequest; - this.write(data, encoding, function () { - self._ended = true; - currentRequest.end(null, null, callback); + // or request stream http://github.com/mikeal/request + } else if (value.hasOwnProperty('httpModule')) { + // wait till response come back + value.on('response', function(response) { + value.pause(); + callback(null, +response.headers['content-length']); }); - this._ending = true; + value.resume(); + + // something else + } else { + callback('Unknown stream'); } }; -// Sets a header value on the current native request -RedirectableRequest.prototype.setHeader = function (name, value) { - this._options.headers[name] = value; - this._currentRequest.setHeader(name, value); -}; +FormData.prototype._multiPartHeader = function(field, value, options) { + // custom header specified (as string)? + // it becomes responsible for boundary + // (e.g. to handle extra CRLFs on .NET servers) + if (typeof options.header == 'string') { + return options.header; + } -// Clears a header value on the current native request -RedirectableRequest.prototype.removeHeader = function (name) { - delete this._options.headers[name]; - this._currentRequest.removeHeader(name); -}; + var contentDisposition = this._getContentDisposition(value, options); + var contentType = this._getContentType(value, options); -// Global timeout for all underlying requests -RedirectableRequest.prototype.setTimeout = function (msecs, callback) { - var self = this; + var contents = ''; + var headers = { + // add custom disposition as third element or keep it two elements if not + 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), + // if no content type. allow it to be empty array + 'Content-Type': [].concat(contentType || []) + }; - // Destroys the socket on timeout - function destroyOnTimeout(socket) { - socket.setTimeout(msecs); - socket.removeListener("timeout", socket.destroy); - socket.addListener("timeout", socket.destroy); + // allow custom headers. + if (typeof options.header == 'object') { + populate(headers, options.header); } - // Sets up a timer to trigger a timeout event - function startTimer(socket) { - if (self._timeout) { - clearTimeout(self._timeout); - } - self._timeout = setTimeout(function () { - self.emit("timeout"); - clearTimer(); - }, msecs); - destroyOnTimeout(socket); - } + var header; + for (var prop in headers) { + if (!headers.hasOwnProperty(prop)) continue; + header = headers[prop]; - // Stops a timeout from triggering - function clearTimer() { - // Clear the timeout - if (self._timeout) { - clearTimeout(self._timeout); - self._timeout = null; + // skip nullish headers. + if (header == null) { + continue; } - // Clean up all attached listeners - self.removeListener("abort", clearTimer); - self.removeListener("error", clearTimer); - self.removeListener("response", clearTimer); - if (callback) { - self.removeListener("timeout", callback); + // convert all headers to arrays. + if (!Array.isArray(header)) { + header = [header]; } - if (!self.socket) { - self._currentRequest.removeListener("socket", startTimer); + + // add non-empty headers. + if (header.length) { + contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; } } - // Attach callback if passed - if (callback) { - this.on("timeout", callback); - } + return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; +}; - // Start the timer if or when the socket is opened - if (this.socket) { - startTimer(this.socket); - } - else { - this._currentRequest.once("socket", startTimer); +FormData.prototype._getContentDisposition = function(value, options) { + + var filename + , contentDisposition + ; + + if (typeof options.filepath === 'string') { + // custom filepath for relative paths + filename = path.normalize(options.filepath).replace(/\\/g, '/'); + } else if (options.filename || value.name || value.path) { + // custom filename take precedence + // formidable and the browser add a name property + // fs- and request- streams have path property + filename = path.basename(options.filename || value.name || value.path); + } else if (value.readable && value.hasOwnProperty('httpVersion')) { + // or try http response + filename = path.basename(value.client._httpMessage.path || ''); } - // Clean up on events - this.on("socket", destroyOnTimeout); - this.on("abort", clearTimer); - this.on("error", clearTimer); - this.on("response", clearTimer); + if (filename) { + contentDisposition = 'filename="' + filename + '"'; + } - return this; + return contentDisposition; }; -// Proxy all other public ClientRequest methods -[ - "flushHeaders", "getHeader", - "setNoDelay", "setSocketKeepAlive", -].forEach(function (method) { - RedirectableRequest.prototype[method] = function (a, b) { - return this._currentRequest[method](a, b); - }; -}); +FormData.prototype._getContentType = function(value, options) { -// Proxy all public ClientRequest properties -["aborted", "connection", "socket"].forEach(function (property) { - Object.defineProperty(RedirectableRequest.prototype, property, { - get: function () { return this._currentRequest[property]; }, - }); -}); + // use custom content-type above all + var contentType = options.contentType; -RedirectableRequest.prototype._sanitizeOptions = function (options) { - // Ensure headers are always present - if (!options.headers) { - options.headers = {}; + // or try `name` from formidable, browser + if (!contentType && value.name) { + contentType = mime.lookup(value.name); } - // Since http.request treats host as an alias of hostname, - // but the url module interprets host as hostname plus port, - // eliminate the host property to avoid confusion. - if (options.host) { - // Use hostname if set, because it has precedence - if (!options.hostname) { - options.hostname = options.host; - } - delete options.host; + // or try `path` from fs-, request- streams + if (!contentType && value.path) { + contentType = mime.lookup(value.path); + } + + // or if it's http-reponse + if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) { + contentType = value.headers['content-type']; + } + + // or guess it from the filepath or filename + if (!contentType && (options.filepath || options.filename)) { + contentType = mime.lookup(options.filepath || options.filename); + } + + // fallback to the default content type if `value` is not simple value + if (!contentType && typeof value == 'object') { + contentType = FormData.DEFAULT_CONTENT_TYPE; } - // Complete the URL object when necessary - if (!options.pathname && options.path) { - var searchPos = options.path.indexOf("?"); - if (searchPos < 0) { - options.pathname = options.path; + return contentType; +}; + +FormData.prototype._multiPartFooter = function() { + return function(next) { + var footer = FormData.LINE_BREAK; + + var lastPart = (this._streams.length === 0); + if (lastPart) { + footer += this._lastBoundary(); } - else { - options.pathname = options.path.substring(0, searchPos); - options.search = options.path.substring(searchPos); + + next(footer); + }.bind(this); +}; + +FormData.prototype._lastBoundary = function() { + return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; +}; + +FormData.prototype.getHeaders = function(userHeaders) { + var header; + var formHeaders = { + 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() + }; + + for (header in userHeaders) { + if (userHeaders.hasOwnProperty(header)) { + formHeaders[header.toLowerCase()] = userHeaders[header]; } } + + return formHeaders; }; +FormData.prototype.setBoundary = function(boundary) { + this._boundary = boundary; +}; -// Executes the next native request (initial or redirect) -RedirectableRequest.prototype._performRequest = function () { - // Load the native protocol - var protocol = this._options.protocol; - var nativeProtocol = this._options.nativeProtocols[protocol]; - if (!nativeProtocol) { - this.emit("error", new TypeError("Unsupported protocol " + protocol)); - return; +FormData.prototype.getBoundary = function() { + if (!this._boundary) { + this._generateBoundary(); } - // If specified, use the agent corresponding to the protocol - // (HTTP and HTTPS use different types of agents) - if (this._options.agents) { - var scheme = protocol.slice(0, -1); - this._options.agent = this._options.agents[scheme]; - } + return this._boundary; +}; - // Create the native request and set up its event handlers - var request = this._currentRequest = - nativeProtocol.request(this._options, this._onNativeResponse); - request._redirectable = this; - for (var event of events) { - request.on(event, eventHandlers[event]); - } +FormData.prototype.getBuffer = function() { + var dataBuffer = new Buffer.alloc( 0 ); + var boundary = this.getBoundary(); - // RFC7230§5.3.1: When making a request directly to an origin server, […] - // a client MUST send only the absolute path […] as the request-target. - this._currentUrl = /^\//.test(this._options.path) ? - url.format(this._options) : - // When making a request to a proxy, […] - // a client MUST send the target URI in absolute-form […]. - this._options.path; + // Create the form content. Add Line breaks to the end of data. + for (var i = 0, len = this._streams.length; i < len; i++) { + if (typeof this._streams[i] !== 'function') { - // End a redirected request - // (The first request must be ended explicitly with RedirectableRequest#end) - if (this._isRedirect) { - // Write the request entity and end - var i = 0; - var self = this; - var buffers = this._requestBodyBuffers; - (function writeNext(error) { - // Only write if this request has not been redirected yet - /* istanbul ignore else */ - if (request === self._currentRequest) { - // Report any write errors - /* istanbul ignore if */ - if (error) { - self.emit("error", error); - } - // Write the next buffer if there are still left - else if (i < buffers.length) { - var buffer = buffers[i++]; - /* istanbul ignore else */ - if (!request.finished) { - request.write(buffer.data, buffer.encoding, writeNext); - } - } - // End the request if `end` has been called on us - else if (self._ended) { - request.end(); - } + // Add content to the buffer. + if(Buffer.isBuffer(this._streams[i])) { + dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]); + }else { + dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]); } - }()); + + // Add break after content. + if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) { + dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] ); + } + } } + + // Add the footer and return the Buffer object. + return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] ); }; -// Processes a response from the current native request -RedirectableRequest.prototype._processResponse = function (response) { - // Store the redirected response - var statusCode = response.statusCode; - if (this._options.trackRedirects) { - this._redirects.push({ - url: this._currentUrl, - headers: response.headers, - statusCode: statusCode, - }); +FormData.prototype._generateBoundary = function() { + // This generates a 50 character boundary similar to those used by Firefox. + // They are optimized for boyer-moore parsing. + var boundary = '--------------------------'; + for (var i = 0; i < 24; i++) { + boundary += Math.floor(Math.random() * 10).toString(16); } - // RFC7231§6.4: The 3xx (Redirection) class of status code indicates - // that further action needs to be taken by the user agent in order to - // fulfill the request. If a Location header field is provided, - // the user agent MAY automatically redirect its request to the URI - // referenced by the Location field value, - // even if the specific status code is not understood. + this._boundary = boundary; +}; - // If the response is not a redirect; return it as-is - var location = response.headers.location; - if (!location || this._options.followRedirects === false || - statusCode < 300 || statusCode >= 400) { - response.responseUrl = this._currentUrl; - response.redirects = this._redirects; - this.emit("response", response); +// Note: getLengthSync DOESN'T calculate streams length +// As workaround one can calculate file size manually +// and add it as knownLength option +FormData.prototype.getLengthSync = function() { + var knownLength = this._overheadLength + this._valueLength; - // Clean up - this._requestBodyBuffers = []; - return; + // Don't get confused, there are 3 "internal" streams for each keyval pair + // so it basically checks if there is any value added to the form + if (this._streams.length) { + knownLength += this._lastBoundary().length; } - // The response is a redirect, so abort the current request - abortRequest(this._currentRequest); - // Discard the remainder of the response to avoid waiting for data - response.destroy(); - - // RFC7231§6.4: A client SHOULD detect and intervene - // in cyclical redirections (i.e., "infinite" redirection loops). - if (++this._redirectCount > this._options.maxRedirects) { - this.emit("error", new TooManyRedirectsError()); - return; + // https://github.com/form-data/form-data/issues/40 + if (!this.hasKnownLength()) { + // Some async length retrievers are present + // therefore synchronous length calculation is false. + // Please use getLength(callback) to get proper length + this._error(new Error('Cannot calculate proper length in synchronous way.')); } - // Store the request headers if applicable - var requestHeaders; - var beforeRedirect = this._options.beforeRedirect; - if (beforeRedirect) { - requestHeaders = Object.assign({ - // The Host header was set by nativeProtocol.request - Host: response.req.getHeader("host"), - }, this._options.headers); - } + return knownLength; +}; - // RFC7231§6.4: Automatic redirection needs to done with - // care for methods not known to be safe, […] - // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change - // the request method from POST to GET for the subsequent request. - var method = this._options.method; - if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || - // RFC7231§6.4.4: The 303 (See Other) status code indicates that - // the server is redirecting the user agent to a different resource […] - // A user agent can perform a retrieval request targeting that URI - // (a GET or HEAD request if using HTTP) […] - (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) { - this._options.method = "GET"; - // Drop a possible entity and headers related to it - this._requestBodyBuffers = []; - removeMatchingHeaders(/^content-/i, this._options.headers); +// Public API to check if length of added values is known +// https://github.com/form-data/form-data/issues/196 +// https://github.com/form-data/form-data/issues/262 +FormData.prototype.hasKnownLength = function() { + var hasKnownLength = true; + + if (this._valuesToMeasure.length) { + hasKnownLength = false; } - // Drop the Host header, as the redirect might lead to a different host - var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); + return hasKnownLength; +}; - // If the redirect is relative, carry over the host of the last request - var currentUrlParts = url.parse(this._currentUrl); - var currentHost = currentHostHeader || currentUrlParts.host; - var currentUrl = /^\w+:/.test(location) ? this._currentUrl : - url.format(Object.assign(currentUrlParts, { host: currentHost })); +FormData.prototype.getLength = function(cb) { + var knownLength = this._overheadLength + this._valueLength; - // Determine the URL of the redirection - var redirectUrl; - try { - redirectUrl = url.resolve(currentUrl, location); - } - catch (cause) { - this.emit("error", new RedirectionError({ cause: cause })); - return; + if (this._streams.length) { + knownLength += this._lastBoundary().length; } - // Create the redirected request - debug("redirecting to", redirectUrl); - this._isRedirect = true; - var redirectUrlParts = url.parse(redirectUrl); - Object.assign(this._options, redirectUrlParts); - - // Drop confidential headers when redirecting to a less secure protocol - // or to a different domain that is not a superdomain - if (redirectUrlParts.protocol !== currentUrlParts.protocol && - redirectUrlParts.protocol !== "https:" || - redirectUrlParts.host !== currentHost && - !isSubdomain(redirectUrlParts.host, currentHost)) { - removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers); + if (!this._valuesToMeasure.length) { + process.nextTick(cb.bind(this, null, knownLength)); + return; } - // Evaluate the beforeRedirect callback - if (isFunction(beforeRedirect)) { - var responseDetails = { - headers: response.headers, - statusCode: statusCode, - }; - var requestDetails = { - url: currentUrl, - method: method, - headers: requestHeaders, - }; - try { - beforeRedirect(this._options, responseDetails, requestDetails); - } - catch (err) { - this.emit("error", err); + asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { + if (err) { + cb(err); return; } - this._sanitizeOptions(this._options); - } - // Perform the redirected request - try { - this._performRequest(); - } - catch (cause) { - this.emit("error", new RedirectionError({ cause: cause })); - } + values.forEach(function(length) { + knownLength += length; + }); + + cb(null, knownLength); + }); }; -// Wraps the key/value object of protocols with redirect functionality -function wrap(protocols) { - // Default settings - var exports = { - maxRedirects: 21, - maxBodyLength: 10 * 1024 * 1024, - }; +FormData.prototype.submit = function(params, cb) { + var request + , options + , defaults = {method: 'post'} + ; - // Wrap each protocol - var nativeProtocols = {}; - Object.keys(protocols).forEach(function (scheme) { - var protocol = scheme + ":"; - var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; - var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol); + // parse provided url if it's string + // or treat it as options object + if (typeof params == 'string') { - // Executes a request, following redirects - function request(input, options, callback) { - // Parse parameters - if (isString(input)) { - var parsed; - try { - parsed = urlToOptions(new URL(input)); - } - catch (err) { - /* istanbul ignore next */ - parsed = url.parse(input); - } - if (!isString(parsed.protocol)) { - throw new InvalidUrlError({ input }); - } - input = parsed; - } - else if (URL && (input instanceof URL)) { - input = urlToOptions(input); - } - else { - callback = options; - options = input; - input = { protocol: protocol }; - } - if (isFunction(options)) { - callback = options; - options = null; - } + params = parseUrl(params); + options = populate({ + port: params.port, + path: params.pathname, + host: params.hostname, + protocol: params.protocol + }, defaults); - // Set defaults - options = Object.assign({ - maxRedirects: exports.maxRedirects, - maxBodyLength: exports.maxBodyLength, - }, input, options); - options.nativeProtocols = nativeProtocols; - if (!isString(options.host) && !isString(options.hostname)) { - options.hostname = "::1"; - } + // use custom params + } else { - assert.equal(options.protocol, protocol, "protocol mismatch"); - debug("options", options); - return new RedirectableRequest(options, callback); + options = populate(params, defaults); + // if no port provided use default one + if (!options.port) { + options.port = options.protocol == 'https:' ? 443 : 80; } + } - // Executes a GET request, following redirects - function get(input, options, callback) { - var wrappedRequest = wrappedProtocol.request(input, options, callback); - wrappedRequest.end(); - return wrappedRequest; + // put that good code in getHeaders to some use + options.headers = this.getHeaders(params.headers); + + // https if specified, fallback to http in any other case + if (options.protocol == 'https:') { + request = https.request(options); + } else { + request = http.request(options); + } + + // get content length and fire away + this.getLength(function(err, length) { + if (err && err !== 'Unknown stream') { + this._error(err); + return; } - // Expose the properties on the wrapped protocol - Object.defineProperties(wrappedProtocol, { - request: { value: request, configurable: true, enumerable: true, writable: true }, - get: { value: get, configurable: true, enumerable: true, writable: true }, - }); - }); - return exports; -} + // add content length + if (length) { + request.setHeader('Content-Length', length); + } -/* istanbul ignore next */ -function noop() { /* empty */ } + this.pipe(request); + if (cb) { + var onResponse; -// from https://github.com/nodejs/node/blob/master/lib/internal/url.js -function urlToOptions(urlObject) { - var options = { - protocol: urlObject.protocol, - hostname: urlObject.hostname.startsWith("[") ? - /* istanbul ignore next */ - urlObject.hostname.slice(1, -1) : - urlObject.hostname, - hash: urlObject.hash, - search: urlObject.search, - pathname: urlObject.pathname, - path: urlObject.pathname + urlObject.search, - href: urlObject.href, - }; - if (urlObject.port !== "") { - options.port = Number(urlObject.port); - } - return options; -} + var callback = function (error, responce) { + request.removeListener('error', callback); + request.removeListener('response', onResponse); -function removeMatchingHeaders(regex, headers) { - var lastValue; - for (var header in headers) { - if (regex.test(header)) { - lastValue = headers[header]; - delete headers[header]; + return cb.call(this, error, responce); + }; + + onResponse = callback.bind(this, null); + + request.on('error', callback); + request.on('response', onResponse); } - } - return (lastValue === null || typeof lastValue === "undefined") ? - undefined : String(lastValue).trim(); -} + }.bind(this)); -function createErrorType(code, message, baseClass) { - // Create constructor - function CustomError(properties) { - Error.captureStackTrace(this, this.constructor); - Object.assign(this, properties || {}); - this.code = code; - this.message = this.cause ? message + ": " + this.cause.message : message; + return request; +}; + +FormData.prototype._error = function(err) { + if (!this.error) { + this.error = err; + this.pause(); + this.emit('error', err); } +}; - // Attach constructor and set default properties - CustomError.prototype = new (baseClass || Error)(); - CustomError.prototype.constructor = CustomError; - CustomError.prototype.name = "Error [" + code + "]"; - return CustomError; -} +FormData.prototype.toString = function () { + return '[object FormData]'; +}; -function abortRequest(request) { - for (var event of events) { - request.removeListener(event, eventHandlers[event]); - } - request.on("error", noop); - request.abort(); -} -function isSubdomain(subdomain, domain) { - assert(isString(subdomain) && isString(domain)); - var dot = subdomain.length - domain.length - 1; - return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain); -} +/***/ }), -function isString(value) { - return typeof value === "string" || value instanceof String; -} +/***/ 7142: +/***/ ((module) => { -function isFunction(value) { - return typeof value === "function"; -} +// populates missing values +module.exports = function(dst, src) { -function isBuffer(value) { - return typeof value === "object" && ("length" in value); -} + Object.keys(src).forEach(function(prop) + { + dst[prop] = dst[prop] || src[prop]; + }); -// Exports -module.exports = wrap({ http: http, https: https }); -module.exports.wrap = wrap; + return dst; +}; /***/ }), @@ -33205,6 +35691,8 @@ const humanitec_1 = __nccwpck_require__(9857); async function createEnvironment(input) { const { orgId, appId, envId, context, octokit, humClient, branchName, environmentUrl, webAppUrl } = input; const baseEnvId = (0, core_1.getInput)('base-env') || 'development'; + const createAutomationRule = (0, core_1.getBooleanInput)('create-automation-rule'); + console.log('createAutomationRule', createAutomationRule); const imageName = (process.env.GITHUB_REPOSITORY || '').replace(/.*\//, ''); const image = (0, core_1.getInput)('image') || `registry.humanitec.io/${orgId}/${imageName}`; const baseEnvRes = await humClient.orgsOrgIdAppsAppIdEnvsEnvIdGet({ @@ -33233,22 +35721,24 @@ async function createEnvironment(input) { throw new Error(`Unexpected response creating env: ${baseEnvRes.status}, ${baseEnvRes.data}`); } console.log(`Created environment: ${envId}, ${environmentUrl}`); - const matchRef = `refs/heads/${branchName}`; - const createRuleRes = await humClient.orgsOrgIdAppsAppIdEnvsEnvIdRulesPost({ - orgId, - appId, - envId, - automationRuleRequest: { - active: true, - artefacts_filter: [image], - type: 'update', - match_ref: matchRef, - }, - }); - if (createRuleRes.status != 201) { - throw new Error(`Unexpected response creating rule: ${baseEnvRes.status}, ${baseEnvRes.data}`); + if (createAutomationRule) { + const matchRef = `refs/heads/${branchName}`; + const createRuleRes = await humClient.orgsOrgIdAppsAppIdEnvsEnvIdRulesPost({ + orgId, + appId, + envId, + automationRuleRequest: { + active: true, + artefacts_filter: [image], + type: 'update', + match_ref: matchRef, + }, + }); + if (createRuleRes.status != 201) { + throw new Error(`Unexpected response creating rule: ${baseEnvRes.status}, ${baseEnvRes.data}`); + } + console.log(`Created auto-deployment rule for ${matchRef} and image ${image}`); } - console.log(`Created auto-deployment rule for ${matchRef} and image ${image}`); if (!octokit) { return; } @@ -33379,6 +35869,7 @@ async function runAction() { } (0, core_1.info)('Using environment: ' + environmentUrl); (0, core_1.setOutput)('environment-url', environmentUrl); + (0, core_1.setOutput)('humanitec-env', envId); if (action == 'get-environment-url') { return; } @@ -33414,11 +35905,14 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createApiClient = void 0; const autogen_1 = __nccwpck_require__(5468); const createApiClient = (basePath, token) => { - const config = (0, autogen_1.apiConfig)({ + const clientConfig = { token, - apiHost: `https://${basePath}`, internalApp: 'preview-envs-action/latest', - }); + }; + if (basePath) { + clientConfig.apiHost = `https://${basePath}`; + } + const config = (0, autogen_1.apiConfig)(clientConfig); return new autogen_1.PublicApi(config); }; exports.createApiClient = createApiClient; @@ -33643,7 +36137,7 @@ module.exports = require("zlib"); // Axios v1.2.1 Copyright (c) 2022 Matt Zabriskie and contributors -const FormData$1 = __nccwpck_require__(1403); +const FormData$1 = __nccwpck_require__(4334); const url = __nccwpck_require__(7310); const proxyFromEnv = __nccwpck_require__(3329); const http = __nccwpck_require__(3685); diff --git a/package-lock.json b/package-lock.json index 677a5bd..503960f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@actions/core": "^1.9.1", "@actions/github": "^5.1.1", - "@humanitec/autogen": "^0.0.8", + "@humanitec/autogen": "^0.0.9", "axios": "^1.2.1", "mustache": "^4.2.0" }, @@ -710,11 +710,12 @@ } }, "node_modules/@humanitec/autogen": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/@humanitec/autogen/-/autogen-0.0.8.tgz", - "integrity": "sha512-99zUFtYVmltCex98qVbCxgarZ/vQ67LPO8ACDFVHvH0CSdcjZLeRTiBSc0gxtBUG5Oz9rHIQ2qc4X9iNLCzBEg==", + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/@humanitec/autogen/-/autogen-0.0.9.tgz", + "integrity": "sha512-iZAi3xP/qU3ShuzjBk4izmey66LiFYSPbdi8wO1Ky0rtBT+9GGz6KlaeFREryk9k8tgStiEnzTPRTYpuG5jKhQ==", "dependencies": { - "axios": "^1.2.1" + "axios": "^1.2.1", + "form-data": "^4.0.0" } }, "node_modules/@humanwhocodes/config-array": { @@ -1801,19 +1802,6 @@ "proxy-from-env": "^1.1.0" } }, - "node_modules/axios/node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/babel-jest": { "version": "29.3.1", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.3.1.tgz", @@ -2890,6 +2878,19 @@ } } }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -5788,11 +5789,12 @@ } }, "@humanitec/autogen": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/@humanitec/autogen/-/autogen-0.0.8.tgz", - "integrity": "sha512-99zUFtYVmltCex98qVbCxgarZ/vQ67LPO8ACDFVHvH0CSdcjZLeRTiBSc0gxtBUG5Oz9rHIQ2qc4X9iNLCzBEg==", + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/@humanitec/autogen/-/autogen-0.0.9.tgz", + "integrity": "sha512-iZAi3xP/qU3ShuzjBk4izmey66LiFYSPbdi8wO1Ky0rtBT+9GGz6KlaeFREryk9k8tgStiEnzTPRTYpuG5jKhQ==", "requires": { - "axios": "^1.2.1" + "axios": "^1.2.1", + "form-data": "^4.0.0" } }, "@humanwhocodes/config-array": { @@ -6631,18 +6633,6 @@ "follow-redirects": "^1.15.0", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" - }, - "dependencies": { - "form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - } } }, "babel-jest": { @@ -7425,6 +7415,16 @@ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", diff --git a/package.json b/package.json index 5b0fe65..5db2860 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "dependencies": { "@actions/core": "^1.9.1", "@actions/github": "^5.1.1", - "@humanitec/autogen": "^0.0.8", + "@humanitec/autogen": "^0.0.9", "axios": "^1.2.1", "mustache": "^4.2.0" }, diff --git a/src/action.test.ts b/src/action.test.ts index 9d56c34..513e820 100644 --- a/src/action.test.ts +++ b/src/action.test.ts @@ -1,6 +1,8 @@ import {describe, expect, test, beforeEach, afterAll} from '@jest/globals'; import {runAction} from './action'; import {randomBytes} from 'crypto'; +import {createApiClient} from './humanitec'; +import {branchNameToEnvId} from './utils'; // Emulate https://github.com/actions/toolkit/blob/819157bf8/packages/core/src/core.ts#L128 const setInput = (name: string, value: string): void => { @@ -22,8 +24,11 @@ const appId = ensureEnv('HUMANITEC_APP'); describe('action', () => { let branch: string; + let humClient: ReturnType; beforeEach(async () => { + humClient = createApiClient('', token); + setInput('humanitec-token', token); setInput('humanitec-org', orgId); setInput('humanitec-app', appId); @@ -38,10 +43,56 @@ describe('action', () => { test('succeeds', async () => { try { + setInput('create-automation-rule', 'true'); setInput('action', 'create'); await runAction(); expect(process.exitCode).toBeFalsy(); + // TODO Get from output instead + const envId = branchNameToEnvId('dev', branch); + + const listRules = await humClient.orgsOrgIdAppsAppIdEnvsEnvIdRulesGet({ + orgId, + appId, + envId, + }); + expect(listRules.status).toBe(200); + expect(listRules.data).toHaveLength(1); + expect(listRules.data[0].match_ref).toEqual(`refs/heads/${branch}`); + + + setInput('action', 'notify'); + await runAction(); + expect(process.exitCode).toBeFalsy(); + + setInput('action', 'delete'); + await runAction(); + expect(process.exitCode).toBeFalsy(); + } catch (e) { + console.log(e); + throw new Error('failed'); + } + }); + + + test('succeeds without automation rule', async () => { + try { + setInput('create-automation-rule', 'false'); + setInput('action', 'create'); + await runAction(); + expect(process.exitCode).toBeFalsy(); + + // TODO Get from output instead + const envId = branchNameToEnvId('dev', branch); + + const listRules = await humClient.orgsOrgIdAppsAppIdEnvsEnvIdRulesGet({ + orgId, + appId, + envId, + }); + expect(listRules.status).toBe(200); + expect(listRules.data).toEqual([]); + setInput('action', 'notify'); await runAction(); expect(process.exitCode).toBeFalsy(); diff --git a/src/action.ts b/src/action.ts index dc11745..a60eeb5 100644 --- a/src/action.ts +++ b/src/action.ts @@ -1,5 +1,5 @@ import {getOctokit, context} from '@actions/github'; -import {getInput, setOutput, info} from '@actions/core'; +import {getInput, setOutput, info, getBooleanInput} from '@actions/core'; import {render} from 'mustache'; import {branchNameToEnvId} from './utils'; @@ -11,6 +11,8 @@ async function createEnvironment(input: ActionInput): Promise { const {orgId, appId, envId, context, octokit, humClient, branchName, environmentUrl, webAppUrl} = input; const baseEnvId = getInput('base-env') || 'development'; + const createAutomationRule = getBooleanInput('create-automation-rule'); + console.log('createAutomationRule', createAutomationRule); const imageName = (process.env.GITHUB_REPOSITORY || '').replace(/.*\//, ''); const image = getInput('image') || `registry.humanitec.io/${orgId}/${imageName}`; @@ -48,23 +50,27 @@ async function createEnvironment(input: ActionInput): Promise { console.log(`Created environment: ${envId}, ${environmentUrl}`); - const matchRef =`refs/heads/${branchName}`; - const createRuleRes = await humClient.orgsOrgIdAppsAppIdEnvsEnvIdRulesPost({ - orgId, - appId, - envId, - automationRuleRequest: { - active: true, - artefacts_filter: [image], - type: 'update', - match_ref: matchRef, - }, - }); - if (createRuleRes.status != 201) { - throw new Error(`Unexpected response creating rule: ${baseEnvRes.status}, ${baseEnvRes.data}`); + + if (createAutomationRule) { + const matchRef =`refs/heads/${branchName}`; + const createRuleRes = await humClient.orgsOrgIdAppsAppIdEnvsEnvIdRulesPost({ + orgId, + appId, + envId, + automationRuleRequest: { + active: true, + artefacts_filter: [image], + type: 'update', + match_ref: matchRef, + }, + }); + if (createRuleRes.status != 201) { + throw new Error(`Unexpected response creating rule: ${baseEnvRes.status}, ${baseEnvRes.data}`); + } + + console.log(`Created auto-deployment rule for ${matchRef} and image ${image}`); } - console.log(`Created auto-deployment rule for ${matchRef} and image ${image}`); if (!octokit) { return; @@ -238,6 +244,7 @@ export async function runAction(): Promise { } info('Using environment: '+environmentUrl); setOutput('environment-url', environmentUrl); + setOutput('humanitec-env', envId); if (action == 'get-environment-url') { return; } diff --git a/src/humanitec/index.ts b/src/humanitec/index.ts index 3afd7ed..afb8dc5 100644 --- a/src/humanitec/index.ts +++ b/src/humanitec/index.ts @@ -1,13 +1,18 @@ -import {apiConfig, PublicApi} from '@humanitec/autogen'; +import {APIConfig, apiConfig, PublicApi} from '@humanitec/autogen'; export type HumanitecClient = PublicApi export const createApiClient = (basePath: string, token: string): PublicApi => { - const config = apiConfig({ + const clientConfig: APIConfig = { token, - apiHost: `https://${basePath}`, internalApp: 'preview-envs-action/latest', - }); + }; + + if (basePath) { + clientConfig.apiHost = `https://${basePath}`; + } + + const config = apiConfig(clientConfig); return new PublicApi(config); };