Files
hatchet/api-contracts/v1/shared/condition.proto
abelanger5 00c4bbff09 feat(v1): new gRPC API endpoints (#1367)
* wip: api contracts

* feat: implement put workflow version endpoint

* add support for match existing data, get scaffolding in place for additional triggers

* create additional matches

* feat: durable sleep, user event matching

* update protos

* fix: working poc of user events, durable sleep

* add migration

* fix: migration column

* feat: durable event listener

* fix: skip overrides

* fix: input -> output
2025-03-23 18:58:20 -07:00

46 lines
1.1 KiB
Protocol Buffer

syntax = "proto3";
option go_package = "github.com/hatchet-dev/hatchet/internal/services/shared/proto/v1";
package v1;
enum Action {
CREATE = 0;
QUEUE = 1;
CANCEL = 2;
SKIP = 3;
}
message BaseMatchCondition {
string readable_data_key = 1;
Action action = 2;
string or_group_id = 3; // a UUID defining the OR group for this condition
string expression = 4;
}
message ParentOverrideMatchCondition {
BaseMatchCondition base = 1;
string parent_readable_id = 2;
}
message SleepMatchCondition {
BaseMatchCondition base = 1;
string sleep_for = 2; // a duration string indicating how long to sleep
}
message UserEventMatchCondition {
BaseMatchCondition base = 1;
string user_event_key = 2;
}
message TaskConditions {
repeated ParentOverrideMatchCondition parent_override_conditions = 1;
repeated SleepMatchCondition sleep_conditions = 2;
repeated UserEventMatchCondition user_event_conditions = 3;
}
message DurableEventListenerConditions {
repeated SleepMatchCondition sleep_conditions = 1;
repeated UserEventMatchCondition user_event_conditions = 2;
}