Task Type Packages

interface.json

Task type packages contain an interface.json file of the following schema:

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "definitions": {
        "source_mode_name": {
            "type": "string",
            "enum": [
                "none",
                "output",
                "fixed",
                "define_on_first",
                "ui"
            ]
        },
        "task_type_package_interface": {
            "description": "interface.json of a Task Type package",
            "type": "object",
            "properties": {
                "inputs": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "key": {
                                "description": "Arbitrary name identifying the input parameter.",
                                "type": "string"
                            },
                            "type": {
                                "description": "Specifies the type of the actual values for that parameter in jobs.",
                                "$ref": "parameter_types.json#/definitions/parameter_type_name"
                            },
                            "supported_modes": {
                                "description": "Specifies the supported input source modes of the task type.",
                                "type": "array",
                                "items": {
                                    "$ref": "#/definitions/source_mode_name"
                                }
                            },
                            "default": {
                                "description": "Optionally specifies the default value to use for that parameter. Only allowed for primitive types.",
                                "type": [
                                    "integer",
                                    "number",
                                    "string",
                                    "boolean"
                                ]
                            },
                            "minimum": {
                                "description": "Optionally specifies the minimum value to use for that parameter. Only allowed for Int or Float types.",
                                "type": [
                                    "integer",
                                    "number"
                                ]
                            },
                            "maximum": {
                                "description": "Optionally specifies the maximum value to use for that parameter. Only allowed for Int or Float types.",
                                "type": [
                                    "integer",
                                    "number"
                                ]
                            },
                            "multipleOf": {
                                "description": "Optionally specifies an precision to use for that parameter. Only allowed for Float types.",
                                "type": "number"
                            },
                            "enum": {
                                "description": "Optionally specifies the allowed values to use for that parameter. Only allowed for String types.",
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            "format": {
                                "description": "Optionally specifies a format to use for that parameter. Only allowed for String types.",
                                "type": "string",
                                "enum": [
                                    "multiline",
                                    "commonmark",
                                    "date-time"
                                ]
                            },
                            "description": {
                                "description": "Describes the parameter.",
                                "type": "string"
                            }
                        },
                        "additionalProperties": false,
                        "required": [
                            "key",
                            "type",
                            "supported_modes"
                        ]
                    }
                },
                "outputs": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "key": {
                                "description": "Arbitrary name identifying the output parameter.",
                                "type": "string"
                            },
                            "type": {
                                "description": "Specifies the type of the actual values for that parameter in jobs.",
                                "$ref": "parameter_types.json#/definitions/parameter_type_name"
                            },
                            "default": {
                                "description": "Optionally specifies the default value to use for that parameter. Only allowed for primitive types.",
                                "type": [
                                    "integer",
                                    "number",
                                    "string",
                                    "boolean"
                                ]
                            },
                            "minimum": {
                                "description": "Optionally specifies the minimum value to use for that parameter. Only allowed for Int or Float types.",
                                "type": [
                                    "integer",
                                    "number"
                                ]
                            },
                            "maximum": {
                                "description": "Optionally specifies the maximum value to use for that parameter. Only allowed for Int or Float types.",
                                "type": [
                                    "integer",
                                    "number"
                                ]
                            },
                            "multipleOf": {
                                "description": "Optionally specifies an precision to use for that parameter. Only allowed for Float types.",
                                "type": "number"
                            },
                            "enum": {
                                "description": "Optionally specifies the allowed values to use for that parameter. Only allowed for String types.",
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            "format": {
                                "description": "Optionally specifies a format to use for that parameter. Only allowed for String types.",
                                "type": "string",
                                "enum": [
                                    "multiline",
                                    "commonmark",
                                    "date-time",
                                    "uuid"
                                ]
                            },
                            "description": {
                                "description": "Describes the parameter.",
                                "type": "string"
                            }
                        },
                        "additionalProperties": false,
                        "required": [
                            "key",
                            "type"
                        ]
                    }
                },
                "processing_effort_factor": {
                    "description": "A description of how the `effort_factor` for processing time estimation can be calculated. Optional if `behavior` in the `metadata.json` file is `ProcessingSource`, `ProcessingFollower`, `InteractiveProcessingFollower` or `InteractiveProcessingSource`. Not allowed otherwise.",
                    "type": "object",
                    "oneOf": [
                        {
                            "properties": {
                                "function": {
                                    "description": "Indicates how the `effort_factor` is calculated.",
                                    "type": "string",
                                    "const": "Constant"
                                }
                            },
                            "additionalProperties": false,
                            "required": [
                                "function"
                            ]
                        },
                        {
                            "properties": {
                                "function": {
                                    "description": "Indicates how the `effort_factor` is calculated.",
                                    "type": "string",
                                    "const": "LinearWithSizeOfInput"
                                },
                                "input_key": {
                                    "description": "The `key` of an input.",
                                    "type": "string"
                                }
                            },
                            "additionalProperties": false,
                            "required": [
                                "function",
                                "input_key"
                            ]
                        },
                        {
                            "properties": {
                                "function": {
                                    "description": "Indicates how the `effort_factor` is calculated.",
                                    "type": "string",
                                    "const": "Interactive"
                                }
                            },
                            "additionalProperties": false,
                            "required": [
                                "function"
                            ]
                        }
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "inputs",
                "outputs"
            ]
        }
    }
}