From ffabd97cac42e0b6dcaed0553a4437598616c63d Mon Sep 17 00:00:00 2001 From: Nishu Goel Date: Wed, 30 Oct 2024 13:34:48 +0530 Subject: [PATCH] blueprint-manifest-client: Add source_blueprint_file to ManifestItem --- .../src/openapi.d.ts | 64 ++++++++++++++++++- .../src/openapi.json | 49 +++++++++++++- 2 files changed, 109 insertions(+), 4 deletions(-) diff --git a/clients/blueprint-manifest-client/src/openapi.d.ts b/clients/blueprint-manifest-client/src/openapi.d.ts index 4da85bd..8994187 100644 --- a/clients/blueprint-manifest-client/src/openapi.d.ts +++ b/clients/blueprint-manifest-client/src/openapi.d.ts @@ -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: + * manifest@epilot.cloud + */ + 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 @@ -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 { /** @@ -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; @@ -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) @@ -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 */ @@ -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) */ @@ -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 { @@ -929,6 +988,7 @@ export interface PathsDictionary { export type Client = OpenAPIClient +export type CallerIdentity = Components.Schemas.CallerIdentity; export type CommonImportFields = Components.Schemas.CommonImportFields; export type CommonManifestFields = Components.Schemas.CommonManifestFields; export type CommonMarkdownFields = Components.Schemas.CommonMarkdownFields; diff --git a/clients/blueprint-manifest-client/src/openapi.json b/clients/blueprint-manifest-client/src/openapi.json index ec404c8..5a4ef30 100644 --- a/clients/blueprint-manifest-client/src/openapi.json +++ b/clients/blueprint-manifest-client/src/openapi.json @@ -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 } } } @@ -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" } } }, @@ -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": { @@ -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": "manifest@epilot.cloud" + }, + "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": {