{
  "openapi": "3.1.0",
  "info": {
    "title": "Landing",
    "version": "0.3.2.dev10+gdfc3bdbf5"
  },
  "paths": {
    "/v1/actions": {
      "post": {
        "summary": "Create",
        "operationId": "create_v1_actions_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActionRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Action"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "List Actions",
        "operationId": "list_actions_v1_actions_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Action"
                  },
                  "title": "Response List Actions V1 Actions Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/actions/{action_id}": {
      "get": {
        "summary": "View",
        "operationId": "view_v1_actions__action_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "action_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Action Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Action"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/actions/{action_id}/events": {
      "get": {
        "summary": "Events",
        "operationId": "events_v1_actions__action_id__events_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "action_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Action Id"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "After"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Event"
                  },
                  "title": "Response Events V1 Actions  Action Id  Events Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/actions/{action_id}/cancellation": {
      "post": {
        "summary": "Cancel",
        "operationId": "cancel_v1_actions__action_id__cancellation_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "action_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Action Id"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Action"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/actions/{action_id}/retries": {
      "post": {
        "summary": "Retry",
        "operationId": "retry_v1_actions__action_id__retries_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "action_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Action Id"
            }
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Action"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/healthz": {
      "get": {
        "summary": "Health",
        "operationId": "health_healthz_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Action": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "mode": {
            "type": "string",
            "enum": [
              "issuer",
              "fixer",
              "gatekeeper",
              "explainer",
              "bumper"
            ],
            "title": "Mode"
          },
          "instruction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instruction"
          },
          "workspace": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workspace"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed",
              "cancelled",
              "interrupted"
            ],
            "title": "Status",
            "description": "Delegated task execution status; not human acceptance."
          },
          "result": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result"
          },
          "decision": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "allow",
                  "block",
                  "inconclusive"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Decision",
            "description": "Review recommendation; not human approval."
          },
          "error": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "retry_of": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retry Of"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "cancel_requested_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancel Requested At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "mode",
          "instruction",
          "workspace",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "Action"
      },
      "ActionRequest": {
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "issuer",
              "fixer",
              "gatekeeper",
              "explainer",
              "bumper"
            ],
            "title": "Mode"
          },
          "instruction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instruction"
          },
          "input": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/TextInput"
                },
                {
                  "$ref": "#/components/schemas/FileInput"
                }
              ],
              "discriminator": {
                "propertyName": "type",
                "mapping": {
                  "file": "#/components/schemas/FileInput",
                  "text": "#/components/schemas/TextInput"
                }
              }
            },
            "type": "array",
            "title": "Input"
          },
          "workspace": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workspace"
          },
          "checks": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Checks"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "mode"
        ],
        "title": "ActionRequest"
      },
      "Event": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "data": {
            "additionalProperties": true,
            "type": "object",
            "title": "Data"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "type",
          "created_at"
        ],
        "title": "Event"
      },
      "FileInput": {
        "properties": {
          "type": {
            "type": "string",
            "const": "file",
            "title": "Type",
            "default": "file"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "media_type": {
            "type": "string",
            "title": "Media Type",
            "default": "text/plain"
          },
          "content": {
            "type": "string",
            "title": "Content"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "content"
        ],
        "title": "FileInput"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "TextInput": {
        "properties": {
          "type": {
            "type": "string",
            "const": "text",
            "title": "Type",
            "default": "text"
          },
          "text": {
            "type": "string",
            "title": "Text"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "text"
        ],
        "title": "TextInput"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
