From ApplicationSettings.schema.yaml (ratatoskr/ApplicationSettings.schema
)
---
$id: https://skeleton.botmd.io/ratatoskr/ApplicationSettings.schema
$schema: http://json-schema.org/draft-07/schema#
title: Application Settings
description: >-
`ProviderApplication.application_settings` are used by `ratatoskr.applications.AbstractApplications`s.
This field is not exposed to frontend.
This is where we store secret credentials.
type: object
additionalProperties: false
properties:
action_state:
$ref: "#/definitions/action_state"
chatterbox:
$ref: "#/definitions/chatterbox"
jarvis:
$ref: "#/definitions/jarvis"
formsg_otp:
$ref: "#/definitions/formsg_otp"
healthcheck:
$ref: "#/definitions/healthcheck"
message_testing:
$ref: "#/definitions/message_testing"
noop:
$ref: "#/definitions/noop"
otp_forwarding:
$ref: "#/definitions/otp_forwarding"
ratatoskr:
$ref: "#/definitions/ratatoskr"
rooster:
$ref: "#/definitions/rooster"
#end properties
definitions:
action_state:
title: Action State
description: Application settings relating to action states.
type: object
additionalProperties: false
properties:
execute_automatically:
title: Execute Automatically
description: Whether to execute the action state automatically and bypass the original delivery handling for the application. Defaults to the application class variable `action_state_execute_automatically` (which is set to `true`).
type: boolean
#end properties
chatterbox:
title: Chatterbox Application Settings
description: Application settings for chatterbox applications. This is used to configure Chatterbox specific settings such as restricted organizations.
type: object
additionalProperties: false
properties:
user_info:
title: User Info
description: This user info will be augmented with user id, device id, chatroom id, and sent to Chatterbox as part of the `user_info` object.
type: object
additionalProperties: true
profile_input:
title: Profile Input
description: This profile input will be used for Jarvis. This should usually be overwritten with the appropriate information. Currently, only `hospital` application is supported.
type: object
additionalProperties: true
#end properties
#end chatterbox
jarvis:
title: Jarvis Application Settings
description: Application settings for jarvis applications. This is used to configure Jarvis specific settings such as query engine URI.
type: object
required: [query_engine_uri]
additionalProperties: false
properties:
query_engine_uri:
title: Query Engine Settings
description: This is the URI to the jarvis query engine settings.
type: string
minLength: 1
llm_settings:
title: LLM settings
description: Settings for the LLM model during query flow.
$ref: "/jarvisv2/LLMModelSettings.schema"
formsg_otp:
title: FormSG OTP
description: The FormSG OTP application sets a cache value with OTP from FormSG emails.
type: object
additionalProperties: false
required: []
properties:
cache_key:
title: Cache Key
description: Set the OTP value in the following cache key. Use `{email}` to substitute with the FormSG admin email address which is inferred from the email `To` header. Defaults to `formsg:{email}:otp`.
type: string
minLength: 1
#end formsg_otp
healthcheck:
title: Healthcheck
description: |-
The Healthcheck application manages ping and pong deliveries between different providers to make sure they are working.
For `HealthcheckApplication` which drives the healthcheck process by regularly sending out pings (i.e., aka the pinger), we will send out ping messages to all the `provider_applications` defined here.
Likewise, when the pinger receives a pong message from a matching device/message, we will update the heartbeat on BetterUptime.
For provider-applications being "healthchecked" (i.e., aka the ponger), we will respond with the defined pong message if any of the `provider_applications` matches the device and messages on the incoming delivery.
type: object
additionalProperties: false
required: [provider_applications]
properties:
provider_applications:
title: Provider Applications
description: An array of provider-applications that we will be healthchecking.
type: array
minItems: 1
items:
type: object
required: [device]
additionalProperties: false
properties:
device:
title: Device
description: The device UID when sending out a ping or receiving a pong for healthcheck. We note that the device UID duplicates the provider-application `name` but the `name` is intended for readability purposes.
type: string
minLength: 1
heartbeat_key:
title: Heartbeat Key
description: If set, it will report heartbeat to our Better Uptime account when a pong message is received. This is only applicable to the pinger provider-application.
type: string
minLength: 1
ping_messages:
title: Ping Messages
description: Messages to send out for healthcheck pings (i.e., the pinger) and for comparison when receiving a ping (i.e., the ponger). Defaults to `Message(Text('Healthcheck ping!'))`.
$ref: "/ratatoskr/MessageTemplate.schema"
pong_messages:
title: Pong Messages
description: Messages to send out for healthcheck pongs (i.e., the ponger) and for comparison when receiving a pong (i.e., the pinger). Defaults to `Message(Text('Healthcheck pong!'))`.
$ref: "/ratatoskr/MessageTemplate.schema"
#end properties
#end items
#end provider_applications
#end healthcheck
message_testing:
title: Message Testing Application Settings
description: Application settings for message testing. This is used by frontend for integration/E2E testing. Do not change unless you know what you are doing.
type: object
additionalProperties: false
required: [test_query_responses]
properties:
test_query_responses:
title: Test Query-Responses
description: An array of query/responses pairs.
type: array
items:
type: object
additionalProperties: false
required: [query, responses]
properties:
query:
title: Test Query
description: When application receives this query (case sensitive exact), the below messages will be sent.
type: string
minLength: 1
metadata:
title: Metadata
description: Delivery metadata to associate with the delivery.
$ref: "DeliveryMetadata.schema"
responses:
title: Test Responses
description: These messages are sent on receipt of the test queries.
type: array
items:
$ref: "Message.schema"
#end test_query_responses
#end properties
#end message_testing
noop:
title: Noop
description: The `NoopApplication` does nothing on all incoming messages and does not deliver any outgoing messages. If outgoing deliveries are desired, use `NoopIncomingApplication` instead.
type: object
additionalProperties: false
required: []
#end noop
otp_forwarding:
title: OTP Forwarding
description: The OTP forwarding application simply forwards incoming messages to another provider application.
type: object
additionalProperties: false
required: [forward_to]
properties:
forward_to:
title: Forward To
description: An array of objects describing which provider application and destinations to forward to.
type: array
items:
type: object
additionalProperties: false
required: [provider_application, destinations]
properties:
provider_application:
title: Provider Application
description: Provider application to forward the requests to. This can either be a `name` or `uid`.
type: string
minLength: 1
destinations:
title: Destinations
description: Destination to forward to. This is usually email or E.164 phone numbers.
type: array
minItems: 1
items:
type: string
minLength: 1
device_type:
title: Device Type
description: The keyword argument for `upsert_device`. Only email and phone based providers are currently supported. Defaults to `phone`.
enum: [phone, email]
#end properties
#end items
#end forward_to
#end properties
#end otp_forwarding
ratatoskr:
title: Ratatoskr
description: Ratatoskr related settings.
type: object
additionalProperties: false
required: []
properties:
process_subscribe_delivery:
title: Process Subscribe Delivery
description: Check the messages for `subscribe` requests and processes it in Ratatoskr. Defaults to `true`.
type: boolean
#end process_subscribe_delivery
process_unsubscribe_delivery:
title: Process Unsubscribe Delivery
description: Check the messages for `unsubscribe` requests and processes it in Ratatoskr. Defaults to `true`.
type: boolean
#end process_unsubscribe_delivery
subscribe_message_strings:
title: Subscribe Message Strings
description: Trigger phrases for subscribe process.
type: array
minItems: 1
items:
type: string
minLength: 1
#end subscribe_message_strings
subscribe_messages:
title: Subscribe Messages
description: Messages to send out in response to an subscribe request. See code for default value.
$ref: "/ratatoskr/MessageTemplate.schema"
#end subscribe_messages
unsubscribe_message_strings:
title: Unsubscribe Message Strings
description: Trigger phrases for unsubscribe process.
type: array
minItems: 1
items:
type: string
minLength: 1
#end unsubscribe_message_strings
unsubscribe_messages:
title: Unsubscribe Messages
description: Messages to send out in response to an unsubscribe request. See code for default value.
$ref: "/ratatoskr/MessageTemplate.schema"
#end unsubscribe_messages
unsolicited_delivery_timeout:
title: Unsolicited Delivery Timeout
description: Seconds since the last incoming delivery before we consider an outgoing delivery "unsolicited". Defaults to 3600.
type: integer
minimum: 1
#end unsolicited_delivery_timeout
#end properties
#end ratatoskr
rooster:
title: Rooster
description: Rooster related settings. Covers email webhook-driven integration with Rooster.
type: object
additionalProperties: false
required: [data_source_uid]
properties:
data_source_uid:
title: Data Source UID
description: UID of Data Source that will be synced based on the incoming email information.
type: string
minLength: 1
#end definitions