Files
meeting-assistant/MeetingAssistant/Workflow/MeetingWorkflowRuleSchema.cs
T

61 lines
1.7 KiB
C#

namespace MeetingAssistant.Workflow;
internal static class MeetingWorkflowRuleSchema
{
public const string StepAddAttendee = "add_attendee";
public const string StepRemoveAttendee = "remove_attendee";
public const string StepAddProject = "add_project";
public const string StepSetProperty = "set_property";
public const string StepAddContext = "add_context";
public const string PropertyTitle = "title";
public const string PropertyMeetingTitle = "meeting.title";
public const string PropertyTranscriptLine = "transcript.line";
public const string ParameterTranscriptSpeaker = "transcript.speaker";
public const string PropertyAttendeeName = "attendee.name";
public static readonly string[] SupportedTriggerKeys =
[
"created",
"state_transition",
"speaker_identified",
"transcript_line",
"attendee_added"
];
public static readonly string[] SupportedConditionKeys =
[
"condition",
"and",
"or",
"not"
];
public static readonly string[] SupportedStepUses =
[
StepAddAttendee,
StepRemoveAttendee,
StepAddProject,
StepSetProperty,
StepAddContext
];
public static readonly string[] SupportedSetPropertyNames =
[
PropertyTitle,
PropertyMeetingTitle,
PropertyTranscriptLine,
PropertyAttendeeName
];
public static bool IsStep(string? value, string step)
{
return string.Equals(value?.Trim(), step, StringComparison.OrdinalIgnoreCase);
}
public static bool IsProperty(string? value, string property)
{
return string.Equals(value?.Trim(), property, StringComparison.OrdinalIgnoreCase);
}
}