{
  "openapi": "3.1.0",
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "info": {
    "title": "Dhebe Assets API",
    "version": "1.0.0",
    "description": "Same-origin store contract. Public browsing is anonymous; account resources use platform-managed session identity injected by Sites, not a client API key or invented OAuth/cookie endpoint. x-platform-auth documents this gateway boundary. Owner service credentials are private CLI/native-secret alternatives, never browser values. Checkout is unavailable without actual merchant configuration; mocked/local demonstrations do not verify provider or email delivery."
  },
  "servers": [
    {
      "url": "https://assets.dhebe.com",
      "description": "Existing public store; actual feature readiness comes from /api/status."
    },
    {
      "url": "http://127.0.0.1:5173",
      "description": "Loopback development; local identity simulation is not provider payment."
    }
  ],
  "tags": [
    {
      "name": "Public"
    },
    {
      "name": "Account"
    },
    {
      "name": "Cart"
    },
    {
      "name": "Payments"
    },
    {
      "name": "Downloads"
    },
    {
      "name": "Owner catalog"
    },
    {
      "name": "Owner operations"
    }
  ],
  "paths": {
    "/api/status": {
      "get": {
        "operationId": "get_api_status",
        "summary": "Read binding and checkout readiness",
        "tags": [
          "Public"
        ],
        "description": "",
        "x-platform-auth": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/api/me": {
      "get": {
        "operationId": "get_api_me",
        "summary": "Read platform sign-in and owner state",
        "tags": [
          "Account"
        ],
        "description": "Trusted platform identity is supplied by Sites dispatch. The configured first owner may be bound to its stable ID during this read.",
        "x-platform-auth": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/api/catalog": {
      "get": {
        "operationId": "get_api_catalog",
        "summary": "Read published durable catalog",
        "tags": [
          "Public"
        ],
        "description": "",
        "x-platform-auth": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Catalog"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/api/catalog/{id}": {
      "get": {
        "operationId": "get_api_catalog_id",
        "summary": "Read one published product and active source version",
        "tags": [
          "Public"
        ],
        "description": "",
        "x-platform-auth": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "$ref": "#/components/schemas/Product"
                    }
                  },
                  "required": [
                    "product"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 80
            }
          }
        ]
      }
    },
    "/api/settings": {
      "get": {
        "operationId": "get_api_settings",
        "summary": "Read safe public store settings",
        "tags": [
          "Public"
        ],
        "description": "",
        "x-platform-auth": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Settings"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/api/store": {
      "get": {
        "operationId": "get_api_store",
        "summary": "Read safe public store settings",
        "tags": [
          "Public"
        ],
        "description": "",
        "x-platform-auth": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Settings"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/api/previews/{id}": {
      "get": {
        "operationId": "get_api_previews_id",
        "summary": "Read validated raster preview",
        "tags": [
          "Public"
        ],
        "description": "Returns PNG, JPEG or WebP bytes, not active uploaded HTML/SVG.",
        "x-platform-auth": "public",
        "responses": {
          "200": {
            "description": "Validated raster",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/events": {
      "post": {
        "operationId": "post_api_events",
        "summary": "Record an optional consented product event",
        "tags": [
          "Public"
        ],
        "description": "Client opt-in is required. DNT/GPC suppress collection. The server stores daily deduplication/rate hashes, not raw visitor/IP/email/search/referrer values.",
        "x-platform-auth": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "visitor": {
                    "type": "string"
                  },
                  "productId": {
                    "type": "string",
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                    "maxLength": 80
                  },
                  "event": {
                    "type": "string",
                    "enum": [
                      "product_view",
                      "demo_open",
                      "sample_download",
                      "checkout_start",
                      "request"
                    ]
                  }
                },
                "additionalProperties": true,
                "required": [
                  "visitor",
                  "productId",
                  "event"
                ]
              }
            }
          }
        }
      }
    },
    "/api/requests": {
      "post": {
        "operationId": "post_api_requests",
        "summary": "Store an authenticated asset/support request",
        "tags": [
          "Account"
        ],
        "description": "",
        "x-platform-auth": "session",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestInput"
              }
            }
          }
        }
      }
    },
    "/api/requests/{id}": {
      "delete": {
        "operationId": "delete_api_requests_id",
        "summary": "Delete the current user?s request",
        "tags": [
          "Account"
        ],
        "description": "",
        "x-platform-auth": "session",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/purchases": {
      "get": {
        "operationId": "get_api_purchases",
        "summary": "List owned orders and item snapshots",
        "tags": [
          "Account"
        ],
        "description": "",
        "x-platform-auth": "session",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orders": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Order"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/api/orders/{id}/receipt": {
      "get": {
        "operationId": "get_api_orders_id_receipt",
        "summary": "Read an owned stored purchase record",
        "tags": [
          "Account"
        ],
        "description": "",
        "x-platform-auth": "session",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseRecord"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/cart": {
      "get": {
        "operationId": "get_api_cart",
        "summary": "Read persistent cart and server quote",
        "tags": [
          "Cart"
        ],
        "description": "",
        "x-platform-auth": "session",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Cart"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      },
      "put": {
        "operationId": "put_api_cart",
        "summary": "Replace account cart choices",
        "tags": [
          "Cart"
        ],
        "description": "",
        "x-platform-auth": "session",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Cart"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CartWrite"
              }
            }
          }
        }
      }
    },
    "/api/cart/merge": {
      "post": {
        "operationId": "post_api_cart_merge",
        "summary": "Merge guest choices into account cart",
        "tags": [
          "Cart"
        ],
        "description": "",
        "x-platform-auth": "session",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Cart"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CartWrite"
              }
            }
          }
        }
      }
    },
    "/api/cart/checkout": {
      "post": {
        "operationId": "post_api_cart_checkout",
        "summary": "Create server-priced cart order and hosted checkout",
        "tags": [
          "Cart"
        ],
        "description": "No client amount or paid flag is accepted. Source/price/bundle/license snapshots are persisted before provider access. Keys/domain approval remain an external readiness gate.",
        "x-platform-auth": "session",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "200": {
            "description": "Existing verified paid order; use Purchases",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaidResult"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutInput"
              }
            }
          }
        }
      }
    },
    "/api/orders": {
      "post": {
        "operationId": "post_api_orders",
        "summary": "Compatibility single-product checkout bridge",
        "tags": [
          "Payments"
        ],
        "description": "Managed products use durable cart/snapshot and publication/price rules. New storefront UI uses /api/cart/checkout.",
        "x-platform-auth": "session",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "productId": {
                    "type": "string",
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                    "maxLength": 80
                  },
                  "phone": {
                    "type": "string"
                  },
                  "license": {
                    "type": "string",
                    "const": "commercial-v1"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "productId",
                  "phone",
                  "license"
                ]
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/api/payments/verify": {
      "post": {
        "operationId": "post_api_payments_verify",
        "summary": "Reconcile an owned order with authenticated provider state",
        "tags": [
          "Payments"
        ],
        "description": "A redirect, signed webhook alone or authorization-only payment does not grant sources.",
        "x-platform-auth": "session",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id"
                ]
              }
            }
          }
        }
      }
    },
    "/api/webhooks/cashfree": {
      "post": {
        "operationId": "post_api_webhooks_cashfree",
        "summary": "Receive exact-byte Cashfree payment/refund notification",
        "tags": [
          "Payments"
        ],
        "description": "Validate Base64 HMAC-SHA256 using the matching secret over timestamp plus untouched raw body. Independently reconcile order/refund state; retryable inconsistency is not silently acknowledged.",
        "x-platform-auth": "provider-signature",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              }
            }
          }
        },
        "parameters": [
          {
            "in": "header",
            "name": "x-webhook-timestamp",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "x-webhook-signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/entitlements": {
      "get": {
        "operationId": "get_api_entitlements",
        "summary": "List active owned source entitlements",
        "tags": [
          "Downloads"
        ],
        "description": "",
        "x-platform-auth": "session",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "entitlements": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Entitlement"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/api/download-grants": {
      "post": {
        "operationId": "post_api_download_grants",
        "summary": "Issue an audited identity-bound source grant",
        "tags": [
          "Downloads"
        ],
        "description": "Default 300-second identity-bound audited grant; configurable 60?900 seconds. It may be reused until its signed expiry. Active entitlement and validated immutable source are rechecked on access.",
        "x-platform-auth": "session",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadGrant"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entitlementId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "entitlementId"
                ]
              }
            }
          }
        }
      }
    },
    "/api/private-download": {
      "get": {
        "operationId": "get_api_private_download",
        "summary": "Stream a granted private source ZIP",
        "tags": [
          "Downloads"
        ],
        "description": "Reject invalid/expired grants, another user and revoked/refunded source entitlements. No permanent bucket URL is returned.",
        "x-platform-auth": "session",
        "responses": {
          "200": {
            "description": "Authorized ZIP attachment",
            "headers": {
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "parameters": [
          {
            "name": "grant",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expires",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "head": {
        "operationId": "head_api_private_download",
        "summary": "Stream a granted private source ZIP",
        "tags": [
          "Downloads"
        ],
        "description": "Reject invalid/expired grants, another user and revoked/refunded source entitlements. No permanent bucket URL is returned.",
        "x-platform-auth": "session",
        "responses": {
          "200": {
            "description": "Authorized ZIP attachment",
            "headers": {
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "parameters": [
          {
            "name": "grant",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expires",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/download-token": {
      "post": {
        "operationId": "post_api_download_token",
        "summary": "Issue a legacy owned-order download link",
        "tags": [
          "Downloads"
        ],
        "description": "Compatibility only. New source delivery uses entitlement grants.",
        "x-platform-auth": "session",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "orderId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "orderId"
                ]
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/api/download": {
      "get": {
        "operationId": "get_api_download",
        "summary": "Stream a compatibility owned-order source ZIP",
        "tags": [
          "Downloads"
        ],
        "description": "Identity, entitlement and expiry are rechecked. No one-use guarantee.",
        "x-platform-auth": "session",
        "responses": {
          "200": {
            "description": "Authorized ZIP attachment",
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "deprecated": true,
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expires",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "head": {
        "operationId": "head_api_download",
        "summary": "Stream a compatibility owned-order source ZIP",
        "tags": [
          "Downloads"
        ],
        "description": "Identity, entitlement and expiry are rechecked. No one-use guarantee.",
        "x-platform-auth": "session",
        "responses": {
          "200": {
            "description": "Authorized ZIP attachment",
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "deprecated": true,
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expires",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/catalog": {
      "get": {
        "operationId": "get_api_admin_catalog",
        "summary": "Read owner catalog including drafts and settings",
        "tags": [
          "Owner catalog"
        ],
        "description": " Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Catalog"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/api/admin/products": {
      "post": {
        "operationId": "post_api_admin_products",
        "summary": "Create an unpublished product draft",
        "tags": [
          "Owner catalog"
        ],
        "description": " Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "$ref": "#/components/schemas/Product"
                    },
                    "versions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Version"
                      }
                    },
                    "files": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductWrite"
              }
            }
          }
        }
      }
    },
    "/api/admin/products/{id}": {
      "get": {
        "operationId": "get_api_admin_products_id",
        "summary": "Read product versions/files/prices",
        "tags": [
          "Owner catalog"
        ],
        "description": " Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "$ref": "#/components/schemas/Product"
                    },
                    "versions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Version"
                      }
                    },
                    "files": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 80
            }
          }
        ]
      },
      "patch": {
        "operationId": "patch_api_admin_products_id",
        "summary": "Update product metadata without publishing",
        "tags": [
          "Owner catalog"
        ],
        "description": " Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "$ref": "#/components/schemas/Product"
                    },
                    "versions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Version"
                      }
                    },
                    "files": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 80
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductWrite"
              }
            }
          }
        }
      }
    },
    "/api/admin/products/{id}/transition": {
      "post": {
        "operationId": "post_api_admin_products_id_transition",
        "summary": "Validate and change publication state",
        "tags": [
          "Owner catalog"
        ],
        "description": "Ready/publish gates verify source files, rights, documentation, support, usable previews and active price. Retirement preserves historical purchases. Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 80
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "validating",
                      "ready",
                      "published",
                      "retired"
                    ]
                  },
                  "versionId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "status"
                ]
              }
            }
          }
        }
      }
    },
    "/api/admin/products/{id}/versions": {
      "post": {
        "operationId": "post_api_admin_products_id_versions",
        "summary": "Create a new immutable-edition candidate",
        "tags": [
          "Owner catalog"
        ],
        "description": " Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "$ref": "#/components/schemas/Version"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 80
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VersionWrite"
              }
            }
          }
        }
      }
    },
    "/api/admin/versions/{id}": {
      "patch": {
        "operationId": "patch_api_admin_versions_id",
        "summary": "Edit unpublished version metadata/changelog",
        "tags": [
          "Owner catalog"
        ],
        "description": "Published/retired versions cannot be rewritten. Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "$ref": "#/components/schemas/Version"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "notes": {
                    "type": "string"
                  },
                  "metadata": {
                    "$ref": "#/components/schemas/VersionMetadata"
                  }
                },
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/admin/versions/{id}/package": {
      "put": {
        "operationId": "put_api_admin_versions_id_package",
        "summary": "Upload and structurally validate a private version ZIP",
        "tags": [
          "Owner catalog"
        ],
        "description": "Maximum 32 MiB raw archive, 16 MiB per uncompressed entry and 64 MiB total. Validate names, paths, duplicate entries, integrity and bounded CRC/inflate output. No extraction/execution or antivirus certification. Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Content-SHA256",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{64}$"
            },
            "description": "SHA256 of exact raw uploaded bytes. The server independently validates."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/zip": {
              "schema": {
                "type": "string",
                "format": "binary",
                "maxLength": 33554432
              }
            }
          }
        }
      }
    },
    "/api/admin/products/{id}/versions/{versionId}/validate": {
      "post": {
        "operationId": "post_api_admin_products_id_versions_versionId_validate",
        "summary": "Retry version readiness validation",
        "tags": [
          "Owner catalog"
        ],
        "description": " Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 80
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/admin/products/{id}/preview": {
      "put": {
        "operationId": "put_api_admin_products_id_preview",
        "summary": "Upload a validated raster preview",
        "tags": [
          "Owner catalog"
        ],
        "description": "Actual raster structure/dimensions are checked. Returns same-origin public preview URL; no arbitrary active HTML/SVG upload. Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "sha256": {
                      "type": "string"
                    },
                    "bytes": {
                      "type": "integer"
                    },
                    "width": {
                      "type": "integer"
                    },
                    "height": {
                      "type": "integer"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 80
            }
          },
          {
            "name": "X-Content-SHA256",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{64}$"
            },
            "description": "SHA256 of exact raw uploaded bytes. The server independently validates."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "image/png": {
              "schema": {
                "type": "string",
                "format": "binary",
                "maxLength": 5242880
              }
            },
            "image/jpeg": {
              "schema": {
                "type": "string",
                "format": "binary",
                "maxLength": 5242880
              }
            },
            "image/webp": {
              "schema": {
                "type": "string",
                "format": "binary",
                "maxLength": 5242880
              }
            }
          }
        }
      }
    },
    "/api/admin/products/{id}/prices": {
      "put": {
        "operationId": "put_api_admin_products_id_prices",
        "summary": "Set an actual commercial-v1 INR license price",
        "tags": [
          "Owner catalog"
        ],
        "description": " Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 80
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "licenseId": {
                    "type": "string",
                    "const": "commercial-v1"
                  },
                  "amount": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "currency": {
                    "type": "string",
                    "const": "INR"
                  },
                  "active": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "licenseId",
                  "amount",
                  "currency",
                  "active"
                ]
              }
            }
          }
        }
      }
    },
    "/api/admin/settings": {
      "patch": {
        "operationId": "patch_api_admin_settings",
        "summary": "Update whitelisted public store settings",
        "tags": [
          "Owner catalog"
        ],
        "description": "Known presets only. Business/policy whitelists reject credential-like keys recursively. This does not activate merchant secrets. Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Settings"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Settings"
              }
            }
          }
        }
      }
    },
    "/api/admin/taxonomy": {
      "put": {
        "operationId": "put_api_admin_taxonomy",
        "summary": "Create/update category and tag labels",
        "tags": [
          "Owner catalog"
        ],
        "description": " Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "categories": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                          "maxLength": 80
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true,
                      "required": [
                        "id",
                        "name"
                      ]
                    }
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                          "maxLength": 80
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true,
                      "required": [
                        "id",
                        "name"
                      ]
                    }
                  }
                },
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/admin/collections/{id}": {
      "put": {
        "operationId": "put_api_admin_collections_id",
        "summary": "Manage curated or versioned bundle membership",
        "tags": [
          "Owner catalog"
        ],
        "description": "A bundle record matches its product ID. Members reference distinct actual source versions; active source membership remains frozen until a new edition is published. Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 80
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CollectionWrite"
              }
            }
          }
        }
      }
    },
    "/api/admin/seed": {
      "post": {
        "operationId": "post_api_admin_seed",
        "summary": "Import a bounded batch of prepared product IDs",
        "tags": [
          "Owner catalog"
        ],
        "description": "Idempotent prepared-source seed; existing edits are preserved. Source presence/import alone does not publish a product. Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "outcomes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                      "maxLength": 80
                    }
                  }
                },
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/admin/orders/{id}": {
      "get": {
        "operationId": "get_api_admin_orders_id",
        "summary": "Inspect actual order/payment/refund/download/job records",
        "tags": [
          "Owner operations"
        ],
        "description": " Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OwnerOrder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/admin/refunds": {
      "post": {
        "operationId": "post_api_admin_refunds",
        "summary": "Request a full recorded paid-item provider refund",
        "tags": [
          "Owner operations"
        ],
        "description": "No client refund amount. Only explicit supported full-item allocation is executed; unconfigured provider returns unavailable, not simulated success. Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "refund": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "orderItemId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 10
                  },
                  "confirm": {
                    "type": "boolean",
                    "const": true
                  }
                },
                "additionalProperties": true,
                "required": [
                  "orderItemId",
                  "reason",
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/api/admin/reconcile": {
      "post": {
        "operationId": "post_api_admin_reconcile",
        "summary": "Process bounded due reconciliation jobs",
        "tags": [
          "Owner operations"
        ],
        "description": " Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true
                      }
                    },
                    "outbox": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10
                  }
                },
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/admin/overview": {
      "get": {
        "operationId": "get_api_admin_overview",
        "summary": "Read actual recent requests, events and orders",
        "tags": [
          "Owner operations"
        ],
        "description": " Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "requests": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true
                      }
                    },
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true
                      }
                    },
                    "orders": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/api/admin/requests/{id}": {
      "delete": {
        "operationId": "delete_api_admin_requests_id",
        "summary": "Delete a stored request as authorized owner",
        "tags": [
          "Owner operations"
        ],
        "description": " Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/admin/packages": {
      "get": {
        "operationId": "get_api_admin_packages",
        "summary": "List private operator package metadata",
        "tags": [
          "Owner operations"
        ],
        "description": "Private operator inventory; bucket keys are not customer download URLs. Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "packages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/api/admin/packages/{id}": {
      "put": {
        "operationId": "put_api_admin_packages_id",
        "summary": "Upload prepared compatibility release privately",
        "tags": [
          "Owner operations"
        ],
        "description": "Used by the hidden-stdin private release uploader. New edited editions use version-specific uploads. Requires the server owner role or a private operator service key; do not place the service key in browser code.",
        "x-platform-auth": "owner",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "bytes": {
                      "type": "integer"
                    },
                    "sha256": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 80
            }
          },
          {
            "name": "X-Content-SHA256",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{64}$"
            },
            "description": "SHA256 of exact raw uploaded bytes. The server independently validates."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/zip": {
              "schema": {
                "type": "string",
                "format": "binary",
                "maxLength": 33554432
              }
            }
          }
        }
      }
    },
    "/api/admin/claim": {
      "post": {
        "operationId": "post_api_admin_claim",
        "summary": "Private owner repair/bootstrap compatibility operation",
        "tags": [
          "Owner operations"
        ],
        "description": "Normal onboarding is first matching trusted owner sign-in. This private operator route requires service authorization and an actual stable Site ID, never spoofed identity headers or a browser service-key form.",
        "x-platform-auth": "owner-service-key",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "string",
                    "maxLength": 200
                  }
                },
                "additionalProperties": true
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "retryable": {
            "type": "boolean"
          }
        },
        "additionalProperties": true,
        "required": [
          "error"
        ]
      },
      "Ok": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "additionalProperties": true
      },
      "Price": {
        "type": "object",
        "properties": {
          "licenseId": {
            "type": "string",
            "const": "commercial-v1"
          },
          "amount": {
            "type": "integer",
            "minimum": 0,
            "description": "Integer minor currency units (paise for INR). Never a client-calculated checkout amount."
          },
          "currency": {
            "type": "string",
            "enum": [
              "INR"
            ]
          },
          "active": {
            "type": [
              "boolean",
              "integer"
            ]
          }
        },
        "additionalProperties": true,
        "required": [
          "amount",
          "currency"
        ]
      },
      "Identity": {
        "type": "object",
        "properties": {
          "signedIn": {
            "type": "boolean"
          },
          "userId": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "admin": {
            "type": "boolean"
          }
        },
        "additionalProperties": true,
        "required": [
          "signedIn",
          "userId",
          "email",
          "admin"
        ]
      },
      "Status": {
        "type": "object",
        "properties": {
          "storage": {
            "type": "boolean"
          },
          "commerce": {
            "type": "boolean"
          },
          "provider": {
            "type": [
              "string",
              "null"
            ]
          },
          "prices": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Price"
            }
          }
        },
        "additionalProperties": true,
        "required": [
          "storage",
          "commerce",
          "provider",
          "prices"
        ]
      },
      "CartItem": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "maxLength": 80
          },
          "version": {
            "type": "string",
            "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[a-z0-9.-]+)?$",
            "maxLength": 40
          },
          "licenseId": {
            "type": "string",
            "const": "commercial-v1"
          }
        },
        "additionalProperties": false,
        "required": [
          "productId",
          "version",
          "licenseId"
        ]
      },
      "CartWrite": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 30,
            "items": {
              "$ref": "#/components/schemas/CartItem"
            }
          }
        },
        "additionalProperties": false,
        "required": [
          "items"
        ]
      },
      "QuoteItem": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "maxLength": 80
          },
          "version": {
            "type": "string",
            "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[a-z0-9.-]+)?$",
            "maxLength": 40
          },
          "licenseId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "amount": {
            "type": [
              "integer",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "available": {
            "type": "boolean"
          },
          "error": {
            "type": "string"
          },
          "bundleMembers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "productId": {
                  "type": "string",
                  "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                  "maxLength": 80
                },
                "version": {
                  "type": "string",
                  "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[a-z0-9.-]+)?$",
                  "maxLength": 40
                },
                "name": {
                  "type": "string"
                }
              },
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": true
      },
      "Cart": {
        "type": "object",
        "properties": {
          "cart": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "revision": {
                "type": "integer"
              },
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CartItem"
                }
              }
            },
            "additionalProperties": true
          },
          "quote": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/QuoteItem"
                }
              },
              "total": {
                "type": "integer",
                "minimum": 0,
                "description": "Integer minor currency units (paise for INR). Never a client-calculated checkout amount."
              },
              "currency": {
                "type": "string",
                "const": "INR"
              },
              "valid": {
                "type": "boolean"
              }
            },
            "additionalProperties": true
          }
        },
        "additionalProperties": true,
        "required": [
          "cart",
          "quote"
        ]
      },
      "CheckoutInput": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string",
            "minLength": 10,
            "maxLength": 20,
            "description": "Checkout phone; server normalizes permitted spaces/hyphens and validates 10?15 digits with optional +."
          },
          "license": {
            "type": "string",
            "const": "commercial-v1"
          }
        },
        "additionalProperties": false,
        "required": [
          "phone",
          "license"
        ]
      },
      "CheckoutSession": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "provider": {
            "type": "string",
            "const": "cashfree"
          },
          "mode": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "paymentSessionId": {
            "type": "string"
          },
          "amount": {
            "type": "integer",
            "minimum": 0,
            "description": "Integer minor currency units (paise for INR). Never a client-calculated checkout amount."
          },
          "currency": {
            "type": "string",
            "const": "INR"
          }
        },
        "additionalProperties": true,
        "required": [
          "id",
          "provider",
          "mode",
          "paymentSessionId",
          "amount",
          "currency"
        ]
      },
      "PaidResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "const": "paid"
          },
          "purchases": {
            "type": "string"
          }
        },
        "additionalProperties": true,
        "required": [
          "id",
          "status"
        ]
      },
      "OrderItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "productId": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "maxLength": 80
          },
          "version": {
            "type": "string",
            "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[a-z0-9.-]+)?$",
            "maxLength": 40
          },
          "licenseId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "amount": {
            "type": "integer",
            "minimum": 0,
            "description": "Integer minor currency units (paise for INR). Never a client-calculated checkout amount."
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "bundleSnapshot": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "productId": {
                  "type": "string",
                  "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                  "maxLength": 80
                },
                "version": {
                  "type": "string",
                  "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[a-z0-9.-]+)?$",
                  "maxLength": 40
                },
                "name": {
                  "type": "string"
                }
              },
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": true
      },
      "Order": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "product_id": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "amount": {
            "type": "integer",
            "minimum": 0,
            "description": "Integer minor currency units (paise for INR). Never a client-calculated checkout amount."
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "created_at": {
            "type": "integer"
          },
          "paid_at": {
            "type": [
              "integer",
              "null"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItem"
            }
          }
        },
        "additionalProperties": true
      },
      "Entitlement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "productId": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "maxLength": 80
          },
          "version": {
            "type": "string",
            "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[a-z0-9.-]+)?$",
            "maxLength": 40
          },
          "orderId": {
            "type": "string",
            "format": "uuid"
          },
          "orderItemId": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "DownloadGrant": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri-reference",
            "description": "Same-origin short-lived signed URL, bound to the current user and active entitlement."
          },
          "expiresAt": {
            "type": "integer",
            "description": "UTC epoch milliseconds."
          }
        },
        "additionalProperties": true,
        "required": [
          "url",
          "expiresAt"
        ]
      },
      "RequestInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 100
          },
          "useCase": {
            "type": "string",
            "minLength": 3,
            "maxLength": 100
          },
          "format": {
            "type": "string",
            "minLength": 2,
            "maxLength": 80
          },
          "details": {
            "type": "string",
            "minLength": 20,
            "maxLength": 3000
          },
          "website": {
            "type": "string",
            "description": "Honeypot; leave empty."
          }
        },
        "additionalProperties": true,
        "required": [
          "name",
          "useCase",
          "format",
          "details"
        ]
      },
      "Preview": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Validated same-origin preview URL; no arbitrary remote or HTML resource."
          },
          "alt": {
            "type": "string",
            "minLength": 3
          },
          "kind": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "model"
            ]
          }
        },
        "additionalProperties": true,
        "required": [
          "url",
          "alt",
          "kind"
        ]
      },
      "VersionMetadata": {
        "type": "object",
        "properties": {
          "rightsConfirmed": {
            "type": "boolean"
          },
          "provenance": {
            "type": "string"
          },
          "documentation": {
            "type": "string"
          },
          "supportScope": {
            "type": "string"
          },
          "includes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "compatibility": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "previews": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Preview"
            }
          },
          "updatePolicy": {
            "type": "string",
            "const": "purchased-version-only"
          }
        },
        "additionalProperties": true
      },
      "ProductWrite": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "maxLength": 80
          },
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 160
          },
          "category": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "maxLength": 80
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "subtitle": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "formats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "compatibility": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 80
            }
          },
          "seo": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": "string"
              }
            },
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "Product": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "maxLength": 80
          },
          "name": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "maxLength": 80
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "validating",
              "ready",
              "published",
              "retired"
            ]
          },
          "description": {
            "type": "string"
          },
          "subtitle": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "formats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "compatibility": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "seo": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": "string"
              }
            },
            "additionalProperties": true
          },
          "latestVersion": {
            "type": [
              "string",
              "null"
            ]
          },
          "prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Price"
            }
          },
          "previews": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Preview"
            }
          },
          "versionMetadata": {
            "$ref": "#/components/schemas/VersionMetadata"
          }
        },
        "additionalProperties": true
      },
      "Version": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "maxLength": 80
          },
          "version": {
            "type": "string",
            "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[a-z0-9.-]+)?$",
            "maxLength": 40
          },
          "status": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "metadata": {
            "$ref": "#/components/schemas/VersionMetadata"
          },
          "files": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": true
      },
      "VersionWrite": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string",
            "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[a-z0-9.-]+)?$",
            "maxLength": 40
          },
          "notes": {
            "type": "string"
          },
          "metadata": {
            "$ref": "#/components/schemas/VersionMetadata"
          }
        },
        "additionalProperties": true,
        "required": [
          "version",
          "metadata"
        ]
      },
      "Catalog": {
        "type": "object",
        "properties": {
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Product"
            }
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                  "maxLength": 80
                },
                "name": {
                  "type": "string"
                }
              },
              "additionalProperties": true
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                  "maxLength": 80
                },
                "name": {
                  "type": "string"
                }
              },
              "additionalProperties": true
            }
          },
          "collections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          },
          "settings": {
            "$ref": "#/components/schemas/Settings"
          }
        },
        "additionalProperties": true
      },
      "Settings": {
        "type": "object",
        "properties": {
          "homePreset": {
            "type": "string",
            "enum": [
              "studio",
              "cinematic",
              "gallery"
            ]
          },
          "business": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Whitelisted real public business fields only; credential-like keys are rejected."
          },
          "policies": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Whitelisted public policy fields/references, never secrets."
          },
          "featured": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 80
            }
          }
        },
        "additionalProperties": true
      },
      "CollectionWrite": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "collection",
              "bundle"
            ]
          },
          "members": {
            "type": "array",
            "maxItems": 30,
            "items": {
              "type": "object",
              "properties": {
                "productId": {
                  "type": "string",
                  "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                  "maxLength": 80
                },
                "version": {
                  "type": "string",
                  "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[a-z0-9.-]+)?$",
                  "maxLength": 40
                }
              },
              "additionalProperties": true,
              "required": [
                "productId",
                "version"
              ]
            }
          }
        },
        "additionalProperties": true,
        "required": [
          "name",
          "kind",
          "members"
        ]
      },
      "PurchaseRecord": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "purchase-record"
          },
          "order": {
            "$ref": "#/components/schemas/Order"
          },
          "snapshot": {
            "type": "object",
            "properties": {
              "business": {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              },
              "policies": {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              },
              "license": {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              },
              "tax": {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              }
            },
            "additionalProperties": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItem"
            }
          },
          "emailDelivery": {
            "type": "string"
          }
        },
        "additionalProperties": true,
        "description": "Stored purchase snapshot; not automatically a tax invoice or proof that email was delivered."
      },
      "OwnerOrder": {
        "type": "object",
        "properties": {
          "order": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItem"
            }
          },
          "paymentAttempts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          },
          "refunds": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          },
          "downloads": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          },
          "jobs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          },
          "audits": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": true
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Malformed/invalid input or signature.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "A trusted platform sign-in is required.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Ownership/role/origin/grant authorization failed.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource was not found or is not public to the caller.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Conflict": {
        "description": "Source/publication/price/payment state does not allow this action.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "TooLarge": {
        "description": "Raw request/archive/preview exceeds the bounded size.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Request rate limit exceeded.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unavailable": {
        "description": "Storage, provider, source or required configuration is unavailable.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "string"
            },
            "description": "Present on applicable retryable provider inconsistency responses."
          }
        }
      }
    },
    "securitySchemes": {
      "OwnerServiceKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-dhebe-admin",
        "description": "Private operator/native secret only. Authenticated owner sessions are an alternative checked server-side. Never place this key in public JavaScript or localStorage."
      }
    }
  },
  "externalDocs": {
    "description": "Repository API notes",
    "url": "https://assets.dhebe.com/help/"
  }
}
