Skip to content

Commit

Permalink
Add actions for timetables API /to-combine endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Leitsi committed Dec 14, 2023
1 parent 3b602d9 commit 8a8cd58
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
15 changes: 15 additions & 0 deletions metadata/hsl/actions.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ type Mutation {
replaceTimetables(arg1: ReplaceTimetablesInput!): ReplaceTimetablesOutput
}

type Query {
toCombineTargetVehicleScheduleFrameId(
arg1: ToCombineTargetVehicleScheduleFrameIdInput!
): ToCombineTargetVehicleScheduleFrameIdOutput
}

type Query {
toReplaceVehicleScheduleFrameIds(
arg1: ToReplaceVehicleScheduleFrameIdsInput!
Expand All @@ -22,6 +28,11 @@ input ReplaceTimetablesInput {
targetPriority: Int!
}

input ToCombineTargetVehicleScheduleFrameIdInput {
stagingVehicleScheduleFrameId: uuid!
targetPriority: Int!
}

input ToReplaceVehicleScheduleFrameIdsInput {
stagingVehicleScheduleFrameId: uuid!
targetPriority: Int!
Expand All @@ -35,6 +46,10 @@ type ReplaceTimetablesOutput {
replacedVehicleScheduleFrameIds: [uuid]!
}

type ToCombineTargetVehicleScheduleFrameIdOutput {
toCombineTargetVehicleScheduleFrameId: uuid!
}

type ToReplaceVehicleScheduleFrameIdsOutput {
toReplaceVehicleScheduleFrameIds: [uuid]!
}
18 changes: 17 additions & 1 deletion metadata/hsl/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,21 @@ actions:
query_params: {}
template_engine: Kriti
version: 2
- name: toCombineTargetVehicleScheduleFrameId
definition:
kind: ""
handler: http://jore4-timetablesapi:8080/timetables/to-combine
request_transform:
method: GET
query_params:
stagingVehicleScheduleFrameId: "{{$body.input.arg1.stagingVehicleScheduleFrameId}}"
targetPriority: "{{$body.input.arg1.targetPriority}}"
request_headers:
add_headers: {}
remove_headers:
- content-type
template_engine: Kriti
version: 2
- name: toReplaceVehicleScheduleFrameIds
definition:
kind: ""
Expand All @@ -43,10 +58,11 @@ custom_types:
input_objects:
- name: CombineTimetablesInput
- name: ReplaceTimetablesInput
- name: ToCombineTargetVehicleScheduleFrameIdInput
- name: ToReplaceVehicleScheduleFrameIdsInput
objects:
- name: CombineTimetablesOutput
- name: ReplaceTimetablesOutput
- name: ToCombineTargetVehicleScheduleFrameIdOutput
- name: ToReplaceVehicleScheduleFrameIdsOutput

scalars: []

0 comments on commit 8a8cd58

Please sign in to comment.