From 1989be6d70bf8206d8d5a0c921d218f575b776f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20W=C3=BCrbach?= Date: Thu, 19 Jan 2023 13:27:11 +0100 Subject: [PATCH] feat: release v1 --- .github/workflows/ci.yml | 5 ----- README.md | 6 +++--- dist/index.js | 34 +++++++++++++++++----------------- package-lock.json | 15 +++++++-------- package.json | 2 +- 5 files changed, 28 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b4b5818..a5c8597 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,12 +19,7 @@ jobs: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - registry-url: 'https://npm.pkg.github.com' - run: npm ci - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: npm run lint - run: npm test - run: npm run package diff --git a/README.md b/README.md index 4ced549..eca336a 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: humanitec/preview-envs-action@main + - uses: humanitec/preview-envs-action@v1 with: humanitec-token: ${{ secrets.HUMANITEC_TOKEN }} humanitec-org: my-org @@ -60,7 +60,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: humanitec/preview-envs-action@main + - uses: humanitec/preview-envs-action@v1 with: humanitec-token: ${{ secrets.HUMANITEC_TOKEN }} humanitec-org: my-org @@ -72,7 +72,7 @@ jobs: Add the following snipped after your CI step notifying Humanitec about the newly pushed image (commonly the build-push-to-humanitec step): ```yaml -- uses: humanitec/preview-envs-action@main +- uses: humanitec/preview-envs-action@v1 with: humanitec-org: my-org humanitec-app: my-app diff --git a/dist/index.js b/dist/index.js index 9dbc33b..85328a6 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.19.0 + * The version of the OpenAPI document: 0.20.1 * Contact: apiteam@humanitec.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -2925,7 +2925,7 @@ const ArtefactVersionApiAxiosParamCreator = function (configuration) { * @summary Register a new Artefact Version with your organization. * @param {string} orgId The organization ID. * @param {AddArtefactVersionPayloadRequest} addArtefactVersionPayloadRequest The data needed to register a new Artefact Version within the organization. - * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has one prefix among \"refs/heads/\" or \"refs/tags/\". + * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has the prefix \"refs/\". * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -3074,7 +3074,7 @@ const ArtefactVersionApiFp = function (configuration) { * @summary Register a new Artefact Version with your organization. * @param {string} orgId The organization ID. * @param {AddArtefactVersionPayloadRequest} addArtefactVersionPayloadRequest The data needed to register a new Artefact Version within the organization. - * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has one prefix among \"refs/heads/\" or \"refs/tags/\". + * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has the prefix \"refs/\". * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -3139,7 +3139,7 @@ const ArtefactVersionApiFactory = function (configuration, basePath, axios) { * @summary Register a new Artefact Version with your organization. * @param {string} orgId The organization ID. * @param {AddArtefactVersionPayloadRequest} addArtefactVersionPayloadRequest The data needed to register a new Artefact Version within the organization. - * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has one prefix among \"refs/heads/\" or \"refs/tags/\". + * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has the prefix \"refs/\". * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -3202,7 +3202,7 @@ class ArtefactVersionApi extends base_1.BaseAPI { * @summary Register a new Artefact Version with your organization. * @param {string} orgId The organization ID. * @param {AddArtefactVersionPayloadRequest} addArtefactVersionPayloadRequest The data needed to register a new Artefact Version within the organization. - * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has one prefix among \"refs/heads/\" or \"refs/tags/\". + * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has the prefix \"refs/\". * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArtefactVersionApi @@ -13802,7 +13802,7 @@ const Id98717a05b6ad0b11ApiAxiosParamCreator = function (configuration) { * @summary Register a new Artefact Version with your organization. * @param {string} orgId The organization ID. * @param {AddArtefactVersionPayloadRequest} addArtefactVersionPayloadRequest The data needed to register a new Artefact Version within the organization. - * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has one prefix among \"refs/heads/\" or \"refs/tags/\". + * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has the prefix \"refs/\". * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -13850,7 +13850,7 @@ const Id98717a05b6ad0b11ApiFp = function (configuration) { * @summary Register a new Artefact Version with your organization. * @param {string} orgId The organization ID. * @param {AddArtefactVersionPayloadRequest} addArtefactVersionPayloadRequest The data needed to register a new Artefact Version within the organization. - * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has one prefix among \"refs/heads/\" or \"refs/tags/\". + * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has the prefix \"refs/\". * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -13873,7 +13873,7 @@ const Id98717a05b6ad0b11ApiFactory = function (configuration, basePath, axios) { * @summary Register a new Artefact Version with your organization. * @param {string} orgId The organization ID. * @param {AddArtefactVersionPayloadRequest} addArtefactVersionPayloadRequest The data needed to register a new Artefact Version within the organization. - * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has one prefix among \"refs/heads/\" or \"refs/tags/\". + * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has the prefix \"refs/\". * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -13895,7 +13895,7 @@ class Id98717a05b6ad0b11Api extends base_1.BaseAPI { * @summary Register a new Artefact Version with your organization. * @param {string} orgId The organization ID. * @param {AddArtefactVersionPayloadRequest} addArtefactVersionPayloadRequest The data needed to register a new Artefact Version within the organization. - * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has one prefix among \"refs/heads/\" or \"refs/tags/\". + * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has the prefix \"refs/\". * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof Id98717a05b6ad0b11Api @@ -23335,7 +23335,7 @@ const PublicApiAxiosParamCreator = function (configuration) { * @summary Register a new Artefact Version with your organization. * @param {string} orgId The organization ID. * @param {AddArtefactVersionPayloadRequest} addArtefactVersionPayloadRequest The data needed to register a new Artefact Version within the organization. - * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has one prefix among \"refs/heads/\" or \"refs/tags/\". + * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has the prefix \"refs/\". * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -26115,7 +26115,7 @@ const PublicApiFp = function (configuration) { * @summary Register a new Artefact Version with your organization. * @param {string} orgId The organization ID. * @param {AddArtefactVersionPayloadRequest} addArtefactVersionPayloadRequest The data needed to register a new Artefact Version within the organization. - * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has one prefix among \"refs/heads/\" or \"refs/tags/\". + * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has the prefix \"refs/\". * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -27634,7 +27634,7 @@ const PublicApiFactory = function (configuration, basePath, axios) { * @summary Register a new Artefact Version with your organization. * @param {string} orgId The organization ID. * @param {AddArtefactVersionPayloadRequest} addArtefactVersionPayloadRequest The data needed to register a new Artefact Version within the organization. - * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has one prefix among \"refs/heads/\" or \"refs/tags/\". + * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has the prefix \"refs/\". * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -29166,7 +29166,7 @@ class PublicApi extends base_1.BaseAPI { * @summary Register a new Artefact Version with your organization. * @param {string} orgId The organization ID. * @param {AddArtefactVersionPayloadRequest} addArtefactVersionPayloadRequest The data needed to register a new Artefact Version within the organization. - * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has one prefix among \"refs/heads/\" or \"refs/tags/\". + * @param {string} [vcs] (Optional) Which version control system the version comes from. Default value is \"git\". If this parameter is not supplied or its value is \"git\", the provided ref, if not empty, is checked to ensure that it has the prefix \"refs/\". * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PublicApi @@ -35352,7 +35352,7 @@ exports.WorkloadProfileApi = WorkloadProfileApi; * 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.19.0 + * The version of the OpenAPI document: 0.20.1 * Contact: apiteam@humanitec.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -35424,7 +35424,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.19.0 + * The version of the OpenAPI document: 0.20.1 * Contact: apiteam@humanitec.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -35575,7 +35575,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.19.0 + * The version of the OpenAPI document: 0.20.1 * Contact: apiteam@humanitec.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -35625,7 +35625,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.19.0 + * The version of the OpenAPI document: 0.20.1 * Contact: apiteam@humanitec.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/package-lock.json b/package-lock.json index 3cf658d..63c7863 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.3", + "@humanitec/autogen": "^0.0.4", "axios": "^1.2.1", "mustache": "^4.2.0" }, @@ -710,10 +710,9 @@ } }, "node_modules/@humanitec/autogen": { - "version": "0.0.3", - "resolved": "https://npm.pkg.github.com/download/@humanitec/autogen/0.0.3/cc0687bbe33e752f8657eb7c834cbd2e807ac86c", - "integrity": "sha512-hhLKzvodbhbATMYCR8gcm9CwVd7OdFC6dTVxzlltrYWjJ6vKQP+dDw86DB1nbovHbgNTRgj8RoRU5qG7wRodQg==", - "license": "ISC", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@humanitec/autogen/-/autogen-0.0.4.tgz", + "integrity": "sha512-SQi0I68OEtTSS/uaXxUGxvnBcXOkDyDsoit0sFIUDo4Tp+7/zxYBNAiGLjQFUwl5Azri+GCCyFoYZ9GeqXuaAw==", "dependencies": { "axios": "^1.2.1" } @@ -5789,9 +5788,9 @@ } }, "@humanitec/autogen": { - "version": "0.0.3", - "resolved": "https://npm.pkg.github.com/download/@humanitec/autogen/0.0.3/cc0687bbe33e752f8657eb7c834cbd2e807ac86c", - "integrity": "sha512-hhLKzvodbhbATMYCR8gcm9CwVd7OdFC6dTVxzlltrYWjJ6vKQP+dDw86DB1nbovHbgNTRgj8RoRU5qG7wRodQg==", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@humanitec/autogen/-/autogen-0.0.4.tgz", + "integrity": "sha512-SQi0I68OEtTSS/uaXxUGxvnBcXOkDyDsoit0sFIUDo4Tp+7/zxYBNAiGLjQFUwl5Azri+GCCyFoYZ9GeqXuaAw==", "requires": { "axios": "^1.2.1" } diff --git a/package.json b/package.json index 66c4687..5f0602e 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.3", + "@humanitec/autogen": "^0.0.4", "axios": "^1.2.1", "mustache": "^4.2.0" },