import { Action, Component, DataSource, Trigger, TriggerPayload } from "../../serverTypes"; import { ConfigVarResultCollection, Inputs } from "../../types"; import { TriggerResult } from "../../types/TriggerResult"; export interface ComponentNode { id: string; label: string; description: string; signature: string; key: string; public: boolean; actions: { nodes: ActionNode[]; }; connections: { nodes: ConnectionNode[]; }; } export interface ActionNode { isDataSource: boolean; isDetailDataSource: boolean; dataSourceType: string | null; isTrigger: boolean; isCommonTrigger: boolean; key: string; label: string; description: string; inputs: { nodes: InputNode[]; }; examplePayload: string | null; } export interface ConnectionNode { key: string; label: string; comments: string; inputs: { nodes: InputNode[]; }; } export interface InputNode { key: string; label: string; type: string; required: boolean; default: any; collection: string; shown: boolean; onPremiseControlled: boolean; } export type FormattedAction = Pick; export type FormattedTrigger = TriggerResult> = Pick, "key" | "display" | "inputs">; export type FormattedDataSource = Pick; export type ComponentForManifest = TriggerResult> = Pick, "key" | "public" | "display" | "connections"> & { actions: Record; triggers: Record | FormattedTrigger>; dataSources: Record; }; export type ComponentActionsQueryResponse = { data: { data: { actions: { nodes: Array; pageInfo: { hasNextPage: boolean; endCursor: string; }; }; }; }; };