Feat v0.3.0 workflow schema (#14)
All checks were successful
All checks were successful
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #14.
This commit is contained in:
@@ -54,13 +54,15 @@ type WorkflowStage struct {
|
||||
WorkflowID string `json:"workflow_id"`
|
||||
Ordinal int `json:"ordinal"`
|
||||
Name string `json:"name"`
|
||||
PersonaID *string `json:"persona_id,omitempty"`
|
||||
AssignmentTeamID *string `json:"assignment_team_id,omitempty"`
|
||||
FormTemplate json.RawMessage `json:"form_template"`
|
||||
StageMode string `json:"stage_mode"` // form_only | form_chat | review | custom
|
||||
HistoryMode string `json:"history_mode"` // full | summary | fresh
|
||||
StageMode string `json:"stage_mode"` // form | review | delegated | automated
|
||||
Audience string `json:"audience"` // team | public | system
|
||||
StageType string `json:"stage_type"` // simple | dynamic | automated
|
||||
AutoTransition bool `json:"auto_transition"`
|
||||
TransitionRules json.RawMessage `json:"transition_rules"`
|
||||
StageConfig json.RawMessage `json:"stage_config"`
|
||||
BranchRules json.RawMessage `json:"branch_rules"`
|
||||
StarlarkHook *string `json:"starlark_hook,omitempty"`
|
||||
SurfacePkgID *string `json:"surface_pkg_id,omitempty"`
|
||||
SLASeconds *int `json:"sla_seconds,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
@@ -69,18 +71,48 @@ type WorkflowStage struct {
|
||||
// ── Stage Mode Constants ────────────────────
|
||||
|
||||
const (
|
||||
StageModeCustom = "custom"
|
||||
StageModeFormOnly = "form_only"
|
||||
StageModeFormChat = "form_chat"
|
||||
StageModeReview = "review"
|
||||
StageModeForm = "form"
|
||||
StageModeReview = "review"
|
||||
StageModeDelegated = "delegated"
|
||||
StageModeAutomated = "automated"
|
||||
)
|
||||
|
||||
// ValidStageModes is the set of valid stage_mode values.
|
||||
var ValidStageModes = map[string]bool{
|
||||
StageModeCustom: true,
|
||||
StageModeFormOnly: true,
|
||||
StageModeFormChat: true,
|
||||
StageModeReview: true,
|
||||
StageModeForm: true,
|
||||
StageModeReview: true,
|
||||
StageModeDelegated: true,
|
||||
StageModeAutomated: true,
|
||||
}
|
||||
|
||||
// ── Stage Type Constants ────────────────────
|
||||
|
||||
const (
|
||||
StageTypeSimple = "simple"
|
||||
StageTypeDynamic = "dynamic"
|
||||
StageTypeAutomated = "automated"
|
||||
)
|
||||
|
||||
// ValidStageTypes is the set of valid stage_type values.
|
||||
var ValidStageTypes = map[string]bool{
|
||||
StageTypeSimple: true,
|
||||
StageTypeDynamic: true,
|
||||
StageTypeAutomated: true,
|
||||
}
|
||||
|
||||
// ── Audience Constants ──────────────────────
|
||||
|
||||
const (
|
||||
AudienceTeam = "team"
|
||||
AudiencePublic = "public"
|
||||
AudienceSystem = "system"
|
||||
)
|
||||
|
||||
// ValidAudiences is the set of valid audience values.
|
||||
var ValidAudiences = map[string]bool{
|
||||
AudienceTeam: true,
|
||||
AudiencePublic: true,
|
||||
AudienceSystem: true,
|
||||
}
|
||||
|
||||
// ── Typed Form Template ─────────────────────
|
||||
|
||||
Reference in New Issue
Block a user