scaffolder: actions api report
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
import { BackendFeature } from '@backstage/backend-plugin-api';
|
||||
import { ConditionalPolicyDecision } from '@backstage/plugin-permission-common';
|
||||
import { Conditions } from '@backstage/plugin-permission-node';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
import { PermissionCondition } from '@backstage/plugin-permission-common';
|
||||
import { PermissionCriteria } from '@backstage/plugin-permission-common';
|
||||
import { PermissionRule } from '@backstage/plugin-permission-node';
|
||||
@@ -20,20 +21,53 @@ import { TemplateParametersV1beta3 } from '@backstage/plugin-scaffolder-common';
|
||||
// @alpha
|
||||
export const catalogModuleTemplateKind: () => BackendFeature;
|
||||
|
||||
// @alpha (undocumented)
|
||||
export const createScaffolderActionConditionalDecision: (
|
||||
permission: ResourcePermission<'scaffolder-action'>,
|
||||
conditions: PermissionCriteria<PermissionCondition<'scaffolder-action'>>,
|
||||
) => ConditionalPolicyDecision;
|
||||
|
||||
// @alpha
|
||||
export const createScaffolderConditionalDecision: (
|
||||
export const createScaffolderTemplateConditionalDecision: (
|
||||
permission: ResourcePermission<'scaffolder-template'>,
|
||||
conditions: PermissionCriteria<PermissionCondition<'scaffolder-template'>>,
|
||||
) => ConditionalPolicyDecision;
|
||||
|
||||
// @alpha
|
||||
export const scaffolderConditions: Conditions<{
|
||||
hasTag: PermissionRule<
|
||||
TemplateParametersV1beta3 | TemplateEntityStepV1beta3,
|
||||
{},
|
||||
'scaffolder-template',
|
||||
export const scaffolderActionConditions: Conditions<{
|
||||
hasActionId: PermissionRule<
|
||||
{
|
||||
tag: string;
|
||||
action: string;
|
||||
input: JsonObject | undefined;
|
||||
},
|
||||
{},
|
||||
'scaffolder-action',
|
||||
{
|
||||
actionId: string;
|
||||
}
|
||||
>;
|
||||
hasNumberProperty: PermissionRule<
|
||||
{
|
||||
action: string;
|
||||
input: JsonObject | undefined;
|
||||
},
|
||||
{},
|
||||
'scaffolder-action',
|
||||
{
|
||||
value: number;
|
||||
key: string;
|
||||
}
|
||||
>;
|
||||
hasStringProperty: PermissionRule<
|
||||
{
|
||||
action: string;
|
||||
input: JsonObject | undefined;
|
||||
},
|
||||
{},
|
||||
'scaffolder-action',
|
||||
{
|
||||
value: string;
|
||||
key: string;
|
||||
}
|
||||
>;
|
||||
}>;
|
||||
@@ -52,5 +86,17 @@ export type ScaffolderPluginOptions = {
|
||||
additionalTemplateGlobals?: Record<string, TemplateGlobal>;
|
||||
};
|
||||
|
||||
// @alpha
|
||||
export const scaffolderTemplateConditions: Conditions<{
|
||||
hasTag: PermissionRule<
|
||||
TemplateEntityStepV1beta3 | TemplateParametersV1beta3,
|
||||
{},
|
||||
'scaffolder-template',
|
||||
{
|
||||
tag: string;
|
||||
}
|
||||
>;
|
||||
}>;
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
|
||||
@@ -273,7 +273,7 @@ export function createGithubRepoCreateAction(options: {
|
||||
requiredStatusCheckContexts?: string[] | undefined;
|
||||
requireBranchesToBeUpToDate?: boolean | undefined;
|
||||
requiredConversationResolution?: boolean | undefined;
|
||||
repoVisibility?: 'internal' | 'private' | 'public' | undefined;
|
||||
repoVisibility?: 'public' | 'private' | 'internal' | undefined;
|
||||
collaborators?:
|
||||
| (
|
||||
| {
|
||||
@@ -388,7 +388,7 @@ export function createPublishBitbucketAction(options: {
|
||||
repoUrl: string;
|
||||
description?: string | undefined;
|
||||
defaultBranch?: string | undefined;
|
||||
repoVisibility?: 'private' | 'public' | undefined;
|
||||
repoVisibility?: 'public' | 'private' | undefined;
|
||||
sourcePath?: string | undefined;
|
||||
enableLFS?: boolean | undefined;
|
||||
token?: string | undefined;
|
||||
@@ -408,7 +408,7 @@ export function createPublishBitbucketCloudAction(options: {
|
||||
repoUrl: string;
|
||||
description?: string | undefined;
|
||||
defaultBranch?: string | undefined;
|
||||
repoVisibility?: 'private' | 'public' | undefined;
|
||||
repoVisibility?: 'public' | 'private' | undefined;
|
||||
sourcePath?: string | undefined;
|
||||
token?: string | undefined;
|
||||
},
|
||||
@@ -424,7 +424,7 @@ export function createPublishBitbucketServerAction(options: {
|
||||
repoUrl: string;
|
||||
description?: string | undefined;
|
||||
defaultBranch?: string | undefined;
|
||||
repoVisibility?: 'private' | 'public' | undefined;
|
||||
repoVisibility?: 'public' | 'private' | undefined;
|
||||
sourcePath?: string | undefined;
|
||||
enableLFS?: boolean | undefined;
|
||||
token?: string | undefined;
|
||||
@@ -517,7 +517,7 @@ export function createPublishGithubAction(options: {
|
||||
requiredStatusCheckContexts?: string[] | undefined;
|
||||
requireBranchesToBeUpToDate?: boolean | undefined;
|
||||
requiredConversationResolution?: boolean | undefined;
|
||||
repoVisibility?: 'internal' | 'private' | 'public' | undefined;
|
||||
repoVisibility?: 'public' | 'private' | 'internal' | undefined;
|
||||
collaborators?:
|
||||
| (
|
||||
| {
|
||||
@@ -571,7 +571,7 @@ export function createPublishGitlabAction(options: {
|
||||
{
|
||||
repoUrl: string;
|
||||
defaultBranch?: string | undefined;
|
||||
repoVisibility?: 'internal' | 'private' | 'public' | undefined;
|
||||
repoVisibility?: 'public' | 'private' | 'internal' | undefined;
|
||||
sourcePath?: string | undefined;
|
||||
token?: string | undefined;
|
||||
gitCommitMessage?: string | undefined;
|
||||
@@ -595,7 +595,7 @@ export const createPublishGitlabMergeRequestAction: (options: {
|
||||
sourcePath?: string | undefined;
|
||||
targetPath?: string | undefined;
|
||||
token?: string | undefined;
|
||||
commitAction?: 'update' | 'delete' | 'create' | undefined;
|
||||
commitAction?: 'create' | 'update' | 'delete' | undefined;
|
||||
projectid?: string | undefined;
|
||||
removeSourceBranch?: boolean | undefined;
|
||||
assignee?: string | undefined;
|
||||
@@ -650,6 +650,7 @@ export type CreateWorkerOptions = {
|
||||
additionalTemplateFilters?: Record<string, TemplateFilter>;
|
||||
concurrentTasksLimit?: number;
|
||||
additionalTemplateGlobals?: Record<string, TemplateGlobal>;
|
||||
permissionApi?: PermissionEvaluator;
|
||||
};
|
||||
|
||||
// @public
|
||||
|
||||
@@ -5,11 +5,20 @@
|
||||
```ts
|
||||
import { ResourcePermission } from '@backstage/plugin-permission-common';
|
||||
|
||||
// @alpha
|
||||
export const actionExecutePermission: ResourcePermission<'scaffolder-action'>;
|
||||
|
||||
// @alpha
|
||||
export const RESOURCE_TYPE_SCAFFOLDER_ACTION = 'scaffolder-action';
|
||||
|
||||
// @alpha
|
||||
export const RESOURCE_TYPE_SCAFFOLDER_TEMPLATE = 'scaffolder-template';
|
||||
|
||||
// @alpha
|
||||
export const scaffolderPermissions: ResourcePermission<'scaffolder-template'>[];
|
||||
export const scaffolderPermissions: (
|
||||
| ResourcePermission<'scaffolder-action'>
|
||||
| ResourcePermission<'scaffolder-template'>
|
||||
)[];
|
||||
|
||||
// @alpha
|
||||
export const templateParameterReadPermission: ResourcePermission<'scaffolder-template'>;
|
||||
|
||||
Reference in New Issue
Block a user