diff --git a/api/openapispec/docs.go b/api/openapispec/docs.go index 65e0e36..2c96038 100644 --- a/api/openapispec/docs.go +++ b/api/openapispec/docs.go @@ -284,6 +284,12 @@ const docTemplate = `{ "description": "Workspace ID to filter module list by. Default to all workspaces.", "name": "workspaceID", "in": "query" + }, + { + "type": "string", + "description": "Module name to filter module list by. Default to all modules.", + "name": "moduleName", + "in": "query" } ], "responses": { @@ -1236,6 +1242,38 @@ const docTemplate = `{ "description": "Environment to filter runs by. Default to all", "name": "env", "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "csv", + "description": "RunType to filter runs by. Default to all", + "name": "type", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "csv", + "description": "RunStatus to filter runs by. Default to all", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "StartTime to filter runs by. Default to all. Format: RFC3339", + "name": "startTime", + "in": "query" + }, + { + "type": "string", + "description": "EndTime to filter runs by. Default to all. Format: RFC3339", + "name": "endTime", + "in": "query" } ], "responses": { @@ -1382,6 +1420,14 @@ const docTemplate = `{ ], "summary": "List source", "operationId": "listSource", + "parameters": [ + { + "type": "string", + "description": "Source name to filter source list by. Default to all sources.", + "name": "sourceName", + "in": "query" + } + ], "responses": { "200": { "description": "Success", @@ -2281,7 +2327,7 @@ const docTemplate = `{ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/v1.Spec" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Spec" } }, "400": { @@ -2350,7 +2396,7 @@ const docTemplate = `{ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/v1.Spec" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Spec" } }, "400": { @@ -3006,18 +3052,18 @@ const docTemplate = `{ "constant.SourceProviderType": { "type": "string", "enum": [ - "git", "git", "github", "oci", - "local" + "local", + "git" ], "x-enum-varnames": [ - "DefaultSourceType", "SourceProviderTypeGit", "SourceProviderTypeGithub", "SourceProviderTypeOCI", - "SourceProviderTypeLocal" + "SourceProviderTypeLocal", + "DefaultSourceType" ] }, "constant.StackState": { @@ -3066,7 +3112,7 @@ const docTemplate = `{ "description": "// Type is the type of the backend.\nType string ` + "`" + `yaml:\"type\" json:\"type\"` + "`" + `\nBackend is the configuration of the backend.", "allOf": [ { - "$ref": "#/definitions/v1.BackendConfig" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.BackendConfig" } ] }, @@ -3312,6 +3358,10 @@ const docTemplate = `{ "description": "ResourceType is the type of the resource.", "type": "string" }, + "resourceURN": { + "description": "ResourceURN is the urn of the resource.", + "type": "string" + }, "stack": { "description": "Stack is the stack associated with the resource.", "allOf": [ @@ -3640,354 +3690,435 @@ const docTemplate = `{ } } }, - "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Type": { - "type": "string", - "enum": [ - "Kubernetes", - "Terraform" - ], - "x-enum-varnames": [ - "Kubernetes", - "Terraform" - ] + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AWSProvider": { + "type": "object", + "properties": { + "profile": { + "description": "The profile to be used to interact with AWS Secrets Manager.\nIf not set, the default profile created with ` + "`" + `aws configure` + "`" + ` will be used.", + "type": "string" + }, + "region": { + "description": "AWS Region to be used to interact with AWS Secrets Manager.\nExamples are us-east-1, us-west-2, etc.", + "type": "string" + } + } }, - "models.ActionType": { - "type": "integer", + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AlicloudProvider": { + "type": "object", + "properties": { + "region": { + "description": "Alicloud Region to be used to interact with Alicloud Secrets Manager.\nExamples are cn-beijing, cn-shanghai, etc.", + "type": "string" + } + } + }, + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AzureEnvironmentType": { + "type": "string", "enum": [ - 0, - 1, - 2, - 3, - 4 + "PublicCloud", + "USGovernmentCloud", + "ChinaCloud", + "GermanCloud" ], - "x-enum-comments": { - "Create": "creating a new resource.", - "Delete": "deleting an existing resource.", - "UnChanged": "nothing to do.", - "Undefined": "invalidate value", - "Update": "updating an existing resource." - }, "x-enum-varnames": [ - "Undefined", - "UnChanged", - "Create", - "Update", - "Delete" + "AzureEnvironmentPublicCloud", + "AzureEnvironmentUSGovernmentCloud", + "AzureEnvironmentChinaCloud", + "AzureEnvironmentGermanCloud" ] }, - "models.ChangeStep": { + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AzureKVProvider": { "type": "object", "properties": { - "action": { - "description": "the operation performed by this step", + "environmentType": { + "description": "EnvironmentType specifies the Azure cloud environment endpoints to use for connecting and authenticating with Azure.\nBy-default it points to the public cloud AAD endpoint, and the following endpoints are available:\nPublicCloud, USGovernmentCloud, ChinaCloud, GermanCloud\nRef: https://github.com/Azure/go-autorest/blob/main/autorest/azure/environments.go#L152", "allOf": [ { - "$ref": "#/definitions/models.ActionType" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AzureEnvironmentType" } ] }, - "from": { - "description": "old data" - }, - "id": { - "description": "the resource id", + "tenantId": { + "description": "TenantID configures the Azure Tenant to send requests to.", "type": "string" }, - "to": { - "description": "new data" + "vaultUrl": { + "description": "Vault Url from which the secrets to be fetched from.", + "type": "string" } } }, - "models.Changes": { + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.BackendConfig": { "type": "object", "properties": { - "changeSteps": { + "configs": { + "description": "Configs contains config items of the backend, whose keys differ from different backend types.", "type": "object", - "additionalProperties": { - "$ref": "#/definitions/models.ChangeStep" - } + "additionalProperties": {} }, - "stepKeys": { - "type": "array", - "items": { - "type": "string" - } + "type": { + "description": "Type is the backend type, supports BackendTypeLocal, BackendTypeOss, BackendTypeS3.", + "type": "string" } } }, - "request.CreateBackendRequest": { + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Configs": { "type": "object", - "required": [ - "name" - ], "properties": { - "backendConfig": { - "description": "BackendConfig is the configuration of the backend.", + "default": { + "description": "Default is default block of the module config.", "allOf": [ { - "$ref": "#/definitions/v1.BackendConfig" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.GenericConfig" } ] - }, - "description": { - "description": "Description is a human-readable description of the backend.", - "type": "string" - }, - "name": { - "description": "Name is the name of the backend.", - "type": "string" } } }, - "request.CreateModuleRequest": { + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.FakeProvider": { "type": "object", - "required": [ - "name", - "url" - ], "properties": { - "description": { - "description": "Description is a human-readable description of the module.", - "type": "string" - }, - "doc": { - "description": "Doc is the documentation URL of the module.", - "type": "string" - }, - "name": { - "description": "Name is the module name.", - "type": "string" - }, - "owners": { - "description": "Owners is a list of owners for the module.", + "data": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.FakeProviderData" } - }, - "url": { - "description": "URL is the module oci artifact registry URL.", - "type": "string" } } }, - "request.CreateOrganizationRequest": { + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.FakeProviderData": { "type": "object", - "required": [ - "owners" - ], "properties": { - "description": { - "description": "Description is a human-readable description of the organization.", + "key": { "type": "string" }, - "labels": { - "description": "Labels are custom labels associated with the organization.", - "type": "array", - "items": { - "type": "string" - } - }, - "name": { - "description": "Name is the name of the organization.", + "value": { "type": "string" }, - "owners": { - "description": "Owners is a list of owners for the organization.", - "type": "array", - "items": { + "valueMap": { + "type": "object", + "additionalProperties": { "type": "string" } + }, + "version": { + "type": "string" } } }, - "request.CreateProjectRequest": { + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.GenericConfig": { + "type": "object", + "additionalProperties": {} + }, + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ModuleConfig": { "type": "object", - "required": [ - "domain" - ], "properties": { - "description": { - "description": "Description is a human-readable description of the project.", - "type": "string" + "configs": { + "description": "Configs contains all levels of module configs", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Configs" + } + ] }, - "domain": { - "description": "Domain is the domain of the project, typically serving as the parent folder name for the project.", + "path": { + "description": "Path is the path of the module. It can be a local path or a remote URL", "type": "string" }, - "labels": { - "description": "Labels are custom labels associated with the project.", + "version": { + "description": "Version is the version of the module.", + "type": "string" + } + } + }, + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ModuleConfigs": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ModuleConfig" + } + }, + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ModulePatcherConfig": { + "type": "object", + "properties": { + "projectSelector": { + "description": "ProjectSelector contains the selected projects.", "type": "array", "items": { "type": "string" } - }, - "name": { - "description": "Name is the name of the project.", - "type": "string" - }, - "organizationID": { - "description": "OrganizationID is the organization id associated with the project.", - "type": "integer" - }, - "owners": { - "description": "Owners is a list of owners for the project.", - "type": "array", - "items": { + } + } + }, + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.OnPremisesProvider": { + "type": "object", + "properties": { + "attributes": { + "description": "attributes of the provider", + "type": "object", + "additionalProperties": { "type": "string" } }, - "path": { - "description": "Path is the relative path of the project within the sources.", + "name": { + "description": "platform name of the provider", "type": "string" - }, - "sourceID": { - "description": "SourceID is the configuration source id associated with the project.", - "type": "integer" } } }, - "request.CreateSourceRequest": { + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ProviderSpec": { "type": "object", - "required": [ - "name", - "remote", - "sourceProvider" - ], "properties": { - "description": { - "description": "Description is a human-readable description of the source.", - "type": "string" + "alicloud": { + "description": "Alicloud configures a store to retrieve secrets from Alicloud Secrets Manager.", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AlicloudProvider" + } + ] }, - "labels": { - "description": "Labels are custom labels associated with the source.", - "type": "array", - "items": { - "type": "string" - } + "aws": { + "description": "AWS configures a store to retrieve secrets from AWS Secrets Manager.", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AWSProvider" + } + ] }, - "name": { - "description": "Name is the name of the source.", - "type": "string" + "azure": { + "description": "Azure configures a store to retrieve secrets from Azure KeyVault.", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AzureKVProvider" + } + ] }, - "owners": { - "description": "Owners is a list of owners for the source.", - "type": "array", - "items": { - "type": "string" - } + "fake": { + "description": "Fake configures a store with static key/value pairs", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.FakeProvider" + } + ] }, - "remote": { - "description": "Remote is the source URL, including scheme.", - "type": "string" + "onpremises": { + "description": "Onprem configures a store in on-premises environments", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.OnPremisesProvider" + } + ] }, - "sourceProvider": { - "description": "SourceProvider is the type of the source provider.", - "type": "string" + "vault": { + "description": "Vault configures a store to retrieve secrets from HashiCorp Vault.", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.VaultProvider" + } + ] + }, + "viettelcloud": { + "description": "ViettelCloud configures a store to retrieve secrets from ViettelCloud Secrets Manager.", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ViettelCloudProvider" + } + ] } } }, - "request.CreateStackRequest": { + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Resource": { "type": "object", - "required": [ - "name" - ], "properties": { - "description": { - "description": "Description is a human-readable description of the stack.", - "type": "string" - }, - "desiredVersion": { - "description": "DesiredVersion is the desired revision of stack.", - "type": "string" + "attributes": { + "description": "Attributes represents all specified attributes of this resource", + "type": "object", + "additionalProperties": true }, - "labels": { - "description": "Labels are custom labels associated with the stack.", + "dependsOn": { + "description": "DependsOn contains all resources this resource depends on", "type": "array", "items": { "type": "string" } }, - "name": { - "description": "Name is the name of the stack.", + "extensions": { + "description": "Extensions specifies arbitrary metadata of this resource", + "type": "object", + "additionalProperties": true + }, + "id": { + "description": "ID is the unique key of this resource.\nApiVersion:Kind:Namespace:Name is an idiomatic way for Kubernetes resources.\nproviderNamespace:providerName:resourceType:resourceName for Terraform resources", "type": "string" }, - "owners": { - "description": "Owners is a list of owners for the stack.", + "type": { + "description": "Type represents all Context we supported like Kubernetes and Terraform", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Type" + } + ] + } + } + }, + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.SecretStore": { + "type": "object", + "properties": { + "provider": { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ProviderSpec" + } + } + }, + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Spec": { + "type": "object", + "properties": { + "context": { + "description": "Context contains workspace-level configurations, such as runtimes, topologies, and metadata, etc.", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.GenericConfig" + } + ] + }, + "resources": { + "description": "Resources is the list of Resource this Spec contains.", "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Resource" } }, + "secretStore": { + "description": "SecretSore represents a external secret store location for storing secrets.", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.SecretStore" + } + ] + } + } + }, + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Type": { + "type": "string", + "enum": [ + "Kubernetes", + "Terraform" + ], + "x-enum-varnames": [ + "Kubernetes", + "Terraform" + ] + }, + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.VaultKVStoreVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "x-enum-varnames": [ + "VaultKVStoreV1", + "VaultKVStoreV2" + ] + }, + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.VaultProvider": { + "type": "object", + "properties": { "path": { - "description": "Path is the relative path of the stack within the source.", + "description": "Path is the mount path of the Vault KV backend endpoint, e.g: \"secret\".", "type": "string" }, - "projectID": { - "description": "ProjectID is the project id of the stack within the source.", - "type": "integer" - }, - "projectName": { - "description": "ProjectName is the project name of the stack within the source.", + "server": { + "description": "Server is the target Vault server address to connect, e.g: \"https://vault.example.com:8200\".", "type": "string" }, - "type": { - "description": "Type is the type of the stack.", - "type": "string" + "version": { + "description": "Version is the Vault KV secret engine version. Version can be either \"v1\" or\n\"v2\", defaults to \"v2\".", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.VaultKVStoreVersion" + } + ] } } }, - "request.CreateWorkspaceRequest": { + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ViettelCloudProvider": { "type": "object", - "required": [ - "backendID", - "name", - "owners" - ], "properties": { - "backendID": { - "description": "BackendID is the configuration backend id associated with the workspace.", - "type": "integer" + "cmpURL": { + "description": "ViettelCloud CMP URL to be used to interact with ViettelCloud Secrets Manager.\nExamples are https://console.viettelcloud.vn/api/", + "type": "string" }, - "description": { - "description": "Description is a human-readable description of the workspace.", + "projectID": { + "description": "ProjectID to be used to interact with ViettelCloud Secrets Manager.", "type": "string" + } + } + }, + "models.ActionType": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3, + 4 + ], + "x-enum-comments": { + "Create": "creating a new resource.", + "Delete": "deleting an existing resource.", + "UnChanged": "nothing to do.", + "Undefined": "invalidate value", + "Update": "updating an existing resource." + }, + "x-enum-varnames": [ + "Undefined", + "UnChanged", + "Create", + "Update", + "Delete" + ] + }, + "models.ChangeStep": { + "type": "object", + "properties": { + "action": { + "description": "the operation performed by this step", + "allOf": [ + { + "$ref": "#/definitions/models.ActionType" + } + ] }, - "labels": { - "description": "Labels are custom labels associated with the workspace.", - "type": "array", - "items": { - "type": "string" - } + "from": { + "description": "old data" }, - "name": { - "description": "Name is the name of the workspace.", + "id": { + "description": "the resource id", "type": "string" }, - "owners": { - "description": "Owners is a list of owners for the workspace.", - "type": "array", - "items": { - "type": "string" - } + "to": { + "description": "new data" } } }, - "request.StackImportRequest": { + "models.Changes": { "type": "object", "properties": { - "importedResources": { + "changeSteps": { "type": "object", "additionalProperties": { + "$ref": "#/definitions/models.ChangeStep" + } + }, + "stepKeys": { + "type": "array", + "items": { "type": "string" } } } }, - "request.UpdateBackendRequest": { + "request.CreateBackendRequest": { "type": "object", "required": [ - "id", "name" ], "properties": { @@ -3995,7 +4126,7 @@ const docTemplate = `{ "description": "BackendConfig is the configuration of the backend.", "allOf": [ { - "$ref": "#/definitions/v1.BackendConfig" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.BackendConfig" } ] }, @@ -4003,20 +4134,17 @@ const docTemplate = `{ "description": "Description is a human-readable description of the backend.", "type": "string" }, - "id": { - "description": "ID is the id of the backend.", - "type": "integer" - }, "name": { "description": "Name is the name of the backend.", "type": "string" } } }, - "request.UpdateModuleRequest": { + "request.CreateModuleRequest": { "type": "object", "required": [ - "name" + "name", + "url" ], "properties": { "description": { @@ -4044,10 +4172,9 @@ const docTemplate = `{ } } }, - "request.UpdateOrganizationRequest": { + "request.CreateOrganizationRequest": { "type": "object", "required": [ - "id", "owners" ], "properties": { @@ -4055,10 +4182,6 @@ const docTemplate = `{ "description": "Description is a human-readable description of the organization.", "type": "string" }, - "id": { - "description": "ID is the id of the organization.", - "type": "integer" - }, "labels": { "description": "Labels are custom labels associated with the organization.", "type": "array", @@ -4079,11 +4202,10 @@ const docTemplate = `{ } } }, - "request.UpdateProjectRequest": { + "request.CreateProjectRequest": { "type": "object", "required": [ - "domain", - "id" + "domain" ], "properties": { "description": { @@ -4094,10 +4216,6 @@ const docTemplate = `{ "description": "Domain is the domain of the project, typically serving as the parent folder name for the project.", "type": "string" }, - "id": { - "description": "ID is the id of the project.", - "type": "integer" - }, "labels": { "description": "Labels are custom labels associated with the project.", "type": "array", @@ -4130,10 +4248,9 @@ const docTemplate = `{ } } }, - "request.UpdateSourceRequest": { + "request.CreateSourceRequest": { "type": "object", "required": [ - "id", "name", "remote", "sourceProvider" @@ -4143,10 +4260,6 @@ const docTemplate = `{ "description": "Description is a human-readable description of the source.", "type": "string" }, - "id": { - "description": "ID is the id of the source.", - "type": "integer" - }, "labels": { "description": "Labels are custom labels associated with the source.", "type": "array", @@ -4175,10 +4288,9 @@ const docTemplate = `{ } } }, - "request.UpdateStackRequest": { + "request.CreateStackRequest": { "type": "object", "required": [ - "id", "name" ], "properties": { @@ -4190,79 +4302,177 @@ const docTemplate = `{ "description": "DesiredVersion is the desired revision of stack.", "type": "string" }, - "id": { - "description": "ID is the id of the stack.", + "labels": { + "description": "Labels are custom labels associated with the stack.", + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "description": "Name is the name of the stack.", + "type": "string" + }, + "owners": { + "description": "Owners is a list of owners for the stack.", + "type": "array", + "items": { + "type": "string" + } + }, + "path": { + "description": "Path is the relative path of the stack within the source.", + "type": "string" + }, + "projectID": { + "description": "ProjectID is the project id of the stack within the source.", + "type": "integer" + }, + "projectName": { + "description": "ProjectName is the project name of the stack within the source.", + "type": "string" + }, + "type": { + "description": "Type is the type of the stack.", + "type": "string" + } + } + }, + "request.CreateWorkspaceRequest": { + "type": "object", + "required": [ + "backendID", + "name", + "owners" + ], + "properties": { + "backendID": { + "description": "BackendID is the configuration backend id associated with the workspace.", "type": "integer" }, + "description": { + "description": "Description is a human-readable description of the workspace.", + "type": "string" + }, "labels": { - "description": "Labels are custom labels associated with the stack.", + "description": "Labels are custom labels associated with the workspace.", "type": "array", "items": { "type": "string" } }, "name": { - "description": "Name is the name of the stack.", + "description": "Name is the name of the workspace.", + "type": "string" + }, + "owners": { + "description": "Owners is a list of owners for the workspace.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "request.StackImportRequest": { + "type": "object", + "properties": { + "importedResources": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "request.UpdateBackendRequest": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "backendConfig": { + "description": "BackendConfig is the configuration of the backend.", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.BackendConfig" + } + ] + }, + "description": { + "description": "Description is a human-readable description of the backend.", + "type": "string" + }, + "id": { + "description": "ID is the id of the backend.", + "type": "integer" + }, + "name": { + "description": "Name is the name of the backend.", + "type": "string" + } + } + }, + "request.UpdateModuleRequest": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "description": { + "description": "Description is a human-readable description of the module.", + "type": "string" + }, + "doc": { + "description": "Doc is the documentation URL of the module.", + "type": "string" + }, + "name": { + "description": "Name is the module name.", "type": "string" }, "owners": { - "description": "Owners is a list of owners for the stack.", + "description": "Owners is a list of owners for the module.", "type": "array", "items": { "type": "string" } }, - "path": { - "description": "Path is the relative path of the stack within the source.", - "type": "string" - }, - "projectID": { - "description": "ProjectID is the project id of the stack within the source.", - "type": "integer" - }, - "projectName": { - "description": "ProjectName is the project name of the stack within the source.", - "type": "string" - }, - "type": { - "description": "Type is the type of the stack.", + "url": { + "description": "URL is the module oci artifact registry URL.", "type": "string" } } }, - "request.UpdateWorkspaceRequest": { + "request.UpdateOrganizationRequest": { "type": "object", "required": [ - "backendID", "id", "owners" ], "properties": { - "backendID": { - "description": "BackendID is the configuration backend id associated with the workspace.", - "type": "integer" - }, "description": { - "description": "Description is a human-readable description of the workspace.", + "description": "Description is a human-readable description of the organization.", "type": "string" }, "id": { - "description": "ID is the id of the workspace.", + "description": "ID is the id of the organization.", "type": "integer" }, "labels": { - "description": "Labels are custom labels associated with the workspace.", - "type": "object", - "additionalProperties": { + "description": "Labels are custom labels associated with the organization.", + "type": "array", + "items": { "type": "string" } }, "name": { - "description": "Name is the name of the workspace.", + "description": "Name is the name of the organization.", "type": "string" }, "owners": { - "description": "Owners is a list of owners for the workspace.", + "description": "Owners is a list of owners for the organization.", "type": "array", "items": { "type": "string" @@ -4270,440 +4480,280 @@ const docTemplate = `{ } } }, - "request.WorkspaceConfigs": { - "type": "object", - "properties": { - "context": { - "description": "Context contains workspace-level configurations, such as runtimes, topologies, and metadata, etc.", - "allOf": [ - { - "$ref": "#/definitions/v1.GenericConfig" - } - ] - }, - "modules": { - "description": "Modules are the configs of a set of modules.", - "allOf": [ - { - "$ref": "#/definitions/v1.ModuleConfigs" - } - ] - }, - "secretStore": { - "description": "SecretStore represents a secure external location for storing secrets.", - "allOf": [ - { - "$ref": "#/definitions/v1.SecretStore" - } - ] - } - } - }, - "url.URL": { + "request.UpdateProjectRequest": { "type": "object", + "required": [ + "domain", + "id" + ], "properties": { - "forceQuery": { - "description": "append a query ('?') even if RawQuery is empty", - "type": "boolean" - }, - "fragment": { - "description": "fragment for references, without '#'", - "type": "string" - }, - "host": { - "description": "host or host:port (see Hostname and Port methods)", + "description": { + "description": "Description is a human-readable description of the project.", "type": "string" }, - "omitHost": { - "description": "do not emit empty host (authority)", - "type": "boolean" - }, - "opaque": { - "description": "encoded opaque data", + "domain": { + "description": "Domain is the domain of the project, typically serving as the parent folder name for the project.", "type": "string" }, - "path": { - "description": "path (relative paths may omit leading slash)", - "type": "string" + "id": { + "description": "ID is the id of the project.", + "type": "integer" }, - "rawFragment": { - "description": "encoded fragment hint (see EscapedFragment method)", - "type": "string" + "labels": { + "description": "Labels are custom labels associated with the project.", + "type": "array", + "items": { + "type": "string" + } }, - "rawPath": { - "description": "encoded path hint (see EscapedPath method)", + "name": { + "description": "Name is the name of the project.", "type": "string" }, - "rawQuery": { - "description": "encoded query values, without '?'", - "type": "string" + "organizationID": { + "description": "OrganizationID is the organization id associated with the project.", + "type": "integer" }, - "scheme": { - "type": "string" + "owners": { + "description": "Owners is a list of owners for the project.", + "type": "array", + "items": { + "type": "string" + } }, - "user": { - "description": "username and password information", - "allOf": [ - { - "$ref": "#/definitions/url.Userinfo" - } - ] - } - } - }, - "url.Userinfo": { - "type": "object" - }, - "v1.AWSProvider": { - "type": "object", - "properties": { - "profile": { - "description": "The profile to be used to interact with AWS Secrets Manager.\nIf not set, the default profile created with ` + "`" + `aws configure` + "`" + ` will be used.", + "path": { + "description": "Path is the relative path of the project within the sources.", "type": "string" }, - "region": { - "description": "AWS Region to be used to interact with AWS Secrets Manager.\nExamples are us-east-1, us-west-2, etc.", - "type": "string" + "sourceID": { + "description": "SourceID is the configuration source id associated with the project.", + "type": "integer" } } }, - "v1.AlicloudProvider": { + "request.UpdateSourceRequest": { "type": "object", - "properties": { - "region": { - "description": "Alicloud Region to be used to interact with Alicloud Secrets Manager.\nExamples are cn-beijing, cn-shanghai, etc.", - "type": "string" - } - } - }, - "v1.AzureEnvironmentType": { - "type": "string", - "enum": [ - "PublicCloud", - "USGovernmentCloud", - "ChinaCloud", - "GermanCloud" + "required": [ + "id", + "name", + "remote", + "sourceProvider" ], - "x-enum-varnames": [ - "AzureEnvironmentPublicCloud", - "AzureEnvironmentUSGovernmentCloud", - "AzureEnvironmentChinaCloud", - "AzureEnvironmentGermanCloud" - ] - }, - "v1.AzureKVProvider": { - "type": "object", "properties": { - "environmentType": { - "description": "EnvironmentType specifies the Azure cloud environment endpoints to use for connecting and authenticating with Azure.\nBy-default it points to the public cloud AAD endpoint, and the following endpoints are available:\nPublicCloud, USGovernmentCloud, ChinaCloud, GermanCloud\nRef: https://github.com/Azure/go-autorest/blob/main/autorest/azure/environments.go#L152", - "allOf": [ - { - "$ref": "#/definitions/v1.AzureEnvironmentType" - } - ] - }, - "tenantId": { - "description": "TenantID configures the Azure Tenant to send requests to.", + "description": { + "description": "Description is a human-readable description of the source.", "type": "string" }, - "vaultUrl": { - "description": "Vault Url from which the secrets to be fetched from.", - "type": "string" - } - } - }, - "v1.BackendConfig": { - "type": "object", - "properties": { - "configs": { - "description": "Configs contains config items of the backend, whose keys differ from different backend types.", - "type": "object", - "additionalProperties": {} + "id": { + "description": "ID is the id of the source.", + "type": "integer" }, - "type": { - "description": "Type is the backend type, supports BackendTypeLocal, BackendTypeOss, BackendTypeS3.", - "type": "string" - } - } - }, - "v1.Configs": { - "type": "object", - "properties": { - "default": { - "description": "Default is default block of the module config.", - "allOf": [ - { - "$ref": "#/definitions/v1.GenericConfig" - } - ] - } - } - }, - "v1.FakeProvider": { - "type": "object", - "properties": { - "data": { + "labels": { + "description": "Labels are custom labels associated with the source.", "type": "array", "items": { - "$ref": "#/definitions/v1.FakeProviderData" + "type": "string" } - } - } - }, - "v1.FakeProviderData": { - "type": "object", - "properties": { - "key": { - "type": "string" }, - "value": { + "name": { + "description": "Name is the name of the source.", "type": "string" }, - "valueMap": { - "type": "object", - "additionalProperties": { + "owners": { + "description": "Owners is a list of owners for the source.", + "type": "array", + "items": { "type": "string" } }, - "version": { + "remote": { + "description": "Remote is the source URL, including scheme.", + "type": "string" + }, + "sourceProvider": { + "description": "SourceProvider is the type of the source provider.", "type": "string" } } }, - "v1.GenericConfig": { - "type": "object", - "additionalProperties": {} - }, - "v1.ModuleConfig": { + "request.UpdateStackRequest": { "type": "object", + "required": [ + "id", + "name" + ], "properties": { - "configs": { - "description": "Configs contains all levels of module configs", - "allOf": [ - { - "$ref": "#/definitions/v1.Configs" - } - ] + "description": { + "description": "Description is a human-readable description of the stack.", + "type": "string" }, - "path": { - "description": "Path is the path of the module. It can be a local path or a remote URL", + "desiredVersion": { + "description": "DesiredVersion is the desired revision of stack.", "type": "string" }, - "version": { - "description": "Version is the version of the module.", + "id": { + "description": "ID is the id of the stack.", + "type": "integer" + }, + "labels": { + "description": "Labels are custom labels associated with the stack.", + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "description": "Name is the name of the stack.", "type": "string" - } - } - }, - "v1.ModuleConfigs": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/v1.ModuleConfig" - } - }, - "v1.ModulePatcherConfig": { - "type": "object", - "properties": { - "projectSelector": { - "description": "ProjectSelector contains the selected projects.", + }, + "owners": { + "description": "Owners is a list of owners for the stack.", "type": "array", "items": { "type": "string" } + }, + "path": { + "description": "Path is the relative path of the stack within the source.", + "type": "string" + }, + "projectID": { + "description": "ProjectID is the project id of the stack within the source.", + "type": "integer" + }, + "projectName": { + "description": "ProjectName is the project name of the stack within the source.", + "type": "string" + }, + "type": { + "description": "Type is the type of the stack.", + "type": "string" } } }, - "v1.OnPremisesProvider": { + "request.UpdateWorkspaceRequest": { "type": "object", + "required": [ + "backendID", + "id", + "owners" + ], "properties": { - "attributes": { - "description": "attributes of the provider", + "backendID": { + "description": "BackendID is the configuration backend id associated with the workspace.", + "type": "integer" + }, + "description": { + "description": "Description is a human-readable description of the workspace.", + "type": "string" + }, + "id": { + "description": "ID is the id of the workspace.", + "type": "integer" + }, + "labels": { + "description": "Labels are custom labels associated with the workspace.", "type": "object", "additionalProperties": { "type": "string" } }, "name": { - "description": "platform name of the provider", + "description": "Name is the name of the workspace.", "type": "string" + }, + "owners": { + "description": "Owners is a list of owners for the workspace.", + "type": "array", + "items": { + "type": "string" + } } } }, - "v1.ProviderSpec": { + "request.WorkspaceConfigs": { "type": "object", "properties": { - "alicloud": { - "description": "Alicloud configures a store to retrieve secrets from Alicloud Secrets Manager.", - "allOf": [ - { - "$ref": "#/definitions/v1.AlicloudProvider" - } - ] - }, - "aws": { - "description": "AWS configures a store to retrieve secrets from AWS Secrets Manager.", - "allOf": [ - { - "$ref": "#/definitions/v1.AWSProvider" - } - ] - }, - "azure": { - "description": "Azure configures a store to retrieve secrets from Azure KeyVault.", - "allOf": [ - { - "$ref": "#/definitions/v1.AzureKVProvider" - } - ] - }, - "fake": { - "description": "Fake configures a store with static key/value pairs", - "allOf": [ - { - "$ref": "#/definitions/v1.FakeProvider" - } - ] - }, - "onpremises": { - "description": "Onprem configures a store in on-premises environments", + "context": { + "description": "Context contains workspace-level configurations, such as runtimes, topologies, and metadata, etc.", "allOf": [ { - "$ref": "#/definitions/v1.OnPremisesProvider" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.GenericConfig" } ] }, - "vault": { - "description": "Vault configures a store to retrieve secrets from HashiCorp Vault.", + "modules": { + "description": "Modules are the configs of a set of modules.", "allOf": [ { - "$ref": "#/definitions/v1.VaultProvider" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ModuleConfigs" } ] }, - "viettelcloud": { - "description": "ViettelCloud configures a store to retrieve secrets from ViettelCloud Secrets Manager.", + "secretStore": { + "description": "SecretStore represents a secure external location for storing secrets.", "allOf": [ { - "$ref": "#/definitions/v1.ViettelCloudProvider" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.SecretStore" } ] } } }, - "v1.Resource": { + "url.URL": { "type": "object", "properties": { - "attributes": { - "description": "Attributes represents all specified attributes of this resource", - "type": "object", - "additionalProperties": true - }, - "dependsOn": { - "description": "DependsOn contains all resources this resource depends on", - "type": "array", - "items": { - "type": "string" - } + "forceQuery": { + "description": "append a query ('?') even if RawQuery is empty", + "type": "boolean" }, - "extensions": { - "description": "Extensions specifies arbitrary metadata of this resource", - "type": "object", - "additionalProperties": true + "fragment": { + "description": "fragment for references, without '#'", + "type": "string" }, - "id": { - "description": "ID is the unique key of this resource.\nApiVersion:Kind:Namespace:Name is an idiomatic way for Kubernetes resources.\nproviderNamespace:providerName:resourceType:resourceName for Terraform resources", + "host": { + "description": "host or host:port (see Hostname and Port methods)", "type": "string" }, - "type": { - "description": "Type represents all Context we supported like Kubernetes and Terraform", - "allOf": [ - { - "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Type" - } - ] - } - } - }, - "v1.SecretStore": { - "type": "object", - "properties": { - "provider": { - "$ref": "#/definitions/v1.ProviderSpec" - } - } - }, - "v1.Spec": { - "type": "object", - "properties": { - "context": { - "description": "Context contains workspace-level configurations, such as runtimes, topologies, and metadata, etc.", - "allOf": [ - { - "$ref": "#/definitions/v1.GenericConfig" - } - ] + "omitHost": { + "description": "do not emit empty host (authority)", + "type": "boolean" }, - "resources": { - "description": "Resources is the list of Resource this Spec contains.", - "type": "array", - "items": { - "$ref": "#/definitions/v1.Resource" - } + "opaque": { + "description": "encoded opaque data", + "type": "string" }, - "secretStore": { - "description": "SecretSore represents a external secret store location for storing secrets.", - "allOf": [ - { - "$ref": "#/definitions/v1.SecretStore" - } - ] - } - } - }, - "v1.VaultKVStoreVersion": { - "type": "string", - "enum": [ - "v1", - "v2" - ], - "x-enum-varnames": [ - "VaultKVStoreV1", - "VaultKVStoreV2" - ] - }, - "v1.VaultProvider": { - "type": "object", - "properties": { "path": { - "description": "Path is the mount path of the Vault KV backend endpoint, e.g: \"secret\".", + "description": "path (relative paths may omit leading slash)", "type": "string" }, - "server": { - "description": "Server is the target Vault server address to connect, e.g: \"https://vault.example.com:8200\".", + "rawFragment": { + "description": "encoded fragment hint (see EscapedFragment method)", "type": "string" }, - "version": { - "description": "Version is the Vault KV secret engine version. Version can be either \"v1\" or\n\"v2\", defaults to \"v2\".", + "rawPath": { + "description": "encoded path hint (see EscapedPath method)", + "type": "string" + }, + "rawQuery": { + "description": "encoded query values, without '?'", + "type": "string" + }, + "scheme": { + "type": "string" + }, + "user": { + "description": "username and password information", "allOf": [ { - "$ref": "#/definitions/v1.VaultKVStoreVersion" + "$ref": "#/definitions/url.Userinfo" } ] } } }, - "v1.ViettelCloudProvider": { - "type": "object", - "properties": { - "cmpURL": { - "description": "ViettelCloud CMP URL to be used to interact with ViettelCloud Secrets Manager.\nExamples are https://console.viettelcloud.vn/api/", - "type": "string" - }, - "projectID": { - "description": "ProjectID to be used to interact with ViettelCloud Secrets Manager.", - "type": "string" - } - } + "url.Userinfo": { + "type": "object" } } }` diff --git a/api/openapispec/swagger.json b/api/openapispec/swagger.json index 1b4d274..9249841 100644 --- a/api/openapispec/swagger.json +++ b/api/openapispec/swagger.json @@ -273,6 +273,12 @@ "description": "Workspace ID to filter module list by. Default to all workspaces.", "name": "workspaceID", "in": "query" + }, + { + "type": "string", + "description": "Module name to filter module list by. Default to all modules.", + "name": "moduleName", + "in": "query" } ], "responses": { @@ -1225,6 +1231,38 @@ "description": "Environment to filter runs by. Default to all", "name": "env", "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "csv", + "description": "RunType to filter runs by. Default to all", + "name": "type", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "csv", + "description": "RunStatus to filter runs by. Default to all", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "StartTime to filter runs by. Default to all. Format: RFC3339", + "name": "startTime", + "in": "query" + }, + { + "type": "string", + "description": "EndTime to filter runs by. Default to all. Format: RFC3339", + "name": "endTime", + "in": "query" } ], "responses": { @@ -1371,6 +1409,14 @@ ], "summary": "List source", "operationId": "listSource", + "parameters": [ + { + "type": "string", + "description": "Source name to filter source list by. Default to all sources.", + "name": "sourceName", + "in": "query" + } + ], "responses": { "200": { "description": "Success", @@ -2270,7 +2316,7 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/v1.Spec" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Spec" } }, "400": { @@ -2339,7 +2385,7 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/v1.Spec" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Spec" } }, "400": { @@ -2995,18 +3041,18 @@ "constant.SourceProviderType": { "type": "string", "enum": [ - "git", "git", "github", "oci", - "local" + "local", + "git" ], "x-enum-varnames": [ - "DefaultSourceType", "SourceProviderTypeGit", "SourceProviderTypeGithub", "SourceProviderTypeOCI", - "SourceProviderTypeLocal" + "SourceProviderTypeLocal", + "DefaultSourceType" ] }, "constant.StackState": { @@ -3055,7 +3101,7 @@ "description": "// Type is the type of the backend.\nType string `yaml:\"type\" json:\"type\"`\nBackend is the configuration of the backend.", "allOf": [ { - "$ref": "#/definitions/v1.BackendConfig" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.BackendConfig" } ] }, @@ -3301,6 +3347,10 @@ "description": "ResourceType is the type of the resource.", "type": "string" }, + "resourceURN": { + "description": "ResourceURN is the urn of the resource.", + "type": "string" + }, "stack": { "description": "Stack is the stack associated with the resource.", "allOf": [ @@ -3629,354 +3679,435 @@ } } }, - "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Type": { - "type": "string", - "enum": [ - "Kubernetes", - "Terraform" - ], - "x-enum-varnames": [ - "Kubernetes", - "Terraform" - ] + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AWSProvider": { + "type": "object", + "properties": { + "profile": { + "description": "The profile to be used to interact with AWS Secrets Manager.\nIf not set, the default profile created with `aws configure` will be used.", + "type": "string" + }, + "region": { + "description": "AWS Region to be used to interact with AWS Secrets Manager.\nExamples are us-east-1, us-west-2, etc.", + "type": "string" + } + } }, - "models.ActionType": { - "type": "integer", + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AlicloudProvider": { + "type": "object", + "properties": { + "region": { + "description": "Alicloud Region to be used to interact with Alicloud Secrets Manager.\nExamples are cn-beijing, cn-shanghai, etc.", + "type": "string" + } + } + }, + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AzureEnvironmentType": { + "type": "string", "enum": [ - 0, - 1, - 2, - 3, - 4 + "PublicCloud", + "USGovernmentCloud", + "ChinaCloud", + "GermanCloud" ], - "x-enum-comments": { - "Create": "creating a new resource.", - "Delete": "deleting an existing resource.", - "UnChanged": "nothing to do.", - "Undefined": "invalidate value", - "Update": "updating an existing resource." - }, "x-enum-varnames": [ - "Undefined", - "UnChanged", - "Create", - "Update", - "Delete" + "AzureEnvironmentPublicCloud", + "AzureEnvironmentUSGovernmentCloud", + "AzureEnvironmentChinaCloud", + "AzureEnvironmentGermanCloud" ] }, - "models.ChangeStep": { + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AzureKVProvider": { "type": "object", "properties": { - "action": { - "description": "the operation performed by this step", + "environmentType": { + "description": "EnvironmentType specifies the Azure cloud environment endpoints to use for connecting and authenticating with Azure.\nBy-default it points to the public cloud AAD endpoint, and the following endpoints are available:\nPublicCloud, USGovernmentCloud, ChinaCloud, GermanCloud\nRef: https://github.com/Azure/go-autorest/blob/main/autorest/azure/environments.go#L152", "allOf": [ { - "$ref": "#/definitions/models.ActionType" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AzureEnvironmentType" } ] }, - "from": { - "description": "old data" - }, - "id": { - "description": "the resource id", + "tenantId": { + "description": "TenantID configures the Azure Tenant to send requests to.", "type": "string" }, - "to": { - "description": "new data" + "vaultUrl": { + "description": "Vault Url from which the secrets to be fetched from.", + "type": "string" } } }, - "models.Changes": { + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.BackendConfig": { "type": "object", "properties": { - "changeSteps": { + "configs": { + "description": "Configs contains config items of the backend, whose keys differ from different backend types.", "type": "object", - "additionalProperties": { - "$ref": "#/definitions/models.ChangeStep" - } + "additionalProperties": {} }, - "stepKeys": { - "type": "array", - "items": { - "type": "string" - } + "type": { + "description": "Type is the backend type, supports BackendTypeLocal, BackendTypeOss, BackendTypeS3.", + "type": "string" } } }, - "request.CreateBackendRequest": { + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Configs": { "type": "object", - "required": [ - "name" - ], "properties": { - "backendConfig": { - "description": "BackendConfig is the configuration of the backend.", + "default": { + "description": "Default is default block of the module config.", "allOf": [ { - "$ref": "#/definitions/v1.BackendConfig" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.GenericConfig" } ] - }, - "description": { - "description": "Description is a human-readable description of the backend.", - "type": "string" - }, - "name": { - "description": "Name is the name of the backend.", - "type": "string" } } }, - "request.CreateModuleRequest": { + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.FakeProvider": { "type": "object", - "required": [ - "name", - "url" - ], "properties": { - "description": { - "description": "Description is a human-readable description of the module.", - "type": "string" - }, - "doc": { - "description": "Doc is the documentation URL of the module.", - "type": "string" - }, - "name": { - "description": "Name is the module name.", - "type": "string" - }, - "owners": { - "description": "Owners is a list of owners for the module.", + "data": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.FakeProviderData" } - }, - "url": { - "description": "URL is the module oci artifact registry URL.", - "type": "string" } } }, - "request.CreateOrganizationRequest": { + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.FakeProviderData": { "type": "object", - "required": [ - "owners" - ], "properties": { - "description": { - "description": "Description is a human-readable description of the organization.", + "key": { "type": "string" }, - "labels": { - "description": "Labels are custom labels associated with the organization.", - "type": "array", - "items": { - "type": "string" - } - }, - "name": { - "description": "Name is the name of the organization.", + "value": { "type": "string" }, - "owners": { - "description": "Owners is a list of owners for the organization.", - "type": "array", - "items": { + "valueMap": { + "type": "object", + "additionalProperties": { "type": "string" } + }, + "version": { + "type": "string" } } }, - "request.CreateProjectRequest": { + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.GenericConfig": { + "type": "object", + "additionalProperties": {} + }, + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ModuleConfig": { "type": "object", - "required": [ - "domain" - ], "properties": { - "description": { - "description": "Description is a human-readable description of the project.", - "type": "string" + "configs": { + "description": "Configs contains all levels of module configs", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Configs" + } + ] }, - "domain": { - "description": "Domain is the domain of the project, typically serving as the parent folder name for the project.", + "path": { + "description": "Path is the path of the module. It can be a local path or a remote URL", "type": "string" }, - "labels": { - "description": "Labels are custom labels associated with the project.", + "version": { + "description": "Version is the version of the module.", + "type": "string" + } + } + }, + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ModuleConfigs": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ModuleConfig" + } + }, + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ModulePatcherConfig": { + "type": "object", + "properties": { + "projectSelector": { + "description": "ProjectSelector contains the selected projects.", "type": "array", "items": { "type": "string" } - }, - "name": { - "description": "Name is the name of the project.", - "type": "string" - }, - "organizationID": { - "description": "OrganizationID is the organization id associated with the project.", - "type": "integer" - }, - "owners": { - "description": "Owners is a list of owners for the project.", - "type": "array", - "items": { + } + } + }, + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.OnPremisesProvider": { + "type": "object", + "properties": { + "attributes": { + "description": "attributes of the provider", + "type": "object", + "additionalProperties": { "type": "string" } }, - "path": { - "description": "Path is the relative path of the project within the sources.", + "name": { + "description": "platform name of the provider", "type": "string" - }, - "sourceID": { - "description": "SourceID is the configuration source id associated with the project.", - "type": "integer" } } }, - "request.CreateSourceRequest": { + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ProviderSpec": { "type": "object", - "required": [ - "name", - "remote", - "sourceProvider" - ], "properties": { - "description": { - "description": "Description is a human-readable description of the source.", - "type": "string" + "alicloud": { + "description": "Alicloud configures a store to retrieve secrets from Alicloud Secrets Manager.", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AlicloudProvider" + } + ] }, - "labels": { - "description": "Labels are custom labels associated with the source.", - "type": "array", - "items": { - "type": "string" - } + "aws": { + "description": "AWS configures a store to retrieve secrets from AWS Secrets Manager.", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AWSProvider" + } + ] }, - "name": { - "description": "Name is the name of the source.", - "type": "string" + "azure": { + "description": "Azure configures a store to retrieve secrets from Azure KeyVault.", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AzureKVProvider" + } + ] }, - "owners": { - "description": "Owners is a list of owners for the source.", - "type": "array", - "items": { - "type": "string" - } + "fake": { + "description": "Fake configures a store with static key/value pairs", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.FakeProvider" + } + ] }, - "remote": { - "description": "Remote is the source URL, including scheme.", - "type": "string" + "onpremises": { + "description": "Onprem configures a store in on-premises environments", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.OnPremisesProvider" + } + ] }, - "sourceProvider": { - "description": "SourceProvider is the type of the source provider.", - "type": "string" + "vault": { + "description": "Vault configures a store to retrieve secrets from HashiCorp Vault.", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.VaultProvider" + } + ] + }, + "viettelcloud": { + "description": "ViettelCloud configures a store to retrieve secrets from ViettelCloud Secrets Manager.", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ViettelCloudProvider" + } + ] } } }, - "request.CreateStackRequest": { + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Resource": { "type": "object", - "required": [ - "name" - ], "properties": { - "description": { - "description": "Description is a human-readable description of the stack.", - "type": "string" - }, - "desiredVersion": { - "description": "DesiredVersion is the desired revision of stack.", - "type": "string" + "attributes": { + "description": "Attributes represents all specified attributes of this resource", + "type": "object", + "additionalProperties": true }, - "labels": { - "description": "Labels are custom labels associated with the stack.", + "dependsOn": { + "description": "DependsOn contains all resources this resource depends on", "type": "array", "items": { "type": "string" } }, - "name": { - "description": "Name is the name of the stack.", + "extensions": { + "description": "Extensions specifies arbitrary metadata of this resource", + "type": "object", + "additionalProperties": true + }, + "id": { + "description": "ID is the unique key of this resource.\nApiVersion:Kind:Namespace:Name is an idiomatic way for Kubernetes resources.\nproviderNamespace:providerName:resourceType:resourceName for Terraform resources", "type": "string" }, - "owners": { - "description": "Owners is a list of owners for the stack.", + "type": { + "description": "Type represents all Context we supported like Kubernetes and Terraform", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Type" + } + ] + } + } + }, + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.SecretStore": { + "type": "object", + "properties": { + "provider": { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ProviderSpec" + } + } + }, + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Spec": { + "type": "object", + "properties": { + "context": { + "description": "Context contains workspace-level configurations, such as runtimes, topologies, and metadata, etc.", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.GenericConfig" + } + ] + }, + "resources": { + "description": "Resources is the list of Resource this Spec contains.", "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Resource" } }, + "secretStore": { + "description": "SecretSore represents a external secret store location for storing secrets.", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.SecretStore" + } + ] + } + } + }, + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Type": { + "type": "string", + "enum": [ + "Kubernetes", + "Terraform" + ], + "x-enum-varnames": [ + "Kubernetes", + "Terraform" + ] + }, + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.VaultKVStoreVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "x-enum-varnames": [ + "VaultKVStoreV1", + "VaultKVStoreV2" + ] + }, + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.VaultProvider": { + "type": "object", + "properties": { "path": { - "description": "Path is the relative path of the stack within the source.", + "description": "Path is the mount path of the Vault KV backend endpoint, e.g: \"secret\".", "type": "string" }, - "projectID": { - "description": "ProjectID is the project id of the stack within the source.", - "type": "integer" - }, - "projectName": { - "description": "ProjectName is the project name of the stack within the source.", + "server": { + "description": "Server is the target Vault server address to connect, e.g: \"https://vault.example.com:8200\".", "type": "string" }, - "type": { - "description": "Type is the type of the stack.", - "type": "string" + "version": { + "description": "Version is the Vault KV secret engine version. Version can be either \"v1\" or\n\"v2\", defaults to \"v2\".", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.VaultKVStoreVersion" + } + ] } } }, - "request.CreateWorkspaceRequest": { + "kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ViettelCloudProvider": { "type": "object", - "required": [ - "backendID", - "name", - "owners" - ], "properties": { - "backendID": { - "description": "BackendID is the configuration backend id associated with the workspace.", - "type": "integer" + "cmpURL": { + "description": "ViettelCloud CMP URL to be used to interact with ViettelCloud Secrets Manager.\nExamples are https://console.viettelcloud.vn/api/", + "type": "string" }, - "description": { - "description": "Description is a human-readable description of the workspace.", + "projectID": { + "description": "ProjectID to be used to interact with ViettelCloud Secrets Manager.", "type": "string" + } + } + }, + "models.ActionType": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3, + 4 + ], + "x-enum-comments": { + "Create": "creating a new resource.", + "Delete": "deleting an existing resource.", + "UnChanged": "nothing to do.", + "Undefined": "invalidate value", + "Update": "updating an existing resource." + }, + "x-enum-varnames": [ + "Undefined", + "UnChanged", + "Create", + "Update", + "Delete" + ] + }, + "models.ChangeStep": { + "type": "object", + "properties": { + "action": { + "description": "the operation performed by this step", + "allOf": [ + { + "$ref": "#/definitions/models.ActionType" + } + ] }, - "labels": { - "description": "Labels are custom labels associated with the workspace.", - "type": "array", - "items": { - "type": "string" - } + "from": { + "description": "old data" }, - "name": { - "description": "Name is the name of the workspace.", + "id": { + "description": "the resource id", "type": "string" }, - "owners": { - "description": "Owners is a list of owners for the workspace.", - "type": "array", - "items": { - "type": "string" - } + "to": { + "description": "new data" } } }, - "request.StackImportRequest": { + "models.Changes": { "type": "object", "properties": { - "importedResources": { + "changeSteps": { "type": "object", "additionalProperties": { + "$ref": "#/definitions/models.ChangeStep" + } + }, + "stepKeys": { + "type": "array", + "items": { "type": "string" } } } }, - "request.UpdateBackendRequest": { + "request.CreateBackendRequest": { "type": "object", "required": [ - "id", "name" ], "properties": { @@ -3984,7 +4115,7 @@ "description": "BackendConfig is the configuration of the backend.", "allOf": [ { - "$ref": "#/definitions/v1.BackendConfig" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.BackendConfig" } ] }, @@ -3992,20 +4123,17 @@ "description": "Description is a human-readable description of the backend.", "type": "string" }, - "id": { - "description": "ID is the id of the backend.", - "type": "integer" - }, "name": { "description": "Name is the name of the backend.", "type": "string" } } }, - "request.UpdateModuleRequest": { + "request.CreateModuleRequest": { "type": "object", "required": [ - "name" + "name", + "url" ], "properties": { "description": { @@ -4033,10 +4161,9 @@ } } }, - "request.UpdateOrganizationRequest": { + "request.CreateOrganizationRequest": { "type": "object", "required": [ - "id", "owners" ], "properties": { @@ -4044,10 +4171,6 @@ "description": "Description is a human-readable description of the organization.", "type": "string" }, - "id": { - "description": "ID is the id of the organization.", - "type": "integer" - }, "labels": { "description": "Labels are custom labels associated with the organization.", "type": "array", @@ -4068,11 +4191,10 @@ } } }, - "request.UpdateProjectRequest": { + "request.CreateProjectRequest": { "type": "object", "required": [ - "domain", - "id" + "domain" ], "properties": { "description": { @@ -4083,10 +4205,6 @@ "description": "Domain is the domain of the project, typically serving as the parent folder name for the project.", "type": "string" }, - "id": { - "description": "ID is the id of the project.", - "type": "integer" - }, "labels": { "description": "Labels are custom labels associated with the project.", "type": "array", @@ -4119,10 +4237,9 @@ } } }, - "request.UpdateSourceRequest": { + "request.CreateSourceRequest": { "type": "object", "required": [ - "id", "name", "remote", "sourceProvider" @@ -4132,10 +4249,6 @@ "description": "Description is a human-readable description of the source.", "type": "string" }, - "id": { - "description": "ID is the id of the source.", - "type": "integer" - }, "labels": { "description": "Labels are custom labels associated with the source.", "type": "array", @@ -4164,10 +4277,9 @@ } } }, - "request.UpdateStackRequest": { + "request.CreateStackRequest": { "type": "object", "required": [ - "id", "name" ], "properties": { @@ -4179,79 +4291,177 @@ "description": "DesiredVersion is the desired revision of stack.", "type": "string" }, - "id": { - "description": "ID is the id of the stack.", + "labels": { + "description": "Labels are custom labels associated with the stack.", + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "description": "Name is the name of the stack.", + "type": "string" + }, + "owners": { + "description": "Owners is a list of owners for the stack.", + "type": "array", + "items": { + "type": "string" + } + }, + "path": { + "description": "Path is the relative path of the stack within the source.", + "type": "string" + }, + "projectID": { + "description": "ProjectID is the project id of the stack within the source.", + "type": "integer" + }, + "projectName": { + "description": "ProjectName is the project name of the stack within the source.", + "type": "string" + }, + "type": { + "description": "Type is the type of the stack.", + "type": "string" + } + } + }, + "request.CreateWorkspaceRequest": { + "type": "object", + "required": [ + "backendID", + "name", + "owners" + ], + "properties": { + "backendID": { + "description": "BackendID is the configuration backend id associated with the workspace.", "type": "integer" }, + "description": { + "description": "Description is a human-readable description of the workspace.", + "type": "string" + }, "labels": { - "description": "Labels are custom labels associated with the stack.", + "description": "Labels are custom labels associated with the workspace.", "type": "array", "items": { "type": "string" } }, "name": { - "description": "Name is the name of the stack.", + "description": "Name is the name of the workspace.", + "type": "string" + }, + "owners": { + "description": "Owners is a list of owners for the workspace.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "request.StackImportRequest": { + "type": "object", + "properties": { + "importedResources": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "request.UpdateBackendRequest": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "backendConfig": { + "description": "BackendConfig is the configuration of the backend.", + "allOf": [ + { + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.BackendConfig" + } + ] + }, + "description": { + "description": "Description is a human-readable description of the backend.", + "type": "string" + }, + "id": { + "description": "ID is the id of the backend.", + "type": "integer" + }, + "name": { + "description": "Name is the name of the backend.", + "type": "string" + } + } + }, + "request.UpdateModuleRequest": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "description": { + "description": "Description is a human-readable description of the module.", + "type": "string" + }, + "doc": { + "description": "Doc is the documentation URL of the module.", + "type": "string" + }, + "name": { + "description": "Name is the module name.", "type": "string" }, "owners": { - "description": "Owners is a list of owners for the stack.", + "description": "Owners is a list of owners for the module.", "type": "array", "items": { "type": "string" } }, - "path": { - "description": "Path is the relative path of the stack within the source.", - "type": "string" - }, - "projectID": { - "description": "ProjectID is the project id of the stack within the source.", - "type": "integer" - }, - "projectName": { - "description": "ProjectName is the project name of the stack within the source.", - "type": "string" - }, - "type": { - "description": "Type is the type of the stack.", + "url": { + "description": "URL is the module oci artifact registry URL.", "type": "string" } } }, - "request.UpdateWorkspaceRequest": { + "request.UpdateOrganizationRequest": { "type": "object", "required": [ - "backendID", "id", "owners" ], "properties": { - "backendID": { - "description": "BackendID is the configuration backend id associated with the workspace.", - "type": "integer" - }, "description": { - "description": "Description is a human-readable description of the workspace.", + "description": "Description is a human-readable description of the organization.", "type": "string" }, "id": { - "description": "ID is the id of the workspace.", + "description": "ID is the id of the organization.", "type": "integer" }, "labels": { - "description": "Labels are custom labels associated with the workspace.", - "type": "object", - "additionalProperties": { + "description": "Labels are custom labels associated with the organization.", + "type": "array", + "items": { "type": "string" } }, "name": { - "description": "Name is the name of the workspace.", + "description": "Name is the name of the organization.", "type": "string" }, "owners": { - "description": "Owners is a list of owners for the workspace.", + "description": "Owners is a list of owners for the organization.", "type": "array", "items": { "type": "string" @@ -4259,440 +4469,280 @@ } } }, - "request.WorkspaceConfigs": { - "type": "object", - "properties": { - "context": { - "description": "Context contains workspace-level configurations, such as runtimes, topologies, and metadata, etc.", - "allOf": [ - { - "$ref": "#/definitions/v1.GenericConfig" - } - ] - }, - "modules": { - "description": "Modules are the configs of a set of modules.", - "allOf": [ - { - "$ref": "#/definitions/v1.ModuleConfigs" - } - ] - }, - "secretStore": { - "description": "SecretStore represents a secure external location for storing secrets.", - "allOf": [ - { - "$ref": "#/definitions/v1.SecretStore" - } - ] - } - } - }, - "url.URL": { + "request.UpdateProjectRequest": { "type": "object", + "required": [ + "domain", + "id" + ], "properties": { - "forceQuery": { - "description": "append a query ('?') even if RawQuery is empty", - "type": "boolean" - }, - "fragment": { - "description": "fragment for references, without '#'", - "type": "string" - }, - "host": { - "description": "host or host:port (see Hostname and Port methods)", + "description": { + "description": "Description is a human-readable description of the project.", "type": "string" }, - "omitHost": { - "description": "do not emit empty host (authority)", - "type": "boolean" - }, - "opaque": { - "description": "encoded opaque data", + "domain": { + "description": "Domain is the domain of the project, typically serving as the parent folder name for the project.", "type": "string" }, - "path": { - "description": "path (relative paths may omit leading slash)", - "type": "string" + "id": { + "description": "ID is the id of the project.", + "type": "integer" }, - "rawFragment": { - "description": "encoded fragment hint (see EscapedFragment method)", - "type": "string" + "labels": { + "description": "Labels are custom labels associated with the project.", + "type": "array", + "items": { + "type": "string" + } }, - "rawPath": { - "description": "encoded path hint (see EscapedPath method)", + "name": { + "description": "Name is the name of the project.", "type": "string" }, - "rawQuery": { - "description": "encoded query values, without '?'", - "type": "string" + "organizationID": { + "description": "OrganizationID is the organization id associated with the project.", + "type": "integer" }, - "scheme": { - "type": "string" + "owners": { + "description": "Owners is a list of owners for the project.", + "type": "array", + "items": { + "type": "string" + } }, - "user": { - "description": "username and password information", - "allOf": [ - { - "$ref": "#/definitions/url.Userinfo" - } - ] - } - } - }, - "url.Userinfo": { - "type": "object" - }, - "v1.AWSProvider": { - "type": "object", - "properties": { - "profile": { - "description": "The profile to be used to interact with AWS Secrets Manager.\nIf not set, the default profile created with `aws configure` will be used.", + "path": { + "description": "Path is the relative path of the project within the sources.", "type": "string" }, - "region": { - "description": "AWS Region to be used to interact with AWS Secrets Manager.\nExamples are us-east-1, us-west-2, etc.", - "type": "string" + "sourceID": { + "description": "SourceID is the configuration source id associated with the project.", + "type": "integer" } } }, - "v1.AlicloudProvider": { + "request.UpdateSourceRequest": { "type": "object", - "properties": { - "region": { - "description": "Alicloud Region to be used to interact with Alicloud Secrets Manager.\nExamples are cn-beijing, cn-shanghai, etc.", - "type": "string" - } - } - }, - "v1.AzureEnvironmentType": { - "type": "string", - "enum": [ - "PublicCloud", - "USGovernmentCloud", - "ChinaCloud", - "GermanCloud" + "required": [ + "id", + "name", + "remote", + "sourceProvider" ], - "x-enum-varnames": [ - "AzureEnvironmentPublicCloud", - "AzureEnvironmentUSGovernmentCloud", - "AzureEnvironmentChinaCloud", - "AzureEnvironmentGermanCloud" - ] - }, - "v1.AzureKVProvider": { - "type": "object", "properties": { - "environmentType": { - "description": "EnvironmentType specifies the Azure cloud environment endpoints to use for connecting and authenticating with Azure.\nBy-default it points to the public cloud AAD endpoint, and the following endpoints are available:\nPublicCloud, USGovernmentCloud, ChinaCloud, GermanCloud\nRef: https://github.com/Azure/go-autorest/blob/main/autorest/azure/environments.go#L152", - "allOf": [ - { - "$ref": "#/definitions/v1.AzureEnvironmentType" - } - ] - }, - "tenantId": { - "description": "TenantID configures the Azure Tenant to send requests to.", + "description": { + "description": "Description is a human-readable description of the source.", "type": "string" }, - "vaultUrl": { - "description": "Vault Url from which the secrets to be fetched from.", - "type": "string" - } - } - }, - "v1.BackendConfig": { - "type": "object", - "properties": { - "configs": { - "description": "Configs contains config items of the backend, whose keys differ from different backend types.", - "type": "object", - "additionalProperties": {} + "id": { + "description": "ID is the id of the source.", + "type": "integer" }, - "type": { - "description": "Type is the backend type, supports BackendTypeLocal, BackendTypeOss, BackendTypeS3.", - "type": "string" - } - } - }, - "v1.Configs": { - "type": "object", - "properties": { - "default": { - "description": "Default is default block of the module config.", - "allOf": [ - { - "$ref": "#/definitions/v1.GenericConfig" - } - ] - } - } - }, - "v1.FakeProvider": { - "type": "object", - "properties": { - "data": { + "labels": { + "description": "Labels are custom labels associated with the source.", "type": "array", "items": { - "$ref": "#/definitions/v1.FakeProviderData" + "type": "string" } - } - } - }, - "v1.FakeProviderData": { - "type": "object", - "properties": { - "key": { - "type": "string" }, - "value": { + "name": { + "description": "Name is the name of the source.", "type": "string" }, - "valueMap": { - "type": "object", - "additionalProperties": { + "owners": { + "description": "Owners is a list of owners for the source.", + "type": "array", + "items": { "type": "string" } }, - "version": { + "remote": { + "description": "Remote is the source URL, including scheme.", + "type": "string" + }, + "sourceProvider": { + "description": "SourceProvider is the type of the source provider.", "type": "string" } } }, - "v1.GenericConfig": { - "type": "object", - "additionalProperties": {} - }, - "v1.ModuleConfig": { + "request.UpdateStackRequest": { "type": "object", + "required": [ + "id", + "name" + ], "properties": { - "configs": { - "description": "Configs contains all levels of module configs", - "allOf": [ - { - "$ref": "#/definitions/v1.Configs" - } - ] + "description": { + "description": "Description is a human-readable description of the stack.", + "type": "string" }, - "path": { - "description": "Path is the path of the module. It can be a local path or a remote URL", + "desiredVersion": { + "description": "DesiredVersion is the desired revision of stack.", "type": "string" }, - "version": { - "description": "Version is the version of the module.", + "id": { + "description": "ID is the id of the stack.", + "type": "integer" + }, + "labels": { + "description": "Labels are custom labels associated with the stack.", + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "description": "Name is the name of the stack.", "type": "string" - } - } - }, - "v1.ModuleConfigs": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/v1.ModuleConfig" - } - }, - "v1.ModulePatcherConfig": { - "type": "object", - "properties": { - "projectSelector": { - "description": "ProjectSelector contains the selected projects.", + }, + "owners": { + "description": "Owners is a list of owners for the stack.", "type": "array", "items": { "type": "string" } + }, + "path": { + "description": "Path is the relative path of the stack within the source.", + "type": "string" + }, + "projectID": { + "description": "ProjectID is the project id of the stack within the source.", + "type": "integer" + }, + "projectName": { + "description": "ProjectName is the project name of the stack within the source.", + "type": "string" + }, + "type": { + "description": "Type is the type of the stack.", + "type": "string" } } }, - "v1.OnPremisesProvider": { + "request.UpdateWorkspaceRequest": { "type": "object", + "required": [ + "backendID", + "id", + "owners" + ], "properties": { - "attributes": { - "description": "attributes of the provider", + "backendID": { + "description": "BackendID is the configuration backend id associated with the workspace.", + "type": "integer" + }, + "description": { + "description": "Description is a human-readable description of the workspace.", + "type": "string" + }, + "id": { + "description": "ID is the id of the workspace.", + "type": "integer" + }, + "labels": { + "description": "Labels are custom labels associated with the workspace.", "type": "object", "additionalProperties": { "type": "string" } }, "name": { - "description": "platform name of the provider", + "description": "Name is the name of the workspace.", "type": "string" + }, + "owners": { + "description": "Owners is a list of owners for the workspace.", + "type": "array", + "items": { + "type": "string" + } } } }, - "v1.ProviderSpec": { + "request.WorkspaceConfigs": { "type": "object", "properties": { - "alicloud": { - "description": "Alicloud configures a store to retrieve secrets from Alicloud Secrets Manager.", - "allOf": [ - { - "$ref": "#/definitions/v1.AlicloudProvider" - } - ] - }, - "aws": { - "description": "AWS configures a store to retrieve secrets from AWS Secrets Manager.", - "allOf": [ - { - "$ref": "#/definitions/v1.AWSProvider" - } - ] - }, - "azure": { - "description": "Azure configures a store to retrieve secrets from Azure KeyVault.", - "allOf": [ - { - "$ref": "#/definitions/v1.AzureKVProvider" - } - ] - }, - "fake": { - "description": "Fake configures a store with static key/value pairs", - "allOf": [ - { - "$ref": "#/definitions/v1.FakeProvider" - } - ] - }, - "onpremises": { - "description": "Onprem configures a store in on-premises environments", + "context": { + "description": "Context contains workspace-level configurations, such as runtimes, topologies, and metadata, etc.", "allOf": [ { - "$ref": "#/definitions/v1.OnPremisesProvider" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.GenericConfig" } ] }, - "vault": { - "description": "Vault configures a store to retrieve secrets from HashiCorp Vault.", + "modules": { + "description": "Modules are the configs of a set of modules.", "allOf": [ { - "$ref": "#/definitions/v1.VaultProvider" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ModuleConfigs" } ] }, - "viettelcloud": { - "description": "ViettelCloud configures a store to retrieve secrets from ViettelCloud Secrets Manager.", + "secretStore": { + "description": "SecretStore represents a secure external location for storing secrets.", "allOf": [ { - "$ref": "#/definitions/v1.ViettelCloudProvider" + "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.SecretStore" } ] } } }, - "v1.Resource": { + "url.URL": { "type": "object", "properties": { - "attributes": { - "description": "Attributes represents all specified attributes of this resource", - "type": "object", - "additionalProperties": true - }, - "dependsOn": { - "description": "DependsOn contains all resources this resource depends on", - "type": "array", - "items": { - "type": "string" - } + "forceQuery": { + "description": "append a query ('?') even if RawQuery is empty", + "type": "boolean" }, - "extensions": { - "description": "Extensions specifies arbitrary metadata of this resource", - "type": "object", - "additionalProperties": true + "fragment": { + "description": "fragment for references, without '#'", + "type": "string" }, - "id": { - "description": "ID is the unique key of this resource.\nApiVersion:Kind:Namespace:Name is an idiomatic way for Kubernetes resources.\nproviderNamespace:providerName:resourceType:resourceName for Terraform resources", + "host": { + "description": "host or host:port (see Hostname and Port methods)", "type": "string" }, - "type": { - "description": "Type represents all Context we supported like Kubernetes and Terraform", - "allOf": [ - { - "$ref": "#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Type" - } - ] - } - } - }, - "v1.SecretStore": { - "type": "object", - "properties": { - "provider": { - "$ref": "#/definitions/v1.ProviderSpec" - } - } - }, - "v1.Spec": { - "type": "object", - "properties": { - "context": { - "description": "Context contains workspace-level configurations, such as runtimes, topologies, and metadata, etc.", - "allOf": [ - { - "$ref": "#/definitions/v1.GenericConfig" - } - ] + "omitHost": { + "description": "do not emit empty host (authority)", + "type": "boolean" }, - "resources": { - "description": "Resources is the list of Resource this Spec contains.", - "type": "array", - "items": { - "$ref": "#/definitions/v1.Resource" - } + "opaque": { + "description": "encoded opaque data", + "type": "string" }, - "secretStore": { - "description": "SecretSore represents a external secret store location for storing secrets.", - "allOf": [ - { - "$ref": "#/definitions/v1.SecretStore" - } - ] - } - } - }, - "v1.VaultKVStoreVersion": { - "type": "string", - "enum": [ - "v1", - "v2" - ], - "x-enum-varnames": [ - "VaultKVStoreV1", - "VaultKVStoreV2" - ] - }, - "v1.VaultProvider": { - "type": "object", - "properties": { "path": { - "description": "Path is the mount path of the Vault KV backend endpoint, e.g: \"secret\".", + "description": "path (relative paths may omit leading slash)", "type": "string" }, - "server": { - "description": "Server is the target Vault server address to connect, e.g: \"https://vault.example.com:8200\".", + "rawFragment": { + "description": "encoded fragment hint (see EscapedFragment method)", "type": "string" }, - "version": { - "description": "Version is the Vault KV secret engine version. Version can be either \"v1\" or\n\"v2\", defaults to \"v2\".", + "rawPath": { + "description": "encoded path hint (see EscapedPath method)", + "type": "string" + }, + "rawQuery": { + "description": "encoded query values, without '?'", + "type": "string" + }, + "scheme": { + "type": "string" + }, + "user": { + "description": "username and password information", "allOf": [ { - "$ref": "#/definitions/v1.VaultKVStoreVersion" + "$ref": "#/definitions/url.Userinfo" } ] } } }, - "v1.ViettelCloudProvider": { - "type": "object", - "properties": { - "cmpURL": { - "description": "ViettelCloud CMP URL to be used to interact with ViettelCloud Secrets Manager.\nExamples are https://console.viettelcloud.vn/api/", - "type": "string" - }, - "projectID": { - "description": "ProjectID to be used to interact with ViettelCloud Secrets Manager.", - "type": "string" - } - } + "url.Userinfo": { + "type": "object" } } } \ No newline at end of file diff --git a/api/openapispec/swagger.yaml b/api/openapispec/swagger.yaml index 19f8b80..4fa85f1 100644 --- a/api/openapispec/swagger.yaml +++ b/api/openapispec/swagger.yaml @@ -30,17 +30,17 @@ definitions: constant.SourceProviderType: enum: - git - - git - github - oci - local + - git type: string x-enum-varnames: - - DefaultSourceType - SourceProviderTypeGit - SourceProviderTypeGithub - SourceProviderTypeOCI - SourceProviderTypeLocal + - DefaultSourceType constant.StackState: enum: - UnSynced @@ -81,7 +81,7 @@ definitions: properties: backendConfig: allOf: - - $ref: '#/definitions/v1.BackendConfig' + - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.BackendConfig' description: |- // Type is the type of the backend. Type string `yaml:"type" json:"type"` @@ -256,6 +256,9 @@ definitions: resourceType: description: ResourceType is the type of the resource. type: string + resourceURN: + description: ResourceURN is the urn of the resource. + type: string stack: allOf: - $ref: '#/definitions/entity.Stack' @@ -479,6 +482,218 @@ definitions: description: UpdateTimestamp is the timestamp of the updated for the workspace. type: string type: object + kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AWSProvider: + properties: + profile: + description: |- + The profile to be used to interact with AWS Secrets Manager. + If not set, the default profile created with `aws configure` will be used. + type: string + region: + description: |- + AWS Region to be used to interact with AWS Secrets Manager. + Examples are us-east-1, us-west-2, etc. + type: string + type: object + kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AlicloudProvider: + properties: + region: + description: |- + Alicloud Region to be used to interact with Alicloud Secrets Manager. + Examples are cn-beijing, cn-shanghai, etc. + type: string + type: object + kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AzureEnvironmentType: + enum: + - PublicCloud + - USGovernmentCloud + - ChinaCloud + - GermanCloud + type: string + x-enum-varnames: + - AzureEnvironmentPublicCloud + - AzureEnvironmentUSGovernmentCloud + - AzureEnvironmentChinaCloud + - AzureEnvironmentGermanCloud + kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AzureKVProvider: + properties: + environmentType: + allOf: + - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AzureEnvironmentType' + description: |- + EnvironmentType specifies the Azure cloud environment endpoints to use for connecting and authenticating with Azure. + By-default it points to the public cloud AAD endpoint, and the following endpoints are available: + PublicCloud, USGovernmentCloud, ChinaCloud, GermanCloud + Ref: https://github.com/Azure/go-autorest/blob/main/autorest/azure/environments.go#L152 + tenantId: + description: TenantID configures the Azure Tenant to send requests to. + type: string + vaultUrl: + description: Vault Url from which the secrets to be fetched from. + type: string + type: object + kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.BackendConfig: + properties: + configs: + additionalProperties: {} + description: Configs contains config items of the backend, whose keys differ + from different backend types. + type: object + type: + description: Type is the backend type, supports BackendTypeLocal, BackendTypeOss, + BackendTypeS3. + type: string + type: object + kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Configs: + properties: + default: + allOf: + - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.GenericConfig' + description: Default is default block of the module config. + type: object + kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.FakeProvider: + properties: + data: + items: + $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.FakeProviderData' + type: array + type: object + kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.FakeProviderData: + properties: + key: + type: string + value: + type: string + valueMap: + additionalProperties: + type: string + type: object + version: + type: string + type: object + kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.GenericConfig: + additionalProperties: {} + type: object + kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ModuleConfig: + properties: + configs: + allOf: + - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Configs' + description: Configs contains all levels of module configs + path: + description: Path is the path of the module. It can be a local path or a remote + URL + type: string + version: + description: Version is the version of the module. + type: string + type: object + kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ModuleConfigs: + additionalProperties: + $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ModuleConfig' + type: object + kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ModulePatcherConfig: + properties: + projectSelector: + description: ProjectSelector contains the selected projects. + items: + type: string + type: array + type: object + kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.OnPremisesProvider: + properties: + attributes: + additionalProperties: + type: string + description: attributes of the provider + type: object + name: + description: platform name of the provider + type: string + type: object + kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ProviderSpec: + properties: + alicloud: + allOf: + - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AlicloudProvider' + description: Alicloud configures a store to retrieve secrets from Alicloud + Secrets Manager. + aws: + allOf: + - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AWSProvider' + description: AWS configures a store to retrieve secrets from AWS Secrets Manager. + azure: + allOf: + - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AzureKVProvider' + description: Azure configures a store to retrieve secrets from Azure KeyVault. + fake: + allOf: + - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.FakeProvider' + description: Fake configures a store with static key/value pairs + onpremises: + allOf: + - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.OnPremisesProvider' + description: Onprem configures a store in on-premises environments + vault: + allOf: + - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.VaultProvider' + description: Vault configures a store to retrieve secrets from HashiCorp Vault. + viettelcloud: + allOf: + - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ViettelCloudProvider' + description: ViettelCloud configures a store to retrieve secrets from ViettelCloud + Secrets Manager. + type: object + kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Resource: + properties: + attributes: + additionalProperties: true + description: Attributes represents all specified attributes of this resource + type: object + dependsOn: + description: DependsOn contains all resources this resource depends on + items: + type: string + type: array + extensions: + additionalProperties: true + description: Extensions specifies arbitrary metadata of this resource + type: object + id: + description: |- + ID is the unique key of this resource. + ApiVersion:Kind:Namespace:Name is an idiomatic way for Kubernetes resources. + providerNamespace:providerName:resourceType:resourceName for Terraform resources + type: string + type: + allOf: + - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Type' + description: Type represents all Context we supported like Kubernetes and + Terraform + type: object + kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.SecretStore: + properties: + provider: + $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ProviderSpec' + type: object + kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Spec: + properties: + context: + allOf: + - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.GenericConfig' + description: Context contains workspace-level configurations, such as runtimes, + topologies, and metadata, etc. + resources: + description: Resources is the list of Resource this Spec contains. + items: + $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Resource' + type: array + secretStore: + allOf: + - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.SecretStore' + description: SecretSore represents a external secret store location for storing + secrets. + type: object kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Type: enum: - Kubernetes @@ -487,6 +702,41 @@ definitions: x-enum-varnames: - Kubernetes - Terraform + kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.VaultKVStoreVersion: + enum: + - v1 + - v2 + type: string + x-enum-varnames: + - VaultKVStoreV1 + - VaultKVStoreV2 + kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.VaultProvider: + properties: + path: + description: 'Path is the mount path of the Vault KV backend endpoint, e.g: + "secret".' + type: string + server: + description: 'Server is the target Vault server address to connect, e.g: "https://vault.example.com:8200".' + type: string + version: + allOf: + - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.VaultKVStoreVersion' + description: |- + Version is the Vault KV secret engine version. Version can be either "v1" or + "v2", defaults to "v2". + type: object + kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ViettelCloudProvider: + properties: + cmpURL: + description: |- + ViettelCloud CMP URL to be used to interact with ViettelCloud Secrets Manager. + Examples are https://console.viettelcloud.vn/api/ + type: string + projectID: + description: ProjectID to be used to interact with ViettelCloud Secrets Manager. + type: string + type: object models.ActionType: enum: - 0 @@ -536,7 +786,7 @@ definitions: properties: backendConfig: allOf: - - $ref: '#/definitions/v1.BackendConfig' + - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.BackendConfig' description: BackendConfig is the configuration of the backend. description: description: Description is a human-readable description of the backend. @@ -728,7 +978,7 @@ definitions: properties: backendConfig: allOf: - - $ref: '#/definitions/v1.BackendConfig' + - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.BackendConfig' description: BackendConfig is the configuration of the backend. description: description: Description is a human-readable description of the backend. @@ -935,16 +1185,16 @@ definitions: properties: context: allOf: - - $ref: '#/definitions/v1.GenericConfig' + - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.GenericConfig' description: Context contains workspace-level configurations, such as runtimes, topologies, and metadata, etc. modules: allOf: - - $ref: '#/definitions/v1.ModuleConfigs' + - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ModuleConfigs' description: Modules are the configs of a set of modules. secretStore: allOf: - - $ref: '#/definitions/v1.SecretStore' + - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.SecretStore' description: SecretStore represents a secure external location for storing secrets. type: object @@ -986,253 +1236,6 @@ definitions: type: object url.Userinfo: type: object - v1.AWSProvider: - properties: - profile: - description: |- - The profile to be used to interact with AWS Secrets Manager. - If not set, the default profile created with `aws configure` will be used. - type: string - region: - description: |- - AWS Region to be used to interact with AWS Secrets Manager. - Examples are us-east-1, us-west-2, etc. - type: string - type: object - v1.AlicloudProvider: - properties: - region: - description: |- - Alicloud Region to be used to interact with Alicloud Secrets Manager. - Examples are cn-beijing, cn-shanghai, etc. - type: string - type: object - v1.AzureEnvironmentType: - enum: - - PublicCloud - - USGovernmentCloud - - ChinaCloud - - GermanCloud - type: string - x-enum-varnames: - - AzureEnvironmentPublicCloud - - AzureEnvironmentUSGovernmentCloud - - AzureEnvironmentChinaCloud - - AzureEnvironmentGermanCloud - v1.AzureKVProvider: - properties: - environmentType: - allOf: - - $ref: '#/definitions/v1.AzureEnvironmentType' - description: |- - EnvironmentType specifies the Azure cloud environment endpoints to use for connecting and authenticating with Azure. - By-default it points to the public cloud AAD endpoint, and the following endpoints are available: - PublicCloud, USGovernmentCloud, ChinaCloud, GermanCloud - Ref: https://github.com/Azure/go-autorest/blob/main/autorest/azure/environments.go#L152 - tenantId: - description: TenantID configures the Azure Tenant to send requests to. - type: string - vaultUrl: - description: Vault Url from which the secrets to be fetched from. - type: string - type: object - v1.BackendConfig: - properties: - configs: - additionalProperties: {} - description: Configs contains config items of the backend, whose keys differ - from different backend types. - type: object - type: - description: Type is the backend type, supports BackendTypeLocal, BackendTypeOss, - BackendTypeS3. - type: string - type: object - v1.Configs: - properties: - default: - allOf: - - $ref: '#/definitions/v1.GenericConfig' - description: Default is default block of the module config. - type: object - v1.FakeProvider: - properties: - data: - items: - $ref: '#/definitions/v1.FakeProviderData' - type: array - type: object - v1.FakeProviderData: - properties: - key: - type: string - value: - type: string - valueMap: - additionalProperties: - type: string - type: object - version: - type: string - type: object - v1.GenericConfig: - additionalProperties: {} - type: object - v1.ModuleConfig: - properties: - configs: - allOf: - - $ref: '#/definitions/v1.Configs' - description: Configs contains all levels of module configs - path: - description: Path is the path of the module. It can be a local path or a remote - URL - type: string - version: - description: Version is the version of the module. - type: string - type: object - v1.ModuleConfigs: - additionalProperties: - $ref: '#/definitions/v1.ModuleConfig' - type: object - v1.ModulePatcherConfig: - properties: - projectSelector: - description: ProjectSelector contains the selected projects. - items: - type: string - type: array - type: object - v1.OnPremisesProvider: - properties: - attributes: - additionalProperties: - type: string - description: attributes of the provider - type: object - name: - description: platform name of the provider - type: string - type: object - v1.ProviderSpec: - properties: - alicloud: - allOf: - - $ref: '#/definitions/v1.AlicloudProvider' - description: Alicloud configures a store to retrieve secrets from Alicloud - Secrets Manager. - aws: - allOf: - - $ref: '#/definitions/v1.AWSProvider' - description: AWS configures a store to retrieve secrets from AWS Secrets Manager. - azure: - allOf: - - $ref: '#/definitions/v1.AzureKVProvider' - description: Azure configures a store to retrieve secrets from Azure KeyVault. - fake: - allOf: - - $ref: '#/definitions/v1.FakeProvider' - description: Fake configures a store with static key/value pairs - onpremises: - allOf: - - $ref: '#/definitions/v1.OnPremisesProvider' - description: Onprem configures a store in on-premises environments - vault: - allOf: - - $ref: '#/definitions/v1.VaultProvider' - description: Vault configures a store to retrieve secrets from HashiCorp Vault. - viettelcloud: - allOf: - - $ref: '#/definitions/v1.ViettelCloudProvider' - description: ViettelCloud configures a store to retrieve secrets from ViettelCloud - Secrets Manager. - type: object - v1.Resource: - properties: - attributes: - additionalProperties: true - description: Attributes represents all specified attributes of this resource - type: object - dependsOn: - description: DependsOn contains all resources this resource depends on - items: - type: string - type: array - extensions: - additionalProperties: true - description: Extensions specifies arbitrary metadata of this resource - type: object - id: - description: |- - ID is the unique key of this resource. - ApiVersion:Kind:Namespace:Name is an idiomatic way for Kubernetes resources. - providerNamespace:providerName:resourceType:resourceName for Terraform resources - type: string - type: - allOf: - - $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Type' - description: Type represents all Context we supported like Kubernetes and - Terraform - type: object - v1.SecretStore: - properties: - provider: - $ref: '#/definitions/v1.ProviderSpec' - type: object - v1.Spec: - properties: - context: - allOf: - - $ref: '#/definitions/v1.GenericConfig' - description: Context contains workspace-level configurations, such as runtimes, - topologies, and metadata, etc. - resources: - description: Resources is the list of Resource this Spec contains. - items: - $ref: '#/definitions/v1.Resource' - type: array - secretStore: - allOf: - - $ref: '#/definitions/v1.SecretStore' - description: SecretSore represents a external secret store location for storing - secrets. - type: object - v1.VaultKVStoreVersion: - enum: - - v1 - - v2 - type: string - x-enum-varnames: - - VaultKVStoreV1 - - VaultKVStoreV2 - v1.VaultProvider: - properties: - path: - description: 'Path is the mount path of the Vault KV backend endpoint, e.g: - "secret".' - type: string - server: - description: 'Server is the target Vault server address to connect, e.g: "https://vault.example.com:8200".' - type: string - version: - allOf: - - $ref: '#/definitions/v1.VaultKVStoreVersion' - description: |- - Version is the Vault KV secret engine version. Version can be either "v1" or - "v2", defaults to "v2". - type: object - v1.ViettelCloudProvider: - properties: - cmpURL: - description: |- - ViettelCloud CMP URL to be used to interact with ViettelCloud Secrets Manager. - Examples are https://console.viettelcloud.vn/api/ - type: string - projectID: - description: ProjectID to be used to interact with ViettelCloud Secrets Manager. - type: string - type: object info: contact: {} paths: @@ -1422,6 +1425,10 @@ paths: in: query name: workspaceID type: integer + - description: Module name to filter module list by. Default to all modules. + in: query + name: moduleName + type: string produces: - application/json responses: @@ -2089,6 +2096,28 @@ paths: in: query name: env type: string + - collectionFormat: csv + description: RunType to filter runs by. Default to all + in: query + items: + type: string + name: type + type: array + - collectionFormat: csv + description: RunStatus to filter runs by. Default to all + in: query + items: + type: string + name: status + type: array + - description: 'StartTime to filter runs by. Default to all. Format: RFC3339' + in: query + name: startTime + type: string + - description: 'EndTime to filter runs by. Default to all. Format: RFC3339' + in: query + name: endTime + type: string produces: - application/json responses: @@ -2190,6 +2219,11 @@ paths: get: description: List source information by source ID operationId: listSource + parameters: + - description: Source name to filter source list by. Default to all sources. + in: query + name: sourceName + type: string produces: - application/json responses: @@ -2828,7 +2862,7 @@ paths: "200": description: Success schema: - $ref: '#/definitions/v1.Spec' + $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Spec' "400": description: Bad Request schema: {} @@ -2877,7 +2911,7 @@ paths: "200": description: Success schema: - $ref: '#/definitions/v1.Spec' + $ref: '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Spec' "400": description: Bad Request schema: {} diff --git a/package.json b/package.json index 6cab044..44ad803 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kusionstack/kusion-api-client-sdk", - "version": "1.0.0", + "version": "1.0.2", "description": "Kusion API Client SDK", "main": "dist/src/client/index.js", "types": "dist/src/client/index.d.ts", diff --git a/src/client/index.ts b/src/client/index.ts index 81abc82..0b47304 100644 --- a/src/client/index.ts +++ b/src/client/index.ts @@ -1,3 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts export * from './sdk.gen'; -export * from './types.gen'; \ No newline at end of file +export * from './types.gen'; +export * from './schemas.gen'; diff --git a/src/client/schemas.gen.ts b/src/client/schemas.gen.ts index 5e4237c..5cf780f 100644 --- a/src/client/schemas.gen.ts +++ b/src/client/schemas.gen.ts @@ -13,9 +13,9 @@ export const constant_RunTypeSchema = { } as const; export const constant_SourceProviderTypeSchema = { - enum: ['git', 'git', 'github', 'oci', 'local'], + enum: ['git', 'github', 'oci', 'local', 'git'], type: 'string', - 'x-enum-varnames': ['DefaultSourceType', 'SourceProviderTypeGit', 'SourceProviderTypeGithub', 'SourceProviderTypeOCI', 'SourceProviderTypeLocal'] + 'x-enum-varnames': ['SourceProviderTypeGit', 'SourceProviderTypeGithub', 'SourceProviderTypeOCI', 'SourceProviderTypeLocal', 'DefaultSourceType'] } as const; export const constant_StackStateSchema = { @@ -29,7 +29,7 @@ export const entity_BackendSchema = { backendConfig: { allOf: [ { - '$ref': '#/definitions/v1.BackendConfig' + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.BackendConfig' } ], description: `// Type is the type of the backend. @@ -282,6 +282,10 @@ export const entity_ResourceSchema = { description: 'ResourceType is the type of the resource.', type: 'string' }, + resourceURN: { + description: 'ResourceURN is the urn of the resource.', + type: 'string' + }, stack: { allOf: [ { @@ -619,331 +623,438 @@ export const entity_WorkspaceSchema = { type: 'object' } as const; -export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_TypeSchema = { - enum: ['Kubernetes', 'Terraform'], - type: 'string', - 'x-enum-varnames': ['Kubernetes', 'Terraform'] +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_AWSProviderSchema = { + properties: { + profile: { + description: `The profile to be used to interact with AWS Secrets Manager. +If not set, the default profile created with \`aws configure\` will be used.`, + type: 'string' + }, + region: { + description: `AWS Region to be used to interact with AWS Secrets Manager. +Examples are us-east-1, us-west-2, etc.`, + type: 'string' + } + }, + type: 'object' } as const; -export const models_ActionTypeSchema = { - enum: [0, 1, 2, 3, 4], - type: 'integer', - 'x-enum-comments': { - Create: 'creating a new resource.', - Delete: 'deleting an existing resource.', - UnChanged: 'nothing to do.', - Undefined: 'invalidate value', - Update: 'updating an existing resource.' +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_AlicloudProviderSchema = { + properties: { + region: { + description: `Alicloud Region to be used to interact with Alicloud Secrets Manager. +Examples are cn-beijing, cn-shanghai, etc.`, + type: 'string' + } }, - 'x-enum-varnames': ['Undefined', 'UnChanged', 'Create', 'Update', 'Delete'] + type: 'object' } as const; -export const models_ChangeStepSchema = { +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_AzureEnvironmentTypeSchema = { + enum: ['PublicCloud', 'USGovernmentCloud', 'ChinaCloud', 'GermanCloud'], + type: 'string', + 'x-enum-varnames': ['AzureEnvironmentPublicCloud', 'AzureEnvironmentUSGovernmentCloud', 'AzureEnvironmentChinaCloud', 'AzureEnvironmentGermanCloud'] +} as const; + +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_AzureKVProviderSchema = { properties: { - action: { + environmentType: { allOf: [ { - '$ref': '#/definitions/models.ActionType' + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AzureEnvironmentType' } ], - description: 'the operation performed by this step' - }, - from: { - description: 'old data' + description: `EnvironmentType specifies the Azure cloud environment endpoints to use for connecting and authenticating with Azure. +By-default it points to the public cloud AAD endpoint, and the following endpoints are available: +PublicCloud, USGovernmentCloud, ChinaCloud, GermanCloud +Ref: https://github.com/Azure/go-autorest/blob/main/autorest/azure/environments.go#L152` }, - id: { - description: 'the resource id', + tenantId: { + description: 'TenantID configures the Azure Tenant to send requests to.', type: 'string' }, - to: { - description: 'new data' + vaultUrl: { + description: 'Vault Url from which the secrets to be fetched from.', + type: 'string' } }, type: 'object' } as const; -export const models_ChangesSchema = { +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_BackendConfigSchema = { properties: { - changeSteps: { - additionalProperties: { - '$ref': '#/definitions/models.ChangeStep' - }, + configs: { + additionalProperties: {}, + description: 'Configs contains config items of the backend, whose keys differ from different backend types.', type: 'object' }, - stepKeys: { - items: { - type: 'string' - }, - type: 'array' + type: { + description: 'Type is the backend type, supports BackendTypeLocal, BackendTypeOss, BackendTypeS3.', + type: 'string' } }, type: 'object' } as const; -export const request_CreateBackendRequestSchema = { +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_ConfigsSchema = { properties: { - backendConfig: { + default: { allOf: [ { - '$ref': '#/definitions/v1.BackendConfig' + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.GenericConfig' } ], - description: 'BackendConfig is the configuration of the backend.' - }, - description: { - description: 'Description is a human-readable description of the backend.', - type: 'string' - }, - name: { - description: 'Name is the name of the backend.', - type: 'string' + description: 'Default is default block of the module config.' } }, - required: ['name'], type: 'object' } as const; -export const request_CreateModuleRequestSchema = { +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_FakeProviderSchema = { properties: { - description: { - description: 'Description is a human-readable description of the module.', - type: 'string' - }, - doc: { - description: 'Doc is the documentation URL of the module.', - type: 'string' - }, - name: { - description: 'Name is the module name.', - type: 'string' - }, - owners: { - description: 'Owners is a list of owners for the module.', + data: { items: { - type: 'string' + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.FakeProviderData' }, type: 'array' - }, - url: { - description: 'URL is the module oci artifact registry URL.', - type: 'string' } }, - required: ['name', 'url'], type: 'object' } as const; -export const request_CreateOrganizationRequestSchema = { +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_FakeProviderDataSchema = { properties: { - description: { - description: 'Description is a human-readable description of the organization.', + key: { type: 'string' }, - labels: { - description: 'Labels are custom labels associated with the organization.', - items: { - type: 'string' - }, - type: 'array' - }, - name: { - description: 'Name is the name of the organization.', + value: { type: 'string' }, - owners: { - description: 'Owners is a list of owners for the organization.', - items: { + valueMap: { + additionalProperties: { type: 'string' }, - type: 'array' + type: 'object' + }, + version: { + type: 'string' } }, - required: ['owners'], type: 'object' } as const; -export const request_CreateProjectRequestSchema = { +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_GenericConfigSchema = { + additionalProperties: {}, + type: 'object' +} as const; + +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_ModuleConfigSchema = { properties: { - description: { - description: 'Description is a human-readable description of the project.', - type: 'string' + configs: { + allOf: [ + { + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Configs' + } + ], + description: 'Configs contains all levels of module configs' }, - domain: { - description: 'Domain is the domain of the project, typically serving as the parent folder name for the project.', + path: { + description: 'Path is the path of the module. It can be a local path or a remote URL', type: 'string' }, - labels: { - description: 'Labels are custom labels associated with the project.', - items: { - type: 'string' - }, - type: 'array' - }, - name: { - description: 'Name is the name of the project.', + version: { + description: 'Version is the version of the module.', type: 'string' - }, - organizationID: { - description: 'OrganizationID is the organization id associated with the project.', - type: 'integer' - }, - owners: { - description: 'Owners is a list of owners for the project.', + } + }, + type: 'object' +} as const; + +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_ModuleConfigsSchema = { + additionalProperties: { + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ModuleConfig' + }, + type: 'object' +} as const; + +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_ModulePatcherConfigSchema = { + properties: { + projectSelector: { + description: 'ProjectSelector contains the selected projects.', items: { type: 'string' }, type: 'array' - }, - path: { - description: 'Path is the relative path of the project within the sources.', - type: 'string' - }, - sourceID: { - description: 'SourceID is the configuration source id associated with the project.', - type: 'integer' } }, - required: ['domain'], type: 'object' } as const; -export const request_CreateSourceRequestSchema = { +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_OnPremisesProviderSchema = { properties: { - description: { - description: 'Description is a human-readable description of the source.', - type: 'string' - }, - labels: { - description: 'Labels are custom labels associated with the source.', - items: { + attributes: { + additionalProperties: { type: 'string' }, - type: 'array' + description: 'attributes of the provider', + type: 'object' }, name: { - description: 'Name is the name of the source.', - type: 'string' - }, - owners: { - description: 'Owners is a list of owners for the source.', - items: { - type: 'string' - }, - type: 'array' - }, - remote: { - description: 'Remote is the source URL, including scheme.', - type: 'string' - }, - sourceProvider: { - description: 'SourceProvider is the type of the source provider.', + description: 'platform name of the provider', type: 'string' } }, - required: ['name', 'remote', 'sourceProvider'], type: 'object' } as const; -export const request_CreateStackRequestSchema = { +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_ProviderSpecSchema = { properties: { - description: { - description: 'Description is a human-readable description of the stack.', - type: 'string' - }, - desiredVersion: { - description: 'DesiredVersion is the desired revision of stack.', - type: 'string' + alicloud: { + allOf: [ + { + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AlicloudProvider' + } + ], + description: 'Alicloud configures a store to retrieve secrets from Alicloud Secrets Manager.' }, - labels: { - description: 'Labels are custom labels associated with the stack.', - items: { - type: 'string' - }, - type: 'array' + aws: { + allOf: [ + { + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AWSProvider' + } + ], + description: 'AWS configures a store to retrieve secrets from AWS Secrets Manager.' }, - name: { - description: 'Name is the name of the stack.', - type: 'string' + azure: { + allOf: [ + { + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.AzureKVProvider' + } + ], + description: 'Azure configures a store to retrieve secrets from Azure KeyVault.' }, - owners: { - description: 'Owners is a list of owners for the stack.', + fake: { + allOf: [ + { + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.FakeProvider' + } + ], + description: 'Fake configures a store with static key/value pairs' + }, + onpremises: { + allOf: [ + { + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.OnPremisesProvider' + } + ], + description: 'Onprem configures a store in on-premises environments' + }, + vault: { + allOf: [ + { + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.VaultProvider' + } + ], + description: 'Vault configures a store to retrieve secrets from HashiCorp Vault.' + }, + viettelcloud: { + allOf: [ + { + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ViettelCloudProvider' + } + ], + description: 'ViettelCloud configures a store to retrieve secrets from ViettelCloud Secrets Manager.' + } + }, + type: 'object' +} as const; + +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_ResourceSchema = { + properties: { + attributes: { + additionalProperties: true, + description: 'Attributes represents all specified attributes of this resource', + type: 'object' + }, + dependsOn: { + description: 'DependsOn contains all resources this resource depends on', items: { type: 'string' }, type: 'array' }, - path: { - description: 'Path is the relative path of the stack within the source.', + extensions: { + additionalProperties: true, + description: 'Extensions specifies arbitrary metadata of this resource', + type: 'object' + }, + id: { + description: `ID is the unique key of this resource. +ApiVersion:Kind:Namespace:Name is an idiomatic way for Kubernetes resources. +providerNamespace:providerName:resourceType:resourceName for Terraform resources`, type: 'string' }, - projectID: { - description: 'ProjectID is the project id of the stack within the source.', - type: 'integer' + type: { + allOf: [ + { + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Type' + } + ], + description: 'Type represents all Context we supported like Kubernetes and Terraform' + } + }, + type: 'object' +} as const; + +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_SecretStoreSchema = { + properties: { + provider: { + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ProviderSpec' + } + }, + type: 'object' +} as const; + +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_SpecSchema = { + properties: { + context: { + allOf: [ + { + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.GenericConfig' + } + ], + description: 'Context contains workspace-level configurations, such as runtimes, topologies, and metadata, etc.' }, - projectName: { - description: 'ProjectName is the project name of the stack within the source.', + resources: { + description: 'Resources is the list of Resource this Spec contains.', + items: { + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Resource' + }, + type: 'array' + }, + secretStore: { + allOf: [ + { + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.SecretStore' + } + ], + description: 'SecretSore represents a external secret store location for storing secrets.' + } + }, + type: 'object' +} as const; + +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_TypeSchema = { + enum: ['Kubernetes', 'Terraform'], + type: 'string', + 'x-enum-varnames': ['Kubernetes', 'Terraform'] +} as const; + +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_VaultKVStoreVersionSchema = { + enum: ['v1', 'v2'], + type: 'string', + 'x-enum-varnames': ['VaultKVStoreV1', 'VaultKVStoreV2'] +} as const; + +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_VaultProviderSchema = { + properties: { + path: { + description: 'Path is the mount path of the Vault KV backend endpoint, e.g: "secret".', type: 'string' }, - type: { - description: 'Type is the type of the stack.', + server: { + description: 'Server is the target Vault server address to connect, e.g: "https://vault.example.com:8200".', type: 'string' + }, + version: { + allOf: [ + { + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.VaultKVStoreVersion' + } + ], + description: `Version is the Vault KV secret engine version. Version can be either "v1" or +"v2", defaults to "v2".` } }, - required: ['name'], type: 'object' } as const; -export const request_CreateWorkspaceRequestSchema = { +export const kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_ViettelCloudProviderSchema = { properties: { - backendID: { - description: 'BackendID is the configuration backend id associated with the workspace.', - type: 'integer' + cmpURL: { + description: `ViettelCloud CMP URL to be used to interact with ViettelCloud Secrets Manager. +Examples are https://console.viettelcloud.vn/api/`, + type: 'string' }, - description: { - description: 'Description is a human-readable description of the workspace.', + projectID: { + description: 'ProjectID to be used to interact with ViettelCloud Secrets Manager.', type: 'string' + } + }, + type: 'object' +} as const; + +export const models_ActionTypeSchema = { + enum: [0, 1, 2, 3, 4], + type: 'integer', + 'x-enum-comments': { + Create: 'creating a new resource.', + Delete: 'deleting an existing resource.', + UnChanged: 'nothing to do.', + Undefined: 'invalidate value', + Update: 'updating an existing resource.' + }, + 'x-enum-varnames': ['Undefined', 'UnChanged', 'Create', 'Update', 'Delete'] +} as const; + +export const models_ChangeStepSchema = { + properties: { + action: { + allOf: [ + { + '$ref': '#/definitions/models.ActionType' + } + ], + description: 'the operation performed by this step' }, - labels: { - description: 'Labels are custom labels associated with the workspace.', - items: { - type: 'string' - }, - type: 'array' + from: { + description: 'old data' }, - name: { - description: 'Name is the name of the workspace.', + id: { + description: 'the resource id', type: 'string' }, - owners: { - description: 'Owners is a list of owners for the workspace.', - items: { - type: 'string' - }, - type: 'array' + to: { + description: 'new data' } }, - required: ['backendID', 'name', 'owners'], type: 'object' } as const; -export const request_StackImportRequestSchema = { +export const models_ChangesSchema = { properties: { - importedResources: { + changeSteps: { additionalProperties: { - type: 'string' + '$ref': '#/definitions/models.ChangeStep' }, type: 'object' + }, + stepKeys: { + items: { + type: 'string' + }, + type: 'array' } }, type: 'object' } as const; -export const request_UpdateBackendRequestSchema = { +export const request_CreateBackendRequestSchema = { properties: { backendConfig: { allOf: [ { - '$ref': '#/definitions/v1.BackendConfig' + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.BackendConfig' } ], description: 'BackendConfig is the configuration of the backend.' @@ -952,20 +1063,16 @@ export const request_UpdateBackendRequestSchema = { description: 'Description is a human-readable description of the backend.', type: 'string' }, - id: { - description: 'ID is the id of the backend.', - type: 'integer' - }, name: { description: 'Name is the name of the backend.', type: 'string' } }, - required: ['id', 'name'], + required: ['name'], type: 'object' } as const; -export const request_UpdateModuleRequestSchema = { +export const request_CreateModuleRequestSchema = { properties: { description: { description: 'Description is a human-readable description of the module.', @@ -991,20 +1098,16 @@ export const request_UpdateModuleRequestSchema = { type: 'string' } }, - required: ['name'], + required: ['name', 'url'], type: 'object' } as const; -export const request_UpdateOrganizationRequestSchema = { +export const request_CreateOrganizationRequestSchema = { properties: { description: { description: 'Description is a human-readable description of the organization.', type: 'string' }, - id: { - description: 'ID is the id of the organization.', - type: 'integer' - }, labels: { description: 'Labels are custom labels associated with the organization.', items: { @@ -1024,11 +1127,11 @@ export const request_UpdateOrganizationRequestSchema = { type: 'array' } }, - required: ['id', 'owners'], + required: ['owners'], type: 'object' } as const; -export const request_UpdateProjectRequestSchema = { +export const request_CreateProjectRequestSchema = { properties: { description: { description: 'Description is a human-readable description of the project.', @@ -1038,10 +1141,6 @@ export const request_UpdateProjectRequestSchema = { description: 'Domain is the domain of the project, typically serving as the parent folder name for the project.', type: 'string' }, - id: { - description: 'ID is the id of the project.', - type: 'integer' - }, labels: { description: 'Labels are custom labels associated with the project.', items: { @@ -1073,20 +1172,16 @@ export const request_UpdateProjectRequestSchema = { type: 'integer' } }, - required: ['domain', 'id'], + required: ['domain'], type: 'object' } as const; -export const request_UpdateSourceRequestSchema = { +export const request_CreateSourceRequestSchema = { properties: { description: { description: 'Description is a human-readable description of the source.', type: 'string' }, - id: { - description: 'ID is the id of the source.', - type: 'integer' - }, labels: { description: 'Labels are custom labels associated with the source.', items: { @@ -1114,11 +1209,11 @@ export const request_UpdateSourceRequestSchema = { type: 'string' } }, - required: ['id', 'name', 'remote', 'sourceProvider'], + required: ['name', 'remote', 'sourceProvider'], type: 'object' } as const; -export const request_UpdateStackRequestSchema = { +export const request_CreateStackRequestSchema = { properties: { description: { description: 'Description is a human-readable description of the stack.', @@ -1128,10 +1223,6 @@ export const request_UpdateStackRequestSchema = { description: 'DesiredVersion is the desired revision of stack.', type: 'string' }, - id: { - description: 'ID is the id of the stack.', - type: 'integer' - }, labels: { description: 'Labels are custom labels associated with the stack.', items: { @@ -1167,11 +1258,11 @@ export const request_UpdateStackRequestSchema = { type: 'string' } }, - required: ['id', 'name'], + required: ['name'], type: 'object' } as const; -export const request_UpdateWorkspaceRequestSchema = { +export const request_CreateWorkspaceRequestSchema = { properties: { backendID: { description: 'BackendID is the configuration backend id associated with the workspace.', @@ -1181,16 +1272,12 @@ export const request_UpdateWorkspaceRequestSchema = { description: 'Description is a human-readable description of the workspace.', type: 'string' }, - id: { - description: 'ID is the id of the workspace.', - type: 'integer' - }, labels: { - additionalProperties: { + description: 'Labels are custom labels associated with the workspace.', + items: { type: 'string' }, - description: 'Labels are custom labels associated with the workspace.', - type: 'object' + type: 'array' }, name: { description: 'Name is the name of the workspace.', @@ -1204,458 +1291,375 @@ export const request_UpdateWorkspaceRequestSchema = { type: 'array' } }, - required: ['backendID', 'id', 'owners'], + required: ['backendID', 'name', 'owners'], type: 'object' } as const; -export const request_WorkspaceConfigsSchema = { +export const request_StackImportRequestSchema = { properties: { - context: { - allOf: [ - { - '$ref': '#/definitions/v1.GenericConfig' - } - ], - description: 'Context contains workspace-level configurations, such as runtimes, topologies, and metadata, etc.' - }, - modules: { - allOf: [ - { - '$ref': '#/definitions/v1.ModuleConfigs' - } - ], - description: 'Modules are the configs of a set of modules.' - }, - secretStore: { - allOf: [ - { - '$ref': '#/definitions/v1.SecretStore' - } - ], - description: 'SecretStore represents a secure external location for storing secrets.' + importedResources: { + additionalProperties: { + type: 'string' + }, + type: 'object' } }, type: 'object' } as const; -export const url_URLSchema = { +export const request_UpdateBackendRequestSchema = { properties: { - forceQuery: { - description: "append a query ('?') even if RawQuery is empty", - type: 'boolean' - }, - fragment: { - description: "fragment for references, without '#'", - type: 'string' - }, - host: { - description: 'host or host:port (see Hostname and Port methods)', - type: 'string' - }, - omitHost: { - description: 'do not emit empty host (authority)', - type: 'boolean' - }, - opaque: { - description: 'encoded opaque data', - type: 'string' - }, - path: { - description: 'path (relative paths may omit leading slash)', - type: 'string' - }, - rawFragment: { - description: 'encoded fragment hint (see EscapedFragment method)', - type: 'string' - }, - rawPath: { - description: 'encoded path hint (see EscapedPath method)', - type: 'string' - }, - rawQuery: { - description: "encoded query values, without '?'", - type: 'string' - }, - scheme: { - type: 'string' - }, - user: { + backendConfig: { allOf: [ { - '$ref': '#/definitions/url.Userinfo' + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.BackendConfig' } ], - description: 'username and password information' - } - }, - type: 'object' -} as const; - -export const url_UserinfoSchema = { - type: 'object' -} as const; - -export const v1_AWSProviderSchema = { - properties: { - profile: { - description: `The profile to be used to interact with AWS Secrets Manager. -If not set, the default profile created with \`aws configure\` will be used.`, + description: 'BackendConfig is the configuration of the backend.' + }, + description: { + description: 'Description is a human-readable description of the backend.', type: 'string' }, - region: { - description: `AWS Region to be used to interact with AWS Secrets Manager. -Examples are us-east-1, us-west-2, etc.`, + id: { + description: 'ID is the id of the backend.', + type: 'integer' + }, + name: { + description: 'Name is the name of the backend.', type: 'string' } }, + required: ['id', 'name'], type: 'object' } as const; -export const v1_AlicloudProviderSchema = { +export const request_UpdateModuleRequestSchema = { properties: { - region: { - description: `Alicloud Region to be used to interact with Alicloud Secrets Manager. -Examples are cn-beijing, cn-shanghai, etc.`, + description: { + description: 'Description is a human-readable description of the module.', type: 'string' - } - }, - type: 'object' -} as const; - -export const v1_AzureEnvironmentTypeSchema = { - enum: ['PublicCloud', 'USGovernmentCloud', 'ChinaCloud', 'GermanCloud'], - type: 'string', - 'x-enum-varnames': ['AzureEnvironmentPublicCloud', 'AzureEnvironmentUSGovernmentCloud', 'AzureEnvironmentChinaCloud', 'AzureEnvironmentGermanCloud'] -} as const; - -export const v1_AzureKVProviderSchema = { - properties: { - environmentType: { - allOf: [ - { - '$ref': '#/definitions/v1.AzureEnvironmentType' - } - ], - description: `EnvironmentType specifies the Azure cloud environment endpoints to use for connecting and authenticating with Azure. -By-default it points to the public cloud AAD endpoint, and the following endpoints are available: -PublicCloud, USGovernmentCloud, ChinaCloud, GermanCloud -Ref: https://github.com/Azure/go-autorest/blob/main/autorest/azure/environments.go#L152` }, - tenantId: { - description: 'TenantID configures the Azure Tenant to send requests to.', + doc: { + description: 'Doc is the documentation URL of the module.', type: 'string' }, - vaultUrl: { - description: 'Vault Url from which the secrets to be fetched from.', + name: { + description: 'Name is the module name.', type: 'string' - } - }, - type: 'object' -} as const; - -export const v1_BackendConfigSchema = { - properties: { - configs: { - additionalProperties: {}, - description: 'Configs contains config items of the backend, whose keys differ from different backend types.', - type: 'object' }, - type: { - description: 'Type is the backend type, supports BackendTypeLocal, BackendTypeOss, BackendTypeS3.', - type: 'string' - } - }, - type: 'object' -} as const; - -export const v1_ConfigsSchema = { - properties: { - default: { - allOf: [ - { - '$ref': '#/definitions/v1.GenericConfig' - } - ], - description: 'Default is default block of the module config.' - } - }, - type: 'object' -} as const; - -export const v1_FakeProviderSchema = { - properties: { - data: { + owners: { + description: 'Owners is a list of owners for the module.', items: { - '$ref': '#/definitions/v1.FakeProviderData' + type: 'string' }, type: 'array' + }, + url: { + description: 'URL is the module oci artifact registry URL.', + type: 'string' } }, + required: ['name'], type: 'object' } as const; -export const v1_FakeProviderDataSchema = { +export const request_UpdateOrganizationRequestSchema = { properties: { - key: { + description: { + description: 'Description is a human-readable description of the organization.', type: 'string' }, - value: { - type: 'string' + id: { + description: 'ID is the id of the organization.', + type: 'integer' }, - valueMap: { - additionalProperties: { + labels: { + description: 'Labels are custom labels associated with the organization.', + items: { type: 'string' }, - type: 'object' + type: 'array' }, - version: { + name: { + description: 'Name is the name of the organization.', type: 'string' + }, + owners: { + description: 'Owners is a list of owners for the organization.', + items: { + type: 'string' + }, + type: 'array' } }, + required: ['id', 'owners'], type: 'object' } as const; -export const v1_GenericConfigSchema = { - additionalProperties: {}, - type: 'object' -} as const; - -export const v1_ModuleConfigSchema = { +export const request_UpdateProjectRequestSchema = { properties: { - configs: { - allOf: [ - { - '$ref': '#/definitions/v1.Configs' - } - ], - description: 'Configs contains all levels of module configs' + description: { + description: 'Description is a human-readable description of the project.', + type: 'string' }, - path: { - description: 'Path is the path of the module. It can be a local path or a remote URL', + domain: { + description: 'Domain is the domain of the project, typically serving as the parent folder name for the project.', type: 'string' }, - version: { - description: 'Version is the version of the module.', + id: { + description: 'ID is the id of the project.', + type: 'integer' + }, + labels: { + description: 'Labels are custom labels associated with the project.', + items: { + type: 'string' + }, + type: 'array' + }, + name: { + description: 'Name is the name of the project.', type: 'string' - } - }, - type: 'object' -} as const; - -export const v1_ModuleConfigsSchema = { - additionalProperties: { - '$ref': '#/definitions/v1.ModuleConfig' - }, - type: 'object' -} as const; - -export const v1_ModulePatcherConfigSchema = { - properties: { - projectSelector: { - description: 'ProjectSelector contains the selected projects.', + }, + organizationID: { + description: 'OrganizationID is the organization id associated with the project.', + type: 'integer' + }, + owners: { + description: 'Owners is a list of owners for the project.', items: { type: 'string' }, type: 'array' + }, + path: { + description: 'Path is the relative path of the project within the sources.', + type: 'string' + }, + sourceID: { + description: 'SourceID is the configuration source id associated with the project.', + type: 'integer' } }, + required: ['domain', 'id'], type: 'object' } as const; -export const v1_OnPremisesProviderSchema = { +export const request_UpdateSourceRequestSchema = { properties: { - attributes: { - additionalProperties: { + description: { + description: 'Description is a human-readable description of the source.', + type: 'string' + }, + id: { + description: 'ID is the id of the source.', + type: 'integer' + }, + labels: { + description: 'Labels are custom labels associated with the source.', + items: { type: 'string' }, - description: 'attributes of the provider', - type: 'object' + type: 'array' }, name: { - description: 'platform name of the provider', + description: 'Name is the name of the source.', + type: 'string' + }, + owners: { + description: 'Owners is a list of owners for the source.', + items: { + type: 'string' + }, + type: 'array' + }, + remote: { + description: 'Remote is the source URL, including scheme.', + type: 'string' + }, + sourceProvider: { + description: 'SourceProvider is the type of the source provider.', type: 'string' } }, + required: ['id', 'name', 'remote', 'sourceProvider'], type: 'object' } as const; -export const v1_ProviderSpecSchema = { +export const request_UpdateStackRequestSchema = { properties: { - alicloud: { - allOf: [ - { - '$ref': '#/definitions/v1.AlicloudProvider' - } - ], - description: 'Alicloud configures a store to retrieve secrets from Alicloud Secrets Manager.' - }, - aws: { - allOf: [ - { - '$ref': '#/definitions/v1.AWSProvider' - } - ], - description: 'AWS configures a store to retrieve secrets from AWS Secrets Manager.' - }, - azure: { - allOf: [ - { - '$ref': '#/definitions/v1.AzureKVProvider' - } - ], - description: 'Azure configures a store to retrieve secrets from Azure KeyVault.' + description: { + description: 'Description is a human-readable description of the stack.', + type: 'string' }, - fake: { - allOf: [ - { - '$ref': '#/definitions/v1.FakeProvider' - } - ], - description: 'Fake configures a store with static key/value pairs' + desiredVersion: { + description: 'DesiredVersion is the desired revision of stack.', + type: 'string' }, - onpremises: { - allOf: [ - { - '$ref': '#/definitions/v1.OnPremisesProvider' - } - ], - description: 'Onprem configures a store in on-premises environments' + id: { + description: 'ID is the id of the stack.', + type: 'integer' }, - vault: { - allOf: [ - { - '$ref': '#/definitions/v1.VaultProvider' - } - ], - description: 'Vault configures a store to retrieve secrets from HashiCorp Vault.' + labels: { + description: 'Labels are custom labels associated with the stack.', + items: { + type: 'string' + }, + type: 'array' }, - viettelcloud: { - allOf: [ - { - '$ref': '#/definitions/v1.ViettelCloudProvider' - } - ], - description: 'ViettelCloud configures a store to retrieve secrets from ViettelCloud Secrets Manager.' - } - }, - type: 'object' -} as const; - -export const v1_ResourceSchema = { - properties: { - attributes: { - additionalProperties: true, - description: 'Attributes represents all specified attributes of this resource', - type: 'object' + name: { + description: 'Name is the name of the stack.', + type: 'string' }, - dependsOn: { - description: 'DependsOn contains all resources this resource depends on', + owners: { + description: 'Owners is a list of owners for the stack.', items: { type: 'string' }, type: 'array' }, - extensions: { - additionalProperties: true, - description: 'Extensions specifies arbitrary metadata of this resource', - type: 'object' + path: { + description: 'Path is the relative path of the stack within the source.', + type: 'string' }, - id: { - description: `ID is the unique key of this resource. -ApiVersion:Kind:Namespace:Name is an idiomatic way for Kubernetes resources. -providerNamespace:providerName:resourceType:resourceName for Terraform resources`, + projectID: { + description: 'ProjectID is the project id of the stack within the source.', + type: 'integer' + }, + projectName: { + description: 'ProjectName is the project name of the stack within the source.', type: 'string' }, type: { - allOf: [ - { - '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.Type' - } - ], - description: 'Type represents all Context we supported like Kubernetes and Terraform' + description: 'Type is the type of the stack.', + type: 'string' } }, + required: ['id', 'name'], type: 'object' } as const; -export const v1_SecretStoreSchema = { +export const request_UpdateWorkspaceRequestSchema = { properties: { - provider: { - '$ref': '#/definitions/v1.ProviderSpec' + backendID: { + description: 'BackendID is the configuration backend id associated with the workspace.', + type: 'integer' + }, + description: { + description: 'Description is a human-readable description of the workspace.', + type: 'string' + }, + id: { + description: 'ID is the id of the workspace.', + type: 'integer' + }, + labels: { + additionalProperties: { + type: 'string' + }, + description: 'Labels are custom labels associated with the workspace.', + type: 'object' + }, + name: { + description: 'Name is the name of the workspace.', + type: 'string' + }, + owners: { + description: 'Owners is a list of owners for the workspace.', + items: { + type: 'string' + }, + type: 'array' } }, + required: ['backendID', 'id', 'owners'], type: 'object' } as const; -export const v1_SpecSchema = { +export const request_WorkspaceConfigsSchema = { properties: { context: { allOf: [ { - '$ref': '#/definitions/v1.GenericConfig' + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.GenericConfig' } ], description: 'Context contains workspace-level configurations, such as runtimes, topologies, and metadata, etc.' }, - resources: { - description: 'Resources is the list of Resource this Spec contains.', - items: { - '$ref': '#/definitions/v1.Resource' - }, - type: 'array' + modules: { + allOf: [ + { + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.ModuleConfigs' + } + ], + description: 'Modules are the configs of a set of modules.' }, secretStore: { allOf: [ { - '$ref': '#/definitions/v1.SecretStore' + '$ref': '#/definitions/kusionstack_io_kusion_pkg_apis_api_kusion_io_v1.SecretStore' } ], - description: 'SecretSore represents a external secret store location for storing secrets.' + description: 'SecretStore represents a secure external location for storing secrets.' } }, type: 'object' } as const; -export const v1_VaultKVStoreVersionSchema = { - enum: ['v1', 'v2'], - type: 'string', - 'x-enum-varnames': ['VaultKVStoreV1', 'VaultKVStoreV2'] -} as const; - -export const v1_VaultProviderSchema = { +export const url_URLSchema = { properties: { + forceQuery: { + description: "append a query ('?') even if RawQuery is empty", + type: 'boolean' + }, + fragment: { + description: "fragment for references, without '#'", + type: 'string' + }, + host: { + description: 'host or host:port (see Hostname and Port methods)', + type: 'string' + }, + omitHost: { + description: 'do not emit empty host (authority)', + type: 'boolean' + }, + opaque: { + description: 'encoded opaque data', + type: 'string' + }, path: { - description: 'Path is the mount path of the Vault KV backend endpoint, e.g: "secret".', + description: 'path (relative paths may omit leading slash)', type: 'string' }, - server: { - description: 'Server is the target Vault server address to connect, e.g: "https://vault.example.com:8200".', + rawFragment: { + description: 'encoded fragment hint (see EscapedFragment method)', type: 'string' }, - version: { + rawPath: { + description: 'encoded path hint (see EscapedPath method)', + type: 'string' + }, + rawQuery: { + description: "encoded query values, without '?'", + type: 'string' + }, + scheme: { + type: 'string' + }, + user: { allOf: [ { - '$ref': '#/definitions/v1.VaultKVStoreVersion' + '$ref': '#/definitions/url.Userinfo' } ], - description: `Version is the Vault KV secret engine version. Version can be either "v1" or -"v2", defaults to "v2".` + description: 'username and password information' } }, type: 'object' } as const; -export const v1_ViettelCloudProviderSchema = { - properties: { - cmpURL: { - description: `ViettelCloud CMP URL to be used to interact with ViettelCloud Secrets Manager. -Examples are https://console.viettelcloud.vn/api/`, - type: 'string' - }, - projectID: { - description: 'ProjectID to be used to interact with ViettelCloud Secrets Manager.', - type: 'string' - } - }, +export const url_UserinfoSchema = { type: 'object' } as const; \ No newline at end of file diff --git a/src/client/sdk.gen.ts b/src/client/sdk.gen.ts index d0565f6..d5e4493 100644 --- a/src/client/sdk.gen.ts +++ b/src/client/sdk.gen.ts @@ -1,7 +1,7 @@ // This file is auto-generated by @hey-api/openapi-ts import { createClient, createConfig, type OptionsLegacyParser } from '@hey-api/client-fetch'; -import type { ListBackendError, ListBackendResponse, CreateBackendData, CreateBackendError, CreateBackendResponse, DeleteBackendData, DeleteBackendError, DeleteBackendResponse, GetBackendData, GetBackendError, GetBackendResponse, UpdateBackendData, UpdateBackendError, UpdateBackendResponse, GetEndpointsError, GetEndpointsResponse, ListModuleData, ListModuleError, ListModuleResponse, CreateModuleData, CreateModuleError, CreateModuleResponse, DeleteModuleData, DeleteModuleError, DeleteModuleResponse, GetModuleData, GetModuleError, GetModuleResponse, UpdateModuleData, UpdateModuleError, UpdateModuleResponse, ListOrganizationError, ListOrganizationResponse, CreateOrganizationData, CreateOrganizationError, CreateOrganizationResponse, DeleteOrganizationData, DeleteOrganizationError, DeleteOrganizationResponse, GetOrganizationData, GetOrganizationError, GetOrganizationResponse, UpdateOrganizationData, UpdateOrganizationError, UpdateOrganizationResponse, ListProjectData, ListProjectError, ListProjectResponse, CreateProjectData, CreateProjectError, CreateProjectResponse, DeleteProjectData, DeleteProjectError, DeleteProjectResponse, GetProjectData, GetProjectError, GetProjectResponse, UpdateProjectData, UpdateProjectError, UpdateProjectResponse, ListResourceError, ListResourceResponse, GetResourceData, GetResourceError, GetResourceResponse, GetResourceGraphData, GetResourceGraphError, GetResourceGraphResponse, GetRunData, GetRunError, GetRunResponse, GetRunResultData, GetRunResultError, GetRunResultResponse, ListSourceError, ListSourceResponse, CreateSourceData, CreateSourceError, CreateSourceResponse, DeleteSourceData, DeleteSourceError, DeleteSourceResponse, GetSourceData, GetSourceError, GetSourceResponse, UpdateSourceData, UpdateSourceError, UpdateSourceResponse, ListRunData, ListRunError, ListRunResponse, ListStackData, ListStackError, ListStackResponse, CreateStackData, CreateStackError, CreateStackResponse, DeleteStackData, DeleteStackError, DeleteStackResponse, GetStackData, GetStackError, GetStackResponse, UpdateStackData, UpdateStackError, UpdateStackResponse, ApplyStackData, ApplyStackError, ApplyStackResponse, ApplyStackAsyncData, ApplyStackAsyncError, ApplyStackAsyncResponse, DestroyStackData, DestroyStackError, DestroyStackResponse, DestroyStackAsyncData, DestroyStackAsyncError, DestroyStackAsyncResponse, GenerateStackData, GenerateStackError, GenerateStackResponse, GenerateStackAsyncData, GenerateStackAsyncError, GenerateStackAsyncResponse, PreviewStackAsyncData, PreviewStackAsyncError, PreviewStackAsyncResponse, ListWorkspaceError, ListWorkspaceResponse, CreateWorkspaceData, CreateWorkspaceError, CreateWorkspaceResponse, DeleteWorkspaceData, DeleteWorkspaceError, DeleteWorkspaceResponse, GetWorkspaceData, GetWorkspaceError, GetWorkspaceResponse, UpdateWorkspaceData, UpdateWorkspaceError, UpdateWorkspaceResponse, GetWorkspaceConfigsData, GetWorkspaceConfigsError, GetWorkspaceConfigsResponse, UpdateWorkspaceConfigsData, UpdateWorkspaceConfigsError, UpdateWorkspaceConfigsResponse, CreateWorkspaceModDepsData, CreateWorkspaceModDepsError, CreateWorkspaceModDepsResponse, ValidateWorkspaceConfigsData, ValidateWorkspaceConfigsError, ValidateWorkspaceConfigsResponse } from './types.gen'; +import type { ListBackendError, ListBackendResponse, CreateBackendData, CreateBackendError, CreateBackendResponse, DeleteBackendData, DeleteBackendError, DeleteBackendResponse, GetBackendData, GetBackendError, GetBackendResponse, UpdateBackendData, UpdateBackendError, UpdateBackendResponse, GetEndpointsError, GetEndpointsResponse, ListModuleData, ListModuleError, ListModuleResponse, CreateModuleData, CreateModuleError, CreateModuleResponse, DeleteModuleData, DeleteModuleError, DeleteModuleResponse, GetModuleData, GetModuleError, GetModuleResponse, UpdateModuleData, UpdateModuleError, UpdateModuleResponse, ListOrganizationError, ListOrganizationResponse, CreateOrganizationData, CreateOrganizationError, CreateOrganizationResponse, DeleteOrganizationData, DeleteOrganizationError, DeleteOrganizationResponse, GetOrganizationData, GetOrganizationError, GetOrganizationResponse, UpdateOrganizationData, UpdateOrganizationError, UpdateOrganizationResponse, ListProjectData, ListProjectError, ListProjectResponse, CreateProjectData, CreateProjectError, CreateProjectResponse, DeleteProjectData, DeleteProjectError, DeleteProjectResponse, GetProjectData, GetProjectError, GetProjectResponse, UpdateProjectData, UpdateProjectError, UpdateProjectResponse, ListResourceError, ListResourceResponse, GetResourceData, GetResourceError, GetResourceResponse, GetResourceGraphData, GetResourceGraphError, GetResourceGraphResponse, GetRunData, GetRunError, GetRunResponse, GetRunResultData, GetRunResultError, GetRunResultResponse, ListSourceData, ListSourceError, ListSourceResponse, CreateSourceData, CreateSourceError, CreateSourceResponse, DeleteSourceData, DeleteSourceError, DeleteSourceResponse, GetSourceData, GetSourceError, GetSourceResponse, UpdateSourceData, UpdateSourceError, UpdateSourceResponse, ListRunData, ListRunError, ListRunResponse, ListStackData, ListStackError, ListStackResponse, CreateStackData, CreateStackError, CreateStackResponse, DeleteStackData, DeleteStackError, DeleteStackResponse, GetStackData, GetStackError, GetStackResponse, UpdateStackData, UpdateStackError, UpdateStackResponse, ApplyStackData, ApplyStackError, ApplyStackResponse, ApplyStackAsyncData, ApplyStackAsyncError, ApplyStackAsyncResponse, DestroyStackData, DestroyStackError, DestroyStackResponse, DestroyStackAsyncData, DestroyStackAsyncError, DestroyStackAsyncResponse, GenerateStackData, GenerateStackError, GenerateStackResponse, GenerateStackAsyncData, GenerateStackAsyncError, GenerateStackAsyncResponse, PreviewStackAsyncData, PreviewStackAsyncError, PreviewStackAsyncResponse, ListWorkspaceError, ListWorkspaceResponse, CreateWorkspaceData, CreateWorkspaceError, CreateWorkspaceResponse, DeleteWorkspaceData, DeleteWorkspaceError, DeleteWorkspaceResponse, GetWorkspaceData, GetWorkspaceError, GetWorkspaceResponse, UpdateWorkspaceData, UpdateWorkspaceError, UpdateWorkspaceResponse, GetWorkspaceConfigsData, GetWorkspaceConfigsError, GetWorkspaceConfigsResponse, UpdateWorkspaceConfigsData, UpdateWorkspaceConfigsError, UpdateWorkspaceConfigsResponse, CreateWorkspaceModDepsData, CreateWorkspaceModDepsError, CreateWorkspaceModDepsResponse, ValidateWorkspaceConfigsData, ValidateWorkspaceConfigsError, ValidateWorkspaceConfigsResponse } from './types.gen'; export const client = createClient(createConfig()); @@ -317,7 +317,7 @@ export class SourceService { * List source * List source information by source ID */ - public static listSource(options?: OptionsLegacyParser) { + public static listSource(options?: OptionsLegacyParser) { return (options?.client ?? client).get({ ...options, url: '/api/v1/sources' diff --git a/src/client/types.gen.ts b/src/client/types.gen.ts index 2a2d4f4..2287820 100644 --- a/src/client/types.gen.ts +++ b/src/client/types.gen.ts @@ -17,10 +17,10 @@ export enum constant_RunType { } export enum constant_SourceProviderType { - DefaultSourceType = 'git', - SourceProviderTypeGit = 'github', - SourceProviderTypeGithub = 'oci', - SourceProviderTypeOCI = 'local' + SourceProviderTypeGit = 'git', + SourceProviderTypeGithub = 'github', + SourceProviderTypeOCI = 'oci', + SourceProviderTypeLocal = 'local' } export enum constant_StackState { @@ -48,7 +48,7 @@ export type entity_Backend = { * Type string `yaml:"type" json:"type"` * Backend is the configuration of the backend. */ - backendConfig?: (v1_BackendConfig); + backendConfig?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_BackendConfig); /** * CreationTimestamp is the timestamp of the created for the backend. */ @@ -241,6 +241,10 @@ export type entity_Resource = { * ResourceType is the type of the resource. */ resourceType?: string; + /** + * ResourceURN is the urn of the resource. + */ + resourceURN?: string; /** * Stack is the stack associated with the resource. */ @@ -487,11 +491,241 @@ export type entity_Workspace = { updateTimestamp?: string; }; +export type kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_AlicloudProvider = { + /** + * Alicloud Region to be used to interact with Alicloud Secrets Manager. + * Examples are cn-beijing, cn-shanghai, etc. + */ + region?: string; +}; + +export type kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_AWSProvider = { + /** + * The profile to be used to interact with AWS Secrets Manager. + * If not set, the default profile created with `aws configure` will be used. + */ + profile?: string; + /** + * AWS Region to be used to interact with AWS Secrets Manager. + * Examples are us-east-1, us-west-2, etc. + */ + region?: string; +}; + +export enum kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_AzureEnvironmentType { + AzureEnvironmentPublicCloud = 'PublicCloud', + AzureEnvironmentUSGovernmentCloud = 'USGovernmentCloud', + AzureEnvironmentChinaCloud = 'ChinaCloud', + AzureEnvironmentGermanCloud = 'GermanCloud' +} + +export type kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_AzureKVProvider = { + /** + * EnvironmentType specifies the Azure cloud environment endpoints to use for connecting and authenticating with Azure. + * By-default it points to the public cloud AAD endpoint, and the following endpoints are available: + * PublicCloud, USGovernmentCloud, ChinaCloud, GermanCloud + * Ref: https://github.com/Azure/go-autorest/blob/main/autorest/azure/environments.go#L152 + */ + environmentType?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_AzureEnvironmentType); + /** + * TenantID configures the Azure Tenant to send requests to. + */ + tenantId?: string; + /** + * Vault Url from which the secrets to be fetched from. + */ + vaultUrl?: string; +}; + +export type kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_BackendConfig = { + /** + * Configs contains config items of the backend, whose keys differ from different backend types. + */ + configs?: { + [key: string]: unknown; + }; + /** + * Type is the backend type, supports BackendTypeLocal, BackendTypeOss, BackendTypeS3. + */ + type?: string; +}; + +export type kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_Configs = { + /** + * Default is default block of the module config. + */ + default?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_GenericConfig); +}; + +export type kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_FakeProvider = { + data?: Array; +}; + +export type kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_FakeProviderData = { + key?: string; + value?: string; + valueMap?: { + [key: string]: (string); + }; + version?: string; +}; + +export type kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_GenericConfig = { + [key: string]: unknown; +}; + +export type kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_ModuleConfig = { + /** + * Configs contains all levels of module configs + */ + configs?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_Configs); + /** + * Path is the path of the module. It can be a local path or a remote URL + */ + path?: string; + /** + * Version is the version of the module. + */ + version?: string; +}; + +export type kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_ModuleConfigs = { + [key: string]: kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_ModuleConfig; +}; + +export type kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_ModulePatcherConfig = { + /** + * ProjectSelector contains the selected projects. + */ + projectSelector?: Array<(string)>; +}; + +export type kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_OnPremisesProvider = { + /** + * attributes of the provider + */ + attributes?: { + [key: string]: (string); + }; + /** + * platform name of the provider + */ + name?: string; +}; + +export type kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_ProviderSpec = { + /** + * Alicloud configures a store to retrieve secrets from Alicloud Secrets Manager. + */ + alicloud?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_AlicloudProvider); + /** + * AWS configures a store to retrieve secrets from AWS Secrets Manager. + */ + aws?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_AWSProvider); + /** + * Azure configures a store to retrieve secrets from Azure KeyVault. + */ + azure?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_AzureKVProvider); + /** + * Fake configures a store with static key/value pairs + */ + fake?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_FakeProvider); + /** + * Onprem configures a store in on-premises environments + */ + onpremises?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_OnPremisesProvider); + /** + * Vault configures a store to retrieve secrets from HashiCorp Vault. + */ + vault?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_VaultProvider); + /** + * ViettelCloud configures a store to retrieve secrets from ViettelCloud Secrets Manager. + */ + viettelcloud?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_ViettelCloudProvider); +}; + +export type kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_Resource = { + /** + * Attributes represents all specified attributes of this resource + */ + attributes?: unknown; + /** + * DependsOn contains all resources this resource depends on + */ + dependsOn?: Array<(string)>; + /** + * Extensions specifies arbitrary metadata of this resource + */ + extensions?: unknown; + /** + * ID is the unique key of this resource. + * ApiVersion:Kind:Namespace:Name is an idiomatic way for Kubernetes resources. + * providerNamespace:providerName:resourceType:resourceName for Terraform resources + */ + id?: string; + /** + * Type represents all Context we supported like Kubernetes and Terraform + */ + type?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_Type); +}; + +export type kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_SecretStore = { + provider?: kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_ProviderSpec; +}; + +export type kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_Spec = { + /** + * Context contains workspace-level configurations, such as runtimes, topologies, and metadata, etc. + */ + context?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_GenericConfig); + /** + * Resources is the list of Resource this Spec contains. + */ + resources?: Array; + /** + * SecretSore represents a external secret store location for storing secrets. + */ + secretStore?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_SecretStore); +}; + export enum kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_Type { Kubernetes = 'Kubernetes', Terraform = 'Terraform' } +export enum kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_VaultKVStoreVersion { + VaultKVStoreV1 = 'v1', + VaultKVStoreV2 = 'v2' +} + +export type kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_VaultProvider = { + /** + * Path is the mount path of the Vault KV backend endpoint, e.g: "secret". + */ + path?: string; + /** + * Server is the target Vault server address to connect, e.g: "https://vault.example.com:8200". + */ + server?: string; + /** + * Version is the Vault KV secret engine version. Version can be either "v1" or + * "v2", defaults to "v2". + */ + version?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_VaultKVStoreVersion); +}; + +export type kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_ViettelCloudProvider = { + /** + * ViettelCloud CMP URL to be used to interact with ViettelCloud Secrets Manager. + * Examples are https://console.viettelcloud.vn/api/ + */ + cmpURL?: string; + /** + * ProjectID to be used to interact with ViettelCloud Secrets Manager. + */ + projectID?: string; +}; + export enum models_ActionType { Undefined = 0, UnChanged = 1, @@ -530,7 +764,7 @@ export type request_CreateBackendRequest = { /** * BackendConfig is the configuration of the backend. */ - backendConfig?: (v1_BackendConfig); + backendConfig?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_BackendConfig); /** * Description is a human-readable description of the backend. */ @@ -717,7 +951,7 @@ export type request_UpdateBackendRequest = { /** * BackendConfig is the configuration of the backend. */ - backendConfig?: (v1_BackendConfig); + backendConfig?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_BackendConfig); /** * Description is a human-readable description of the backend. */ @@ -924,15 +1158,15 @@ export type request_WorkspaceConfigs = { /** * Context contains workspace-level configurations, such as runtimes, topologies, and metadata, etc. */ - context?: (v1_GenericConfig); + context?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_GenericConfig); /** * Modules are the configs of a set of modules. */ - modules?: (v1_ModuleConfigs); + modules?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_ModuleConfigs); /** * SecretStore represents a secure external location for storing secrets. */ - secretStore?: (v1_SecretStore); + secretStore?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_SecretStore); }; export type url_URL = { @@ -981,236 +1215,6 @@ export type url_URL = { export type url_Userinfo = unknown; -export type v1_AlicloudProvider = { - /** - * Alicloud Region to be used to interact with Alicloud Secrets Manager. - * Examples are cn-beijing, cn-shanghai, etc. - */ - region?: string; -}; - -export type v1_AWSProvider = { - /** - * The profile to be used to interact with AWS Secrets Manager. - * If not set, the default profile created with `aws configure` will be used. - */ - profile?: string; - /** - * AWS Region to be used to interact with AWS Secrets Manager. - * Examples are us-east-1, us-west-2, etc. - */ - region?: string; -}; - -export enum v1_AzureEnvironmentType { - AzureEnvironmentPublicCloud = 'PublicCloud', - AzureEnvironmentUSGovernmentCloud = 'USGovernmentCloud', - AzureEnvironmentChinaCloud = 'ChinaCloud', - AzureEnvironmentGermanCloud = 'GermanCloud' -} - -export type v1_AzureKVProvider = { - /** - * EnvironmentType specifies the Azure cloud environment endpoints to use for connecting and authenticating with Azure. - * By-default it points to the public cloud AAD endpoint, and the following endpoints are available: - * PublicCloud, USGovernmentCloud, ChinaCloud, GermanCloud - * Ref: https://github.com/Azure/go-autorest/blob/main/autorest/azure/environments.go#L152 - */ - environmentType?: (v1_AzureEnvironmentType); - /** - * TenantID configures the Azure Tenant to send requests to. - */ - tenantId?: string; - /** - * Vault Url from which the secrets to be fetched from. - */ - vaultUrl?: string; -}; - -export type v1_BackendConfig = { - /** - * Configs contains config items of the backend, whose keys differ from different backend types. - */ - configs?: { - [key: string]: unknown; - }; - /** - * Type is the backend type, supports BackendTypeLocal, BackendTypeOss, BackendTypeS3. - */ - type?: string; -}; - -export type v1_Configs = { - /** - * Default is default block of the module config. - */ - default?: (v1_GenericConfig); -}; - -export type v1_FakeProvider = { - data?: Array; -}; - -export type v1_FakeProviderData = { - key?: string; - value?: string; - valueMap?: { - [key: string]: (string); - }; - version?: string; -}; - -export type v1_GenericConfig = { - [key: string]: unknown; -}; - -export type v1_ModuleConfig = { - /** - * Configs contains all levels of module configs - */ - configs?: (v1_Configs); - /** - * Path is the path of the module. It can be a local path or a remote URL - */ - path?: string; - /** - * Version is the version of the module. - */ - version?: string; -}; - -export type v1_ModuleConfigs = { - [key: string]: v1_ModuleConfig; -}; - -export type v1_ModulePatcherConfig = { - /** - * ProjectSelector contains the selected projects. - */ - projectSelector?: Array<(string)>; -}; - -export type v1_OnPremisesProvider = { - /** - * attributes of the provider - */ - attributes?: { - [key: string]: (string); - }; - /** - * platform name of the provider - */ - name?: string; -}; - -export type v1_ProviderSpec = { - /** - * Alicloud configures a store to retrieve secrets from Alicloud Secrets Manager. - */ - alicloud?: (v1_AlicloudProvider); - /** - * AWS configures a store to retrieve secrets from AWS Secrets Manager. - */ - aws?: (v1_AWSProvider); - /** - * Azure configures a store to retrieve secrets from Azure KeyVault. - */ - azure?: (v1_AzureKVProvider); - /** - * Fake configures a store with static key/value pairs - */ - fake?: (v1_FakeProvider); - /** - * Onprem configures a store in on-premises environments - */ - onpremises?: (v1_OnPremisesProvider); - /** - * Vault configures a store to retrieve secrets from HashiCorp Vault. - */ - vault?: (v1_VaultProvider); - /** - * ViettelCloud configures a store to retrieve secrets from ViettelCloud Secrets Manager. - */ - viettelcloud?: (v1_ViettelCloudProvider); -}; - -export type v1_Resource = { - /** - * Attributes represents all specified attributes of this resource - */ - attributes?: unknown; - /** - * DependsOn contains all resources this resource depends on - */ - dependsOn?: Array<(string)>; - /** - * Extensions specifies arbitrary metadata of this resource - */ - extensions?: unknown; - /** - * ID is the unique key of this resource. - * ApiVersion:Kind:Namespace:Name is an idiomatic way for Kubernetes resources. - * providerNamespace:providerName:resourceType:resourceName for Terraform resources - */ - id?: string; - /** - * Type represents all Context we supported like Kubernetes and Terraform - */ - type?: (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_Type); -}; - -export type v1_SecretStore = { - provider?: v1_ProviderSpec; -}; - -export type v1_Spec = { - /** - * Context contains workspace-level configurations, such as runtimes, topologies, and metadata, etc. - */ - context?: (v1_GenericConfig); - /** - * Resources is the list of Resource this Spec contains. - */ - resources?: Array; - /** - * SecretSore represents a external secret store location for storing secrets. - */ - secretStore?: (v1_SecretStore); -}; - -export enum v1_VaultKVStoreVersion { - VaultKVStoreV1 = 'v1', - VaultKVStoreV2 = 'v2' -} - -export type v1_VaultProvider = { - /** - * Path is the mount path of the Vault KV backend endpoint, e.g: "secret". - */ - path?: string; - /** - * Server is the target Vault server address to connect, e.g: "https://vault.example.com:8200". - */ - server?: string; - /** - * Version is the Vault KV secret engine version. Version can be either "v1" or - * "v2", defaults to "v2". - */ - version?: (v1_VaultKVStoreVersion); -}; - -export type v1_ViettelCloudProvider = { - /** - * ViettelCloud CMP URL to be used to interact with ViettelCloud Secrets Manager. - * Examples are https://console.viettelcloud.vn/api/ - */ - cmpURL?: string; - /** - * ProjectID to be used to interact with ViettelCloud Secrets Manager. - */ - projectID?: string; -}; - export type ListBackendResponse = (entity_Backend); export type ListBackendError = (unknown); @@ -1275,6 +1279,10 @@ export type GetEndpointsError = unknown; export type ListModuleData = { query?: { + /** + * Module name to filter module list by. Default to all modules. + */ + moduleName?: string; /** * Workspace ID to filter module list by. Default to all workspaces. */ @@ -1525,6 +1533,15 @@ export type GetRunResultResponse = (entity_Run); export type GetRunResultError = (unknown); +export type ListSourceData = { + query?: { + /** + * Source name to filter source list by. Default to all sources. + */ + sourceName?: string; + }; +}; + export type ListSourceResponse = (entity_Source); export type ListSourceError = (unknown); @@ -1589,6 +1606,10 @@ export type ListRunData = { * Cloud to filter runs by. Default to all */ cloud?: string; + /** + * EndTime to filter runs by. Default to all. Format: RFC3339 + */ + endTime?: string; /** * Environment to filter runs by. Default to all */ @@ -1605,6 +1626,18 @@ export type ListRunData = { * ProjectName to filter runs by. Default to all */ projectName?: string; + /** + * StartTime to filter runs by. Default to all. Format: RFC3339 + */ + startTime?: string; + /** + * RunStatus to filter runs by. Default to all + */ + status?: Array; + /** + * RunType to filter runs by. Default to all + */ + type?: Array; }; }; @@ -1860,7 +1893,7 @@ export type GenerateStackData = { }; }; -export type GenerateStackResponse = (v1_Spec); +export type GenerateStackResponse = (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_Spec); export type GenerateStackError = (unknown); @@ -1887,7 +1920,7 @@ export type GenerateStackAsyncData = { }; }; -export type GenerateStackAsyncResponse = (v1_Spec); +export type GenerateStackAsyncResponse = (kusionstack_io_kusion_pkg_apis_api_kusion_io_v1_Spec); export type GenerateStackAsyncError = (unknown);