diff --git a/package-lock.json b/package-lock.json index aa496f4..f2b9bbe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "12.0.0", "license": "MIT", "dependencies": { - "@netlify/open-api": "^2.11.0", + "@netlify/open-api": "^2.12.0", "lodash.camelcase": "^4.3.0", "micro-api-client": "^3.3.0", "node-fetch": "^3.0.0", @@ -1131,9 +1131,9 @@ } }, "node_modules/@netlify/open-api": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@netlify/open-api/-/open-api-2.11.0.tgz", - "integrity": "sha512-ni6R1xdR8EtH0iB8ixGt9ocuboW+Q8eN4ilTX8lfNHS6Y6Q2S+O/aB2n1BnAgv39wopeQsQ2meL9vfEePURl7w==" + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@netlify/open-api/-/open-api-2.12.0.tgz", + "integrity": "sha512-1n9VvO/9qM7cRB5f7NgSNqeUrovM7j9WVAY7ZQ4LtQuXSquFmO9Fku7WrV3zAUC6v2Y62fxGyJ0fRllYz5uXLw==" }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", @@ -8973,9 +8973,9 @@ } }, "@netlify/open-api": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@netlify/open-api/-/open-api-2.11.0.tgz", - "integrity": "sha512-ni6R1xdR8EtH0iB8ixGt9ocuboW+Q8eN4ilTX8lfNHS6Y6Q2S+O/aB2n1BnAgv39wopeQsQ2meL9vfEePURl7w==" + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@netlify/open-api/-/open-api-2.12.0.tgz", + "integrity": "sha512-1n9VvO/9qM7cRB5f7NgSNqeUrovM7j9WVAY7ZQ4LtQuXSquFmO9Fku7WrV3zAUC6v2Y62fxGyJ0fRllYz5uXLw==" }, "@nodelib/fs.scandir": { "version": "2.1.5", diff --git a/package.json b/package.json index 6398e78..56b67b6 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "node client" ], "dependencies": { - "@netlify/open-api": "^2.11.0", + "@netlify/open-api": "^2.12.0", "lodash.camelcase": "^4.3.0", "micro-api-client": "^3.3.0", "node-fetch": "^3.0.0", diff --git a/src/operations.test.js.md b/src/operations.test.js.md index 4ca2873..1c465d2 100644 --- a/src/operations.test.js.md +++ b/src/operations.test.js.md @@ -3264,6 +3264,177 @@ Generated by [AVA](https://avajs.dev). ], verb: 'put', }, + { + description: '[Beta] Updates or creates a new value for an existing environment variable. To use this endpoint, opt in to the beta environment variable experience using the Netlify UI.', + operationId: 'setEnvVarValue', + parameters: { + body: { + env_var: { + in: 'body', + name: 'env_var', + schema: { + properties: { + context: { + description: 'The deploy context in which this value will be used. `dev` refers to local development when running `netlify dev`.', + enum: [ + 'dev', + 'branch-deploy', + 'deploy-preview', + 'production', + ], + type: 'string', + }, + value: { + description: 'The environment variable\'s unencrypted value', + type: 'string', + }, + }, + type: 'object', + }, + }, + }, + path: { + account_id: { + description: 'Scope response to account_id', + in: 'path', + name: 'account_id', + required: true, + type: 'string', + }, + key: { + description: 'The existing environment variable key name (case-sensitive)', + in: 'path', + name: 'key', + required: true, + type: 'string', + }, + }, + query: { + site_id: { + description: 'If provided, update an environment variable set on this site', + in: 'query', + name: 'site_id', + type: 'string', + }, + }, + }, + path: '/accounts/{account_id}/env/{key}', + responses: { + 201: { + description: 'Created (success)', + schema: { + description: 'Environment variable model definition', + properties: { + key: { + description: 'The environment variable key, like ALGOLIA_ID (case-sensitive)', + type: 'string', + 'x-faker': 'commerce.productName', + }, + scopes: { + description: 'The scopes that this environment variable is set to', + items: { + enum: [ + 'builds', + 'functions', + 'runtime', + 'post_processing', + ], + type: 'string', + }, + type: 'array', + }, + updated_at: { + description: 'The timestamp of when the value was last updated', + format: 'date-time', + type: 'string', + 'x-faker': 'date.past', + }, + updated_by: { + properties: { + avatar_url: { + description: 'A URL pointing to the user\'s avatar', + type: 'string', + 'x-faker': 'internet.avatar', + }, + email: { + description: 'The user\'s email address', + type: 'string', + 'x-faker': 'internet.email', + }, + full_name: { + description: 'The user\'s full name (first and last)', + type: 'string', + 'x-faker': 'name.findName', + }, + id: { + description: 'The user\'s unique identifier', + type: 'string', + 'x-faker': 'datatype.number', + }, + }, + type: 'object', + }, + values: { + description: 'An array of Value objects containing values and metadata', + items: { + description: 'Environment variable value model definition', + properties: { + context: { + description: 'The deploy context in which this value will be used. `dev` refers to local development when running `netlify dev`.', + enum: [ + 'all', + 'dev', + 'branch-deploy', + 'deploy-preview', + 'production', + ], + type: 'string', + }, + id: { + description: 'The environment variable value\'s universally unique ID', + type: 'string', + 'x-faker': 'datatype.uuid', + }, + value: { + description: 'The environment variable\'s unencrypted value', + type: 'string', + 'x-faker': 'internet.password', + }, + }, + type: 'object', + }, + type: 'array', + 'x-faker': 'internet.password', + }, + }, + type: 'object', + }, + }, + default: { + description: 'error', + schema: { + properties: { + code: { + format: 'int64', + type: 'integer', + }, + message: { + type: 'string', + 'x-nullable': false, + }, + }, + required: [ + 'message', + ], + type: 'object', + }, + }, + }, + tags: [ + 'environmentVariables', + ], + verb: 'patch', + }, { description: '[Beta] Deletes an environment variable. To use this endpoint, opt in to the beta environment variable experience using the Netlify UI.', operationId: 'deleteEnvVar', diff --git a/src/operations.test.js.snap b/src/operations.test.js.snap index f3720ac..b2f97d3 100644 Binary files a/src/operations.test.js.snap and b/src/operations.test.js.snap differ