{{define "content"}} {{$i := .Data.Integration}}

Integrations › {{$i.Kind}}

{{$i.Name}} {{$i.Status}}

Mind {{.Data.MindName}} · trust {{$i.Trust}} · every {{$i.Interval}}{{if $i.SecretSet}} · secret set{{end}}{{with $i.LastError}} · {{.}}{{end}}

{{if and (.Principal.User.Role.AtLeast "operator") (ne $i.Kind "webhook")}}
{{end}} {{if .Principal.User.Role.AtLeast "administrator"}}
{{end}}

Configuration

{{pretty (jsonOf $i.Config)}}
{{if eq $i.Kind "webhook"}}

Delivery

POST to /api/v1/webhooks/{{$i.ID}} with headers X-Noema-Timestamp (unix seconds) and X-Noema-Signature: sha256=HMAC_SHA256(secret, timestamp + "." + body). Body: {"title":"…","text":"…","reference":"…","salience":0.6}. Unsigned deliveries and replays are refused.

{{end}} {{if $i.State}}

State

{{pretty (jsonOf $i.State)}}
{{end}}

Recent runs

{{if .Data.Runs}}{{range .Data.Runs}}{{end}}
StartedItemsObservationsErrorsNotes
{{.StartedAt.Local.Format "01-02 15:04:05"}}{{.Items}}{{.Observations}}{{.Errors}}{{with .Error}}{{.}} {{end}}{{trunc (printf "%s" .Notes) 160}}
{{else}}

No runs yet.

{{end}}
{{if .Data.Documents}}

Ingested documents

{{range .Data.Documents}}{{end}}
StatusTitleTypeBytesCharsReference
{{.Status}}{{with .Error}}
{{.}}
{{end}}
{{.Title}}{{.ContentType}}{{.SizeBytes}}{{.ExtractedChars}}{{trunc .Reference 60}}{{if .EventID}}event{{end}}
{{end}} {{end}}