{"$id": "ExporterFunction", "$schema": "http://json-schema.org/draft-07/schema#", "description": "The Hypar exporter function schema.", "type": "object", "required": ["description", "id", "name", "function_type", "on_demand"], "properties": {"description": {"type": "string", "description": "A description of the function."}, "id": {"type": "string", "pattern": "^[a-z0-9-_]+$", "description": "An identifier for the function which must be unique within the system. Function ids can contain any lowercase alphanumeric character, '_', and '-'."}, "language": {"type": "string", "description": "The programming language used by this function.", "enum": ["C#", "Excel", "Grasshopper", "Python"]}, "name": {"type": "string", "description": "A human readable name."}, "display_name": {"type": "string", "description": "An optional display name for this function (useful if you want to change the function's name without changing code)"}, "model_dependencies": {"type": "array", "items": {"$ref": "#/definitions/dependency"}, "description": "An array of model types that this function consumes."}, "input_schema": {"$ref": "https://hypar.io/Schemas/InputSchema.json"}, "messages": {"description": "A mapping from language codes to visible text in that language.", "type": "object", "patternProperties": {"^..$": {"properties": {"description": {"type": "string"}, "name": {"type": "string", "description": "The name of the function."}, "input_schema": {"$ref": "#/definitions/localized_property"}, "overrides": {"type": "object", "patternProperties": {"^.+$": {"properties": {"name": {"type": "string"}, "schema": {"patternProperties": {"^.+$": {"$ref": "#/definitions/localized_property"}}}, "verbs": {"type": "object", "properties": {"edit": {"type": "string"}, "revert": {"type": "string"}}}}}}}}}}}, "overrides": {"type": "object", "patternProperties": {"^.+$": {"properties": {"context": {"type": "string", "description": "A query indicating which elements can be overriden."}, "behaviors": {"type": "object", "properties": {"add": {"type": "object", "properties": {"schema": {"type": "object", "additionalProperties": {"$ref": "https://hypar.io/Schemas/InputSchemaProperty.json"}, "description": "A schema for the information needed to create a new object."}}}, "remove": {"type": "boolean"}}}, "dependency": {"type": "string", "description": "A string indicating which model this override applies to. If empty, applies to the current function."}, "identity": {"patternProperties": {"^.+$": {"$ref": "https://hypar.io/Schemas/InputSchemaProperty.json"}}, "description": "Information from the 'context' element that can be used to uniquely identify it. This is a mapping from fields in the element to the schemas for those fields."}, "paradigm": {"description": "The class of modifications that the user is allowed to make. `edit` (default) means that users can edit properties of the context elements, `group` means that users can assemble context elements into lists.", "type": "string", "enum": ["edit", "group"]}, "schema": {"type": "object", "additionalProperties": {"$ref": "https://hypar.io/Schemas/InputSchemaProperty.json"}, "description": "A schema for the edits that can be performed, which should be a strict subset of the 'context' element's schema."}}}}}, "repository_url": {"type": "string", "format": "", "description": "The url of the git repository that contains the code for this function."}, "preview_image": {"type": ["string", "null"], "description": "A base64 encoded .png containing a preview image."}, "element_types": {"type": "array", "description": "An array of uris representing element type JSON schemas.", "items": {"$ref": "https://prod-api.hypar.io/element-types"}}, "$schema": {"type": "string"}, "cli_version": {"type": "string"}, "last_updated": {"type": "string", "format": "datetime"}, "content_catalogs": {"type": "array", "items": {"type": "string"}}, "function_type": {"description": "The type of function.", "type": "string", "const": "exporter"}, "on_demand": {"type": "boolean", "const": true}}, "additionalProperties": false, "definitions": {"camera": {"type": "object", "properties": {"angle": {"type": "array", "description": "A unit vector in model coordinates indicating which direction the camera is pointing.", "minItems": 3, "maxItems": 3, "items": {"type": "number"}}, "named_position": {"type": "string", "description": "Camera positions, viewing from this direction to the opposite direction. Do not set angle if setting this.", "enum": ["east", "north", "south", "top", "west"]}, "projection": {"type": "string", "description": "How the camera collapses the 3d scene into a 2d image", "enum": ["orthographic", "perspective"]}}}, "dependency": {"type": "object", "required": ["name"], "properties": {"autohide": {"type": "boolean", "description": "Whether to hide the dependency's geometry when your function has visible geometry. Use this when your function largely replaces and elaborates on the geometry of this dependency, such that users will not need to see both at once."}, "name": {"type": "string", "description": "The model type that this function consumes."}, "optional": {"type": "boolean", "description": "Whether the function can run even if this dependency is unavailable."}}}, "localized_property": {"type": "object", "properties": {"description": {"type": "string"}, "enum": {"type": "array", "items": {"type": "string"}}, "items": {"patternProperties": {"^.+$": {"$ref": "#/definitions/localized_property"}}}, "name": {"type": "string"}, "properties": {"patternProperties": {"^.+$": {"$ref": "#/definitions/localized_property"}}}}}, "unit_type": {"type": "string", "description": "The unit type of the numeric value.", "enum": ["area", "currency", "distributed_load", "flow_rate", "force", "heading", "length", "mass", "none", "plane_angle", "pressure", "ratio", "time", "torque", "velocity", "volume"], "default": "none"}}, "discriminator": "discriminator", "title": "ExporterFunction"}