Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ymao1 committed Oct 19, 2022
1 parent 026646a commit 802dfa0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
12 changes: 4 additions & 8 deletions x-pack/plugins/actions/server/create_execute_function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
import { ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE } from './constants/saved_objects';
import { ExecuteOptions as ActionExecutorOptions } from './lib/action_executor';
import { extractSavedObjectReferences, isSavedObjectExecutionSource } from './lib';
import { RelatedSavedObjects } from './lib/related_saved_objects';

interface CreateExecuteFunctionOptions {
taskManager: TaskManagerStartContract;
Expand All @@ -25,21 +24,18 @@ interface CreateExecuteFunctionOptions {
preconfiguredActions: PreConfiguredAction[];
}

export interface ExecuteOptions extends Pick<ActionExecutorOptions, 'params' | 'source'> {
export interface ExecuteOptions
extends Pick<ActionExecutorOptions, 'params' | 'source' | 'relatedSavedObjects' | 'consumer'> {
id: string;
spaceId: string;
apiKey: string | null;
executionId: string;
consumer?: string;
relatedSavedObjects?: RelatedSavedObjects;
}

interface ActionTaskParams extends Pick<ActionExecutorOptions, 'params'> {
actionId: string;
interface ActionTaskParams
extends Pick<ActionExecutorOptions, 'actionId' | 'params' | 'consumer' | 'relatedSavedObjects'> {
apiKey: string | null;
executionId: string;
consumer?: string;
relatedSavedObjects?: RelatedSavedObjects;
}

export interface GetConnectorsResult {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
import { ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE } from './constants/saved_objects';
import { ExecuteOptions as ActionExecutorOptions } from './lib/action_executor';
import { extractSavedObjectReferences, isSavedObjectExecutionSource } from './lib';
import { RelatedSavedObjects } from './lib/related_saved_objects';

// This allowlist should only contain connector types that don't require API keys for
// execution.
Expand All @@ -25,15 +24,14 @@ interface CreateBulkUnsecuredExecuteFunctionOptions {
preconfiguredConnectors: PreconfiguredConnector[];
}

export interface ExecuteOptions extends Pick<ActionExecutorOptions, 'params' | 'source'> {
export interface ExecuteOptions
extends Pick<ActionExecutorOptions, 'params' | 'source' | 'relatedSavedObjects'> {
id: string;
relatedSavedObjects?: RelatedSavedObjects;
}

interface ActionTaskParams extends Pick<ActionExecutorOptions, 'params'> {
actionId: string;
interface ActionTaskParams
extends Pick<ActionExecutorOptions, 'actionId' | 'params' | 'relatedSavedObjects'> {
apiKey: string | null;
relatedSavedObjects?: RelatedSavedObjects;
}

export type BulkUnsecuredExecutionEnqueuer<T> = (
Expand Down

0 comments on commit 802dfa0

Please sign in to comment.