import * as _backstage_types from '@backstage/types';
import * as _backstage_plugin_permission_node from '@backstage/plugin-permission-node';
import * as _backstage_plugin_scaffolder_common from '@backstage/plugin-scaffolder-common';
import * as _backstage_plugin_permission_common from '@backstage/plugin-permission-common';
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';

/**
 * `createScaffolderTemplateConditionalDecision` can be used when authoring policies to
 * create conditional decisions. It requires a permission of type
 * `ResourcePermission<'scaffolder-template'>` to be passed as the first parameter.
 * It's recommended that you use the provided `isResourcePermission` and
 * `isPermission` helper methods to narrow the type of the permission passed to
 * the handle method as shown below.
 *
 * ```
 * // MyAuthorizationPolicy.ts
 * ...
 * import { createScaffolderPolicyDecision } from '@backstage/plugin-scaffolder-backend';
 * import { RESOURCE_TYPE_SCAFFOLDER_TEMPLATE } from '@backstage/plugin-scaffolder-common';
 *
 * class MyAuthorizationPolicy implements PermissionPolicy {
 *   async handle(request, user) {
 *    ...
 *
 *    if (isResourcePermission(request.permission, RESOURCE_TYPE_SCAFFOLDER_TEMPLATE)) {
 *      return createScaffolderConditionalDecision(
 *        request.permission,
 *        { anyOf: [...insert conditions here...] }
 *      );
 *    }
 *
 *    ...
 * }
 *
 * ```
 *
 * @alpha
 */
declare const createScaffolderTemplateConditionalDecision: (permission: _backstage_plugin_permission_common.ResourcePermission<"scaffolder-template">, conditions: _backstage_plugin_permission_common.PermissionCriteria<_backstage_plugin_permission_common.PermissionCondition<"scaffolder-template">>) => _backstage_plugin_permission_common.ConditionalPolicyDecision;
/**
 * These conditions are used when creating conditional decisions for scaffolder
 * templates that are returned by authorization policies.
 *
 * @alpha
 */
declare const scaffolderTemplateConditions: _backstage_plugin_permission_node.Conditions<{
    hasTag: _backstage_plugin_permission_node.PermissionRule<_backstage_plugin_scaffolder_common.TemplateParametersV1beta3 | _backstage_plugin_scaffolder_common.TemplateEntityStepV1beta3, {}, "scaffolder-template", {
        tag: string;
    }>;
}>;
/**
 * @alpha
 */
declare const createScaffolderActionConditionalDecision: (permission: _backstage_plugin_permission_common.ResourcePermission<"scaffolder-action">, conditions: _backstage_plugin_permission_common.PermissionCriteria<_backstage_plugin_permission_common.PermissionCondition<"scaffolder-action">>) => _backstage_plugin_permission_common.ConditionalPolicyDecision;
/**
 *
 * These conditions are used when creating conditional decisions for scaffolder
 * actions that are returned by authorization policies.
 *
 * @alpha
 */
declare const scaffolderActionConditions: _backstage_plugin_permission_node.Conditions<{
    hasActionId: _backstage_plugin_permission_node.PermissionRule<{
        action: string;
        input: _backstage_types.JsonObject | undefined;
    }, {}, "scaffolder-action", {
        actionId: string;
    }>;
    hasBooleanProperty: _backstage_plugin_permission_node.PermissionRule<{
        action: string;
        input: _backstage_types.JsonObject | undefined;
    }, {}, "scaffolder-action", {
        key: string;
        value?: boolean | undefined;
    }>;
    hasNumberProperty: _backstage_plugin_permission_node.PermissionRule<{
        action: string;
        input: _backstage_types.JsonObject | undefined;
    }, {}, "scaffolder-action", {
        key: string;
        value?: number | undefined;
    }>;
    hasStringProperty: _backstage_plugin_permission_node.PermissionRule<{
        action: string;
        input: _backstage_types.JsonObject | undefined;
    }, {}, "scaffolder-action", {
        key: string;
        value?: string | undefined;
    }>;
}>;

/**
 * Scaffolder plugin
 *
 * @alpha
 */
declare const scaffolderPlugin: () => _backstage_backend_plugin_api.BackendFeature;

export { createScaffolderActionConditionalDecision, createScaffolderTemplateConditionalDecision, scaffolderPlugin as default, scaffolderActionConditions, scaffolderTemplateConditions };
