{
  "openapi": "3.0.3",
  "info": {
    "title": "KeepInTracks Public API",
    "version": "1.0.0",
    "description": "Read-only public API (`/v1`) for tenant integrators. Authenticate with a scoped tenant API key in the `Authorization` header (`Bearer ak_live_…`). Generated from Zod schemas in `@keepintracks/schemas/public-api` — do not hand-edit `openapi/public-v1.json`; run `npm run openapi:public`."
  },
  "servers": [
    {
      "url": "/",
      "description": "Tenant hostname (`app.{tenant}.keepintracks.com` or custom domain)"
    }
  ],
  "tags": [
    {
      "name": "Contacts",
      "description": "People and companies (`entity.contact`)"
    },
    {
      "name": "Invoices",
      "description": "Accounts receivable invoices"
    },
    {
      "name": "Quotes",
      "description": "Pre-invoice estimates"
    },
    {
      "name": "Sales",
      "description": "Completed / voided sales (POS, portal, API)"
    },
    {
      "name": "Jobs",
      "description": "Field service jobs"
    },
    {
      "name": "Products",
      "description": "Tenant product/service catalog"
    },
    {
      "name": "Expenses",
      "description": "Accounts payable bills"
    },
    {
      "name": "Payments",
      "description": "Money received against invoices"
    },
    {
      "name": "Vendors",
      "description": "Accounts payable vendors"
    },
    {
      "name": "Insights",
      "description": "Governed financial and operational analytics"
    }
  ],
  "paths": {
    "/v1/insights/query": {
      "post": {
        "operationId": "queryInsights",
        "summary": "Run a governed Insights query",
        "tags": [
          "Insights"
        ],
        "security": [
          {
            "TenantApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightsQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "500": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SemanticQuery"
              }
            }
          }
        },
        "description": "Requires insights.query scope and enabled Insights composition. Read-only financial and operational analytics, including permitted grouped labels. Uses the same one-measure semantic query and provenance/reconciliation response as the staff Insights route; no arbitrary SQL or dashboard access. Tenant/timezone come from the active key. Existing per-IP/per-key rate limits and one usage credit per successful query apply."
      }
    },
    "/v1/contacts": {
      "get": {
        "operationId": "listContacts",
        "summary": "List contacts",
        "tags": [
          "Contacts"
        ],
        "security": [
          {
            "TenantApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicContactListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous page `nextCursor`",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (1–100)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Case-insensitive match on display name, email, phone, or company",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lifecycleStage",
            "in": "query",
            "required": false,
            "description": "Relationship stage",
            "schema": {
              "type": "string",
              "enum": [
                "lead",
                "prospect",
                "active",
                "dormant",
                "lost"
              ]
            }
          }
        ]
      }
    },
    "/v1/contacts/{contactId}": {
      "get": {
        "operationId": "getContact",
        "summary": "Get a contact",
        "tags": [
          "Contacts"
        ],
        "security": [
          {
            "TenantApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicContact"
                }
              }
            }
          },
          "400": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/invoices": {
      "get": {
        "operationId": "listInvoices",
        "summary": "List invoices",
        "tags": [
          "Invoices"
        ],
        "security": [
          {
            "TenantApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicInvoiceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous page `nextCursor`",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (1–100)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "sent",
                "partial",
                "paid",
                "overdue",
                "void"
              ]
            }
          },
          {
            "name": "overdue",
            "in": "query",
            "required": false,
            "description": "Only overdue invoices (due date passed, open AR)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "contactId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Match on invoice number or contact",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/invoices/{invoiceId}": {
      "get": {
        "operationId": "getInvoice",
        "summary": "Get an invoice",
        "tags": [
          "Invoices"
        ],
        "security": [
          {
            "TenantApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicInvoice"
                }
              }
            }
          },
          "400": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/quotes": {
      "get": {
        "operationId": "listQuotes",
        "summary": "List quotes",
        "tags": [
          "Quotes"
        ],
        "security": [
          {
            "TenantApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicQuoteListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous page `nextCursor`",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (1–100)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "contactId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "dealId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "sent",
                "accepted",
                "declined",
                "converted"
              ]
            }
          }
        ]
      }
    },
    "/v1/quotes/{quoteId}": {
      "get": {
        "operationId": "getQuote",
        "summary": "Get a quote",
        "tags": [
          "Quotes"
        ],
        "security": [
          {
            "TenantApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicQuote"
                }
              }
            }
          },
          "400": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "quoteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/sales": {
      "get": {
        "operationId": "listSales",
        "summary": "List sales",
        "tags": [
          "Sales"
        ],
        "security": [
          {
            "TenantApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicSaleListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous page `nextCursor`",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (1–100)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "contactId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "channel",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pos",
                "portal",
                "api",
                "manual"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "completed",
                "void"
              ]
            }
          }
        ]
      }
    },
    "/v1/sales/{saleId}": {
      "get": {
        "operationId": "getSale",
        "summary": "Get a sale",
        "tags": [
          "Sales"
        ],
        "security": [
          {
            "TenantApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicSale"
                }
              }
            }
          },
          "400": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "saleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/jobs": {
      "get": {
        "operationId": "listJobs",
        "summary": "List jobs",
        "tags": [
          "Jobs"
        ],
        "security": [
          {
            "TenantApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicJobListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous page `nextCursor`",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (1–100)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unscheduled",
                "scheduled",
                "on_site",
                "done",
                "cancelled"
              ]
            }
          },
          {
            "name": "contactId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Inclusive lower bound (YYYY-MM-DD)",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Inclusive upper bound (YYYY-MM-DD)",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Match on job title",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Ordering (default recency)",
            "schema": {
              "type": "string",
              "enum": [
                "recent",
                "scheduled"
              ]
            }
          }
        ]
      }
    },
    "/v1/jobs/{jobId}": {
      "get": {
        "operationId": "getJob",
        "summary": "Get a job",
        "tags": [
          "Jobs"
        ],
        "security": [
          {
            "TenantApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicJob"
                }
              }
            }
          },
          "400": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/products": {
      "get": {
        "operationId": "listProducts",
        "summary": "List products",
        "tags": [
          "Products"
        ],
        "security": [
          {
            "TenantApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicProductListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous page `nextCursor`",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (1–100)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Match on product name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "product",
                "service"
              ]
            }
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "description": "Default: active only",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false",
                "all"
              ]
            }
          }
        ]
      }
    },
    "/v1/products/{productId}": {
      "get": {
        "operationId": "getProduct",
        "summary": "Get a product",
        "tags": [
          "Products"
        ],
        "security": [
          {
            "TenantApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicProduct"
                }
              }
            }
          },
          "400": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/expenses": {
      "get": {
        "operationId": "listExpenses",
        "summary": "List expenses",
        "tags": [
          "Expenses"
        ],
        "security": [
          {
            "TenantApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicExpenseListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous page `nextCursor`",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (1–100)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "partial",
                "paid",
                "void"
              ]
            }
          },
          {
            "name": "vendorId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "jobId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "contactId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/expenses/{expenseId}": {
      "get": {
        "operationId": "getExpense",
        "summary": "Get an expense",
        "tags": [
          "Expenses"
        ],
        "security": [
          {
            "TenantApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicExpense"
                }
              }
            }
          },
          "400": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "expenseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/payments": {
      "get": {
        "operationId": "listPayments",
        "summary": "List payments",
        "tags": [
          "Payments"
        ],
        "security": [
          {
            "TenantApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicPaymentListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous page `nextCursor`",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (1–100)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "invoiceId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "contactId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/payments/{paymentId}": {
      "get": {
        "operationId": "getPayment",
        "summary": "Get a payment",
        "tags": [
          "Payments"
        ],
        "security": [
          {
            "TenantApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicPayment"
                }
              }
            }
          },
          "400": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "paymentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/vendors": {
      "get": {
        "operationId": "listVendors",
        "summary": "List vendors",
        "tags": [
          "Vendors"
        ],
        "security": [
          {
            "TenantApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicVendorListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from the previous page `nextCursor`",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (1–100)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Match on vendor name",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/vendors/{vendorId}": {
      "get": {
        "operationId": "getVendor",
        "summary": "Get a vendor",
        "tags": [
          "Vendors"
        ],
        "security": [
          {
            "TenantApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicVendor"
                }
              }
            }
          },
          "400": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Standard API error envelope (docs/design/errors.md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vendorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "TenantApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Scoped tenant API key in `Authorization: Bearer ak_live_…` form (`integ.p3.01`)"
      }
    },
    "schemas": {
      "ApiErrorBody": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "details": {
                "type": "object",
                "additionalProperties": {}
              },
              "requestId": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "InsightsQueryResponse": {
        "type": "object",
        "properties": {
          "metricId": {
            "type": "string",
            "enum": [
              "metric.revenue_cash",
              "metric.revenue_accrual",
              "metric.revenue_by_product",
              "metric.revenue_by_contact",
              "metric.expense_cash",
              "metric.expense_by_category",
              "metric.pnl_cash",
              "metric.ar_open",
              "metric.ar_aging_current",
              "metric.ar_aging_1_30",
              "metric.ar_aging_31_60",
              "metric.ar_aging_61_90",
              "metric.ar_aging_over_90",
              "metric.contact_financials",
              "metric.contact_profitability",
              "metric.job_cost",
              "metric.job_labor_cost",
              "metric.job_margin",
              "metric.service_job_contribution",
              "metric.service_callback_rate",
              "metric.service_skill_capacity",
              "metric.vendor_financials",
              "metric.jobs_today_scheduled",
              "metric.jobs_today_completed",
              "metric.tasks_overdue_invoices",
              "metric.bills_due_soon",
              "metric.low_stock",
              "metric.out_of_stock",
              "metric.tax_collected",
              "metric.tax_collected_by_code",
              "metric.sales_revenue",
              "metric.sales_count",
              "metric.average_sale_value",
              "metric.sales_revenue_percent_of_total",
              "metric.sales_tips",
              "metric.register_expected_cash",
              "metric.register_card_batch",
              "metric.deal_win_rate",
              "metric.deal_win_rate_by_lead_source",
              "metric.deal_revenue_by_lead_source",
              "metric.payment_dispute_fees",
              "metric.payment_dispute_fees_by_kind",
              "metric.stored_value_outstanding",
              "metric.stored_value_outstanding_by_kind",
              "metric.consignor_payable_outstanding",
              "metric.consignor_payable_by_contact",
              "metric.perishable_waste_cost",
              "metric.perishable_waste_by_product",
              "metric.appointment_booked_hours",
              "metric.appointment_booked_hours_by_resource",
              "metric.appointment_no_show_rate",
              "metric.appointment_resource_utilization",
              "metric.appointment_cancellation_rate",
              "metric.appointment_rebooking_rate",
              "metric.trial_balance",
              "metric.project_unbilled_hours",
              "metric.project_billed_revenue",
              "metric.project_retainer_burn",
              "metric.project_actual_profitability",
              "metric.inventory_sell_through",
              "metric.inventory_stock_cover",
              "metric.inventory_waste_actual_cost",
              "metric.income_statement",
              "metric.balance_sheet",
              "metric.cash_flow_statement",
              "metric.personal.cash_income",
              "metric.personal.cash_expense",
              "metric.personal.cash_debt_principal",
              "metric.personal.cash_net",
              "metric.personal.cash_by_category",
              "metric.personal.budget_actual",
              "metric.personal.networth_assets",
              "metric.personal.networth_liabilities",
              "metric.personal.networth_total",
              "metric.personal.networth_trend",
              "metric.personal.debt_payoff",
              "metric.purchase_plan_selected_total",
              "metric.purchase_plan_progress",
              "metric.purchase_option_unit_price",
              "metric.purchase_option_ownership_cost",
              "metric.purchase_portfolio_cash_forecast"
            ]
          },
          "unit": {
            "type": "string",
            "enum": [
              "money",
              "count",
              "percent",
              "duration"
            ]
          },
          "dimension": {
            "nullable": true,
            "type": "string",
            "enum": [
              "month",
              "customer",
              "category",
              "employee",
              "product"
            ]
          },
          "period": {
            "type": "string"
          },
          "periodKind": {
            "type": "string",
            "enum": [
              "month",
              "quarter",
              "year"
            ]
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "minLength": 1
                },
                "keyId": {
                  "nullable": true,
                  "type": "string"
                },
                "amountCents": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "key",
                "keyId",
                "amountCents"
              ],
              "additionalProperties": false
            }
          },
          "totalCents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "compareTotalCents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "reconciliation": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "complete",
                  "truncated",
                  "incomplete"
                ]
              },
              "returnedCents": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "omittedCents": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "omittedRowCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "status",
              "returnedCents",
              "omittedCents",
              "omittedRowCount"
            ],
            "additionalProperties": false
          },
          "chartHint": {
            "type": "string",
            "enum": [
              "bar",
              "line",
              "donut"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "basis": {
                "type": "string",
                "enum": [
                  "cash",
                  "accrual"
                ]
              },
              "period": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "minLength": 1
                  },
                  "to": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "additionalProperties": false
              },
              "metricIds": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "metric.revenue_cash",
                    "metric.revenue_accrual",
                    "metric.revenue_by_product",
                    "metric.revenue_by_contact",
                    "metric.expense_cash",
                    "metric.expense_by_category",
                    "metric.pnl_cash",
                    "metric.ar_open",
                    "metric.ar_aging_current",
                    "metric.ar_aging_1_30",
                    "metric.ar_aging_31_60",
                    "metric.ar_aging_61_90",
                    "metric.ar_aging_over_90",
                    "metric.contact_financials",
                    "metric.contact_profitability",
                    "metric.job_cost",
                    "metric.job_labor_cost",
                    "metric.job_margin",
                    "metric.service_job_contribution",
                    "metric.service_callback_rate",
                    "metric.service_skill_capacity",
                    "metric.vendor_financials",
                    "metric.jobs_today_scheduled",
                    "metric.jobs_today_completed",
                    "metric.tasks_overdue_invoices",
                    "metric.bills_due_soon",
                    "metric.low_stock",
                    "metric.out_of_stock",
                    "metric.tax_collected",
                    "metric.tax_collected_by_code",
                    "metric.sales_revenue",
                    "metric.sales_count",
                    "metric.average_sale_value",
                    "metric.sales_revenue_percent_of_total",
                    "metric.sales_tips",
                    "metric.register_expected_cash",
                    "metric.register_card_batch",
                    "metric.deal_win_rate",
                    "metric.deal_win_rate_by_lead_source",
                    "metric.deal_revenue_by_lead_source",
                    "metric.payment_dispute_fees",
                    "metric.payment_dispute_fees_by_kind",
                    "metric.stored_value_outstanding",
                    "metric.stored_value_outstanding_by_kind",
                    "metric.consignor_payable_outstanding",
                    "metric.consignor_payable_by_contact",
                    "metric.perishable_waste_cost",
                    "metric.perishable_waste_by_product",
                    "metric.appointment_booked_hours",
                    "metric.appointment_booked_hours_by_resource",
                    "metric.appointment_no_show_rate",
                    "metric.appointment_resource_utilization",
                    "metric.appointment_cancellation_rate",
                    "metric.appointment_rebooking_rate",
                    "metric.trial_balance",
                    "metric.project_unbilled_hours",
                    "metric.project_billed_revenue",
                    "metric.project_retainer_burn",
                    "metric.project_actual_profitability",
                    "metric.inventory_sell_through",
                    "metric.inventory_stock_cover",
                    "metric.inventory_waste_actual_cost",
                    "metric.income_statement",
                    "metric.balance_sheet",
                    "metric.cash_flow_statement",
                    "metric.personal.cash_income",
                    "metric.personal.cash_expense",
                    "metric.personal.cash_debt_principal",
                    "metric.personal.cash_net",
                    "metric.personal.cash_by_category",
                    "metric.personal.budget_actual",
                    "metric.personal.networth_assets",
                    "metric.personal.networth_liabilities",
                    "metric.personal.networth_total",
                    "metric.personal.networth_trend",
                    "metric.personal.debt_payoff",
                    "metric.purchase_plan_selected_total",
                    "metric.purchase_plan_progress",
                    "metric.purchase_option_unit_price",
                    "metric.purchase_option_ownership_cost",
                    "metric.purchase_portfolio_cash_forecast"
                  ]
                }
              },
              "generatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              }
            },
            "required": [
              "basis",
              "period",
              "metricIds",
              "generatedAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "metricId",
          "unit",
          "dimension",
          "period",
          "periodKind",
          "from",
          "to",
          "rows",
          "totalCents",
          "reconciliation",
          "chartHint",
          "meta"
        ],
        "additionalProperties": false
      },
      "SemanticQuery": {
        "type": "object",
        "properties": {
          "measures": {
            "minItems": 1,
            "maxItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "metric.revenue_cash",
                "metric.revenue_accrual",
                "metric.revenue_by_product",
                "metric.revenue_by_contact",
                "metric.expense_cash",
                "metric.expense_by_category",
                "metric.pnl_cash",
                "metric.ar_open",
                "metric.ar_aging_current",
                "metric.ar_aging_1_30",
                "metric.ar_aging_31_60",
                "metric.ar_aging_61_90",
                "metric.ar_aging_over_90",
                "metric.contact_financials",
                "metric.contact_profitability",
                "metric.job_cost",
                "metric.job_labor_cost",
                "metric.job_margin",
                "metric.service_job_contribution",
                "metric.service_callback_rate",
                "metric.service_skill_capacity",
                "metric.vendor_financials",
                "metric.jobs_today_scheduled",
                "metric.jobs_today_completed",
                "metric.tasks_overdue_invoices",
                "metric.bills_due_soon",
                "metric.low_stock",
                "metric.out_of_stock",
                "metric.tax_collected",
                "metric.tax_collected_by_code",
                "metric.sales_revenue",
                "metric.sales_count",
                "metric.average_sale_value",
                "metric.sales_revenue_percent_of_total",
                "metric.sales_tips",
                "metric.register_expected_cash",
                "metric.register_card_batch",
                "metric.deal_win_rate",
                "metric.deal_win_rate_by_lead_source",
                "metric.deal_revenue_by_lead_source",
                "metric.payment_dispute_fees",
                "metric.payment_dispute_fees_by_kind",
                "metric.stored_value_outstanding",
                "metric.stored_value_outstanding_by_kind",
                "metric.consignor_payable_outstanding",
                "metric.consignor_payable_by_contact",
                "metric.perishable_waste_cost",
                "metric.perishable_waste_by_product",
                "metric.appointment_booked_hours",
                "metric.appointment_booked_hours_by_resource",
                "metric.appointment_no_show_rate",
                "metric.appointment_resource_utilization",
                "metric.appointment_cancellation_rate",
                "metric.appointment_rebooking_rate",
                "metric.trial_balance",
                "metric.project_unbilled_hours",
                "metric.project_billed_revenue",
                "metric.project_retainer_burn",
                "metric.project_actual_profitability",
                "metric.inventory_sell_through",
                "metric.inventory_stock_cover",
                "metric.inventory_waste_actual_cost",
                "metric.income_statement",
                "metric.balance_sheet",
                "metric.cash_flow_statement",
                "metric.personal.cash_income",
                "metric.personal.cash_expense",
                "metric.personal.cash_debt_principal",
                "metric.personal.cash_net",
                "metric.personal.cash_by_category",
                "metric.personal.budget_actual",
                "metric.personal.networth_assets",
                "metric.personal.networth_liabilities",
                "metric.personal.networth_total",
                "metric.personal.networth_trend",
                "metric.personal.debt_payoff",
                "metric.purchase_plan_selected_total",
                "metric.purchase_plan_progress",
                "metric.purchase_option_unit_price",
                "metric.purchase_option_ownership_cost",
                "metric.purchase_portfolio_cash_forecast"
              ]
            }
          },
          "dimensions": {
            "maxItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "month",
                "customer",
                "category",
                "employee",
                "product"
              ]
            }
          },
          "period": {
            "default": "month",
            "type": "string",
            "enum": [
              "month",
              "quarter",
              "year"
            ]
          },
          "compareTo": {
            "type": "string",
            "enum": [
              "prior_period",
              "prior_year"
            ]
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 500
          }
        },
        "required": [
          "measures"
        ]
      },
      "PublicContactListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "tenantId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "displayName": {
                  "type": "string"
                },
                "email": {
                  "nullable": true,
                  "type": "string",
                  "format": "email",
                  "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                },
                "phone": {
                  "nullable": true,
                  "type": "string"
                },
                "companyName": {
                  "nullable": true,
                  "type": "string"
                },
                "city": {
                  "nullable": true,
                  "type": "string"
                },
                "region": {
                  "nullable": true,
                  "type": "string"
                },
                "lifecycleStage": {
                  "type": "string",
                  "enum": [
                    "lead",
                    "prospect",
                    "active",
                    "dormant",
                    "lost"
                  ]
                },
                "contactType": {
                  "type": "string",
                  "enum": [
                    "person",
                    "organization"
                  ]
                },
                "parentContactId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "updatedAt": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "preferredLocale": {
                  "nullable": true,
                  "type": "string",
                  "pattern": "^[a-z]{2}$"
                },
                "openBalanceCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "overdueCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "retiredAt": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "required": [
                "id",
                "tenantId",
                "displayName",
                "email",
                "phone",
                "companyName",
                "city",
                "region",
                "lifecycleStage",
                "contactType",
                "parentContactId",
                "updatedAt",
                "createdAt",
                "preferredLocale",
                "openBalanceCents",
                "overdueCents"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "PublicContact": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "displayName": {
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string",
            "format": "email",
            "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          },
          "companyName": {
            "nullable": true,
            "type": "string"
          },
          "addressLine1": {
            "nullable": true,
            "type": "string"
          },
          "addressLine2": {
            "nullable": true,
            "type": "string"
          },
          "city": {
            "nullable": true,
            "type": "string"
          },
          "region": {
            "nullable": true,
            "type": "string"
          },
          "postalCode": {
            "nullable": true,
            "type": "string"
          },
          "country": {
            "nullable": true,
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "lifecycleStage": {
            "type": "string",
            "enum": [
              "lead",
              "prospect",
              "active",
              "dormant",
              "lost"
            ]
          },
          "contactType": {
            "type": "string",
            "enum": [
              "person",
              "organization"
            ]
          },
          "parentContactId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "leadSource": {
            "nullable": true,
            "type": "string"
          },
          "paymentTermsDays": {
            "type": "integer",
            "minimum": 0,
            "maximum": 365
          },
          "marketingConsent": {
            "type": "boolean"
          },
          "marketingConsentPurposes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "email",
                "sms"
              ]
            }
          },
          "taxExempt": {
            "type": "boolean"
          },
          "taxId": {
            "nullable": true,
            "type": "string"
          },
          "preferredLocale": {
            "nullable": true,
            "type": "string",
            "pattern": "^[a-z]{2}$"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "createdBy": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "updatedBy": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "id",
          "tenantId",
          "displayName",
          "email",
          "phone",
          "companyName",
          "addressLine1",
          "addressLine2",
          "city",
          "region",
          "postalCode",
          "country",
          "notes",
          "lifecycleStage",
          "contactType",
          "parentContactId",
          "leadSource",
          "paymentTermsDays",
          "marketingConsent",
          "marketingConsentPurposes",
          "taxExempt",
          "taxId",
          "preferredLocale",
          "createdAt",
          "updatedAt",
          "createdBy",
          "updatedBy"
        ],
        "additionalProperties": false
      },
      "PublicInvoiceListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "tenantId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "contactId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "sent",
                    "partial",
                    "paid",
                    "overdue",
                    "void"
                  ]
                },
                "invoiceNumber": {
                  "nullable": true,
                  "type": "string"
                },
                "currency": {
                  "type": "string",
                  "pattern": "^[A-Z]{3}$",
                  "description": "ISO-4217 currency code (uppercase)"
                },
                "issueDate": {
                  "nullable": true,
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "dueAt": {
                  "nullable": true,
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "sentAt": {
                  "nullable": true,
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "jurisdictionCode": {
                  "nullable": true,
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 16,
                  "pattern": "^[A-Z]{2}(-[A-Z0-9]{1,8})?$"
                },
                "pricesIncludeTax": {
                  "type": "boolean"
                },
                "contactSiteId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "jobId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "projectId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "billingKind": {
                  "type": "string",
                  "enum": [
                    "standard",
                    "deposit",
                    "draw"
                  ]
                },
                "depositRecognizedAt": {
                  "nullable": true,
                  "type": "string"
                },
                "subtotalCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "taxCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "totalCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "balanceCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                },
                "createdBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "updatedBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "contactDisplayName": {
                  "nullable": true,
                  "type": "string"
                },
                "retiredAt": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "required": [
                "id",
                "tenantId",
                "contactId",
                "status",
                "invoiceNumber",
                "currency",
                "issueDate",
                "dueAt",
                "sentAt",
                "notes",
                "jurisdictionCode",
                "pricesIncludeTax",
                "contactSiteId",
                "jobId",
                "projectId",
                "billingKind",
                "subtotalCents",
                "taxCents",
                "totalCents",
                "balanceCents",
                "createdAt",
                "updatedAt",
                "createdBy",
                "updatedBy"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "PublicInvoice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "contactId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "sent",
              "partial",
              "paid",
              "overdue",
              "void"
            ]
          },
          "invoiceNumber": {
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$",
            "description": "ISO-4217 currency code (uppercase)"
          },
          "issueDate": {
            "nullable": true,
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "dueAt": {
            "nullable": true,
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "sentAt": {
            "nullable": true,
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "jurisdictionCode": {
            "nullable": true,
            "type": "string",
            "minLength": 2,
            "maxLength": 16,
            "pattern": "^[A-Z]{2}(-[A-Z0-9]{1,8})?$"
          },
          "pricesIncludeTax": {
            "type": "boolean"
          },
          "contactSiteId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "jobId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "projectId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "billingKind": {
            "type": "string",
            "enum": [
              "standard",
              "deposit",
              "draw"
            ]
          },
          "depositRecognizedAt": {
            "nullable": true,
            "type": "string"
          },
          "subtotalCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "taxCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "totalCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "balanceCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "lineItems": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "tenantId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "invoiceId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "position": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "description": {
                  "type": "string"
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unitPriceCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "discountCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "taxRateBps": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 10000
                },
                "subtotalCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "taxCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "totalCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "productId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "taxComponents": {
                  "default": [],
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "componentKind": {
                        "type": "string",
                        "enum": [
                          "tax",
                          "fee"
                        ]
                      },
                      "taxCode": {
                        "type": "string"
                      },
                      "jurisdictionCode": {
                        "type": "string"
                      },
                      "rateMicros": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      "taxableCents": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "taxCents": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "registrationNumber": {
                        "nullable": true,
                        "type": "string"
                      },
                      "position": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "componentKind",
                      "taxCode",
                      "jurisdictionCode",
                      "rateMicros",
                      "taxableCents",
                      "taxCents",
                      "registrationNumber",
                      "position"
                    ],
                    "additionalProperties": false
                  }
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                },
                "createdBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "updatedBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                }
              },
              "required": [
                "id",
                "tenantId",
                "invoiceId",
                "position",
                "description",
                "quantity",
                "unitPriceCents",
                "discountCents",
                "taxRateBps",
                "subtotalCents",
                "taxCents",
                "totalCents",
                "taxComponents",
                "createdAt",
                "updatedAt",
                "createdBy",
                "updatedBy"
              ],
              "additionalProperties": false
            }
          },
          "taxSummary": {
            "default": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "taxCode": {
                  "type": "string"
                },
                "componentKind": {
                  "type": "string",
                  "enum": [
                    "tax",
                    "fee"
                  ]
                },
                "taxCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "taxableCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "registrationNumber": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "required": [
                "taxCode",
                "componentKind",
                "taxCents",
                "taxableCents",
                "registrationNumber"
              ],
              "additionalProperties": false
            }
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "createdBy": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "updatedBy": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "id",
          "tenantId",
          "contactId",
          "status",
          "invoiceNumber",
          "currency",
          "issueDate",
          "dueAt",
          "sentAt",
          "notes",
          "jurisdictionCode",
          "pricesIncludeTax",
          "contactSiteId",
          "jobId",
          "projectId",
          "billingKind",
          "subtotalCents",
          "taxCents",
          "totalCents",
          "balanceCents",
          "lineItems",
          "taxSummary",
          "createdAt",
          "updatedAt",
          "createdBy",
          "updatedBy"
        ],
        "additionalProperties": false
      },
      "PublicQuoteListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "tenantId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "contactId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "dealId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "sent",
                    "accepted",
                    "declined",
                    "converted"
                  ]
                },
                "quoteNumber": {
                  "nullable": true,
                  "type": "string"
                },
                "currency": {
                  "type": "string",
                  "pattern": "^[A-Z]{3}$",
                  "description": "ISO-4217 currency code (uppercase)"
                },
                "issueDate": {
                  "nullable": true,
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "validUntil": {
                  "nullable": true,
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "sentAt": {
                  "nullable": true,
                  "type": "string"
                },
                "acceptedAt": {
                  "nullable": true,
                  "type": "string"
                },
                "declinedAt": {
                  "nullable": true,
                  "type": "string"
                },
                "convertedAt": {
                  "nullable": true,
                  "type": "string"
                },
                "declineReason": {
                  "nullable": true,
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "jurisdictionCode": {
                  "nullable": true,
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 16,
                  "pattern": "^[A-Z]{2}(-[A-Z0-9]{1,8})?$"
                },
                "pricesIncludeTax": {
                  "type": "boolean"
                },
                "contactSiteId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "jobId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "subtotalCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "taxCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "totalCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "convertedJobId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "convertedInvoiceId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                },
                "createdBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "updatedBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "contactDisplayName": {
                  "nullable": true,
                  "type": "string"
                },
                "retiredAt": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "required": [
                "id",
                "tenantId",
                "contactId",
                "dealId",
                "status",
                "quoteNumber",
                "currency",
                "issueDate",
                "validUntil",
                "sentAt",
                "acceptedAt",
                "declinedAt",
                "convertedAt",
                "declineReason",
                "notes",
                "jurisdictionCode",
                "pricesIncludeTax",
                "contactSiteId",
                "jobId",
                "subtotalCents",
                "taxCents",
                "totalCents",
                "convertedJobId",
                "convertedInvoiceId",
                "createdAt",
                "updatedAt",
                "createdBy",
                "updatedBy"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "PublicQuote": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "contactId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "dealId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "sent",
              "accepted",
              "declined",
              "converted"
            ]
          },
          "quoteNumber": {
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$",
            "description": "ISO-4217 currency code (uppercase)"
          },
          "issueDate": {
            "nullable": true,
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "validUntil": {
            "nullable": true,
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "sentAt": {
            "nullable": true,
            "type": "string"
          },
          "acceptedAt": {
            "nullable": true,
            "type": "string"
          },
          "declinedAt": {
            "nullable": true,
            "type": "string"
          },
          "convertedAt": {
            "nullable": true,
            "type": "string"
          },
          "declineReason": {
            "nullable": true,
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "jurisdictionCode": {
            "nullable": true,
            "type": "string",
            "minLength": 2,
            "maxLength": 16,
            "pattern": "^[A-Z]{2}(-[A-Z0-9]{1,8})?$"
          },
          "pricesIncludeTax": {
            "type": "boolean"
          },
          "contactSiteId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "jobId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "subtotalCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "taxCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "totalCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "convertedJobId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "convertedInvoiceId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "lineItems": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "tenantId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "quoteId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "position": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "description": {
                  "type": "string"
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unitPriceCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "discountCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "taxRateBps": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 10000
                },
                "subtotalCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "taxCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "totalCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "productId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "taxComponents": {
                  "default": [],
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "componentKind": {
                        "type": "string",
                        "enum": [
                          "tax",
                          "fee"
                        ]
                      },
                      "taxCode": {
                        "type": "string"
                      },
                      "jurisdictionCode": {
                        "type": "string"
                      },
                      "rateMicros": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      "taxableCents": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "taxCents": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "registrationNumber": {
                        "nullable": true,
                        "type": "string"
                      },
                      "position": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "componentKind",
                      "taxCode",
                      "jurisdictionCode",
                      "rateMicros",
                      "taxableCents",
                      "taxCents",
                      "registrationNumber",
                      "position"
                    ],
                    "additionalProperties": false
                  }
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                },
                "createdBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "updatedBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                }
              },
              "required": [
                "id",
                "tenantId",
                "quoteId",
                "position",
                "description",
                "quantity",
                "unitPriceCents",
                "discountCents",
                "taxRateBps",
                "subtotalCents",
                "taxCents",
                "totalCents",
                "taxComponents",
                "createdAt",
                "updatedAt",
                "createdBy",
                "updatedBy"
              ],
              "additionalProperties": false
            }
          },
          "taxSummary": {
            "default": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "taxCode": {
                  "type": "string"
                },
                "componentKind": {
                  "type": "string",
                  "enum": [
                    "tax",
                    "fee"
                  ]
                },
                "taxCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "taxableCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "registrationNumber": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "required": [
                "taxCode",
                "componentKind",
                "taxCents",
                "taxableCents",
                "registrationNumber"
              ],
              "additionalProperties": false
            }
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "createdBy": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "updatedBy": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "id",
          "tenantId",
          "contactId",
          "dealId",
          "status",
          "quoteNumber",
          "currency",
          "issueDate",
          "validUntil",
          "sentAt",
          "acceptedAt",
          "declinedAt",
          "convertedAt",
          "declineReason",
          "notes",
          "jurisdictionCode",
          "pricesIncludeTax",
          "contactSiteId",
          "jobId",
          "subtotalCents",
          "taxCents",
          "totalCents",
          "convertedJobId",
          "convertedInvoiceId",
          "lineItems",
          "taxSummary",
          "createdAt",
          "updatedAt",
          "createdBy",
          "updatedBy"
        ],
        "additionalProperties": false
      },
      "PublicSaleListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "tenantId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "contactId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "channel": {
                  "type": "string",
                  "enum": [
                    "pos",
                    "portal",
                    "api",
                    "manual"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "completed",
                    "void"
                  ]
                },
                "currency": {
                  "type": "string",
                  "pattern": "^[A-Z]{3}$",
                  "description": "ISO-4217 currency code (uppercase)"
                },
                "notes": {
                  "type": "string"
                },
                "jurisdictionCode": {
                  "nullable": true,
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 16,
                  "pattern": "^[A-Z]{2}(-[A-Z0-9]{1,8})?$"
                },
                "pricesIncludeTax": {
                  "type": "boolean"
                },
                "contactSiteId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "registerSessionId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "completedAt": {
                  "type": "string"
                },
                "voidedAt": {
                  "nullable": true,
                  "type": "string"
                },
                "idempotencyKey": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "subtotalCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "taxCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "totalCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "liabilityCents": {
                  "default": 0,
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "consignorLiabilityCents": {
                  "default": 0,
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "tipCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "tipPaymentMethod": {
                  "nullable": true,
                  "type": "string",
                  "enum": [
                    "cash",
                    "card",
                    "other"
                  ]
                },
                "fulfillmentStatus": {
                  "nullable": true,
                  "type": "string",
                  "enum": [
                    "unfulfilled",
                    "pickup_ready",
                    "shipped",
                    "fulfilled"
                  ]
                },
                "shippingAddress": {
                  "nullable": true,
                  "type": "object",
                  "properties": {
                    "recipientName": {
                      "type": "string",
                      "maxLength": 120
                    },
                    "addressLine1": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "addressLine2": {
                      "nullable": true
                    },
                    "city": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "region": {
                      "nullable": true
                    },
                    "postalCode": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 32
                    },
                    "country": {
                      "nullable": true
                    },
                    "phone": {
                      "nullable": true
                    }
                  },
                  "required": [
                    "addressLine1",
                    "city",
                    "postalCode"
                  ],
                  "additionalProperties": false
                },
                "deliveryMethodId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "deliveryMethodName": {
                  "nullable": true,
                  "type": "string"
                },
                "deliveryMethodType": {
                  "nullable": true,
                  "type": "string",
                  "enum": [
                    "pickup",
                    "flatRate",
                    "freeOverThreshold"
                  ]
                },
                "diningCheckId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "diningTableId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                },
                "createdBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "updatedBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "contactDisplayName": {
                  "nullable": true,
                  "type": "string"
                },
                "retiredAt": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "required": [
                "id",
                "tenantId",
                "contactId",
                "channel",
                "status",
                "currency",
                "notes",
                "jurisdictionCode",
                "pricesIncludeTax",
                "contactSiteId",
                "completedAt",
                "voidedAt",
                "idempotencyKey",
                "subtotalCents",
                "taxCents",
                "totalCents",
                "liabilityCents",
                "consignorLiabilityCents",
                "tipCents",
                "createdAt",
                "updatedAt",
                "createdBy",
                "updatedBy"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "PublicSale": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "contactId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "channel": {
            "type": "string",
            "enum": [
              "pos",
              "portal",
              "api",
              "manual"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "completed",
              "void"
            ]
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$",
            "description": "ISO-4217 currency code (uppercase)"
          },
          "notes": {
            "type": "string"
          },
          "jurisdictionCode": {
            "nullable": true,
            "type": "string",
            "minLength": 2,
            "maxLength": 16,
            "pattern": "^[A-Z]{2}(-[A-Z0-9]{1,8})?$"
          },
          "pricesIncludeTax": {
            "type": "boolean"
          },
          "contactSiteId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "registerSessionId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "completedAt": {
            "type": "string"
          },
          "voidedAt": {
            "nullable": true,
            "type": "string"
          },
          "idempotencyKey": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "subtotalCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "taxCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "totalCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "liabilityCents": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "consignorLiabilityCents": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "tipCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "tipPaymentMethod": {
            "nullable": true,
            "type": "string",
            "enum": [
              "cash",
              "card",
              "other"
            ]
          },
          "fulfillmentStatus": {
            "nullable": true,
            "type": "string",
            "enum": [
              "unfulfilled",
              "pickup_ready",
              "shipped",
              "fulfilled"
            ]
          },
          "shippingAddress": {
            "nullable": true,
            "type": "object",
            "properties": {
              "recipientName": {
                "type": "string",
                "maxLength": 120
              },
              "addressLine1": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "addressLine2": {
                "nullable": true
              },
              "city": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "region": {
                "nullable": true
              },
              "postalCode": {
                "type": "string",
                "minLength": 1,
                "maxLength": 32
              },
              "country": {
                "nullable": true
              },
              "phone": {
                "nullable": true
              }
            },
            "required": [
              "addressLine1",
              "city",
              "postalCode"
            ],
            "additionalProperties": false
          },
          "deliveryMethodId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "deliveryMethodName": {
            "nullable": true,
            "type": "string"
          },
          "deliveryMethodType": {
            "nullable": true,
            "type": "string",
            "enum": [
              "pickup",
              "flatRate",
              "freeOverThreshold"
            ]
          },
          "diningCheckId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "diningTableId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "lineItems": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "tenantId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "saleId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "position": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "description": {
                  "type": "string"
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unitPriceCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "discountCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "taxRateBps": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 10000
                },
                "subtotalCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "taxCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "totalCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "productId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "variantId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "lineKind": {
                  "default": "standard",
                  "type": "string",
                  "enum": [
                    "standard",
                    "stored_value_issue"
                  ]
                },
                "storedValueCode": {
                  "nullable": true,
                  "type": "string"
                },
                "storedValueId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "consignorContactId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "consignorShareCents": {
                  "default": 0,
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "taxComponents": {
                  "default": [],
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "componentKind": {
                        "type": "string",
                        "enum": [
                          "tax",
                          "fee"
                        ]
                      },
                      "taxCode": {
                        "type": "string"
                      },
                      "jurisdictionCode": {
                        "type": "string"
                      },
                      "rateMicros": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      "taxableCents": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "taxCents": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "registrationNumber": {
                        "nullable": true,
                        "type": "string"
                      },
                      "position": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "componentKind",
                      "taxCode",
                      "jurisdictionCode",
                      "rateMicros",
                      "taxableCents",
                      "taxCents",
                      "registrationNumber",
                      "position"
                    ],
                    "additionalProperties": false
                  }
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                },
                "createdBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "updatedBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                }
              },
              "required": [
                "id",
                "tenantId",
                "saleId",
                "position",
                "description",
                "quantity",
                "unitPriceCents",
                "discountCents",
                "taxRateBps",
                "subtotalCents",
                "taxCents",
                "totalCents",
                "lineKind",
                "consignorShareCents",
                "taxComponents",
                "createdAt",
                "updatedAt",
                "createdBy",
                "updatedBy"
              ],
              "additionalProperties": false
            }
          },
          "taxSummary": {
            "default": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "taxCode": {
                  "type": "string"
                },
                "componentKind": {
                  "type": "string",
                  "enum": [
                    "tax",
                    "fee"
                  ]
                },
                "taxCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "taxableCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "registrationNumber": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "required": [
                "taxCode",
                "componentKind",
                "taxCents",
                "taxableCents",
                "registrationNumber"
              ],
              "additionalProperties": false
            }
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "createdBy": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "updatedBy": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "id",
          "tenantId",
          "contactId",
          "channel",
          "status",
          "currency",
          "notes",
          "jurisdictionCode",
          "pricesIncludeTax",
          "contactSiteId",
          "completedAt",
          "voidedAt",
          "idempotencyKey",
          "subtotalCents",
          "taxCents",
          "totalCents",
          "liabilityCents",
          "consignorLiabilityCents",
          "tipCents",
          "lineItems",
          "taxSummary",
          "createdAt",
          "updatedAt",
          "createdBy",
          "updatedBy"
        ],
        "additionalProperties": false
      },
      "PublicJobListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "tenantId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "contactId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "unscheduled",
                    "scheduled",
                    "on_site",
                    "done",
                    "cancelled"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "addressLine1": {
                  "nullable": true,
                  "type": "string"
                },
                "addressLine2": {
                  "nullable": true,
                  "type": "string"
                },
                "city": {
                  "nullable": true,
                  "type": "string"
                },
                "region": {
                  "nullable": true,
                  "type": "string"
                },
                "postalCode": {
                  "nullable": true,
                  "type": "string"
                },
                "country": {
                  "nullable": true,
                  "type": "string"
                },
                "scheduledAt": {
                  "nullable": true,
                  "type": "string"
                },
                "durationMinutes": {
                  "nullable": true,
                  "type": "integer",
                  "minimum": 0,
                  "exclusiveMinimum": true,
                  "maximum": 9007199254740991
                },
                "onSiteAt": {
                  "nullable": true,
                  "type": "string"
                },
                "completedAt": {
                  "nullable": true,
                  "type": "string"
                },
                "contactSiteId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "contactEquipmentId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "invoiceId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "assigneeIds": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "resourceIds": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                },
                "createdBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "updatedBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "contactDisplayName": {
                  "nullable": true,
                  "type": "string"
                },
                "retiredAt": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "required": [
                "id",
                "tenantId",
                "contactId",
                "status",
                "title",
                "notes",
                "addressLine1",
                "addressLine2",
                "city",
                "region",
                "postalCode",
                "country",
                "scheduledAt",
                "durationMinutes",
                "onSiteAt",
                "completedAt",
                "contactSiteId",
                "contactEquipmentId",
                "invoiceId",
                "assigneeIds",
                "resourceIds",
                "createdAt",
                "updatedAt",
                "createdBy",
                "updatedBy"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "PublicJob": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "contactId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "status": {
            "type": "string",
            "enum": [
              "unscheduled",
              "scheduled",
              "on_site",
              "done",
              "cancelled"
            ]
          },
          "title": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "addressLine1": {
            "nullable": true,
            "type": "string"
          },
          "addressLine2": {
            "nullable": true,
            "type": "string"
          },
          "city": {
            "nullable": true,
            "type": "string"
          },
          "region": {
            "nullable": true,
            "type": "string"
          },
          "postalCode": {
            "nullable": true,
            "type": "string"
          },
          "country": {
            "nullable": true,
            "type": "string"
          },
          "scheduledAt": {
            "nullable": true,
            "type": "string"
          },
          "durationMinutes": {
            "nullable": true,
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "onSiteAt": {
            "nullable": true,
            "type": "string"
          },
          "completedAt": {
            "nullable": true,
            "type": "string"
          },
          "contactSiteId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "contactEquipmentId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "invoiceId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "assigneeIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "resourceIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "lineItems": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "tenantId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "jobId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "position": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "description": {
                  "type": "string"
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unitPriceCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "discountCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "taxRateBps": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 10000
                },
                "subtotalCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "taxCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "totalCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                },
                "createdBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "updatedBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                }
              },
              "required": [
                "id",
                "tenantId",
                "jobId",
                "position",
                "description",
                "quantity",
                "unitPriceCents",
                "discountCents",
                "taxRateBps",
                "subtotalCents",
                "taxCents",
                "totalCents",
                "createdAt",
                "updatedAt",
                "createdBy",
                "updatedBy"
              ],
              "additionalProperties": false
            }
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "createdBy": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "updatedBy": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "id",
          "tenantId",
          "contactId",
          "status",
          "title",
          "notes",
          "addressLine1",
          "addressLine2",
          "city",
          "region",
          "postalCode",
          "country",
          "scheduledAt",
          "durationMinutes",
          "onSiteAt",
          "completedAt",
          "contactSiteId",
          "contactEquipmentId",
          "invoiceId",
          "assigneeIds",
          "resourceIds",
          "lineItems",
          "createdAt",
          "updatedAt",
          "createdBy",
          "updatedBy"
        ],
        "additionalProperties": false
      },
      "PublicProductListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "tenantId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "product",
                    "service"
                  ]
                },
                "sku": {
                  "nullable": true,
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                },
                "sellBy": {
                  "default": "each",
                  "type": "string",
                  "enum": [
                    "each",
                    "weight",
                    "length",
                    "volume"
                  ]
                },
                "quantityDecimals": {
                  "default": 0,
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 4
                },
                "unitPriceCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "taxClassId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "category": {
                  "nullable": true,
                  "type": "string"
                },
                "menuCategoryId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "active": {
                  "type": "boolean"
                },
                "webPublished": {
                  "type": "boolean"
                },
                "requiresAgeVerification": {
                  "type": "boolean"
                },
                "consignorContactId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "consignorSplitBps": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 10000
                },
                "tracksPerishableWaste": {
                  "type": "boolean"
                },
                "slug": {
                  "nullable": true,
                  "type": "string"
                },
                "posModifiers": {
                  "default": [],
                  "maxItems": 12,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "required": {
                        "default": true,
                        "type": "boolean"
                      },
                      "options": {
                        "minItems": 1,
                        "maxItems": 24,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "priceDeltaCents": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "id",
                            "label",
                            "priceDeltaCents"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "id",
                      "label",
                      "required",
                      "options"
                    ],
                    "additionalProperties": false
                  }
                },
                "durationMinutes": {
                  "nullable": true,
                  "type": "integer",
                  "minimum": 0,
                  "exclusiveMinimum": true,
                  "maximum": 9007199254740991
                },
                "bufferBeforeMinutes": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "bufferAfterMinutes": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "resourceKinds": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "staff",
                      "room",
                      "equipment",
                      "vehicle",
                      "crew"
                    ]
                  }
                },
                "primaryImage": {
                  "default": null,
                  "nullable": true,
                  "type": "object",
                  "properties": {
                    "mediaId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "url": {
                      "type": "string",
                      "minLength": 1
                    },
                    "altText": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "mediaId",
                    "url",
                    "altText"
                  ],
                  "additionalProperties": false
                },
                "locale": {
                  "type": "string"
                },
                "fallbackLocale": {
                  "nullable": true,
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                },
                "createdBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "updatedBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "retiredAt": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "required": [
                "id",
                "tenantId",
                "type",
                "sku",
                "name",
                "description",
                "uom",
                "sellBy",
                "quantityDecimals",
                "unitPriceCents",
                "taxClassId",
                "category",
                "menuCategoryId",
                "active",
                "webPublished",
                "requiresAgeVerification",
                "consignorContactId",
                "consignorSplitBps",
                "tracksPerishableWaste",
                "slug",
                "posModifiers",
                "durationMinutes",
                "bufferBeforeMinutes",
                "bufferAfterMinutes",
                "resourceKinds",
                "primaryImage",
                "createdAt",
                "updatedAt",
                "createdBy",
                "updatedBy"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false
      },
      "PublicProduct": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "type": {
            "type": "string",
            "enum": [
              "product",
              "service"
            ]
          },
          "sku": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "uom": {
            "type": "string"
          },
          "sellBy": {
            "default": "each",
            "type": "string",
            "enum": [
              "each",
              "weight",
              "length",
              "volume"
            ]
          },
          "quantityDecimals": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 4
          },
          "unitPriceCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "taxClassId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "category": {
            "nullable": true,
            "type": "string"
          },
          "menuCategoryId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "active": {
            "type": "boolean"
          },
          "webPublished": {
            "type": "boolean"
          },
          "requiresAgeVerification": {
            "type": "boolean"
          },
          "consignorContactId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "consignorSplitBps": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          },
          "tracksPerishableWaste": {
            "type": "boolean"
          },
          "slug": {
            "nullable": true,
            "type": "string"
          },
          "posModifiers": {
            "default": [],
            "maxItems": 12,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "required": {
                  "default": true,
                  "type": "boolean"
                },
                "options": {
                  "minItems": 1,
                  "maxItems": 24,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "priceDeltaCents": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "label",
                      "priceDeltaCents"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "id",
                "label",
                "required",
                "options"
              ],
              "additionalProperties": false
            }
          },
          "durationMinutes": {
            "nullable": true,
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "bufferBeforeMinutes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "bufferAfterMinutes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "resourceKinds": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "staff",
                "room",
                "equipment",
                "vehicle",
                "crew"
              ]
            }
          },
          "primaryImage": {
            "default": null,
            "nullable": true,
            "type": "object",
            "properties": {
              "mediaId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "url": {
                "type": "string",
                "minLength": 1
              },
              "altText": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "mediaId",
              "url",
              "altText"
            ],
            "additionalProperties": false
          },
          "translations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "tenantId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "productId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "locale": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                },
                "createdBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "updatedBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                }
              },
              "required": [
                "id",
                "tenantId",
                "productId",
                "locale",
                "name",
                "description",
                "createdAt",
                "updatedAt",
                "createdBy",
                "updatedBy"
              ],
              "additionalProperties": false
            }
          },
          "locale": {
            "type": "string"
          },
          "fallbackLocale": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "createdBy": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "updatedBy": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "id",
          "tenantId",
          "type",
          "sku",
          "name",
          "description",
          "uom",
          "sellBy",
          "quantityDecimals",
          "unitPriceCents",
          "taxClassId",
          "category",
          "menuCategoryId",
          "active",
          "webPublished",
          "requiresAgeVerification",
          "consignorContactId",
          "consignorSplitBps",
          "tracksPerishableWaste",
          "slug",
          "posModifiers",
          "durationMinutes",
          "bufferBeforeMinutes",
          "bufferAfterMinutes",
          "resourceKinds",
          "primaryImage",
          "createdAt",
          "updatedAt",
          "createdBy",
          "updatedBy"
        ],
        "additionalProperties": false
      },
      "PublicExpenseListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "tenantId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "vendorId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "vendorDisplayName": {
                  "type": "string"
                },
                "jobId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "contactId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "categoryId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "category": {
                  "type": "string"
                },
                "amountCents": {
                  "type": "integer",
                  "minimum": 0,
                  "exclusiveMinimum": true,
                  "maximum": 9007199254740991
                },
                "balanceCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "currency": {
                  "type": "string",
                  "pattern": "^[A-Z]{3}$",
                  "description": "ISO-4217 currency code (uppercase)"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "open",
                    "partial",
                    "paid",
                    "void"
                  ]
                },
                "dueAt": {
                  "nullable": true,
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "paidAt": {
                  "nullable": true,
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                },
                "createdBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "updatedBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "retiredAt": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "required": [
                "id",
                "tenantId",
                "vendorId",
                "jobId",
                "contactId",
                "categoryId",
                "category",
                "amountCents",
                "balanceCents",
                "currency",
                "status",
                "dueAt",
                "paidAt",
                "notes",
                "createdAt",
                "updatedAt",
                "createdBy",
                "updatedBy"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "PublicExpense": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "vendorId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "vendorDisplayName": {
            "type": "string"
          },
          "jobId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "contactId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "categoryId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "category": {
            "type": "string"
          },
          "amountCents": {
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "balanceCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$",
            "description": "ISO-4217 currency code (uppercase)"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "partial",
              "paid",
              "void"
            ]
          },
          "dueAt": {
            "nullable": true,
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "paidAt": {
            "nullable": true,
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "createdBy": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "updatedBy": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "retiredAt": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "tenantId",
          "vendorId",
          "jobId",
          "contactId",
          "categoryId",
          "category",
          "amountCents",
          "balanceCents",
          "currency",
          "status",
          "dueAt",
          "paidAt",
          "notes",
          "createdAt",
          "updatedAt",
          "createdBy",
          "updatedBy"
        ],
        "additionalProperties": false
      },
      "PublicPaymentListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "tenantId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "invoiceId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "saleId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "contactId": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "amountCents": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "paymentMethod": {
                  "type": "string",
                  "enum": [
                    "cash",
                    "card",
                    "check",
                    "transfer",
                    "other",
                    "acss_debit",
                    "gift_card",
                    "store_credit"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "applied",
                    "failed"
                  ]
                },
                "paidAt": {
                  "type": "string"
                },
                "reference": {
                  "nullable": true,
                  "type": "string"
                },
                "stripePaymentIntentId": {
                  "nullable": true,
                  "type": "string"
                },
                "stripeCheckoutSessionId": {
                  "nullable": true,
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "tenantId",
                "invoiceId",
                "contactId",
                "amountCents",
                "paymentMethod",
                "status",
                "paidAt",
                "reference",
                "stripePaymentIntentId",
                "stripeCheckoutSessionId",
                "createdAt"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "PublicPayment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "invoiceId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "saleId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "contactId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "amountCents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "paymentMethod": {
            "type": "string",
            "enum": [
              "cash",
              "card",
              "check",
              "transfer",
              "other",
              "acss_debit",
              "gift_card",
              "store_credit"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "applied",
              "failed"
            ]
          },
          "paidAt": {
            "type": "string"
          },
          "reference": {
            "nullable": true,
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "stripePaymentIntentId": {
            "nullable": true,
            "type": "string"
          },
          "stripeCheckoutSessionId": {
            "nullable": true,
            "type": "string"
          },
          "reversesPaymentId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "paymentDisputeId": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "createdBy": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "updatedBy": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "id",
          "tenantId",
          "invoiceId",
          "contactId",
          "amountCents",
          "paymentMethod",
          "status",
          "paidAt",
          "reference",
          "notes",
          "stripePaymentIntentId",
          "stripeCheckoutSessionId",
          "createdAt",
          "updatedAt",
          "createdBy",
          "updatedBy"
        ],
        "additionalProperties": false
      },
      "PublicVendorListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "tenantId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "displayName": {
                  "type": "string"
                },
                "email": {
                  "nullable": true,
                  "type": "string"
                },
                "phone": {
                  "nullable": true,
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                },
                "createdBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "updatedBy": {
                  "nullable": true,
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "openBalanceCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "overdueCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "retiredAt": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "required": [
                "id",
                "tenantId",
                "displayName",
                "email",
                "phone",
                "notes",
                "createdAt",
                "updatedAt",
                "createdBy",
                "updatedBy"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "PublicVendor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "displayName": {
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "createdBy": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "updatedBy": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "openBalanceCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "overdueCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "retiredAt": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "tenantId",
          "displayName",
          "email",
          "phone",
          "notes",
          "createdAt",
          "updatedAt",
          "createdBy",
          "updatedBy"
        ],
        "additionalProperties": false
      }
    }
  }
}
