Skip to content

Commit

Permalink
blueprint-manifest-client: Add source_blueprint_file to ManifestItem
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishu Goel committed Oct 30, 2024
1 parent 9f88752 commit ffabd97
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 4 deletions.
64 changes: 62 additions & 2 deletions clients/blueprint-manifest-client/src/openapi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,32 @@ declare namespace Components {
JobID?: Parameters.JobID;
}
namespace Schemas {
export interface CallerIdentity {
/**
* a human readable name of the caller (e.g. user name, token name or email address)
* example:
* [email protected]
*/
name?: any;
/**
* epilot organization id
* example:
* 911690
*/
org_id: string;
/**
* epilot user id, when called by a user
* example:
* 11001045
*/
user_id?: string;
/**
* token id, when called by API token
* example:
* api_5ZugdRXasLfWBypHi93Fk
*/
token_id?: string;
}
export interface CommonImportFields {
/**
* An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import
Expand Down Expand Up @@ -57,10 +83,18 @@ declare namespace Components {
* 1.0.0
*/
source_blueprint_version?: string;
/**
* A URL to download the source blueprint file used to import the blueprint
* example:
* https://blueprint-manifest-prod.s3.eu-central-1.amazonaws.com/manifest.zip
*/
source_blueprint_file?: string;
/**
* Whether the manifest comes from a trusted source and is signed by epilot
*/
is_verified?: boolean;
created_by?: CallerIdentity;
updated_by?: CallerIdentity;
}
export interface CommonMarkdownFields {
/**
Expand Down Expand Up @@ -119,7 +153,7 @@ declare namespace Components {
code?: FormattedErrorCodes;
data?: FormattedErrorData;
}
export type FormattedErrorCodes = "dependency_extraction" | "resource_not_found" | "resource_fetch_api_error" | "resource_fetch_unknown_error" | "terraform_cli_process_error" | "terraform_import_block_process_error";
export type FormattedErrorCodes = "dependency_extraction" | "resource_not_found" | "resource_fetch_api_error" | "resource_fetch_unknown_error" | "terraform_cli_process_error" | "terraform_import_block_process_error" | "terraform_init_error" | "terraform_plan_error" | "terraform_apply_error" | "terraform_show_error";
export interface FormattedErrorData {
resource?: {
id?: string;
Expand Down Expand Up @@ -221,6 +255,14 @@ declare namespace Components {
* 1.0.0
*/
source_blueprint_version?: string;
/**
* A URL to download the source blueprint file used to import the blueprint
* example:
* https://blueprint-manifest-prod.s3.eu-central-1.amazonaws.com/manifest.zip
*/
source_blueprint_file?: string;
created_by?: CallerIdentity;
updated_by?: CallerIdentity;
}
/**
* ID of an import or export job (state machine)
Expand Down Expand Up @@ -259,10 +301,18 @@ declare namespace Components {
* 1.0.0
*/
source_blueprint_version?: string;
/**
* A URL to download the source blueprint file used to import the blueprint
* example:
* https://blueprint-manifest-prod.s3.eu-central-1.amazonaws.com/manifest.zip
*/
source_blueprint_file?: string;
/**
* Whether the manifest comes from a trusted source and is signed by epilot
*/
is_verified?: boolean;
created_by?: CallerIdentity;
updated_by?: CallerIdentity;
/**
* Markdown content part of a manifest file
*/
Expand Down Expand Up @@ -338,10 +388,18 @@ declare namespace Components {
* 1.0.0
*/
source_blueprint_version?: string;
/**
* A URL to download the source blueprint file used to import the blueprint
* example:
* https://blueprint-manifest-prod.s3.eu-central-1.amazonaws.com/manifest.zip
*/
source_blueprint_file?: string;
/**
* Whether the manifest comes from a trusted source and is signed by epilot
*/
is_verified?: boolean;
created_by?: CallerIdentity;
updated_by?: CallerIdentity;
/**
* When the manifest was first installed (applied)
*/
Expand Down Expand Up @@ -479,10 +537,11 @@ declare namespace Paths {
}
export interface RequestBody {
/**
* This is no longer used
* example:
* example.tf
*/
manifestFilePath?: string;
manifestFilePath?: string | null;
}
namespace Responses {
export interface $200 {
Expand Down Expand Up @@ -929,6 +988,7 @@ export interface PathsDictionary {

export type Client = OpenAPIClient<OperationMethods, PathsDictionary>

export type CallerIdentity = Components.Schemas.CallerIdentity;
export type CommonImportFields = Components.Schemas.CommonImportFields;
export type CommonManifestFields = Components.Schemas.CommonManifestFields;
export type CommonMarkdownFields = Components.Schemas.CommonMarkdownFields;
Expand Down
49 changes: 47 additions & 2 deletions clients/blueprint-manifest-client/src/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,11 @@
"type": "object",
"properties": {
"manifestFilePath": {
"description": "This is no longer used",
"type": "string",
"example": "example.tf"
"example": "example.tf",
"deprecated": true,
"nullable": true
}
}
}
Expand Down Expand Up @@ -810,9 +813,20 @@
"description": "Version of the blueprint (semver)",
"example": "1.0.0"
},
"source_blueprint_file": {
"type": "string",
"description": "A URL to download the source blueprint file used to import the blueprint",
"example": "https://blueprint-manifest-prod.s3.eu-central-1.amazonaws.com/manifest.zip"
},
"is_verified": {
"type": "boolean",
"description": "Whether the manifest comes from a trusted source and is signed by epilot"
},
"created_by": {
"$ref": "#/components/schemas/CallerIdentity"
},
"updated_by": {
"$ref": "#/components/schemas/CallerIdentity"
}
}
},
Expand Down Expand Up @@ -891,7 +905,11 @@
"resource_fetch_api_error",
"resource_fetch_unknown_error",
"terraform_cli_process_error",
"terraform_import_block_process_error"
"terraform_import_block_process_error",
"terraform_init_error",
"terraform_plan_error",
"terraform_apply_error",
"terraform_show_error"
]
},
"FormattedErrorData": {
Expand Down Expand Up @@ -933,6 +951,33 @@
"$ref": "#/components/schemas/FormattedErrorData"
}
}
},
"CallerIdentity": {
"type": "object",
"properties": {
"name": {
"description": "a human readable name of the caller (e.g. user name, token name or email address)",
"example": "[email protected]"
},
"org_id": {
"description": "epilot organization id",
"type": "string",
"example": "911690"
},
"user_id": {
"description": "epilot user id, when called by a user",
"type": "string",
"example": "11001045"
},
"token_id": {
"description": "token id, when called by API token",
"type": "string",
"example": "api_5ZugdRXasLfWBypHi93Fk"
}
},
"required": [
"org_id"
]
}
},
"parameters": {
Expand Down

0 comments on commit ffabd97

Please sign in to comment.