Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions src/bitdrift_public/protobuf/workflow/v1/save_field.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// api - bitdrift's client/server API definitions
// Copyright Bitdrift, Inc. All rights reserved.
//
// Use of this source code and APIs are governed by a source available license that can be found in
// the LICENSE file or at:
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt

syntax = "proto3";

package bitdrift_public.protobuf.workflow.v1;

// The log's field value, if available, will be snapped, and persisted to the workflow state.
// This can be looked up by ID by further transitions.
message SaveField {
string id = 1;

oneof save_field_type {
// Saves the value of a specified field from the log. If the field is not present, nothing
// is saved.
string field_name = 2;

// Saves the message of the log.
bool message = 3;
}

// If provided, this must specify a regex with a single capture group. The value of the
// captured group will be saved instead of the whole field value. If not provided, the whole
// field value will be saved. If the regex doesn't match the field value, nothing will be
// saved.
optional string regex_capture = 4;
}
22 changes: 1 addition & 21 deletions src/bitdrift_public/protobuf/workflow/v1/workflow.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ package bitdrift_public.protobuf.workflow.v1;
import "bitdrift_public/protobuf/matcher/v1/log_matcher.proto";
import "bitdrift_public/protobuf/state/v1/matcher.proto";
import "bitdrift_public/protobuf/state/v1/scope.proto";
import "bitdrift_public/protobuf/workflow/v1/save_field.proto";
import "validate/validate.proto";

// The wrapper for the list of workflows. Top-level item used to send information
Expand Down Expand Up @@ -110,27 +111,6 @@ message Workflow {
string id = 1;
}

// The log's field value, if available, will be snapped, and persisted to the workflow state.
// This can be looked up by ID by further transitions.
message SaveField {
string id = 1;

oneof save_field_type {
// Saves the value of a specified field from the log. If the field is not present, nothing
// is saved.
string field_name = 2;

// Saves the message of the log.
bool message = 3;
}

// If provided, this must specify a regex with a single capture group. The value of the
// captured group will be saved instead of the whole field value. If not provided, the whole
// field value will be saved. If the regex doesn't match the field value, nothing will be
// saved.
optional string regex_capture = 4;
}

// The configuration of a value extraction for a Sankey diagram.
message SankeyDiagramValueExtraction {
// The ID of the Sankey diagram to extract the value for.
Expand Down
Loading