@@ -17,12 +17,18 @@ import { z, ZodType } from 'zod';
|
||||
import { LoggerService } from './LoggerService';
|
||||
import { BackstageCredentials } from './AuthService';
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export type ActionsRegistryActionContext<TInputSchema extends ZodType> = {
|
||||
input: z.infer<TInputSchema>;
|
||||
logger: LoggerService;
|
||||
credentials: BackstageCredentials;
|
||||
};
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export type ActionsRegistryActionOptions<
|
||||
TInputSchema extends ZodType,
|
||||
TOutputSchema extends ZodType,
|
||||
@@ -41,6 +47,9 @@ export type ActionsRegistryActionOptions<
|
||||
>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface ActionsRegistryService {
|
||||
register<TInputSchema extends ZodType, TOutputSchema extends ZodType>(
|
||||
options: ActionsRegistryActionOptions<TInputSchema, TOutputSchema>,
|
||||
|
||||
@@ -17,6 +17,9 @@ import { JsonObject, JsonValue } from '@backstage/types';
|
||||
import { JSONSchema7 } from 'json-schema';
|
||||
import { BackstageCredentials } from './AuthService';
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export type ActionsServiceAction = {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -28,6 +31,9 @@ export type ActionsServiceAction = {
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface ActionsService {
|
||||
listActions: (opts: {
|
||||
credentials: BackstageCredentials;
|
||||
|
||||
Reference in New Issue
Block a user