{
  "openapi": "3.1.0",
  "info": {
    "title": "riskapi",
    "version": "0.1.0"
  },
  "paths": {
    "/": {
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Service Info",
        "operationId": "service_info__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceInfoResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/catalog": {
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Service Catalog",
        "operationId": "service_catalog_v1_catalog_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceCatalogResponse"
                }
              }
            }
          }
        }
      }
    },
    "/health/live": {
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Health Live",
        "operationId": "health_live_health_live_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          }
        }
      }
    },
    "/health/ready": {
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Health Ready",
        "operationId": "health_ready_health_ready_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/free/ping": {
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Free Ping",
        "operationId": "free_ping_v1_free_ping_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PingResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/free/time/utc": {
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Free Utc Time",
        "operationId": "free_utc_time_v1_free_time_utc_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeNowResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/score/email": {
      "post": {
        "tags": [
          "public"
        ],
        "summary": "Score Email",
        "operationId": "score_email_v1_score_email_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailScoreRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailScoreResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/text/cleanup": {
      "post": {
        "tags": [
          "public"
        ],
        "summary": "Text Cleanup",
        "operationId": "text_cleanup_v1_tools_text_cleanup_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TextCleanupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TextCleanupResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/time/shift": {
      "post": {
        "tags": [
          "public"
        ],
        "summary": "Time Shift",
        "operationId": "time_shift_v1_tools_time_shift_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeShiftRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeShiftResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CreateStripeCheckoutSessionRequest": {
        "properties": {
          "price_id": {
            "type": "string",
            "maxLength": 128,
            "minLength": 3,
            "title": "Price Id"
          },
          "owner_email": {
            "type": "string",
            "format": "email",
            "title": "Owner Email"
          },
          "success_url": {
            "type": "string",
            "maxLength": 2048,
            "minLength": 8,
            "title": "Success Url"
          },
          "cancel_url": {
            "type": "string",
            "maxLength": 2048,
            "minLength": 8,
            "title": "Cancel Url"
          },
          "plan_tier": {
            "type": "string",
            "enum": [
              "starter",
              "pro",
              "scale"
            ],
            "title": "Plan Tier",
            "default": "starter"
          },
          "mode": {
            "type": "string",
            "enum": [
              "payment",
              "subscription"
            ],
            "title": "Mode",
            "default": "payment"
          },
          "quantity": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Quantity",
            "default": 1
          },
          "key_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Key Name"
          }
        },
        "type": "object",
        "required": [
          "price_id",
          "owner_email",
          "success_url",
          "cancel_url"
        ],
        "title": "CreateStripeCheckoutSessionRequest"
      },
      "CreateStripeCheckoutSessionResponse": {
        "properties": {
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "checkout_url": {
            "type": "string",
            "title": "Checkout Url"
          }
        },
        "type": "object",
        "required": [
          "session_id",
          "checkout_url"
        ],
        "title": "CreateStripeCheckoutSessionResponse"
      },
      "EmailFlag": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "weight": {
            "type": "integer",
            "title": "Weight"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "code",
          "weight",
          "message"
        ],
        "title": "EmailFlag"
      },
      "EmailScoreRequest": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "ip_address": {
            "anyOf": [
              {
                "type": "string",
                "format": "ipvanyaddress"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip Address"
          },
          "include_explanations": {
            "type": "boolean",
            "title": "Include Explanations",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "EmailScoreRequest"
      },
      "EmailScoreResponse": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "normalized_email": {
            "type": "string",
            "title": "Normalized Email"
          },
          "domain": {
            "type": "string",
            "title": "Domain"
          },
          "score": {
            "type": "integer",
            "title": "Score"
          },
          "risk_band": {
            "type": "string",
            "title": "Risk Band"
          },
          "flags": {
            "items": {
              "$ref": "#/components/schemas/EmailFlag"
            },
            "type": "array",
            "title": "Flags"
          },
          "consumer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Consumer Id"
          },
          "key_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key Id"
          },
          "plan_tier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Plan Tier"
          }
        },
        "type": "object",
        "required": [
          "email",
          "normalized_email",
          "domain",
          "score",
          "risk_band",
          "flags"
        ],
        "title": "EmailScoreResponse"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "HealthResponse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status"
          },
          "app": {
            "type": "string",
            "title": "App"
          },
          "now": {
            "type": "string",
            "format": "date-time",
            "title": "Now"
          }
        },
        "type": "object",
        "required": [
          "status",
          "app",
          "now"
        ],
        "title": "HealthResponse"
      },
      "PingResponse": {
        "properties": {
          "service": {
            "type": "string",
            "title": "Service"
          },
          "result": {
            "type": "string",
            "title": "Result"
          },
          "tier": {
            "type": "string",
            "const": "free",
            "title": "Tier",
            "default": "free"
          },
          "now": {
            "type": "string",
            "format": "date-time",
            "title": "Now"
          }
        },
        "type": "object",
        "required": [
          "service",
          "result",
          "now"
        ],
        "title": "PingResponse"
      },
      "RedeemProvisioningRequest": {
        "properties": {
          "token": {
            "type": "string",
            "maxLength": 256,
            "minLength": 24,
            "title": "Token"
          }
        },
        "type": "object",
        "required": [
          "token"
        ],
        "title": "RedeemProvisioningRequest"
      },
      "RedeemProvisioningResponse": {
        "properties": {
          "api_key": {
            "type": "string",
            "title": "Api Key"
          },
          "key_id": {
            "type": "string",
            "title": "Key Id"
          },
          "owner_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Email"
          },
          "plan_tier": {
            "type": "string",
            "title": "Plan Tier"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          }
        },
        "type": "object",
        "required": [
          "api_key",
          "key_id",
          "plan_tier"
        ],
        "title": "RedeemProvisioningResponse"
      },
      "ServiceCatalogItem": {
        "properties": {
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "tier": {
            "type": "string",
            "enum": [
              "free",
              "paid"
            ],
            "title": "Tier"
          },
          "method": {
            "type": "string",
            "title": "Method"
          },
          "path": {
            "type": "string",
            "title": "Path"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "requires_api_key": {
            "type": "boolean",
            "title": "Requires Api Key"
          },
          "plan_tier": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "starter",
                  "pro",
                  "scale"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Plan Tier"
          }
        },
        "type": "object",
        "required": [
          "slug",
          "name",
          "tier",
          "method",
          "path",
          "description",
          "requires_api_key"
        ],
        "title": "ServiceCatalogItem"
      },
      "ServiceCatalogResponse": {
        "properties": {
          "base_url": {
            "type": "string",
            "title": "Base Url"
          },
          "free_services": {
            "items": {
              "$ref": "#/components/schemas/ServiceCatalogItem"
            },
            "type": "array",
            "title": "Free Services"
          },
          "paid_services": {
            "items": {
              "$ref": "#/components/schemas/ServiceCatalogItem"
            },
            "type": "array",
            "title": "Paid Services"
          }
        },
        "type": "object",
        "required": [
          "base_url",
          "free_services",
          "paid_services"
        ],
        "title": "ServiceCatalogResponse"
      },
      "ServiceInfoResponse": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "environment": {
            "type": "string",
            "title": "Environment"
          },
          "now": {
            "type": "string",
            "format": "date-time",
            "title": "Now"
          }
        },
        "type": "object",
        "required": [
          "name",
          "environment",
          "now"
        ],
        "title": "ServiceInfoResponse"
      },
      "StripeCheckoutResultResponse": {
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "ready"
            ],
            "title": "Status"
          },
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "owner_email": {
            "type": "string",
            "title": "Owner Email"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "key_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key Id"
          },
          "plan_tier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Plan Tier"
          }
        },
        "type": "object",
        "required": [
          "status",
          "session_id",
          "owner_email"
        ],
        "title": "StripeCheckoutResultResponse"
      },
      "StripeWebhookResponse": {
        "properties": {
          "ok": {
            "type": "boolean",
            "title": "Ok",
            "default": true
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "event_id": {
            "type": "string",
            "title": "Event Id"
          }
        },
        "type": "object",
        "required": [
          "status",
          "event_id"
        ],
        "title": "StripeWebhookResponse"
      },
      "TextCleanupRequest": {
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 5000,
            "minLength": 1,
            "title": "Text"
          },
          "collapse_whitespace": {
            "type": "boolean",
            "title": "Collapse Whitespace",
            "default": true
          },
          "trim_edges": {
            "type": "boolean",
            "title": "Trim Edges",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "text"
        ],
        "title": "TextCleanupRequest"
      },
      "TextCleanupResponse": {
        "properties": {
          "service": {
            "type": "string",
            "title": "Service"
          },
          "original_length": {
            "type": "integer",
            "title": "Original Length"
          },
          "cleaned_text": {
            "type": "string",
            "title": "Cleaned Text"
          },
          "cleaned_length": {
            "type": "integer",
            "title": "Cleaned Length"
          },
          "consumer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Consumer Id"
          },
          "key_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key Id"
          },
          "plan_tier": {
            "type": "string",
            "title": "Plan Tier"
          }
        },
        "type": "object",
        "required": [
          "service",
          "original_length",
          "cleaned_text",
          "cleaned_length",
          "plan_tier"
        ],
        "title": "TextCleanupResponse"
      },
      "TimeNowResponse": {
        "properties": {
          "service": {
            "type": "string",
            "title": "Service"
          },
          "current_utc": {
            "type": "string",
            "format": "date-time",
            "title": "Current Utc"
          },
          "unix_epoch": {
            "type": "integer",
            "title": "Unix Epoch"
          },
          "tier": {
            "type": "string",
            "const": "free",
            "title": "Tier",
            "default": "free"
          }
        },
        "type": "object",
        "required": [
          "service",
          "current_utc",
          "unix_epoch"
        ],
        "title": "TimeNowResponse"
      },
      "TimeShiftRequest": {
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          },
          "delta_minutes": {
            "type": "integer",
            "maximum": 10080.0,
            "minimum": -10080.0,
            "title": "Delta Minutes"
          }
        },
        "type": "object",
        "required": [
          "timestamp",
          "delta_minutes"
        ],
        "title": "TimeShiftRequest"
      },
      "TimeShiftResponse": {
        "properties": {
          "service": {
            "type": "string",
            "title": "Service"
          },
          "original_timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Original Timestamp"
          },
          "shifted_timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Shifted Timestamp"
          },
          "delta_minutes": {
            "type": "integer",
            "title": "Delta Minutes"
          },
          "consumer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Consumer Id"
          },
          "key_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key Id"
          },
          "plan_tier": {
            "type": "string",
            "title": "Plan Tier"
          }
        },
        "type": "object",
        "required": [
          "service",
          "original_timestamp",
          "shifted_timestamp",
          "delta_minutes",
          "plan_tier"
        ],
        "title": "TimeShiftResponse"
      },
      "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"
      }
    }
  }
}
