diff --git a/packages/frinx-workflow-builder/api.graphql b/packages/frinx-workflow-builder/api.graphql index 0859e7aa1..b094c4afd 100644 --- a/packages/frinx-workflow-builder/api.graphql +++ b/packages/frinx-workflow-builder/api.graphql @@ -1,6 +1,50 @@ ### This file was generated by Nexus Schema ### Do not make changes to this file directly +type ActionCompleteTask { + output: String + taskId: String + taskRefName: String + workflowId: String +} + +input ActionCompleteTaskInput { + output: String + taskId: String + taskRefName: String + workflowId: String +} + +type ActionFailTask { + output: String + taskId: String + taskRefName: String + workflowId: String +} + +input ActionFailTaskInput { + output: String + taskId: String + taskRefName: String + workflowId: String +} + +type ActionStartWorkflow { + correlationId: String + input: String + name: String + taskToDomain: String + version: Int +} + +input ActionStartWorkflowInput { + correlationId: String + input: String + name: String + taskToDomain: String + version: Int +} + input AddBlueprintInput { name: String! template: String! @@ -82,7 +126,6 @@ type Blueprint implements Node { name: String! template: String! updatedAt: String! - version: Int } type BlueprintConnection { @@ -153,7 +196,6 @@ type Country implements Node { code: String! id: ID! name: String! - version: Int } type CountryConnection { @@ -167,6 +209,23 @@ type CountryEdge { node: Country! } +input CreateEventHandlerInput { + actions: [EventHandlerActionInput!]! + condition: String + evaluatorType: String + + """ + The event is immutable and cannot be changed. + """ + event: String! + isActive: Boolean + + """ + The name is immutable and cannot be changed. Also it must be unique. + """ + name: String! +} + input CreateLabelInput { name: String! } @@ -187,6 +246,32 @@ input CreateScheduleInput { workflowVersion: String! } +input CreateTaskDefinitionInput { + accessPolicy: String + backoffScaleFactor: Int + concurrentExecLimit: Int + createdBy: String + description: String + executionNameSpace: String + inputKeys: [String!] + inputTemplate: String + isolationGroupId: String + name: String! + outputKeys: [String!] + ownerApp: String + ownerEmail: String + pollTimeoutSeconds: Int + rateLimitFrequencyInSeconds: Int + rateLimitPerFrequency: Int + responseTimeoutSeconds: Int + retryCount: Int + retryDelaySeconds: Int + retryLogic: RetryLogic + timeoutPolicy: TaskTimeoutPolicy + timeoutSeconds: Int! + updatedBy: String +} + type CreateTransactionPayload { transactionId: String } @@ -253,7 +338,6 @@ type Device implements Node { source: DeviceSource! updatedAt: String! vendor: String - version: Int zone: Zone! } @@ -312,6 +396,56 @@ input EditWorkflowScheduleInput { workflowVersion: String } +type EventHandler implements Node { + actions: [EventHandlerAction!]! + condition: String + evaluatorType: String + + """ + The event is immutable and cannot be changed. + """ + event: String! + id: ID! + isActive: Boolean + + """ + The name is immutable and cannot be changed. Also it must be unique. + """ + name: String! +} + +type EventHandlerAction { + action: EventHandlerActionEnum + completeTask: ActionCompleteTask + expandInlineJSON: Boolean + failTask: ActionFailTask + startWorkflow: ActionStartWorkflow +} + +enum EventHandlerActionEnum { + complete_task + fail_task + start_workflow +} + +input EventHandlerActionInput { + action: EventHandlerActionEnum + completeTask: ActionCompleteTaskInput + expandInlineJSON: Boolean + failTask: ActionFailTaskInput + startWorkflow: ActionStartWorkflowInput +} + +type EventHandlerConnection { + edges: [EventHandlerEdge!] + pageInfo: PageInfo! +} + +type EventHandlerEdge { + cursor: String! + node: EventHandler! +} + input ExecuteNewWorkflowInput { correlationId: String externalInputPayloadStoragePath: String @@ -353,7 +487,6 @@ type ExecutedWorkflow implements Node { updatedAt: String updatedBy: String variables: String - version: Int workflowDefinition: Workflow workflowId: String! workflowName: String @@ -421,7 +554,6 @@ type ExecutedWorkflowTask implements Node { taskId: String taskType: String updateTime: String - version: Int workflowType: String } @@ -442,10 +574,28 @@ input FilterDevicesInput { labels: [String!] } +input FilterEventHandlerInput { + evaluatorType: String + event: String + isActive: Boolean +} + +input FilterPollDataInput { + afterDate: String + beforeDate: String + domain: String + queueName: String + workerId: String +} + input FilterPoolsInput { poolName: String } +input FilterTaskDefinitionsInput { + keyword: String +} + input FilterTopologyInput { labels: [String!] } @@ -525,7 +675,6 @@ type Label implements Node { id: ID! name: String! updatedAt: String! - version: Int } type LabelConnection { @@ -545,7 +694,6 @@ type Location implements Node { id: ID! name: String! updatedAt: String! - version: Int } type LocationConnection { @@ -573,14 +721,18 @@ type Mutation { bulkTerminateWorkflow(input: BulkOperationInput!): BulkOperationResponse closeTransaction(deviceId: String!, transactionId: String!): CloseTransactionPayload! commitConfig(input: CommitConfigInput!, transactionId: String!): CommitConfigPayload! + createEventHandler(input: CreateEventHandlerInput!): EventHandler createLabel(input: CreateLabelInput!): CreateLabelPayload! + createTaskDefinition(input: CreateTaskDefinitionInput!): TaskDefinition createTransaction(deviceId: String!): CreateTransactionPayload! createWorkflow(input: CreateWorkflowInput!): CreateWorkflowPayload! deleteBlueprint(id: String!): DeleteBlueprintPayload! deleteDevice(id: String!): DeleteDevicePayload! + deleteEventHandler(id: String!): IsOkResponse deleteLabel(id: String!): DeleteLabelPayload! deleteSchedule(id: String!): IsOkResponse deleteSnapshot(input: DeleteSnapshotInput!): DeleteSnapshotPayload + deleteTask(name: String!): IsOkResponse deleteWorkflow(input: DeleteWorkflowInput!): DeleteWorkflowPayload! editWorkflowSchedule(id: String!, input: EditWorkflowScheduleInput!): Schedule executeNewWorkflow(input: StartWorkflowRequestInput!): String @@ -602,6 +754,7 @@ type Mutation { updateBlueprint(id: String!, input: UpdateBlueprintInput!): UpdateBlueprintPayload! updateDataStore(deviceId: String!, input: UpdateDataStoreInput!, transactionId: String!): UpdateDataStorePayload! updateDevice(id: String!, input: UpdateDeviceInput!): UpdateDevicePayload! + updateEventHandler(event: String!, input: UpdateEventHandlerInput!, name: String!): EventHandler updateGraphNodeCoordinates(input: [GraphNodeCoordinatesInput!]!): UpdateGraphNodeCoordinatesPayload! updateWorkflow(id: String!, input: UpdateWorkflowInput!): UpdateWorkflowPayload! } @@ -625,6 +778,11 @@ type NetNode { networks: [NetNetwork!]! } +type NetRoutingPaths { + alternativePaths: [[String!]!]! + shortestPath: [String!]! +} + type NetTopology { edges: [GraphEdge!]! nodes: [NetNode!]! @@ -632,7 +790,6 @@ type NetTopology { interface Node { id: ID! - version: Int } type OutputParameter { @@ -657,13 +814,36 @@ input PaginationArgs { start: Int! } +type PollData { + domain: String + id: ID! + lastPollTime: String + queueName: String + workerId: String +} + +type PollDataConnection { + edges: [PollDataEdge] + pageInfo: PageInfo + totalCount: Int +} + +type PollDataEdge { + cursor: String + node: PollData +} + +input PollsOrderByInput { + direction: SortPollsDirection! + sortKey: SortPollsBy! +} + type Pool implements Node { id: ID! name: String! poolType: PoolType! resourceType: ResourceType! tags: [Tag!]! - version: Int } type PoolConnection { @@ -696,11 +876,35 @@ type Query { last: Int orderBy: DeviceOrderByInput ): DeviceConnection! + eventHandler(event: String!, name: String!): EventHandler + eventHandlers( + after: String + before: String + filter: FilterEventHandlerInput + first: Int + last: Int + ): EventHandlerConnection + eventHandlersByEvent( + activeOnly: Boolean + after: String + before: String + event: String! + first: Int + last: Int + ): EventHandlerConnection executedWorkflows(pagination: PaginationArgs, searchQuery: ExecutedWorkflowSearchInput): ExecutedWorkflowConnection labels(after: String, before: String, first: Int, last: Int): LabelConnection! locations(after: String, before: String, first: Int, last: Int): LocationConnection! netTopology: NetTopology node(id: ID!, version: Int): Node + pollData( + after: String + before: String + filter: FilterPollDataInput + first: Int + last: Int + orderBy: PollsOrderByInput! + ): PollDataConnection pools( after: String before: String @@ -710,7 +914,14 @@ type Query { resourceTypeId: String ): PoolConnection! schedules(after: String, before: String, filter: ScheduleFilterInput, first: Int, last: Int): ScheduleConnection! - taskDefinitions: [TaskDefinition!]! + shortestPath(from: String!, to: String!): NetRoutingPaths + taskDefinitions( + after: String + before: String + filter: FilterTaskDefinitionsInput + first: Int + last: Int + ): TaskDefinitionConnection! topology(filter: FilterTopologyInput): Topology topologyCommonNodes(nodes: [String!]!): TopologyCommonNodes topologyVersionData(version: String!): TopologyVersionData! @@ -781,7 +992,6 @@ type Schedule implements Node { performFromDate: String! performTillDate: String! status: ScheduleStatus! - version: Int workflowContext: String! workflowName: String! workflowVersion: String! @@ -828,6 +1038,17 @@ enum SortDirection { DESC } +enum SortPollsBy { + lastPollTime + queueName + workerId +} + +enum SortPollsDirection { + asc + desc +} + input StartWorkflowRequestInput { workflow: ExecuteNewWorkflowInput! workflowDefinition: WorkflowDefinitionInput @@ -853,11 +1074,12 @@ type Tag { tag: String! } -type TaskDefinition { +type TaskDefinition implements Node { concurrentExecLimit: Int createdAt: String createdBy: String description: String + id: ID! inputKeys: [String!] inputTemplate: String name: String! @@ -876,6 +1098,17 @@ type TaskDefinition { updatedBy: String } +type TaskDefinitionConnection { + edges: [TaskDefinitionEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type TaskDefinitionEdge { + cursor: String! + node: TaskDefinition! +} + input TaskInput { asyncComplete: Boolean decisionCases: String @@ -985,6 +1218,13 @@ type UpdateDevicePayload { device: Device } +input UpdateEventHandlerInput { + actions: [EventHandlerActionInput!] + condition: String + evaluatorType: String + isActive: Boolean +} + type UpdateGraphNodeCoordinatesPayload { deviceNames: [String!]! } @@ -1102,7 +1342,6 @@ type Zone implements Node { id: ID! name: String! updatedAt: String! - version: Int } type ZoneEdge { diff --git a/packages/frinx-workflow-builder/src/__generated__/graphql.ts b/packages/frinx-workflow-builder/src/__generated__/graphql.ts index 606cd8e9c..86a10b52d 100644 --- a/packages/frinx-workflow-builder/src/__generated__/graphql.ts +++ b/packages/frinx-workflow-builder/src/__generated__/graphql.ts @@ -16,6 +16,53 @@ export type Scalars = { Upload: any; }; +export type ActionCompleteTask = { + __typename?: 'ActionCompleteTask'; + output: Maybe; + taskId: Maybe; + taskRefName: Maybe; + workflowId: Maybe; +}; + +export type ActionCompleteTaskInput = { + output?: InputMaybe; + taskId?: InputMaybe; + taskRefName?: InputMaybe; + workflowId?: InputMaybe; +}; + +export type ActionFailTask = { + __typename?: 'ActionFailTask'; + output: Maybe; + taskId: Maybe; + taskRefName: Maybe; + workflowId: Maybe; +}; + +export type ActionFailTaskInput = { + output?: InputMaybe; + taskId?: InputMaybe; + taskRefName?: InputMaybe; + workflowId?: InputMaybe; +}; + +export type ActionStartWorkflow = { + __typename?: 'ActionStartWorkflow'; + correlationId: Maybe; + input: Maybe; + name: Maybe; + taskToDomain: Maybe; + version: Maybe; +}; + +export type ActionStartWorkflowInput = { + correlationId?: InputMaybe; + input?: InputMaybe; + name?: InputMaybe; + taskToDomain?: InputMaybe; + version?: InputMaybe; +}; + export type AddBlueprintInput = { name: Scalars['String']; template: Scalars['String']; @@ -104,7 +151,6 @@ export type Blueprint = Node & { name: Scalars['String']; template: Scalars['String']; updatedAt: Scalars['String']; - version: Maybe; }; export type BlueprintConnection = { @@ -186,7 +232,6 @@ export type Country = Node & { code: Scalars['String']; id: Scalars['ID']; name: Scalars['String']; - version: Maybe; }; export type CountryConnection = { @@ -202,6 +247,17 @@ export type CountryEdge = { node: Country; }; +export type CreateEventHandlerInput = { + actions: Array; + condition?: InputMaybe; + evaluatorType?: InputMaybe; + /** The event is immutable and cannot be changed. */ + event: Scalars['String']; + isActive?: InputMaybe; + /** The name is immutable and cannot be changed. Also it must be unique. */ + name: Scalars['String']; +}; + export type CreateLabelInput = { name: Scalars['String']; }; @@ -223,6 +279,32 @@ export type CreateScheduleInput = { workflowVersion: Scalars['String']; }; +export type CreateTaskDefinitionInput = { + accessPolicy?: InputMaybe; + backoffScaleFactor?: InputMaybe; + concurrentExecLimit?: InputMaybe; + createdBy?: InputMaybe; + description?: InputMaybe; + executionNameSpace?: InputMaybe; + inputKeys?: InputMaybe>; + inputTemplate?: InputMaybe; + isolationGroupId?: InputMaybe; + name: Scalars['String']; + outputKeys?: InputMaybe>; + ownerApp?: InputMaybe; + ownerEmail?: InputMaybe; + pollTimeoutSeconds?: InputMaybe; + rateLimitFrequencyInSeconds?: InputMaybe; + rateLimitPerFrequency?: InputMaybe; + responseTimeoutSeconds?: InputMaybe; + retryCount?: InputMaybe; + retryDelaySeconds?: InputMaybe; + retryLogic?: InputMaybe; + timeoutPolicy?: InputMaybe; + timeoutSeconds: Scalars['Int']; + updatedBy?: InputMaybe; +}; + export type CreateTransactionPayload = { __typename?: 'CreateTransactionPayload'; transactionId: Maybe; @@ -298,7 +380,6 @@ export type Device = Node & { source: DeviceSource; updatedAt: Scalars['String']; vendor: Maybe; - version: Maybe; zone: Zone; }; @@ -366,6 +447,53 @@ export type EditWorkflowScheduleInput = { workflowVersion?: InputMaybe; }; +export type EventHandler = Node & { + __typename?: 'EventHandler'; + actions: Array; + condition: Maybe; + evaluatorType: Maybe; + /** The event is immutable and cannot be changed. */ + event: Scalars['String']; + id: Scalars['ID']; + isActive: Maybe; + /** The name is immutable and cannot be changed. Also it must be unique. */ + name: Scalars['String']; +}; + +export type EventHandlerAction = { + __typename?: 'EventHandlerAction'; + action: Maybe; + completeTask: Maybe; + expandInlineJSON: Maybe; + failTask: Maybe; + startWorkflow: Maybe; +}; + +export type EventHandlerActionEnum = + | 'complete_task' + | 'fail_task' + | 'start_workflow'; + +export type EventHandlerActionInput = { + action?: InputMaybe; + completeTask?: InputMaybe; + expandInlineJSON?: InputMaybe; + failTask?: InputMaybe; + startWorkflow?: InputMaybe; +}; + +export type EventHandlerConnection = { + __typename?: 'EventHandlerConnection'; + edges: Maybe>; + pageInfo: PageInfo; +}; + +export type EventHandlerEdge = { + __typename?: 'EventHandlerEdge'; + cursor: Scalars['String']; + node: EventHandler; +}; + export type ExecuteNewWorkflowInput = { correlationId?: InputMaybe; externalInputPayloadStoragePath?: InputMaybe; @@ -405,7 +533,6 @@ export type ExecutedWorkflow = Node & { updatedAt: Maybe; updatedBy: Maybe; variables: Maybe; - version: Maybe; workflowDefinition: Maybe; workflowId: Scalars['String']; workflowName: Maybe; @@ -475,7 +602,6 @@ export type ExecutedWorkflowTask = Node & { taskId: Maybe; taskType: Maybe; updateTime: Maybe; - version: Maybe; workflowType: Maybe; }; @@ -495,10 +621,28 @@ export type FilterDevicesInput = { labels?: InputMaybe>; }; +export type FilterEventHandlerInput = { + evaluatorType?: InputMaybe; + event?: InputMaybe; + isActive?: InputMaybe; +}; + +export type FilterPollDataInput = { + afterDate?: InputMaybe; + beforeDate?: InputMaybe; + domain?: InputMaybe; + queueName?: InputMaybe; + workerId?: InputMaybe; +}; + export type FilterPoolsInput = { poolName?: InputMaybe; }; +export type FilterTaskDefinitionsInput = { + keyword?: InputMaybe; +}; + export type FilterTopologyInput = { labels?: InputMaybe>; }; @@ -586,7 +730,6 @@ export type Label = Node & { id: Scalars['ID']; name: Scalars['String']; updatedAt: Scalars['String']; - version: Maybe; }; export type LabelConnection = { @@ -609,7 +752,6 @@ export type Location = Node & { id: Scalars['ID']; name: Scalars['String']; updatedAt: Scalars['String']; - version: Maybe; }; export type LocationConnection = { @@ -640,14 +782,18 @@ export type Mutation = { bulkTerminateWorkflow: Maybe; closeTransaction: CloseTransactionPayload; commitConfig: CommitConfigPayload; + createEventHandler: Maybe; createLabel: CreateLabelPayload; + createTaskDefinition: Maybe; createTransaction: CreateTransactionPayload; createWorkflow: CreateWorkflowPayload; deleteBlueprint: DeleteBlueprintPayload; deleteDevice: DeleteDevicePayload; + deleteEventHandler: Maybe; deleteLabel: DeleteLabelPayload; deleteSchedule: Maybe; deleteSnapshot: Maybe; + deleteTask: Maybe; deleteWorkflow: DeleteWorkflowPayload; editWorkflowSchedule: Maybe; executeNewWorkflow: Maybe; @@ -669,6 +815,7 @@ export type Mutation = { updateBlueprint: UpdateBlueprintPayload; updateDataStore: UpdateDataStorePayload; updateDevice: UpdateDevicePayload; + updateEventHandler: Maybe; updateGraphNodeCoordinates: UpdateGraphNodeCoordinatesPayload; updateWorkflow: UpdateWorkflowPayload; }; @@ -743,11 +890,21 @@ export type MutationCommitConfigArgs = { }; +export type MutationCreateEventHandlerArgs = { + input: CreateEventHandlerInput; +}; + + export type MutationCreateLabelArgs = { input: CreateLabelInput; }; +export type MutationCreateTaskDefinitionArgs = { + input: CreateTaskDefinitionInput; +}; + + export type MutationCreateTransactionArgs = { deviceId: Scalars['String']; }; @@ -768,6 +925,11 @@ export type MutationDeleteDeviceArgs = { }; +export type MutationDeleteEventHandlerArgs = { + id: Scalars['String']; +}; + + export type MutationDeleteLabelArgs = { id: Scalars['String']; }; @@ -783,6 +945,11 @@ export type MutationDeleteSnapshotArgs = { }; +export type MutationDeleteTaskArgs = { + name: Scalars['String']; +}; + + export type MutationDeleteWorkflowArgs = { input: DeleteWorkflowInput; }; @@ -899,6 +1066,13 @@ export type MutationUpdateDeviceArgs = { }; +export type MutationUpdateEventHandlerArgs = { + event: Scalars['String']; + input: UpdateEventHandlerInput; + name: Scalars['String']; +}; + + export type MutationUpdateGraphNodeCoordinatesArgs = { input: Array; }; @@ -931,6 +1105,12 @@ export type NetNode = { networks: Array; }; +export type NetRoutingPaths = { + __typename?: 'NetRoutingPaths'; + alternativePaths: Array>; + shortestPath: Array; +}; + export type NetTopology = { __typename?: 'NetTopology'; edges: Array; @@ -939,7 +1119,6 @@ export type NetTopology = { export type Node = { id: Scalars['ID']; - version: Maybe; }; export type OutputParameter = { @@ -966,6 +1145,33 @@ export type PaginationArgs = { start: Scalars['Int']; }; +export type PollData = { + __typename?: 'PollData'; + domain: Maybe; + id: Scalars['ID']; + lastPollTime: Maybe; + queueName: Maybe; + workerId: Maybe; +}; + +export type PollDataConnection = { + __typename?: 'PollDataConnection'; + edges: Maybe>>; + pageInfo: Maybe; + totalCount: Maybe; +}; + +export type PollDataEdge = { + __typename?: 'PollDataEdge'; + cursor: Maybe; + node: Maybe; +}; + +export type PollsOrderByInput = { + direction: SortPollsDirection; + sortKey: SortPollsBy; +}; + export type Pool = Node & { __typename?: 'Pool'; id: Scalars['ID']; @@ -973,7 +1179,6 @@ export type Pool = Node & { poolType: PoolType; resourceType: ResourceType; tags: Array; - version: Maybe; }; export type PoolConnection = { @@ -1001,14 +1206,19 @@ export type Query = { countries: CountryConnection; dataStore: Maybe; devices: DeviceConnection; + eventHandler: Maybe; + eventHandlers: Maybe; + eventHandlersByEvent: Maybe; executedWorkflows: Maybe; labels: LabelConnection; locations: LocationConnection; netTopology: Maybe; node: Maybe; + pollData: Maybe; pools: PoolConnection; schedules: ScheduleConnection; - taskDefinitions: Array; + shortestPath: Maybe; + taskDefinitions: TaskDefinitionConnection; topology: Maybe; topologyCommonNodes: Maybe; topologyVersionData: TopologyVersionData; @@ -1060,6 +1270,31 @@ export type QueryDevicesArgs = { }; +export type QueryEventHandlerArgs = { + event: Scalars['String']; + name: Scalars['String']; +}; + + +export type QueryEventHandlersArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + + +export type QueryEventHandlersByEventArgs = { + activeOnly?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + event: Scalars['String']; + first?: InputMaybe; + last?: InputMaybe; +}; + + export type QueryExecutedWorkflowsArgs = { pagination?: InputMaybe; searchQuery?: InputMaybe; @@ -1088,6 +1323,16 @@ export type QueryNodeArgs = { }; +export type QueryPollDataArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy: PollsOrderByInput; +}; + + export type QueryPoolsArgs = { after?: InputMaybe; before?: InputMaybe; @@ -1107,6 +1352,21 @@ export type QuerySchedulesArgs = { }; +export type QueryShortestPathArgs = { + from: Scalars['String']; + to: Scalars['String']; +}; + + +export type QueryTaskDefinitionsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + + export type QueryTopologyArgs = { filter?: InputMaybe; }; @@ -1194,7 +1454,6 @@ export type Schedule = Node & { performFromDate: Scalars['String']; performTillDate: Scalars['String']; status: ScheduleStatus; - version: Maybe; workflowContext: Scalars['String']; workflowName: Scalars['String']; workflowVersion: Scalars['String']; @@ -1241,6 +1500,15 @@ export type SortDirection = | 'ASC' | 'DESC'; +export type SortPollsBy = + | 'lastPollTime' + | 'queueName' + | 'workerId'; + +export type SortPollsDirection = + | 'asc' + | 'desc'; + export type StartWorkflowRequestInput = { workflow: ExecuteNewWorkflowInput; workflowDefinition?: InputMaybe; @@ -1282,12 +1550,13 @@ export type Tag = { tag: Scalars['String']; }; -export type TaskDefinition = { +export type TaskDefinition = Node & { __typename?: 'TaskDefinition'; concurrentExecLimit: Maybe; createdAt: Maybe; createdBy: Maybe; description: Maybe; + id: Scalars['ID']; inputKeys: Maybe>; inputTemplate: Maybe; name: Scalars['String']; @@ -1306,6 +1575,19 @@ export type TaskDefinition = { updatedBy: Maybe; }; +export type TaskDefinitionConnection = { + __typename?: 'TaskDefinitionConnection'; + edges: Array; + pageInfo: PageInfo; + totalCount: Scalars['Int']; +}; + +export type TaskDefinitionEdge = { + __typename?: 'TaskDefinitionEdge'; + cursor: Scalars['String']; + node: TaskDefinition; +}; + export type TaskInput = { asyncComplete?: InputMaybe; decisionCases?: InputMaybe; @@ -1424,6 +1706,13 @@ export type UpdateDevicePayload = { device: Maybe; }; +export type UpdateEventHandlerInput = { + actions?: InputMaybe>; + condition?: InputMaybe; + evaluatorType?: InputMaybe; + isActive?: InputMaybe; +}; + export type UpdateGraphNodeCoordinatesPayload = { __typename?: 'UpdateGraphNodeCoordinatesPayload'; deviceNames: Array; @@ -1542,7 +1831,6 @@ export type Zone = Node & { id: Scalars['ID']; name: Scalars['String']; updatedAt: Scalars['String']; - version: Maybe; }; export type ZoneEdge = { @@ -1566,12 +1854,12 @@ export type WorkflowQueryVariables = Exact<{ }>; -export type WorkflowQuery = { __typename?: 'Query', workflow: { __typename?: 'Blueprint' } | { __typename?: 'Country' } | { __typename?: 'Device' } | { __typename?: 'ExecutedWorkflow' } | { __typename?: 'ExecutedWorkflowTask' } | { __typename?: 'Label' } | { __typename?: 'Location' } | { __typename?: 'Pool' } | { __typename?: 'Schedule' } | { __typename?: 'Workflow', id: string, name: string, description: string | null, version: number | null, createdAt: string | null, updatedAt: string | null, createdBy: string | null, updatedBy: string | null, tasks: string | null, hasSchedule: boolean | null, inputParameters: Array | null, restartable: boolean | null, timeoutSeconds: number, timeoutPolicy: TimeoutPolicy | null, outputParameters: Array<{ __typename?: 'OutputParameter', key: string, value: string }> | null } | { __typename?: 'Zone' } | null }; +export type WorkflowQuery = { __typename?: 'Query', workflow: { __typename?: 'Blueprint' } | { __typename?: 'Country' } | { __typename?: 'Device' } | { __typename?: 'EventHandler' } | { __typename?: 'ExecutedWorkflow' } | { __typename?: 'ExecutedWorkflowTask' } | { __typename?: 'Label' } | { __typename?: 'Location' } | { __typename?: 'Pool' } | { __typename?: 'Schedule' } | { __typename?: 'TaskDefinition' } | { __typename?: 'Workflow', id: string, name: string, description: string | null, version: number | null, createdAt: string | null, updatedAt: string | null, createdBy: string | null, updatedBy: string | null, tasks: string | null, hasSchedule: boolean | null, inputParameters: Array | null, restartable: boolean | null, timeoutSeconds: number, timeoutPolicy: TimeoutPolicy | null, outputParameters: Array<{ __typename?: 'OutputParameter', key: string, value: string }> | null } | { __typename?: 'Zone' } | null }; export type WorkflowListQueryVariables = Exact<{ [key: string]: never; }>; -export type WorkflowListQuery = { __typename?: 'Query', workflows: { __typename?: 'WorkflowConnection', totalCount: number, edges: Array<{ __typename?: 'WorkflowEdge', cursor: string, node: { __typename?: 'Workflow', id: string, name: string, description: string | null, version: number | null, createdAt: string | null, updatedAt: string | null, createdBy: string | null, updatedBy: string | null, tasks: string | null, hasSchedule: boolean | null, inputParameters: Array | null, restartable: boolean | null, timeoutSeconds: number, timeoutPolicy: TimeoutPolicy | null, outputParameters: Array<{ __typename?: 'OutputParameter', key: string, value: string }> | null } }>, pageInfo: { __typename?: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } }, taskDefinitions: Array<{ __typename?: 'TaskDefinition', name: string, description: string | null, createdAt: string | null, retryCount: number | null, timeoutSeconds: number, timeoutPolicy: TaskTimeoutPolicy | null, retryLogic: RetryLogic | null, retryDelaySeconds: number | null, responseTimeoutSeconds: number | null, ownerEmail: string | null }> }; +export type WorkflowListQuery = { __typename?: 'Query', workflows: { __typename?: 'WorkflowConnection', totalCount: number, edges: Array<{ __typename?: 'WorkflowEdge', cursor: string, node: { __typename?: 'Workflow', id: string, name: string, description: string | null, version: number | null, createdAt: string | null, updatedAt: string | null, createdBy: string | null, updatedBy: string | null, tasks: string | null, hasSchedule: boolean | null, inputParameters: Array | null, restartable: boolean | null, timeoutSeconds: number, timeoutPolicy: TimeoutPolicy | null, outputParameters: Array<{ __typename?: 'OutputParameter', key: string, value: string }> | null } }>, pageInfo: { __typename?: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } }, taskDefinitions: { __typename?: 'TaskDefinitionConnection', edges: Array<{ __typename?: 'TaskDefinitionEdge', node: { __typename?: 'TaskDefinition', name: string, description: string | null, createdAt: string | null, retryCount: number | null, timeoutSeconds: number, timeoutPolicy: TaskTimeoutPolicy | null, retryLogic: RetryLogic | null, retryDelaySeconds: number | null, responseTimeoutSeconds: number | null, ownerEmail: string | null } }> } }; export type UpdateWorkflowMutationVariables = Exact<{ updateWorkflowId: Scalars['String']; diff --git a/packages/frinx-workflow-builder/src/root.tsx b/packages/frinx-workflow-builder/src/root.tsx index 23c928771..699362a71 100644 --- a/packages/frinx-workflow-builder/src/root.tsx +++ b/packages/frinx-workflow-builder/src/root.tsx @@ -82,16 +82,20 @@ const WORKFLOW_LIST_QUERY = gql` totalCount } taskDefinitions { - name - description - createdAt - retryCount - timeoutSeconds - timeoutPolicy - retryLogic - retryDelaySeconds - responseTimeoutSeconds - ownerEmail + edges { + node { + name + description + createdAt + retryCount + timeoutSeconds + timeoutPolicy + retryLogic + retryDelaySeconds + responseTimeoutSeconds + ownerEmail + } + } } } ${WorkflowFragment} @@ -329,7 +333,7 @@ const Root: VoidFunctionComponent = ({ onClose }) => { workflow={workflow} onWorkflowChange={handleWorkflowChange} workflows={clientWorkflowList} - taskDefinitions={taskDefinitions} + taskDefinitions={taskDefinitions.edges.map((e) => e.node)} onFileImport={handleFileImport} onFileExport={handleFileExport} onWorkflowDelete={handleWorkflowDelete}