{
  "components": {
    "schemas": {
      "Accepted": {
        "properties": {
          "status": {
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "Action": {
        "oneOf": [
          {
            "additionalProperties": false,
            "properties": {
              "target": {
                "type": "string"
              },
              "type": {
                "enum": [
                  "navigation.open"
                ],
                "type": "string"
              }
            },
            "required": [
              "target",
              "type"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "text": {
                "type": "string"
              },
              "type": {
                "enum": [
                  "text.insert"
                ],
                "type": "string"
              }
            },
            "required": [
              "text",
              "type"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "target": {
                "type": "string"
              },
              "type": {
                "enum": [
                  "media.play"
                ],
                "type": "string"
              }
            },
            "required": [
              "target",
              "type"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "target": {
                "type": "string"
              },
              "type": {
                "enum": [
                  "media.pause"
                ],
                "type": "string"
              }
            },
            "required": [
              "target",
              "type"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "target": {
                "type": "string"
              },
              "type": {
                "enum": [
                  "scene.focus"
                ],
                "type": "string"
              }
            },
            "required": [
              "target",
              "type"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "parameters": {
                "additionalProperties": {
                  "type": "string"
                },
                "propertyNames": {
                  "type": "string"
                },
                "type": "object"
              },
              "target": {
                "type": "string"
              },
              "type": {
                "enum": [
                  "workflow.trigger"
                ],
                "type": "string"
              }
            },
            "required": [
              "target",
              "type"
            ],
            "type": "object"
          }
        ]
      },
      "ActionDefinition": {
        "properties": {
          "execution": {
            "type": "string"
          },
          "payload": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "payload",
          "execution"
        ],
        "type": "object"
      },
      "Actions": {
        "properties": {
          "actions": {
            "items": {
              "$ref": "#/components/schemas/ActionDefinition"
            },
            "type": "array"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "version",
          "actions"
        ],
        "type": "object"
      },
      "ApiError": {
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "Capabilities": {
        "properties": {
          "capabilities": {
            "items": {
              "$ref": "#/components/schemas/Capability"
            },
            "type": "array"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "version",
          "capabilities"
        ],
        "type": "object"
      },
      "Capability": {
        "properties": {
          "acquisition": {
            "type": "string"
          },
          "apiAvailable": {
            "type": "boolean"
          },
          "note": {
            "type": "string"
          },
          "productStage": {
            "type": "string"
          },
          "sense": {
            "type": "string"
          }
        },
        "required": [
          "sense",
          "productStage",
          "apiAvailable",
          "acquisition",
          "note"
        ],
        "type": "object"
      },
      "ContactApiError": {
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "ErrorDetail": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "Input": {
        "oneOf": [
          {
            "additionalProperties": false,
            "properties": {
              "confidence": {
                "format": "double",
                "maximum": 1,
                "minimum": 0,
                "type": [
                  "number",
                  "null"
                ]
              },
              "sense": {
                "enum": [
                  "voice"
                ],
                "type": "string"
              },
              "transcript": {
                "type": "string"
              }
            },
            "required": [
              "transcript",
              "sense"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "confidence": {
                "format": "double",
                "maximum": 1,
                "minimum": 0,
                "type": [
                  "number",
                  "null"
                ]
              },
              "gesture": {
                "type": "string"
              },
              "sense": {
                "enum": [
                  "motion"
                ],
                "type": "string"
              }
            },
            "required": [
              "gesture",
              "sense"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "sense": {
                "enum": [
                  "smell"
                ],
                "type": "string"
              }
            },
            "required": [
              "sense"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "sense": {
                "enum": [
                  "taste"
                ],
                "type": "string"
              }
            },
            "required": [
              "sense"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "sense": {
                "enum": [
                  "view"
                ],
                "type": "string"
              }
            },
            "required": [
              "sense"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "sense": {
                "enum": [
                  "touch"
                ],
                "type": "string"
              }
            },
            "required": [
              "sense"
            ],
            "type": "object"
          }
        ]
      },
      "InquiryRequest": {
        "additionalProperties": false,
        "properties": {
          "capitalRange": {
            "type": [
              "string",
              "null"
            ]
          },
          "consent": {
            "type": "boolean"
          },
          "email": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organization": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "email",
          "kind",
          "language",
          "consent"
        ],
        "type": "object"
      },
      "Intent": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/Action"
          },
          "ruleId": {
            "type": "string"
          }
        },
        "required": [
          "ruleId",
          "action"
        ],
        "type": "object"
      },
      "ResolveRequest": {
        "additionalProperties": false,
        "properties": {
          "input": {
            "$ref": "#/components/schemas/Input"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/Rule"
            },
            "maxItems": 32,
            "type": "array"
          }
        },
        "required": [
          "input",
          "rules"
        ],
        "type": "object"
      },
      "ResolveResponse": {
        "properties": {
          "execution": {
            "type": "string"
          },
          "intents": {
            "items": {
              "$ref": "#/components/schemas/Intent"
            },
            "type": "array"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "intents",
          "execution"
        ],
        "type": "object"
      },
      "Rule": {
        "additionalProperties": false,
        "properties": {
          "action": {
            "$ref": "#/components/schemas/Action"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "match": {
            "type": "string"
          },
          "minConfidence": {
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "match",
          "action"
        ],
        "type": "object"
      },
      "SignupRequest": {
        "additionalProperties": false,
        "properties": {
          "consent": {
            "type": "boolean"
          },
          "email": {
            "type": "string"
          },
          "language": {
            "type": "string"
          }
        },
        "required": [
          "email",
          "language",
          "consent"
        ],
        "type": "object"
      },
      "Template": {
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "request": {
            "$ref": "#/components/schemas/ResolveRequest"
          }
        },
        "required": [
          "id",
          "name",
          "request"
        ],
        "type": "object"
      },
      "Templates": {
        "properties": {
          "templates": {
            "items": {
              "$ref": "#/components/schemas/Template"
            },
            "type": "array"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "version",
          "templates"
        ],
        "type": "object"
      },
      "ValidationResponse": {
        "properties": {
          "valid": {
            "type": "boolean"
          }
        },
        "required": [
          "valid"
        ],
        "type": "object"
      }
    }
  },
  "info": {
    "title": "EnterSense API",
    "version": "0.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/health": {
      "get": {
        "operationId": "health",
        "responses": {
          "200": {
            "description": "D1 available"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactApiError"
                }
              }
            },
            "description": ""
          }
        },
        "tags": []
      }
    },
    "/api/inquiries": {
      "post": {
        "operationId": "contact",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InquiryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Accepted"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactApiError"
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactApiError"
                }
              }
            },
            "description": ""
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactApiError"
                }
              }
            },
            "description": ""
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactApiError"
                }
              }
            },
            "description": ""
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactApiError"
                }
              }
            },
            "description": ""
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactApiError"
                }
              }
            },
            "description": ""
          }
        },
        "tags": []
      }
    },
    "/api/newsletter": {
      "post": {
        "operationId": "newsletter",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Accepted"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactApiError"
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactApiError"
                }
              }
            },
            "description": ""
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactApiError"
                }
              }
            },
            "description": ""
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactApiError"
                }
              }
            },
            "description": ""
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactApiError"
                }
              }
            },
            "description": ""
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactApiError"
                }
              }
            },
            "description": ""
          }
        },
        "tags": []
      }
    },
    "/api/openapi.json": {
      "get": {
        "operationId": "openapi",
        "responses": {
          "200": {
            "description": "OpenAPI derived from the registered handlers"
          }
        },
        "tags": []
      }
    },
    "/api/v1/actions": {
      "get": {
        "operationId": "get_actions",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Actions"
                }
              }
            },
            "description": ""
          }
        },
        "tags": []
      }
    },
    "/api/v1/capabilities": {
      "get": {
        "operationId": "get_capabilities",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Capabilities"
                }
              }
            },
            "description": ""
          }
        },
        "tags": []
      }
    },
    "/api/v1/resolve": {
      "post": {
        "operationId": "post_resolve",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolveResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": ""
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": ""
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": ""
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": ""
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": ""
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": ""
          }
        },
        "tags": []
      }
    },
    "/api/v1/templates": {
      "get": {
        "operationId": "get_templates",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Templates"
                }
              }
            },
            "description": ""
          }
        },
        "tags": []
      }
    },
    "/api/v1/validate": {
      "post": {
        "operationId": "post_validate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": ""
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": ""
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": ""
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": ""
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": ""
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": ""
          }
        },
        "tags": []
      }
    }
  }
}
