{
    "title": "Check-in",
    "name": "Checkin",
    "description": "Config for check-in options",
    "type": "object",
    "properties": {
        "Checkin": {
            "type": "object",
            "properties": {
                "pages": {
                    "properties": {
                        "dashboard": {
                            "properties": {
                                "style": {
                                    "$ref": "#/definitions/style"
                                },
                                "layout": {
                                    "$ref": "#/definitions/layout"
                                }
                            }
                        },
                        "roles": {
                            "$ref": "#/definitions/roles"
                        }
                    }
                },
                "multiStatus": {
                    "type": "object",
                    "properties": {
                        "sequenced": {
                            "$ref": "#/definitions/sequenced"
                        },
                        "entry": {
                            "$ref": "#/definitions/entry"
                        },
                        "statuses": {
                            "$ref": "#/definitions/statuses"
                        },
                        "filterProps": {
                            "$ref": "#/definitions/filterProps"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "style": {
            "type": "string"
        },
        "layout": {
            "type": "array",
            "items": {
                "type": "array",
                "items": {
                    "type": "object",
                    "properties": {
                        "type": {
                            "type": "string"
                        },
                        "width": {
                            "type": "number"
                        },
                        "index": {
                            "type": "number"
                        },
                        "panel_params": {
                            "type": "object"
                        }
                    }
                }
            }
        },
        "roles": {
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "sequenced": {
            "type": "boolean",
            "description": "Determines if status selection should follow a sequenced flow or freeform dropdown"
        },
        "entry": {
            "type": "object",
            "description": "Actions for the beginning of a sequenced flow where no statuses have been set",
            "properties": {
                "next": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                        "type": "string"
                    }
                },
                "negative": {
                    "type": "string"
                }
            },
            "example": {
                "next": ["checked_in"],
                "negative": "no_show"
            }
        },
        "statuses": {
            "type": "array",
            "description": "A collection of statuses available for selection, along with definition of actions",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Slug name to identify a status. It is internal only and won't be used on the view. Should be unique"
                    },
                    "actionLabel": {
                        "type": "string",
                        "description": "Label text used on call-to-actions to set this status. E.g. 'Mark as arrived'"
                    },
                    "timelogLabel": {
                        "type": "string",
                        "description": "Label text used when referring to a point in time when this status was set. E.g. 'Arrived at'"
                    },
                    "statusColour": {
                        "type": "string",
                        "description": "Assign a colour associated with this status to help distinguish it. RGB hex value including leading hash. E.g. '#FF0000'"
                    },
                    "triggerOutcomes": {
                        "type": "boolean",
                        "description": "Specify whether outcomes questions should be asked when this status is set."
                    },
                    "next": {
                        "type": "array",
                        "uniqueItems": true,
                        "items": {
                            "type": "string"
                        }
                    },
                    "negative": {
                        "type": "string"
                    }
                },
                "required": ["name", "actionLabel", "timelogLabel"]
            }
        },
        "filterProps": {
            "type": "array",
            "description": "A collection of property names of a booking object to query when filtering bookings",
            "items": {
                "type": "string",
                "example": [
                    "client_name",
                    "person_name",
                    "resource_name",
                    "service_name"
                ]
            }
        }
    }
}