From LinkMetadata.schema.yaml (stitch/LinkMetadata.schema
)
---
$id: https://skeleton.botmd.io/stitch/LinkMetadata.schema
$schema: http://json-schema.org/draft-07/schema#
title: Link Metadata
description: Metadata for Stitch links.
type: object
additionalProperties: false
required: []
properties:
delayed:
$ref: "#/definitions/delayed"
#end delayed
stream_response:
title: Stream Response
description: "Whether to stream the response rather than redirect (default: `False`)"
type: boolean
ready_message:
title: Ready Message
description: This message is displayed to the user when the link is ready but `source_url` is empty. Defaults to `None`. If both this and `source_url` is not set, a 404 will be returned to the user.
type: string
minLength: 1
#end ready_message
expired_message:
title: Expired Message
description: This message is displayed to the user when the link is expired. If this is not set, 404 will be returned. Defaults to `None`.
type: string
minLength: 1
#end expired_message
cleo:
title: Link Tracking Metadata
description: Metadata for tracking link creation and context
type: object
additionalProperties: false
properties:
patient_uid:
type: ["string", "null"]
description: Patient's unique identifier
clinic_uid:
type: ["string", "null"]
description: Clinic's unique identifier
#end cleo
#end properties
definitions:
delayed:
title: Delayed
description: This is used to store information about delayed link, such as status.
type: object
required: [filename, status, delay_function]
additionalProperties: false
properties:
filename:
title: Filename
description: File name of generated link. This is used to generate the correct file extensions for the stitch link and is used in the default waiting message.
type: string
minLength: 1
#end filename
status:
title: Status
description: Status of the delayed link.
enum: [queued, in_progress, ready, failed]
#end status
delay_function:
title: Delay Function
description: Python path to delayed task/function that generates data for the link. Used for debugging purposes.
type: string
minLength: 1
#end delay_function
refresh_interval:
title: Refresh Interval
description: Set the refresh interval for the message page while delayed link is in progress. Defaults to 10 seconds.
type: integer
minimum: 1
#end refresh_interval
waiting_message:
title: Waiting Message
description: This message is displayed to the user when the link is not ready yet (i.e., `queued` or `in_progress` status). Defaults to `Please wait while we prepare ${filename}. It will be ready shortly.`.
type: string
minLength: 1
failed_message:
title: Failed Message
description: This message is displayed to the user when the link generation has failed (i.e., `failed` status). Defaults to `We were unable to prepare ${filename}. Please contact the link owner for more information.`.
type: string
minLength: 1
#end properties
#end delayed
#end definitions