-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappConfig.schema.ts
30 lines (30 loc) · 1.12 KB
/
appConfig.schema.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
type JSONContentTest = {
Key: string
Value: string | number | boolean
}
type TestConditions = {
/** Optional, strict string equality test for each entries in the Header map */
Header?: Record<string, any>
/** Optional, should always begin each property using $ */
JSONBody?: JSONContentTest[]
}
type Task = {
/** Optional, unique, must be `0-9a-zA-Z-_.`, used for logs entries. When not set, the task logging is disabled and does not appear in logs list HTML. */
TaskKey?: string
/** Optional, must be `0-9a-zA-Z-_.`, registers the route `{{RoutePrefix}}/tasks/{{Route}}`. When not set, the task webhook is directly to the tasks root endpoint. */
WebhookRoute?: string
/** Path to the task's executor executable */
RunnerExecutable: string
/** Arguments that will be passed to the task executor */
Args?: string[]
/** Optional, defaults to 60 seconds */
MaxRunSeconds?: number
/** Optional, must pass all criteria for the task to be run */
Tests?: TestConditions
}
export type ConfigSchema = {
Listen: string
AppName: string
RoutePrefix: string
Tasks: Task[]
}