import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api'; import { UrlReaderService } from '@backstage/backend-plugin-api'; import * as _backstage_plugin_scaffolder_node from '@backstage/plugin-scaffolder-node'; import { TemplateFilter, TemplateGlobal } from '@backstage/plugin-scaffolder-node'; import { ScmIntegrations } from '@backstage/integration'; import { CatalogService } from '@backstage/plugin-catalog-node'; import { HumanDuration } from '@backstage/types'; import { Duration } from 'luxon'; import { PermissionRule } from '@backstage/plugin-permission-node'; import { TemplateEntityStepV1beta3, TemplateParametersV1beta3 } from '@backstage/plugin-scaffolder-common'; import { RESOURCE_TYPE_SCAFFOLDER_TEMPLATE, RESOURCE_TYPE_SCAFFOLDER_ACTION } from '@backstage/plugin-scaffolder-common/alpha'; import { PermissionRuleParams } from '@backstage/plugin-permission-common'; /** * Scaffolder plugin * * @public */ declare const scaffolderPlugin: _backstage_backend_plugin_api.BackendFeature; /** * Registers entities from a catalog descriptor file in the workspace into the software catalog. * @public */ declare function createCatalogRegisterAction(options: { catalog: CatalogService; integrations: ScmIntegrations; }): _backstage_plugin_scaffolder_node.TemplateAction<{ catalogInfoUrl: string; optional?: boolean | undefined; } | { catalogInfoUrl: string; optional?: boolean | undefined; catalogInfoPath?: string | undefined; } | { repoContentsUrl: string; optional?: boolean | undefined; } | { repoContentsUrl: string; optional?: boolean | undefined; catalogInfoPath?: string | undefined; }, { [x: string]: any; }, "v2">; /** * Writes a catalog descriptor file containing the provided entity to a path in the workspace. * @public */ declare function createCatalogWriteAction(): _backstage_plugin_scaffolder_node.TemplateAction<{ entity: Record; filePath?: string | undefined; }, { [x: string]: any; }, "v2">; /** * Returns entity or entities from the catalog by entity reference(s). * * @public */ declare function createFetchCatalogEntityAction(options: { catalog: CatalogService; }): _backstage_plugin_scaffolder_node.TemplateAction<{ entityRef?: string | undefined; entityRefs?: string[] | undefined; optional?: boolean | undefined; defaultKind?: string | undefined; defaultNamespace?: string | undefined; }, { entity?: any; entities?: any[] | undefined; }, "v2">; /** * Writes a message into the log or lists all files in the workspace * * @remarks * * This task is useful for local development and testing of both the scaffolder * and scaffolder templates. * * @public */ declare function createDebugLogAction(): _backstage_plugin_scaffolder_node.TemplateAction<{ message?: string | undefined; listWorkspace?: boolean | "with-contents" | "with-filenames" | undefined; }, { [x: string]: any; }, "v2">; /** * Waits for a certain period of time. * * @remarks * * This task is useful to give some waiting time for manual intervention. * Has to be used in a combination with other actions. * * @public */ declare function createWaitAction(options?: { maxWaitTime?: Duration | HumanDuration; }): _backstage_plugin_scaffolder_node.TemplateAction<{ minutes?: number | undefined; seconds?: number | undefined; milliseconds?: number | undefined; }, { [x: string]: any; }, "v2">; /** * Downloads content and places it in the workspace, or optionally * in a subdirectory specified by the 'targetPath' input option. * @public */ declare function createFetchPlainAction(options: { reader: UrlReaderService; integrations: ScmIntegrations; }): _backstage_plugin_scaffolder_node.TemplateAction<{ url: string; targetPath?: string | undefined; token?: string | undefined; }, { [x: string]: any; }, "v2">; /** * Downloads a single file and places it in the workspace. * @public */ declare function createFetchPlainFileAction(options: { reader: UrlReaderService; integrations: ScmIntegrations; }): _backstage_plugin_scaffolder_node.TemplateAction<{ url: string; targetPath: string; token?: string | undefined; }, { [x: string]: any; }, "v2">; /** * Downloads a skeleton, templates variables into file and directory names and content. * Then places the result in the workspace, or optionally in a subdirectory * specified by the 'targetPath' input option. * * @public */ declare function createFetchTemplateAction(options: { reader: UrlReaderService; integrations: ScmIntegrations; additionalTemplateFilters?: Record; additionalTemplateGlobals?: Record; }): _backstage_plugin_scaffolder_node.TemplateAction<{ url: string; targetPath?: string | undefined; values?: Record | undefined; copyWithoutRender?: string[] | undefined; copyWithoutTemplating?: string[] | undefined; cookiecutterCompat?: boolean | undefined; templateFileExtension?: string | boolean | undefined; replace?: boolean | undefined; trimBlocks?: boolean | undefined; lstripBlocks?: boolean | undefined; token?: string | undefined; }, { [x: string]: any; }, "v2">; /** * Downloads a single file and templates variables into file. * Then places the result in the workspace, or optionally in a subdirectory * specified by the 'targetPath' input option. * @public */ declare function createFetchTemplateFileAction(options: { reader: UrlReaderService; integrations: ScmIntegrations; additionalTemplateFilters?: Record; additionalTemplateGlobals?: Record; }): _backstage_plugin_scaffolder_node.TemplateAction<{ url: string; targetPath: string; values?: Record | undefined; cookiecutterCompat?: boolean | undefined; replace?: boolean | undefined; trimBlocks?: boolean | undefined; lstripBlocks?: boolean | undefined; token?: string | undefined; }, { [x: string]: any; }, "v2">; /** * Creates new action that enables deletion of files and directories in the workspace. * @public */ declare const createFilesystemDeleteAction: () => _backstage_plugin_scaffolder_node.TemplateAction<{ files: string[]; }, { [x: string]: any; }, "v2">; /** * Creates a new action that allows renames of files and directories in the workspace. * @public */ declare const createFilesystemRenameAction: () => _backstage_plugin_scaffolder_node.TemplateAction<{ files: { from: string; to: string; overwrite?: boolean | undefined; }[]; }, { [x: string]: any; }, "v2">; /** * Creates new action that enables reading directories in the workspace. * @public */ declare const createFilesystemReadDirAction: () => _backstage_plugin_scaffolder_node.TemplateAction<{ paths: string[]; recursive: boolean; }, { files: { name: string; path: string; fullPath: string; }[]; folders: { name: string; path: string; fullPath: string; }[]; }, "v2">; /** * @public */ type TemplatePermissionRuleInput = PermissionRule; /** * * @public */ type ActionPermissionRuleInput = PermissionRule; export { type ActionPermissionRuleInput, type TemplatePermissionRuleInput, createCatalogRegisterAction, createCatalogWriteAction, createDebugLogAction, createFetchCatalogEntityAction, createFetchPlainAction, createFetchPlainFileAction, createFetchTemplateAction, createFetchTemplateFileAction, createFilesystemDeleteAction, createFilesystemReadDirAction, createFilesystemRenameAction, createWaitAction, scaffolderPlugin as default };