-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c9f821
commit a3dd59d
Showing
214 changed files
with
744 additions
and
554 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* 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. See our [Developer Docs on API Authentication](https://developer.humanitec.com/platform-orchestrator/reference/api-references/#authentication) for instructions. ## Content Types The Humanitec API, unless explicitly specified, 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, a new resource was created | | `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` range should be regarded as an error that 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.26.18 | ||
* The version of the OpenAPI document: 0.26.20 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
|
@@ -17,11 +17,13 @@ import * as runtime from '../runtime.js'; | |
import type { | ||
AccountTypeResponse, | ||
ActiveResourceResponse, | ||
ActiveResourceTargetDefinitionRequest, | ||
Agent, | ||
AgentCreateBody, | ||
AgentPatchBody, | ||
ApplicationCreationRequest, | ||
ApplicationResponse, | ||
ArchiveDefinitionVersionRequest, | ||
ArtefactResponse, | ||
ArtefactVersion, | ||
AuditLogEntry, | ||
|
@@ -137,6 +139,8 @@ import { | |
AccountTypeResponseToJSON, | ||
ActiveResourceResponseFromJSON, | ||
ActiveResourceResponseToJSON, | ||
ActiveResourceTargetDefinitionRequestFromJSON, | ||
ActiveResourceTargetDefinitionRequestToJSON, | ||
AgentFromJSON, | ||
AgentToJSON, | ||
AgentCreateBodyFromJSON, | ||
|
@@ -147,6 +151,8 @@ import { | |
ApplicationCreationRequestToJSON, | ||
ApplicationResponseFromJSON, | ||
ApplicationResponseToJSON, | ||
ArchiveDefinitionVersionRequestFromJSON, | ||
ArchiveDefinitionVersionRequestToJSON, | ||
ArtefactResponseFromJSON, | ||
ArtefactResponseToJSON, | ||
ArtefactVersionFromJSON, | ||
|
@@ -376,6 +382,13 @@ export interface ApprovePipelineApprovalRequestRequest { | |
approvalId: string; | ||
} | ||
|
||
export interface ArchiveResourceDefinitionVersionRequest { | ||
orgId: string; | ||
defId: string; | ||
defVersionId: string; | ||
ArchiveDefinitionVersionRequest: ArchiveDefinitionVersionRequest; | ||
} | ||
|
||
export interface CancelPipelineRunRequest { | ||
orgId: string; | ||
appId: string; | ||
|
@@ -1535,6 +1548,21 @@ export interface PatchResourceDefinitionRequest { | |
PatchResourceDefinitionRequestRequest: PatchResourceDefinitionRequestRequest; | ||
} | ||
|
||
export interface PinActiveResourceRequest { | ||
orgId: string; | ||
appId: string; | ||
envId: string; | ||
type: string; | ||
resId: string; | ||
ActiveResourceTargetDefinitionRequest: ActiveResourceTargetDefinitionRequest; | ||
} | ||
|
||
export interface PromoteResourceDefinitionVersionRequest { | ||
orgId: string; | ||
defId: string; | ||
defVersionId: string; | ||
} | ||
|
||
export interface PutDeltaRequest { | ||
orgId: string; | ||
appId: string; | ||
|
@@ -1731,6 +1759,62 @@ export class PublicApi extends runtime.BaseAPI { | |
return await response.value(); | ||
} | ||
|
||
/** | ||
* Mark/unmark the Resource Definition Version as archived. | ||
*/ | ||
async archiveResourceDefinitionVersionRaw(requestParameters: ArchiveResourceDefinitionVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> { | ||
if (requestParameters['orgId'] == null) { | ||
throw new runtime.RequiredError( | ||
'orgId', | ||
'Required parameter "orgId" was null or undefined when calling archiveResourceDefinitionVersion().' | ||
); | ||
} | ||
|
||
if (requestParameters['defId'] == null) { | ||
throw new runtime.RequiredError( | ||
'defId', | ||
'Required parameter "defId" was null or undefined when calling archiveResourceDefinitionVersion().' | ||
); | ||
} | ||
|
||
if (requestParameters['defVersionId'] == null) { | ||
throw new runtime.RequiredError( | ||
'defVersionId', | ||
'Required parameter "defVersionId" was null or undefined when calling archiveResourceDefinitionVersion().' | ||
); | ||
} | ||
|
||
if (requestParameters['ArchiveDefinitionVersionRequest'] == null) { | ||
throw new runtime.RequiredError( | ||
'ArchiveDefinitionVersionRequest', | ||
'Required parameter "ArchiveDefinitionVersionRequest" was null or undefined when calling archiveResourceDefinitionVersion().' | ||
); | ||
} | ||
|
||
const queryParameters: any = {}; | ||
|
||
const headerParameters: runtime.HTTPHeaders = {}; | ||
|
||
headerParameters['Content-Type'] = 'application/json'; | ||
|
||
const response = await this.request({ | ||
path: `/orgs/{orgId}/resources/defs/{defId}/versions/{defVersionId}/actions/archive`.replace(`{${"orgId"}}`, encodeURIComponent(String(requestParameters['orgId']))).replace(`{${"defId"}}`, encodeURIComponent(String(requestParameters['defId']))).replace(`{${"defVersionId"}}`, encodeURIComponent(String(requestParameters['defVersionId']))), | ||
method: 'POST', | ||
headers: headerParameters, | ||
query: queryParameters, | ||
body: ArchiveDefinitionVersionRequestToJSON(requestParameters['ArchiveDefinitionVersionRequest']), | ||
}, initOverrides); | ||
|
||
return new runtime.VoidApiResponse(response); | ||
} | ||
|
||
/** | ||
* Mark/unmark the Resource Definition Version as archived. | ||
*/ | ||
async archiveResourceDefinitionVersion(requestParameters: ArchiveResourceDefinitionVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> { | ||
await this.archiveResourceDefinitionVersionRaw(requestParameters, initOverrides); | ||
} | ||
|
||
/** | ||
* Attempts to cancel the specified Run. If the Run is in a queued state, this cancellation will be applied immediately. If the Run is executing, the cancellation will be stored and will be resolved by the next Job or Step that supports in-flight cancellation. Runs that are in any other state, are not cancellable. | ||
* Cancel a Run within an Pipeline. | ||
|
@@ -10848,6 +10932,123 @@ export class PublicApi extends runtime.BaseAPI { | |
return await response.value(); | ||
} | ||
|
||
/** | ||
* Pin Active Resource to a target Resource Definition Version. | ||
*/ | ||
async pinActiveResourceRaw(requestParameters: PinActiveResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ActiveResourceResponse>> { | ||
if (requestParameters['orgId'] == null) { | ||
throw new runtime.RequiredError( | ||
'orgId', | ||
'Required parameter "orgId" was null or undefined when calling pinActiveResource().' | ||
); | ||
} | ||
|
||
if (requestParameters['appId'] == null) { | ||
throw new runtime.RequiredError( | ||
'appId', | ||
'Required parameter "appId" was null or undefined when calling pinActiveResource().' | ||
); | ||
} | ||
|
||
if (requestParameters['envId'] == null) { | ||
throw new runtime.RequiredError( | ||
'envId', | ||
'Required parameter "envId" was null or undefined when calling pinActiveResource().' | ||
); | ||
} | ||
|
||
if (requestParameters['type'] == null) { | ||
throw new runtime.RequiredError( | ||
'type', | ||
'Required parameter "type" was null or undefined when calling pinActiveResource().' | ||
); | ||
} | ||
|
||
if (requestParameters['resId'] == null) { | ||
throw new runtime.RequiredError( | ||
'resId', | ||
'Required parameter "resId" was null or undefined when calling pinActiveResource().' | ||
); | ||
} | ||
|
||
if (requestParameters['ActiveResourceTargetDefinitionRequest'] == null) { | ||
throw new runtime.RequiredError( | ||
'ActiveResourceTargetDefinitionRequest', | ||
'Required parameter "ActiveResourceTargetDefinitionRequest" was null or undefined when calling pinActiveResource().' | ||
); | ||
} | ||
|
||
const queryParameters: any = {}; | ||
|
||
const headerParameters: runtime.HTTPHeaders = {}; | ||
|
||
headerParameters['Content-Type'] = 'application/json'; | ||
|
||
const response = await this.request({ | ||
path: `/orgs/{orgId}/apps/{appId}/envs/{envId}/resources/{type}/{resId}/actions/pin`.replace(`{${"orgId"}}`, encodeURIComponent(String(requestParameters['orgId']))).replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))).replace(`{${"envId"}}`, encodeURIComponent(String(requestParameters['envId']))).replace(`{${"type"}}`, encodeURIComponent(String(requestParameters['type']))).replace(`{${"resId"}}`, encodeURIComponent(String(requestParameters['resId']))), | ||
method: 'POST', | ||
headers: headerParameters, | ||
query: queryParameters, | ||
body: ActiveResourceTargetDefinitionRequestToJSON(requestParameters['ActiveResourceTargetDefinitionRequest']), | ||
}, initOverrides); | ||
|
||
return new runtime.JSONApiResponse(response, (jsonValue) => ActiveResourceResponseFromJSON(jsonValue)); | ||
} | ||
|
||
/** | ||
* Pin Active Resource to a target Resource Definition Version. | ||
*/ | ||
async pinActiveResource(requestParameters: PinActiveResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ActiveResourceResponse> { | ||
const response = await this.pinActiveResourceRaw(requestParameters, initOverrides); | ||
return await response.value(); | ||
} | ||
|
||
/** | ||
* Promote the Resource Definition Version as active. | ||
*/ | ||
async promoteResourceDefinitionVersionRaw(requestParameters: PromoteResourceDefinitionVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> { | ||
if (requestParameters['orgId'] == null) { | ||
throw new runtime.RequiredError( | ||
'orgId', | ||
'Required parameter "orgId" was null or undefined when calling promoteResourceDefinitionVersion().' | ||
); | ||
} | ||
|
||
if (requestParameters['defId'] == null) { | ||
throw new runtime.RequiredError( | ||
'defId', | ||
'Required parameter "defId" was null or undefined when calling promoteResourceDefinitionVersion().' | ||
); | ||
} | ||
|
||
if (requestParameters['defVersionId'] == null) { | ||
throw new runtime.RequiredError( | ||
'defVersionId', | ||
'Required parameter "defVersionId" was null or undefined when calling promoteResourceDefinitionVersion().' | ||
); | ||
} | ||
|
||
const queryParameters: any = {}; | ||
|
||
const headerParameters: runtime.HTTPHeaders = {}; | ||
|
||
const response = await this.request({ | ||
path: `/orgs/{orgId}/resources/defs/{defId}/versions/{defVersionId}/actions/promote`.replace(`{${"orgId"}}`, encodeURIComponent(String(requestParameters['orgId']))).replace(`{${"defId"}}`, encodeURIComponent(String(requestParameters['defId']))).replace(`{${"defVersionId"}}`, encodeURIComponent(String(requestParameters['defVersionId']))), | ||
method: 'POST', | ||
headers: headerParameters, | ||
query: queryParameters, | ||
}, initOverrides); | ||
|
||
return new runtime.VoidApiResponse(response); | ||
} | ||
|
||
/** | ||
* Promote the Resource Definition Version as active. | ||
*/ | ||
async promoteResourceDefinitionVersion(requestParameters: PromoteResourceDefinitionVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> { | ||
await this.promoteResourceDefinitionVersionRaw(requestParameters, initOverrides); | ||
} | ||
|
||
/** | ||
* Update an existing Delta | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* 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. See our [Developer Docs on API Authentication](https://developer.humanitec.com/platform-orchestrator/reference/api-references/#authentication) for instructions. ## Content Types The Humanitec API, unless explicitly specified, 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, a new resource was created | | `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` range should be regarded as an error that 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.26.18 | ||
* The version of the OpenAPI document: 0.26.20 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
|
Oops, something went wrong.