{
  "openapi": "3.1.0",
  "info": {
    "title": "ezacto API",
    "version": "1.0.0",
    "description": "The native ezacto v1 contract. Contract and generated clients are deterministic build artifacts. An operator can switch whole modules off (SSO_ENABLED, BACKUPS_ENABLED, INVOICES_ENABLED, ACCOUNTING_ENABLED, each `true` or `false`): every operation of a switched-off module answers 403 `module_disabled`, makes no provider call and leaves its data untouched."
  },
  "servers": [
    {
      "url": "https://ezacto.io"
    }
  ],
  "paths": {
    "/api/v1/work-items/github/setup/callback": {
      "get": {
        "operationId": "completeGithubAppSetup",
        "summary": "Finish the private GitHub App registration",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "303": {
            "description": "Redirect response",
            "headers": {
              "Location": {
                "description": "Redirect target",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/work-items/github/setup/callback",
        "x-ezacto-generate-client": false,
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/work-items/github/installations": {
      "get": {
        "operationId": "listGithubReaderInstallations",
        "summary": "List read-enabled App installations",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubReaderInstallationsEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/work-items/github/installations",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ]
      }
    },
    "/api/v1/work-items/github/repositories": {
      "get": {
        "operationId": "listGithubReaderRepositories",
        "summary": "List repository names available to the selected installation",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubReaderRepositoriesEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/work-items/github/repositories",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "installation_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ]
      },
      "post": {
        "operationId": "mapGithubRepository",
        "summary": "Verify an App installation repository and map it to a local task",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubReaderMapEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/work-items/github/repositories",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GithubReaderMapRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/work-items/github/setup": {
      "post": {
        "operationId": "beginGithubAppSetup",
        "summary": "Prepare a private read-only GitHub App manifest",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubReaderSetupEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/work-items/github/setup",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GithubReaderSetupRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/work-items/github/status": {
      "get": {
        "operationId": "getGithubReaderStatus",
        "summary": "Inspect GitHub issue synchronization and deferred retries",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubReaderStatusEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/work-items/github/status",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/work-items/github/disconnect": {
      "post": {
        "operationId": "disconnectGithubReader",
        "summary": "Fence GitHub reads and deliveries while retaining local links",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubReaderDisconnectEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/work-items/github/disconnect",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GithubReaderDisconnectRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/work-items/github/reconcile": {
      "post": {
        "operationId": "reconcileGithubReader",
        "summary": "Schedule a bounded GitHub metadata reconciliation",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/work-items/github/reconcile",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GithubReaderReconcileRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/work-item-links/{id}/github": {
      "get": {
        "operationId": "getGithubWorkItemMetadata",
        "summary": "Read verified issue metadata for an authorized local time link",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubReaderMetadataEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/work-item-links/:id/github",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/work-items/github/publication": {
      "get": {
        "operationId": "getGithubPublications",
        "summary": "Inspect opted-in GitHub time publication",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubPublicationsEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/work-items/github/publication",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/work-items/github/publication/preview/{id}": {
      "get": {
        "operationId": "previewGithubPublication",
        "summary": "Preview date and duration before publication consent",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubPublicationPreviewEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/work-items/github/publication/preview/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ]
      }
    },
    "/api/v1/work-items/github/publication/policy": {
      "post": {
        "operationId": "setGithubPublicationPolicy",
        "summary": "Explicitly enable or disable verified Issues-write publication",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/work-items/github/publication/policy",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GithubPublicationPolicyRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/work-items/github/publication/consent": {
      "post": {
        "operationId": "consentGithubPublication",
        "summary": "Opt one reviewed time link into publication",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/work-items/github/publication/consent",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GithubPublicationConsentRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/work-items/github/publication/{id}/actions": {
      "post": {
        "operationId": "actGithubPublication",
        "summary": "Resolve a publication conflict or retry decision",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/work-items/github/publication/:id/actions",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GithubPublicationActionRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}/missing-rates": {
      "post": {
        "operationId": "recoverProjectMissingRates",
        "summary": "Preview or explicitly repair missing project-rate snapshots on open time",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectMissingRatesEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/projects/:id/missing-rates",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectMissingRatesInput"
              }
            }
          }
        }
      }
    },
    "/auth/apple/native-capabilities": {
      "get": {
        "operationId": "getNativeAppleCapabilities",
        "summary": "Check explicit native Apple lifecycle protocol support",
        "tags": [
          "authentication"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeAppleCapabilities"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/auth/apple/native-capabilities",
        "x-ezacto-generate-client": true
      }
    },
    "/auth/apple": {
      "post": {
        "operationId": "signInNativeApple",
        "summary": "Verify origin-bound Apple lifecycle custody and native identity before sign-in",
        "tags": [
          "authentication"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeAppleSignInEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/auth/apple",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NativeAppleSignInInput"
              }
            }
          }
        }
      }
    },
    "/auth/apple/deletion-requests/{id}/binding": {
      "post": {
        "operationId": "rebindAppleCleanup",
        "summary": "Bind fresh cleanup-purpose Apple custody to a pending deletion request",
        "tags": [
          "authentication"
        ],
        "security": [],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/auth/apple/deletion-requests/:id/binding",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppleLifecycleProofInput"
              }
            }
          }
        }
      }
    },
    "/auth/apple/deletion-requests/{id}/revocation": {
      "post": {
        "operationId": "acceptAppleRevocation",
        "summary": "Durably accept exact request-bound Apple invalidation evidence",
        "tags": [
          "authentication"
        ],
        "security": [],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/auth/apple/deletion-requests/:id/revocation",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppleLifecycleProofInput"
              }
            }
          }
        }
      }
    },
    "/auth/oidc/{provider}": {
      "get": {
        "operationId": "startOidcSignIn",
        "summary": "Start an OpenID Connect sign-in",
        "tags": [
          "authentication"
        ],
        "security": [],
        "responses": {
          "302": {
            "description": "Redirect response",
            "headers": {
              "Location": {
                "description": "Redirect target",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/auth/oidc/:provider",
        "x-ezacto-generate-client": false,
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/auth/oidc/{provider}/callback": {
      "get": {
        "operationId": "completeOidcSignIn",
        "summary": "Complete an OpenID Connect sign-in",
        "tags": [
          "authentication"
        ],
        "security": [],
        "responses": {
          "303": {
            "description": "Redirect response",
            "headers": {
              "Location": {
                "description": "Redirect target",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/auth/oidc/:provider/callback",
        "x-ezacto-generate-client": false,
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/auth/oidc/exchange": {
      "post": {
        "operationId": "exchangeOidcAppCode",
        "summary": "Exchange a native-app OIDC sign-in code for a session",
        "tags": [
          "authentication"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/auth/oidc/exchange",
        "x-ezacto-generate-client": false
      }
    },
    "/auth/signup": {
      "post": {
        "operationId": "signup",
        "summary": "Create the first owner and send email verification",
        "tags": [
          "authentication"
        ],
        "security": [],
        "responses": {
          "202": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthAcceptedEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/auth/signup",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignupInput"
              }
            }
          }
        }
      }
    },
    "/auth/verify-email": {
      "post": {
        "operationId": "verifyEmail",
        "summary": "Verify an email address",
        "tags": [
          "authentication"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthPrincipalEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/auth/verify-email",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuthTokenInput"
              }
            }
          }
        }
      }
    },
    "/auth/sign-in": {
      "post": {
        "operationId": "signIn",
        "summary": "Authenticate a verified email and password",
        "tags": [
          "authentication"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignInResultEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/auth/sign-in",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordSignInInput"
              }
            }
          }
        }
      }
    },
    "/auth/two-factor/challenge": {
      "post": {
        "operationId": "completeTwoFactorChallenge",
        "summary": "Answer a two-factor challenge and receive the session",
        "tags": [
          "authentication"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TwoFactorChallengeAcceptedEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/auth/two-factor/challenge",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TwoFactorChallengeInput"
              }
            }
          }
        }
      }
    },
    "/auth/two-factor/email-code": {
      "post": {
        "operationId": "sendTwoFactorEmailCode",
        "summary": "Email a verification code for a pending sign-in",
        "description": "Supersedes the earlier challenge: the response carries the new one. Limited to one a minute and five an hour per user. Only a password sign-in can ask.",
        "tags": [
          "authentication"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TwoFactorChallengeIssuedEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/auth/two-factor/email-code",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TwoFactorEmailCodeInput"
              }
            }
          }
        }
      }
    },
    "/auth/password/forgot": {
      "post": {
        "operationId": "requestPasswordReset",
        "summary": "Request a password-reset email",
        "tags": [
          "authentication"
        ],
        "security": [],
        "responses": {
          "202": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthAcceptedEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/auth/password/forgot",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailInput"
              }
            }
          }
        }
      }
    },
    "/auth/password/reset": {
      "post": {
        "operationId": "resetPassword",
        "summary": "Consume a password-reset token",
        "tags": [
          "authentication"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthPrincipalEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/auth/password/reset",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordResetInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/sessions": {
      "get": {
        "operationId": "listSessions",
        "summary": "List sessions for the acting user",
        "tags": [
          "authentication"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/sessions",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/email-log": {
      "get": {
        "operationId": "listEmailLog",
        "summary": "List outbound email delivery outcomes",
        "description": "Newest first, or oldest first with order=oldest, a page at a time. The first page fixes the traversal to the mail that existed when it was read: mail sent after it does not appear on later pages of the same traversal. The filters combine. from and to are calendar days in the organization's timezone, both included. q matches part of a recipient's address or name in To or Cc, ignoring case. page.total counts everything the filters match, not only this page.",
        "tags": [
          "email"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailLogPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/email-log",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "queued",
                "sent",
                "bounced",
                "complained",
                "failed"
              ]
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "invoice",
                "invoice_preview",
                "reminder",
                "thank_you",
                "sign_in",
                "account"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "newest",
                "oldest"
              ]
            }
          }
        ]
      }
    },
    "/api/v1/email-suppressions": {
      "get": {
        "operationId": "listEmailSuppressions",
        "summary": "List suppressed recipients with immutable provider evidence",
        "tags": [
          "email"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailSuppressionsPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/email-suppressions",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ]
      }
    },
    "/api/v1/email-suppressions/{id}/lift": {
      "post": {
        "operationId": "liftEmailSuppression",
        "summary": "Allow future delivery after reviewing the current suppression evidence",
        "tags": [
          "email"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailSuppressionLiftEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/email-suppressions/:id/lift",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailSuppressionLiftInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/email-health": {
      "get": {
        "operationId": "getEmailHealth",
        "summary": "Get email reputation health with bounce and complaint rates",
        "tags": [
          "email"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailHealthEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/email-health",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/email-template-variables": {
      "get": {
        "operationId": "listEmailTemplateVariables",
        "summary": "List the closed email-template variable vocabulary",
        "tags": [
          "email"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailTemplateVariableCatalog"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/email-template-variables",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/email-templates": {
      "get": {
        "operationId": "listEmailTemplates",
        "summary": "List active versioned email templates",
        "tags": [
          "email"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailTemplatePage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/email-templates",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/email-templates/{kind}/versions": {
      "get": {
        "operationId": "listEmailTemplateVersions",
        "summary": "List immutable versions of an email template",
        "tags": [
          "email"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailTemplatePage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/email-templates/:kind/versions",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "operationId": "createEmailTemplateVersion",
        "summary": "Append an immutable email-template version",
        "tags": [
          "email"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailTemplateEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/email-templates/:kind/versions",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailTemplateVersionInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/sender-identities": {
      "get": {
        "operationId": "listSenderIdentities",
        "summary": "List organization sender identities and provider evidence",
        "tags": [
          "email"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SenderIdentityPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/sender-identities",
        "x-ezacto-generate-client": true
      },
      "post": {
        "operationId": "createSenderIdentity",
        "summary": "Configure an unverified organization sender identity",
        "tags": [
          "email"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SenderIdentityEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/sender-identities",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SenderIdentityInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/sender-identities/{id}": {
      "patch": {
        "operationId": "updateSenderIdentity",
        "summary": "Update sender display and Reply-To configuration",
        "tags": [
          "email"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SenderIdentityEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/sender-identities/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SenderIdentityPatch"
              }
            }
          }
        }
      }
    },
    "/api/v1/sender-identities/{id}/default": {
      "post": {
        "operationId": "setDefaultSenderIdentity",
        "summary": "Select a fully verified default sender identity",
        "tags": [
          "email"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SenderIdentityEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/sender-identities/:id/default",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SenderIdentityVersionInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/sender-identities/{id}/archive": {
      "post": {
        "operationId": "archiveSenderIdentity",
        "summary": "Archive a non-default sender identity",
        "tags": [
          "email"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SenderIdentityEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/sender-identities/:id/archive",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SenderIdentityVersionInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/sender-identities/{id}/refresh": {
      "post": {
        "operationId": "refreshSenderIdentityEvidence",
        "summary": "Refresh authoritative sender verification evidence from its provider",
        "tags": [
          "email"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SenderIdentityEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/sender-identities/:id/refresh",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SenderEvidenceRefreshInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/sender-identities/{id}/test-send": {
      "post": {
        "operationId": "testSendEmailTemplate",
        "summary": "Queue a persisted organization-template test to the acting administrator",
        "tags": [
          "email"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "202": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailTestSendEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/sender-identities/:id/test-send",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailTestSendInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/activity-log/status": {
      "get": {
        "operationId": "getActivityLogStatus",
        "summary": "Get Activity log module availability for navigation",
        "tags": [
          "activity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActivityLogStatusEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/activity-log/status",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/activity-log": {
      "get": {
        "operationId": "listActivityLog",
        "summary": "List activity recorded from delivered domain events (403 `module_disabled` when the module is off)",
        "description": "Newest first, a page at a time, ordered by when each entry was recorded and then its event id. Every filter narrows together; a value that is not valid is a 422, never an empty page. aggregate_id needs aggregate_type. Sign-in, token and account-deletion events are left out unless the reader is an administrator.",
        "tags": [
          "activity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActivityLogPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/activity-log",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "event_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "actor_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "aggregate_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "aggregate_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/activity-log/export": {
      "get": {
        "operationId": "exportActivityLog",
        "summary": "Download the filtered Activity log as CSV (403 `module_disabled` when the module is off)",
        "description": "The same filters as the list, applied together, and the same entries a reader may see. At most 5000 entries, newest first; a longer log is cut and the file ends with a Truncated line, with the x-export-truncated response header set to true. Event payloads are not included.",
        "tags": [
          "activity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment content",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/activity-log/export",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "event_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "actor_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "aggregate_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "aggregate_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/activity-log/rolls": {
      "get": {
        "operationId": "listRollableActivityYears",
        "summary": "List the finished years the Activity log can still roll (administrator session; 403 `module_disabled` when the module is off)",
        "tags": [
          "activity"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RollableActivityYearsEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/activity-log/rolls",
        "x-ezacto-generate-client": true
      },
      "post": {
        "operationId": "rollActivityYear",
        "summary": "Roll a finished year of the Activity log into its own table (administrator session; 403 `module_disabled` when the module is off)",
        "description": "Nothing is deleted: the year's entries move to activity_log_<year>, still append-only, and stay readable. The current year and a year that has already been rolled are refused with 409. The roll is recorded in the log as activity_log.rolled. An API token cannot call this.",
        "tags": [
          "activity"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActivityYearRolledEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/activity-log/rolls",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RollActivityYearInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/outbox-deliveries": {
      "get": {
        "operationId": "listOutboxDeliveries",
        "summary": "List domain-event subscriber delivery outcomes",
        "description": "Newest first, or oldest first with order=oldest, a page at a time, by when the delivery was created. from and to are calendar days in the organization's timezone, both included. page.total counts everything the filters match, not only this page.",
        "tags": [
          "operations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OutboxDeliveryPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/outbox-deliveries",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "processing",
                "delivered",
                "failed"
              ]
            }
          },
          {
            "name": "event_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "newest",
                "oldest"
              ]
            }
          }
        ]
      }
    },
    "/api/v1/outbox-deliveries/{subscriberId}/{eventId}/retry": {
      "post": {
        "operationId": "retryOutboxDelivery",
        "summary": "Retry a failed domain-event subscriber delivery",
        "tags": [
          "operations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OutboxDeliveryEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/outbox-deliveries/:subscriberId/:eventId/retry",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "subscriberId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/sessions/{sessionId}": {
      "delete": {
        "operationId": "revokeSession",
        "summary": "Revoke a session for the acting user",
        "tags": [
          "authentication"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/sessions/:sessionId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1": {
      "get": {
        "operationId": "getApiRoot",
        "summary": "Get API service metadata",
        "tags": [
          "service"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/whoami": {
      "get": {
        "operationId": "getWhoami",
        "summary": "Get the authenticated user and credential authority",
        "tags": [
          "identity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhoamiEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/whoami",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/api-tokens": {
      "get": {
        "operationId": "listApiTokens",
        "summary": "List API tokens for the acting user",
        "tags": [
          "api-tokens"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTokenListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/api-tokens",
        "x-ezacto-generate-client": true
      },
      "post": {
        "operationId": "createApiToken",
        "summary": "Issue an API token",
        "tags": [
          "api-tokens"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssuedApiTokenEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/api-tokens",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiTokenInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/api-tokens/{tokenId}": {
      "delete": {
        "operationId": "revokeApiToken",
        "summary": "Revoke an API token",
        "tags": [
          "api-tokens"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTokenEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/api-tokens/:tokenId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "tokenId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/profile": {
      "get": {
        "operationId": "getProfile",
        "summary": "The signed-in user's own profile",
        "tags": [
          "profile"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/profile",
        "x-ezacto-generate-client": true
      },
      "patch": {
        "operationId": "updateProfile",
        "summary": "Update the signed-in user's own profile",
        "tags": [
          "profile"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/profile",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfilePatch"
              }
            }
          }
        }
      }
    },
    "/api/v1/profile/notifications": {
      "get": {
        "operationId": "getProfileNotifications",
        "summary": "The signed-in user's own reminder and digest preferences",
        "tags": [
          "profile"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileNotificationEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/profile/notifications",
        "x-ezacto-generate-client": true
      },
      "post": {
        "operationId": "updateProfileNotifications",
        "summary": "Change the signed-in user's own reminder and digest preferences",
        "tags": [
          "profile"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileNotificationEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/profile/notifications",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileNotificationInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/profile/deletion-request": {
      "post": {
        "operationId": "requestAccountDeletion",
        "summary": "Ask the administrators to delete the signed-in user's own account",
        "tags": [
          "profile"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "202": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionRequestEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/profile/deletion-request",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountDeletionSubmission"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "getAccountDeletionRequest",
        "summary": "Read your deletion request and original policy disclosure",
        "tags": [
          "profile"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionStatusEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/profile/deletion-request",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/clients": {
      "get": {
        "operationId": "listClients",
        "summary": "List clients",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourcePage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/clients",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "parent_client_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "bill_to_client_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "pattern": "\\S"
            }
          }
        ]
      },
      "post": {
        "operationId": "createClient",
        "summary": "Create a client",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/clients",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneralMutationInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/clients/{id}": {
      "get": {
        "operationId": "getClient",
        "summary": "Get a client",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/clients/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateClient",
        "summary": "Update a client",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/clients/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneralMutationInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteClient",
        "summary": "Delete or archive a client",
        "tags": [
          "clients"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/clients/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/contacts": {
      "get": {
        "operationId": "listContacts",
        "summary": "List contacts",
        "tags": [
          "contacts"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourcePage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/contacts",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ]
      },
      "post": {
        "operationId": "createContact",
        "summary": "Create a contact",
        "tags": [
          "contacts"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/contacts",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneralMutationInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/contacts/{id}": {
      "get": {
        "operationId": "getContact",
        "summary": "Get a contact",
        "tags": [
          "contacts"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/contacts/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateContact",
        "summary": "Update a contact",
        "tags": [
          "contacts"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/contacts/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneralMutationInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteContact",
        "summary": "Delete or archive a contact",
        "tags": [
          "contacts"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/contacts/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/expense-categories": {
      "get": {
        "operationId": "listExpenseCategories",
        "summary": "List expense-categories",
        "tags": [
          "expense-categories"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseCategoryPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/expense-categories",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ]
      },
      "post": {
        "operationId": "createExpenseCategory",
        "summary": "Create a expensecategory",
        "tags": [
          "expense-categories"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseCategoryEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/expense-categories",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExpenseCategoryInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/expense-categories/{id}": {
      "get": {
        "operationId": "getExpenseCategory",
        "summary": "Get a expensecategory",
        "tags": [
          "expense-categories"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseCategoryEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/expense-categories/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateExpenseCategory",
        "summary": "Update a expensecategory",
        "tags": [
          "expense-categories"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseCategoryEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/expense-categories/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExpenseCategoryPatch"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteExpenseCategory",
        "summary": "Delete or archive a expensecategory",
        "tags": [
          "expense-categories"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/expense-categories/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/projects": {
      "get": {
        "operationId": "listProjects",
        "summary": "List projects",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourcePage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/projects",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "pattern": "\\S"
            }
          }
        ]
      },
      "post": {
        "operationId": "createProject",
        "summary": "Create a project",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/projects",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneralMutationInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}": {
      "get": {
        "operationId": "getProject",
        "summary": "Get a project",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/projects/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateProject",
        "summary": "Update a project",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/projects/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneralMutationInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteProject",
        "summary": "Delete or archive a project",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/projects/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/tasks": {
      "get": {
        "operationId": "listTasks",
        "summary": "List tasks",
        "tags": [
          "tasks"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourcePage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/tasks",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "pattern": "\\S"
            }
          }
        ]
      },
      "post": {
        "operationId": "createTask",
        "summary": "Create a task",
        "tags": [
          "tasks"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/tasks",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneralMutationInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/tasks/{id}": {
      "get": {
        "operationId": "getTask",
        "summary": "Get a task",
        "tags": [
          "tasks"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/tasks/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateTask",
        "summary": "Update a task",
        "tags": [
          "tasks"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/tasks/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneralMutationInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteTask",
        "summary": "Delete or archive a task",
        "tags": [
          "tasks"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/tasks/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/task-assignments": {
      "get": {
        "operationId": "listTaskAssignments",
        "summary": "List task-assignments",
        "tags": [
          "task-assignments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourcePage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/task-assignments",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "task_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ]
      },
      "post": {
        "operationId": "createTaskAssignment",
        "summary": "Create a taskassignment",
        "tags": [
          "task-assignments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/task-assignments",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneralMutationInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/task-assignments/{id}": {
      "get": {
        "operationId": "getTaskAssignment",
        "summary": "Get a taskassignment",
        "tags": [
          "task-assignments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/task-assignments/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateTaskAssignment",
        "summary": "Update a taskassignment",
        "tags": [
          "task-assignments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/task-assignments/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneralMutationInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteTaskAssignment",
        "summary": "Delete or archive a taskassignment",
        "tags": [
          "task-assignments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/task-assignments/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/user-assignments": {
      "get": {
        "operationId": "listUserAssignments",
        "summary": "List user-assignments",
        "tags": [
          "user-assignments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourcePage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/user-assignments",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ]
      },
      "post": {
        "operationId": "createUserAssignment",
        "summary": "Create a userassignment",
        "tags": [
          "user-assignments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/user-assignments",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneralMutationInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/user-assignments/{id}": {
      "get": {
        "operationId": "getUserAssignment",
        "summary": "Get a userassignment",
        "tags": [
          "user-assignments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/user-assignments/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateUserAssignment",
        "summary": "Update a userassignment",
        "tags": [
          "user-assignments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/user-assignments/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneralMutationInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteUserAssignment",
        "summary": "Delete or archive a userassignment",
        "tags": [
          "user-assignments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/user-assignments/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/users": {
      "get": {
        "operationId": "listUsers",
        "summary": "List users",
        "tags": [
          "users"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourcePage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "profile",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "member",
                "project_manager",
                "people_admin",
                "accounting",
                "executive_manager",
                "administrator"
              ]
            }
          },
          {
            "name": "is_contractor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ]
      },
      "post": {
        "operationId": "createUser",
        "summary": "Create a user",
        "tags": [
          "users"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneralMutationInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/users/{id}": {
      "get": {
        "operationId": "getUser",
        "summary": "Get a user",
        "tags": [
          "users"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateUser",
        "summary": "Update a user",
        "tags": [
          "users"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneralMutationInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteUser",
        "summary": "Delete or archive a user",
        "tags": [
          "users"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/roles": {
      "get": {
        "operationId": "listRoles",
        "summary": "List roles",
        "tags": [
          "roles"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourcePage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/roles",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ]
      },
      "post": {
        "operationId": "createRole",
        "summary": "Create a role",
        "tags": [
          "roles"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/roles",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneralMutationInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/roles/{id}": {
      "get": {
        "operationId": "getRole",
        "summary": "Get a role",
        "tags": [
          "roles"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/roles/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateRole",
        "summary": "Update a role",
        "tags": [
          "roles"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralResourceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/roles/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneralMutationInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteRole",
        "summary": "Delete or archive a role",
        "tags": [
          "roles"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/roles/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/users/{userId}/billable-rates": {
      "get": {
        "operationId": "listBillableRates",
        "summary": "List billable rates for a user",
        "tags": [
          "user-rates"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRatePage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:userId/billable-rates",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ]
      },
      "post": {
        "operationId": "appendBillableRate",
        "summary": "Append a billable rate for a user",
        "tags": [
          "user-rates"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRateEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:userId/billable-rates",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserRateInput"
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patchBillableRateCollectionNotAllowed",
        "summary": "BillableRate records are append-only",
        "tags": [
          "user-rates"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "405": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:userId/billable-rates",
        "x-ezacto-generate-client": false,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "delete": {
        "operationId": "deleteBillableRateCollectionNotAllowed",
        "summary": "BillableRate records are append-only",
        "tags": [
          "user-rates"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "405": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:userId/billable-rates",
        "x-ezacto-generate-client": false,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/users/{userId}/billable-rates/{id}": {
      "get": {
        "operationId": "getBillableRate",
        "summary": "Get a billable rate",
        "tags": [
          "user-rates"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRateEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:userId/billable-rates/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "patchBillableRateNotAllowed",
        "summary": "BillableRate records are append-only",
        "tags": [
          "user-rates"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "405": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:userId/billable-rates/:id",
        "x-ezacto-generate-client": false,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "delete": {
        "operationId": "deleteBillableRateNotAllowed",
        "summary": "BillableRate records are append-only",
        "tags": [
          "user-rates"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "405": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:userId/billable-rates/:id",
        "x-ezacto-generate-client": false,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/users/{userId}/cost-rates": {
      "get": {
        "operationId": "listCostRates",
        "summary": "List cost rates for a user",
        "tags": [
          "user-rates"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRatePage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:userId/cost-rates",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ]
      },
      "post": {
        "operationId": "appendCostRate",
        "summary": "Append a cost rate for a user",
        "tags": [
          "user-rates"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRateEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:userId/cost-rates",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserRateInput"
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patchCostRateCollectionNotAllowed",
        "summary": "CostRate records are append-only",
        "tags": [
          "user-rates"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "405": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:userId/cost-rates",
        "x-ezacto-generate-client": false,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "delete": {
        "operationId": "deleteCostRateCollectionNotAllowed",
        "summary": "CostRate records are append-only",
        "tags": [
          "user-rates"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "405": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:userId/cost-rates",
        "x-ezacto-generate-client": false,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/users/{userId}/cost-rates/{id}": {
      "get": {
        "operationId": "getCostRate",
        "summary": "Get a cost rate",
        "tags": [
          "user-rates"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRateEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:userId/cost-rates/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "patchCostRateNotAllowed",
        "summary": "CostRate records are append-only",
        "tags": [
          "user-rates"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "405": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:userId/cost-rates/:id",
        "x-ezacto-generate-client": false,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "delete": {
        "operationId": "deleteCostRateNotAllowed",
        "summary": "CostRate records are append-only",
        "tags": [
          "user-rates"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "405": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:userId/cost-rates/:id",
        "x-ezacto-generate-client": false,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/time-entry-settings": {
      "get": {
        "operationId": "getTimeEntrySettings",
        "summary": "Get organization time-entry display and entry-mode settings",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntrySettingsEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/time-entry-settings",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/time-entry-note-settings": {
      "get": {
        "operationId": "getTimeEntryNoteSettings",
        "summary": "Get organization time-entry note settings",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryNoteSettingsEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/time-entry-note-settings",
        "x-ezacto-generate-client": true
      },
      "patch": {
        "operationId": "updateTimeEntryNoteSettings",
        "summary": "Update organization time-entry note settings",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryNoteSettingsEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/time-entry-note-settings",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeEntryNoteSettingsPatch"
              }
            }
          }
        }
      }
    },
    "/api/v1/time-entry-rounding-settings": {
      "patch": {
        "operationId": "updateTimeEntryRoundingSettings",
        "summary": "Update the organization's time rounding rule",
        "description": "A direction and an increment, either or both. Nothing already saved changes: the rule rounds time saved from now on, and open time is re-rounded only by `/time-rounding-recalculation`, after a preview. Executive managers and administrators only.",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeRoundingEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/time-entry-rounding-settings",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeRoundingPatch"
              }
            }
          }
        }
      }
    },
    "/api/v1/time-rounding-recalculation": {
      "get": {
        "operationId": "previewTimeRoundingRecalculation",
        "summary": "Preview re-rounding open time under the current rules",
        "description": "What the apply would change, writing nothing: how many open entries change, their rounded hours before and after, a breakdown by project, the date span, and what is left alone and why. Open means the same as for a single edit: stopped, not invoiced, not approved, on an unlocked date, under an active client, project and task. The `fingerprint` names exactly this set. Executive managers and administrators only.",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeRoundingRecalculationPreviewEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/time-rounding-recalculation",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ]
      },
      "post": {
        "operationId": "applyTimeRoundingRecalculation",
        "summary": "Re-round open time under the current rules",
        "description": "Applies the preview whose `fingerprint` is sent, for the same scope. If anything has changed since that preview, nothing is written and the answer is 409 `preview_stale`. Executive managers and administrators only.",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeRoundingRecalculationAppliedEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/time-rounding-recalculation",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeRoundingRecalculationRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/time-entry-options": {
      "get": {
        "operationId": "listTimeEntryOptions",
        "summary": "List the active project and task combinations a user may log time against",
        "description": "The acting user's unless `user_id` names somebody else, which only an administrator may do (403 `row_forbidden` otherwise).",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryOptionListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/time-entry-options",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/time-entries": {
      "get": {
        "operationId": "listTimeEntries",
        "summary": "List time entries",
        "description": "The acting user's unless `user_id` names somebody else, which only an administrator may do (403 `row_forbidden` otherwise). An administrator may also read, update, stop and delete any entry by id; everyone else reaches only their own.",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/time-entries",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "spent_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "approval_status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unsubmitted",
                "submitted",
                "approved"
              ]
            }
          },
          {
            "name": "invoice_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Requires invoices:read for both the profile and token."
            }
          },
          {
            "name": "is_billed",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Requires invoices:read for both the profile and token."
            }
          },
          {
            "name": "billable",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "task_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "is_running",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "budgeted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "external_reference_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "operationId": "createTimeEntry",
        "summary": "Create or start a time entry",
        "description": "`started_time` with `ended_time` logs a stopped start/end entry in either organization mode, its `seconds` derived from the two times (an end before the start is past midnight); `seconds` beside them is 422 `mode_mismatch`. Without times the organization's `time_entry_mode` decides: in `duration`, `seconds` logs a stopped entry and leaving it out starts a timer; in `start_end`, leaving out `ended_time` starts a timer at the current local time and `seconds` is 422 `mode_mismatch`. A timer in a `duration` organization never carries times, so `started_time` without `ended_time` there is 422 `mode_mismatch`. Stopped entries must have a positive rounded duration; zero-hour entries are refused. Entries may overlap; each counts its own full duration.",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/time-entries",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeEntryInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/time-entries/{id}": {
      "get": {
        "operationId": "getTimeEntry",
        "summary": "Get a time entry",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/time-entries/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateTimeEntry",
        "summary": "Update a time entry",
        "description": "An entry keeps the shape it was created with, whatever the organization's mode: a start/end entry takes `started_time` and `ended_time` and re-derives `seconds`, a duration entry takes `seconds`, and the other is 422 `mode_mismatch`.",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/time-entries/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeEntryPatch"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteTimeEntry",
        "summary": "Delete a time entry",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/time-entries/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/time-entries/{id}/stop": {
      "post": {
        "operationId": "stopTimeEntry",
        "summary": "Stop a time entry",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/time-entries/:id/stop",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/time-entries/{id}/restart": {
      "post": {
        "operationId": "restartTimeEntry",
        "summary": "Restart a time entry",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/time-entries/:id/restart",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/calendar-proposals": {
      "get": {
        "operationId": "listCalendarProposals",
        "summary": "List the acting user's calendar events offered as time",
        "description": "Only the acting user's own, administrators included. A proposal is a calendar event held beside the timesheet, not a time entry: it reaches no report, lock or invoice until it is accepted. `status` defaults to `proposed`, what is waiting for a decision. `from` and `to` are calendar days on the user's own calendar, both included, and filter on the day the event starts.",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarProposalPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/calendar-proposals",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "proposed",
                "accepted",
                "discarded",
                "cancelled"
              ]
            }
          }
        ]
      }
    },
    "/api/v1/calendar-proposals/{id}/accept": {
      "post": {
        "operationId": "acceptCalendarProposal",
        "summary": "Accept a calendar proposal as a time entry",
        "description": "Creates the entry through the same path as `POST /time-entries`, so rounding, timesheet locks, approval membership, assignment and note rules all apply, and marks the proposal accepted in the same write. In a `duration` organization the entry carries the event's length and no times; in `start_end` it carries the event's times on the user's own clock, and an event that runs past local midnight is 422 `spans_days`. `notes` defaults to the event's title. The proposal's `time_entry_id` and the `Location` header name the entry. A proposal already decided is 409 `proposal_not_open`, and nothing is created.",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarProposalEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/calendar-proposals/:id/accept",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalendarProposalAcceptInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/calendar-proposals/{id}/discard": {
      "post": {
        "operationId": "discardCalendarProposal",
        "summary": "Discard a calendar proposal",
        "description": "A discarded event is not offered again when the calendar is read again. A proposal already decided is 409 `proposal_not_open`.",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarProposalEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/calendar-proposals/:id/discard",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/calendar-connections/{provider}/cleanup": {
      "get": {
        "operationId": "listCalendarManualCleanup",
        "summary": "List the acting user’s manual Microsoft cleanup records",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarManualCleanupList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/calendar-connections/:provider/cleanup",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "google",
                "microsoft"
              ]
            }
          }
        ]
      }
    },
    "/api/v1/calendar-connections/{provider}/cleanup/confirm": {
      "post": {
        "operationId": "confirmCalendarManualCleanup",
        "summary": "Record the owner’s confirmation of Microsoft permission removal",
        "description": "This is a user attestation, not provider verification. Only the acting user’s current-incarnation disconnect or reauthorization record can be resolved.",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/calendar-connections/:provider/cleanup/confirm",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "google",
                "microsoft"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalendarManualCleanupInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/calendar-connections/{provider}/authorize": {
      "post": {
        "operationId": "beginCalendarAuthorization",
        "summary": "Begin personal read-only calendar consent",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarAuthorizationEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/calendar-connections/:provider/authorize",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "google",
                "microsoft"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalendarAuthorizationInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/calendar-connections/{provider}/callback": {
      "get": {
        "operationId": "completeCalendarAuthorization",
        "summary": "Complete native-session-bound calendar consent",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "303": {
            "description": "Redirect response",
            "headers": {
              "Location": {
                "description": "Redirect target",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/calendar-connections/:provider/callback",
        "x-ezacto-generate-client": false,
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "google",
                "microsoft"
              ]
            }
          }
        ]
      }
    },
    "/api/v1/calendar-cleanup-status": {
      "get": {
        "operationId": "getCalendarCleanupStatus",
        "summary": "Show unresolved calendar cleanup counts across retained incarnations",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarCleanupEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/calendar-cleanup-status",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/calendar-connections": {
      "get": {
        "operationId": "listCalendarConnections",
        "summary": "List the acting user’s private calendar connection status",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarConnectionList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/calendar-connections",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/calendar-connections/{provider}": {
      "delete": {
        "operationId": "disconnectCalendarConnection",
        "summary": "Disconnect the acting user’s calendar and cancel open proposals",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/calendar-connections/:provider",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "google",
                "microsoft"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalendarDisconnectInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/calendar-connections/{provider}/refresh": {
      "post": {
        "operationId": "refreshCalendarConnection",
        "summary": "Refresh proposals from an available calendar provider",
        "description": "No time entry is created or changed. Returns unavailable until an approved provider adapter is configured. No token may be supplied.",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarRefreshResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/calendar-connections/:provider/refresh",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "google",
                "microsoft"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalendarRefreshInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/calendar-cleanup": {
      "get": {
        "operationId": "listCalendarOperatorCleanup",
        "summary": "Review retained old-incarnation and closed-account calendar cleanup",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarOperatorCleanupList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/admin/calendar-cleanup",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/admin/calendar-cleanup/confirm": {
      "post": {
        "operationId": "confirmCalendarOperatorCleanup",
        "summary": "Record administrator evidence of exact calendar permission removal",
        "description": "Operator attestation only; never provider verification. Requires the complete reviewed custody identity.",
        "tags": [
          "time-entries"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarOperatorCleanupReceiptEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/admin/calendar-cleanup/confirm",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalendarOperatorCleanupInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/allocations": {
      "get": {
        "operationId": "listAllocations",
        "summary": "List planned allocations",
        "description": "Planned hours per week for a person on a project over a range of dates. Administrators and executive managers read all of them; a project manager reads their own and those for the people and projects they manage; everyone else reads only their own. `from` and `to` keep the allocations that reach into that span of days. A plan is not work: it is separate from time entries and never billed.",
        "tags": [
          "schedule"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllocationPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/allocations",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ]
      },
      "post": {
        "operationId": "createAllocation",
        "summary": "Plan hours for a person on a project",
        "description": "Administrators, executive managers and project managers only, a project manager only for people and projects they manage. Dates are plain local days, both included; the figure counts in full for every week the range touches. An end before the start is 422 `invalid_range`, an archived or unknown person or project is 422 `inactive_user`, `inactive_project`, `unknown_user` or `unknown_project`, and a range that overlaps another for the same person and project is 409 `allocation_overlap`. Planning more than a person's capacity is allowed: the capacity view flags it.",
        "tags": [
          "schedule"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllocationEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/allocations",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AllocationInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/allocations/{id}": {
      "get": {
        "operationId": "getAllocation",
        "summary": "Get an allocation",
        "tags": [
          "schedule"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllocationEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/allocations/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateAllocation",
        "summary": "Update an allocation",
        "description": "Dates and hours only: the person and project of a plan do not change, so to move one, delete it and make another. The same rules as creating apply, and a plan changed by someone else in the meantime is 409 `allocation_changed`.",
        "tags": [
          "schedule"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllocationEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/allocations/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AllocationPatch"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteAllocation",
        "summary": "Delete an allocation",
        "description": "Send the version last read in the JSON body. A stale version is 409; omitted versions are deprecated until the 2027-01-22 sunset, then refused.",
        "tags": [
          "schedule"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllocationEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/allocations/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanningRevisionInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/capacity": {
      "get": {
        "operationId": "getCapacity",
        "summary": "Read planned hours against capacity and tracked time, person by week",
        "description": "Read-only. Weeks begin on the organization's week start day and run from the week holding `from` through the week holding `to`, at most 53. Per person and week: `planned_seconds` (the sum of the allocations touching that week, on active projects), `weekly_capacity_seconds` (the person's current weekly capacity, so part-time is honoured), `tracked_seconds` (rounded time actually logged, a separate figure and never changed by the plan) and `over_allocated` when planned exceeds capacity, which is a flag and never a refusal. Archived people are left out. Administrators and executive managers see everyone, a project manager the people they manage, everyone else only themselves.",
        "tags": [
          "schedule"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapacityEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/capacity",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ]
      }
    },
    "/api/v1/time-off": {
      "get": {
        "operationId": "listTimeOff",
        "summary": "List time off",
        "description": "Days a person is away, entered by an administrator. Administrators and executive managers read all of it; a project manager reads their own and that of the people they manage; everyone else reads only their own. `from` and `to` keep the entries that reach into that span of days. Time off reduces the capacity the capacity view counts as available; it is not work, is never billed, and has no approval step.",
        "tags": [
          "schedule"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeOffPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/time-off",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ]
      },
      "post": {
        "operationId": "createTimeOff",
        "summary": "Enter time off for a person",
        "description": "Administrators, executive managers and project managers only, a project manager only for the people they manage. Dates are plain local days, both included; only Monday to Friday remove capacity. `seconds_per_day` null is a whole day (a fifth of the person's weekly capacity); a figure is that many seconds away on each working day. An end before the start or an unknown `kind` is 422, an archived or unknown person is 422 `inactive_user` or `unknown_user`, and a range that overlaps other time off for the same person is 409 `time_off_overlap`, so a day is never taken off twice.",
        "tags": [
          "schedule"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeOffEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/time-off",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeOffInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/time-off/{id}": {
      "get": {
        "operationId": "getTimeOff",
        "summary": "Get time off",
        "tags": [
          "schedule"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeOffEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/time-off/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateTimeOff",
        "summary": "Update time off",
        "description": "Dates, kind and hours only: the person does not change, so to move time off to someone else, delete it and make another. The same rules as creating apply, and an entry changed by someone else in the meantime is 409 `time_off_changed`.",
        "tags": [
          "schedule"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeOffEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/time-off/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeOffPatch"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteTimeOff",
        "summary": "Delete time off",
        "description": "Send the version last read in the JSON body. A stale version is 409; omitted versions are deprecated until the 2027-01-22 sunset, then refused.",
        "tags": [
          "schedule"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeOffEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/time-off/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanningRevisionInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/organization-holidays": {
      "get": {
        "operationId": "listOrganizationHolidays",
        "summary": "List organization holidays",
        "description": "Organization-wide local calendar dates. Reads require schedule:read. Only administrators with schedule:write may change dates. Each weekday removes one fifth of the person’s current weekly capacity; weekends remove none. Overlapping personal leave and holidays use the larger daily amount, never their sum. No tracked time or invoices are changed.",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationHolidayPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/organization-holidays",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ]
      },
      "post": {
        "operationId": "createOrganizationHoliday",
        "summary": "Add an organization holiday",
        "description": "Organization-wide local calendar dates. Reads require schedule:read. Only administrators with schedule:write may change dates. Each weekday removes one fifth of the person’s current weekly capacity; weekends remove none. Overlapping personal leave and holidays use the larger daily amount, never their sum. No tracked time or invoices are changed.",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationHolidayEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/organization-holidays",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationHolidayInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/organization-holidays/{id}": {
      "get": {
        "operationId": "getOrganizationHoliday",
        "summary": "Read an organization holiday",
        "description": "Organization-wide local calendar dates. Reads require schedule:read. Only administrators with schedule:write may change dates. Each weekday removes one fifth of the person’s current weekly capacity; weekends remove none. Overlapping personal leave and holidays use the larger daily amount, never their sum. No tracked time or invoices are changed.",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationHolidayEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/organization-holidays/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateOrganizationHoliday",
        "summary": "Replace holiday fields at their current version",
        "description": "Organization-wide local calendar dates. Reads require schedule:read. Only administrators with schedule:write may change dates. Each weekday removes one fifth of the person’s current weekly capacity; weekends remove none. Overlapping personal leave and holidays use the larger daily amount, never their sum. No tracked time or invoices are changed.",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationHolidayEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/organization-holidays/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationHolidayUpdateInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteOrganizationHoliday",
        "summary": "Remove an organization holiday at its current version",
        "description": "Organization-wide local calendar dates. Reads require schedule:read. Only administrators with schedule:write may change dates. Each weekday removes one fifth of the person’s current weekly capacity; weekends remove none. Overlapping personal leave and holidays use the larger daily amount, never their sum. No tracked time or invoices are changed.",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationHolidayEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/organization-holidays/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationHolidayDeleteInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/planning-placeholders": {
      "get": {
        "operationId": "listPlanningPlaceholders",
        "summary": "List permitted planning placeholders",
        "description": "Named unassigned project demand, separate from people, capacity, actual time and money. Reads require schedule:read; mutations require schedule:write. Current management authority and project access are rechecked, including within native writes. Ordinary members cannot list organization-wide unassigned demand. Project managers are confined to managed work. Every edit or archive requires its saved version; a conflict preserves the saved state. Archiving a placeholder archives its remaining open demand without removing assigned person allocations.",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanningPlaceholderPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/planning-placeholders",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ]
      },
      "post": {
        "operationId": "createPlanningPlaceholder",
        "summary": "Create a named planning placeholder",
        "description": "Named unassigned project demand, separate from people, capacity, actual time and money. Reads require schedule:read; mutations require schedule:write. Current management authority and project access are rechecked, including within native writes. Ordinary members cannot list organization-wide unassigned demand. Project managers are confined to managed work. Every edit or archive requires its saved version; a conflict preserves the saved state. Archiving a placeholder archives its remaining open demand without removing assigned person allocations.",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanningPlaceholderEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/planning-placeholders",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanningPlaceholderInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/planning-placeholders/{id}": {
      "patch": {
        "operationId": "updatePlanningPlaceholder",
        "summary": "Rename a planning placeholder at its current version",
        "description": "Named unassigned project demand, separate from people, capacity, actual time and money. Reads require schedule:read; mutations require schedule:write. Current management authority and project access are rechecked, including within native writes. Ordinary members cannot list organization-wide unassigned demand. Project managers are confined to managed work. Every edit or archive requires its saved version; a conflict preserves the saved state. Archiving a placeholder archives its remaining open demand without removing assigned person allocations.",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanningPlaceholderEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/planning-placeholders/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanningPlaceholderUpdateInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deletePlanningPlaceholder",
        "summary": "Archive a placeholder and its open unassigned demand",
        "description": "Named unassigned project demand, separate from people, capacity, actual time and money. Reads require schedule:read; mutations require schedule:write. Current management authority and project access are rechecked, including within native writes. Ordinary members cannot list organization-wide unassigned demand. Project managers are confined to managed work. Every edit or archive requires its saved version; a conflict preserves the saved state. Archiving a placeholder archives its remaining open demand without removing assigned person allocations.",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanningPlaceholderEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/planning-placeholders/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanningVersionInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/placeholder-allocations": {
      "get": {
        "operationId": "listPlaceholderAllocations",
        "summary": "List scoped unassigned allocation records",
        "description": "Named unassigned project demand, separate from people, capacity, actual time and money. Reads require schedule:read; mutations require schedule:write. Current management authority and project access are rechecked, including within native writes. Ordinary members cannot list organization-wide unassigned demand. Project managers are confined to managed work. Every edit or archive requires its saved version; a conflict preserves the saved state. Archiving a placeholder archives its remaining open demand without removing assigned person allocations.",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlaceholderAllocationPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/placeholder-allocations",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "assigned",
                "archived"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ]
      },
      "post": {
        "operationId": "createPlaceholderAllocation",
        "summary": "Plan unassigned project work",
        "description": "Named unassigned project demand, separate from people, capacity, actual time and money. Reads require schedule:read; mutations require schedule:write. Current management authority and project access are rechecked, including within native writes. Ordinary members cannot list organization-wide unassigned demand. Project managers are confined to managed work. Every edit or archive requires its saved version; a conflict preserves the saved state. Archiving a placeholder archives its remaining open demand without removing assigned person allocations.",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlaceholderAllocationEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/placeholder-allocations",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlaceholderAllocationInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/placeholder-allocations/{id}": {
      "patch": {
        "operationId": "updatePlaceholderAllocation",
        "summary": "Edit open unassigned work at its current version",
        "description": "Named unassigned project demand, separate from people, capacity, actual time and money. Reads require schedule:read; mutations require schedule:write. Current management authority and project access are rechecked, including within native writes. Ordinary members cannot list organization-wide unassigned demand. Project managers are confined to managed work. Every edit or archive requires its saved version; a conflict preserves the saved state. Archiving a placeholder archives its remaining open demand without removing assigned person allocations.",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlaceholderAllocationEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/placeholder-allocations/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlaceholderAllocationUpdateInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deletePlaceholderAllocation",
        "summary": "Archive open unassigned work at its current version",
        "description": "Named unassigned project demand, separate from people, capacity, actual time and money. Reads require schedule:read; mutations require schedule:write. Current management authority and project access are rechecked, including within native writes. Ordinary members cannot list organization-wide unassigned demand. Project managers are confined to managed work. Every edit or archive requires its saved version; a conflict preserves the saved state. Archiving a placeholder archives its remaining open demand without removing assigned person allocations.",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlaceholderAllocationEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/placeholder-allocations/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanningVersionInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/placeholder-allocations/{id}/assign": {
      "post": {
        "operationId": "assignPlaceholderAllocation",
        "summary": "Atomically assign unassigned demand to a person",
        "description": "Named unassigned project demand, separate from people, capacity, actual time and money. Reads require schedule:read; mutations require schedule:write. Current management authority and project access are rechecked, including within native writes. Ordinary members cannot list organization-wide unassigned demand. Project managers are confined to managed work. Every edit or archive requires its saved version; a conflict preserves the saved state. Archiving a placeholder archives its remaining open demand without removing assigned person allocations. One explicit command creates one person allocation and marks the open placeholder allocation assigned, with an audit event and actor-scoped idempotency receipt in the same transaction. Repeat the same key and exact payload to recover its prior result; reusing the key for different input is refused. The expected version, active target and project, current authority and same-person/project overlap are checked. An overlap consumes no demand. Over-allocation produces warnings. Project access and staffing are never granted implicitly; a missing-access prerequisite is returned separately.",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlaceholderAssignmentEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/placeholder-allocations/:id/assign",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlaceholderAssignmentInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/resource-calendar/context": {
      "get": {
        "operationId": "getResourceCalendarContext",
        "summary": "Read current organization-local calendar context",
        "description": "Requires schedule:read and current native actor authority. Supplies organization-local today, current week, timezone and week start for initial calendar navigation without using the device date. Always no-store; invalid imported organization zones fall back to UTC.",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceCalendarContextEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/resource-calendar/context",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/resource-calendar": {
      "get": {
        "operationId": "getResourceCalendar",
        "summary": "Read the scoped project or team resource calendar",
        "description": "Requires schedule:read. A bounded live projection of planned, available and rounded tracked seconds, with separate unassigned demand. Uses current self/managed-person/project authority on every page. Hidden project work is labelled only by aggregate scope; private leave details are never returned. Availability uses full touched organization weeks and current person capacity. Context always contains organization-local today/week and refreshes even if revision is unchanged. No actual time, staffing or accounting mutations. More than the native fact budget is refused with a range_too_large field error; narrow the date range or person filter. Other web profiles remain read-only.",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceCalendarEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/resource-calendar",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "view",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "project",
                "team"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "person_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/resource-calendar/allocations": {
      "get": {
        "operationId": "getResourceCalendarAllocations",
        "summary": "Read scoped dated allocation ranges",
        "description": "Requires schedule:read and current self/managed-person/project access. Returns actual saved allocation dates, exact weekly seconds and mutation versions; no ranges are inferred from weekly aggregates. Snaps the query to full organization weeks, at most 53. Archived people and plans on archived projects are omitted. Project view requires project_id. The live signed cursor is independently scoped to this query. No hidden project identities, time-off detail, rates or actual-time writes.",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceCalendarAllocationPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/resource-calendar/allocations",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "view",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "project",
                "team"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "person_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/resource-calendar/projects": {
      "get": {
        "operationId": "listResourceCalendarProjects",
        "summary": "List project identities visible to the resource calendar",
        "description": "Requires schedule:read. Current administrators/executive managers see all projects; project managers see managed projects; members see assigned historical/current project identities. Optional is_active narrows the catalog; archived identities remain available to label retained actuals. Pagination is bounded at 100; current authority is rechecked for every page.",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceCalendarProjectPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/resource-calendar/projects",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/calendar-feeds": {
      "get": {
        "operationId": "listCalendarFeeds",
        "summary": "List owned advisory calendar subscriptions",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarFeedList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/calendar-feeds",
        "x-ezacto-generate-client": true
      },
      "post": {
        "operationId": "createCalendarFeed",
        "summary": "Issue a scoped expiring calendar subscription password",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarFeedIssued"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/calendar-feeds",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalendarFeedInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/calendar-feeds/{id}/rotate": {
      "post": {
        "operationId": "rotateCalendarFeed",
        "summary": "Replace a subscription password while retaining stable event IDs",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarFeedIssued"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/calendar-feeds/:id/rotate",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/calendar-feeds/{id}": {
      "delete": {
        "operationId": "revokeCalendarFeed",
        "summary": "Revoke a calendar subscription immediately",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/calendar-feeds/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/calendar-feeds/{id}/download": {
      "get": {
        "operationId": "downloadCalendarFeed",
        "summary": "Download the current authorized advisory calendar",
        "tags": [
          "capacity"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment content",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/calendar-feeds/:id/download",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/settings/work-item-connections": {
      "get": {
        "operationId": "listWorkItemConnections",
        "summary": "List the issue trackers this instance has connected",
        "description": "Administrators in a session only. `credential_configured` says whether the deployment holds the provider's credential; the credential itself is never returned.",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkItemConnectionListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/work-item-connections",
        "x-ezacto-generate-client": true
      },
      "post": {
        "operationId": "connectWorkItemProvider",
        "summary": "Connect an issue tracker",
        "description": "Administrators in a session only, recorded in the activity log. The credential is a deployment secret chosen by the server, never sent here: a provider with no secret configured is 409 `credential_not_configured`. Connecting a provider that was disconnected revives its row, so earlier links stay attached.",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkItemConnectionEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/work-item-connections",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkItemConnectionInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/settings/work-item-connections/{id}/disconnect": {
      "post": {
        "operationId": "disconnectWorkItemProvider",
        "summary": "Disconnect an issue tracker",
        "description": "Administrators in a session only, recorded in the activity log. Drops the connection's credential reference and keeps the connection and every link made through it. Disconnecting one already disconnected changes nothing.",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkItemConnectionEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/work-item-connections/:id/disconnect",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/work-item-links": {
      "get": {
        "operationId": "listWorkItemLinks",
        "summary": "List links between time or projects and issue tracker items",
        "description": "Administrators see every link; everyone else sees links on their own time entries only.",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkItemLinkPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/work-item-links",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "time_entry_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "item_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "operationId": "createWorkItemLink",
        "summary": "Link a time entry or project to an issue tracker item",
        "description": "Name exactly one of `time_entry_id` or `project_id`. A time entry links to one item per connection (409 `work_item_link_exists` otherwise). Administrators may link any entry or project; everyone else only their own entries, and an entry that is not theirs is 404. The item is recorded as given and is not yet checked with the tracker. A disconnected connection is 409 `work_item_connection_inactive`.",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkItemLinkEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/work-item-links",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkItemLinkInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/work-item-links/{id}": {
      "get": {
        "operationId": "getWorkItemLink",
        "summary": "Get one work item link",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkItemLinkEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/work-item-links/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "delete": {
        "operationId": "deleteWorkItemLink",
        "summary": "Remove a work item link",
        "tags": [
          "work-items"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/work-item-links/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/timesheet-submissions": {
      "get": {
        "operationId": "listTimesheetSubmissions",
        "summary": "List the acting user's timesheet submissions",
        "tags": [
          "timesheet-approvals"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetSubmissionPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/timesheet-submissions",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "period_start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "period_end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ]
      },
      "post": {
        "operationId": "submitTimesheet",
        "summary": "Submit a timesheet period for approval",
        "tags": [
          "timesheet-approvals"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetSubmissionEnvelope"
                }
              }
            }
          },
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetSubmissionEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/timesheet-submissions",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimesheetSubmissionInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/timesheet-submissions/pending": {
      "get": {
        "operationId": "listPendingTimesheetSubmissions",
        "summary": "List timesheet submissions awaiting review",
        "tags": [
          "timesheet-approvals"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetSubmissionPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/timesheet-submissions/pending",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "period_start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "period_end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/timesheet-submissions/approved": {
      "get": {
        "operationId": "listApprovedTimesheetSubmissions",
        "summary": "List recently approved timesheet periods available to reopen",
        "tags": [
          "timesheet-approvals"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetSubmissionPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/timesheet-submissions/approved",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "period_start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "period_end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/timesheet-submissions/{id}": {
      "get": {
        "operationId": "getTimesheetSubmission",
        "summary": "Get an owner- or approver-visible timesheet submission",
        "tags": [
          "timesheet-approvals"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetSubmissionDetailEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/timesheet-submissions/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/timesheet-submissions/bulk-approve": {
      "post": {
        "operationId": "bulkApproveTimesheetSubmissions",
        "summary": "Approve an explicit selection of submitted timesheet periods",
        "tags": [
          "timesheet-approvals"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetBulkApprovalResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/timesheet-submissions/bulk-approve",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimesheetBulkApprovalInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/timesheet-submissions/{id}/approve": {
      "post": {
        "operationId": "approveTimesheetSubmission",
        "summary": "Approve a submitted timesheet period",
        "tags": [
          "timesheet-approvals"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetSubmissionEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/timesheet-submissions/:id/approve",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/timesheet-submissions/{id}/reject": {
      "post": {
        "operationId": "rejectTimesheetSubmission",
        "summary": "Reject a submitted timesheet period with a reason",
        "tags": [
          "timesheet-approvals"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetSubmissionEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/timesheet-submissions/:id/reject",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimesheetRejectionInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/timesheet-submissions/{id}/unsubmit": {
      "post": {
        "operationId": "unsubmitTimesheetSubmission",
        "summary": "Take back your own timesheet before anyone has reviewed it",
        "tags": [
          "timesheet-approvals"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetSubmissionEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/timesheet-submissions/:id/unsubmit",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/timesheet-submissions/{id}/withdraw": {
      "post": {
        "operationId": "withdrawTimesheetSubmission",
        "summary": "Explicitly withdraw or reopen a timesheet period",
        "tags": [
          "timesheet-approvals"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetSubmissionEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/timesheet-submissions/:id/withdraw",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimesheetWithdrawalInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/timesheet-lock-policy": {
      "get": {
        "operationId": "getTimesheetLockPolicy",
        "summary": "Get the organization timesheet lock policy",
        "tags": [
          "timesheet-locks"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetLockPolicyEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/timesheet-lock-policy",
        "x-ezacto-generate-client": true
      },
      "patch": {
        "operationId": "updateTimesheetLockPolicy",
        "summary": "Update the organization timesheet lock policy",
        "tags": [
          "timesheet-locks"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetLockPolicyEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/timesheet-lock-policy",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimesheetLockPolicyPatch"
              }
            }
          }
        }
      }
    },
    "/api/v1/timesheet-locks": {
      "get": {
        "operationId": "listTimesheetLocks",
        "summary": "List durable timesheet lock windows",
        "tags": [
          "timesheet-locks"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetLockWindowPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/timesheet-locks",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "manual",
                "auto"
              ]
            }
          }
        ]
      },
      "post": {
        "operationId": "createTimesheetManualLock",
        "summary": "Create an organization-wide manual lock cutoff",
        "tags": [
          "timesheet-locks"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetLockWindowEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/timesheet-locks",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimesheetManualLockInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/timesheet-locks/{id}": {
      "get": {
        "operationId": "getTimesheetLock",
        "summary": "Get a durable timesheet lock window",
        "tags": [
          "timesheet-locks"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetLockWindowEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/timesheet-locks/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/timesheet-locks/{id}/unlock": {
      "post": {
        "operationId": "unlockTimesheetLock",
        "summary": "Explicitly unlock a timesheet lock window",
        "tags": [
          "timesheet-locks"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetLockWindowEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/timesheet-locks/:id/unlock",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimesheetUnlockInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/expenses": {
      "get": {
        "operationId": "listExpenses",
        "summary": "List the acting user's expenses",
        "tags": [
          "expenses"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpensePage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/expenses",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "spent_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "approval_status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unsubmitted",
                "submitted",
                "approved"
              ]
            }
          },
          {
            "name": "invoice_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Requires invoices:read for both the profile and token."
            }
          },
          {
            "name": "is_billed",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Requires invoices:read for both the profile and token."
            }
          },
          {
            "name": "billable",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "expense_category_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "reimbursable",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "reimbursement_status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "none",
                "pending",
                "approved",
                "paid"
              ]
            }
          }
        ]
      },
      "post": {
        "operationId": "createExpense",
        "summary": "Create an expense",
        "tags": [
          "expenses"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/expenses",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExpenseInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/expenses/{id}": {
      "get": {
        "operationId": "getExpense",
        "summary": "Get an expense",
        "tags": [
          "expenses"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/expenses/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateExpense",
        "summary": "Update an expense",
        "tags": [
          "expenses"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/expenses/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExpensePatch"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteExpense",
        "summary": "Delete an expense",
        "tags": [
          "expenses"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/expenses/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/invoices": {
      "get": {
        "operationId": "listInvoices",
        "summary": "List invoices",
        "description": "Newest first: by issue_date, latest first; then by number, highest first -- compared as a number when it is made of digits alone (leading zeros ignored) and as text, by Unicode code point, otherwise, with all-digit numbers ahead of the rest on a day that has both; then by id, highest first, so no two invoices tie. The first page fixes the traversal to the invoices that existed when it was read: an invoice created after it does not appear on later pages of the same traversal, and is listed by a new one. Editing an invoice's issue_date or number moves it in the order, so a traversal already under way may miss it or list it twice. The number parameter narrows the list to the invoice with exactly that number, compared as text, so 089 is not 89; numbers are unique, so the page holds that invoice or nothing. The sort parameter orders by issue_date, due_date, number, amount or balance, with - in front for descending (the default is -issue_date, the order above). The chosen column ranks first, then the number, then the id, all in the one direction. A cursor belongs to the sort it was issued under and is refused under another.",
        "tags": [
          "invoices"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicePage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(draft|open|paid|closed)(,(draft|open|paid|closed))*$"
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*(,[1-9][0-9]*)*$"
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^-?(issue_date|due_date|number|amount|balance)$"
            }
          }
        ]
      }
    },
    "/api/v1/invoices/{id}": {
      "get": {
        "operationId": "getInvoice",
        "summary": "Get an invoice",
        "tags": [
          "invoices"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateInvoice",
        "summary": "Apply one retry-safe invoice edit",
        "description": " API-token edits require an administrator and X-Ezacto-Invoice-Elevation bound to this base token and draft invoice. Browser sessions retain their existing policy.",
        "tags": [
          "invoices"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceCommandEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Ezacto-Invoice-Elevation",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^ezi_[0-9a-f]{64}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceEditInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/estimates": {
      "get": {
        "operationId": "listEstimates",
        "summary": "List estimates",
        "tags": [
          "estimates"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EstimatePage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/estimates",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ]
      },
      "post": {
        "operationId": "createEstimateDraft",
        "summary": "Create a new estimate draft",
        "description": "Requires invoices:write and an idempotency key. Copies content into independent quote rows, with explicit client, number and issue date. Never sends, accepts, charges or converts. Optional template provenance must still be current and active.",
        "tags": [
          "estimates"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EstimateDraftEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/estimates",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EstimateDraftInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/estimates/{id}": {
      "get": {
        "operationId": "getEstimate",
        "summary": "Get an estimate",
        "tags": [
          "estimates"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EstimateEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/estimates/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/estimates/{id}/messages": {
      "get": {
        "operationId": "listEstimateMessages",
        "summary": "List estimate lifecycle messages",
        "tags": [
          "estimate-messages"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EstimateMessageListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/estimates/:id/messages",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "post": {
        "operationId": "createEstimateMessage",
        "summary": "Create a retry-safe estimate lifecycle message",
        "tags": [
          "estimate-messages"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EstimateMessageCommandEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/estimates/:id/messages",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EstimateMessageInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/estimates/{id}/expiry": {
      "patch": {
        "operationId": "setEstimateExpiry",
        "summary": "Set or clear the last day a customer can answer an estimate",
        "description": "The expiry is the last day the estimate can still be answered, to the end of that day in the instance timezone; null clears it and the organization's estimate validity applies. Moving it does not change the content version a customer was shown. Asking for the expiry the estimate already has changes nothing.",
        "tags": [
          "estimates"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EstimateEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/estimates/:id/expiry",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EstimateExpiryInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/estimates/{id}/convert": {
      "post": {
        "operationId": "convertEstimate",
        "summary": "Convert an accepted estimate into one draft invoice",
        "tags": [
          "estimates"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EstimateConversionEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/estimates/:id/convert",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EstimateConversionInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/invoice-generations": {
      "post": {
        "operationId": "generateInvoice",
        "summary": "Create one draft invoice from tracked work, a flat fee covering tracked work, or a blank free-form draft",
        "tags": [
          "invoices"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceGenerationEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoice-generations",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceGenerationInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{id}/line-items": {
      "post": {
        "operationId": "createInvoiceLine",
        "summary": "Add a parent-owned invoice line",
        "description": " API-token edits require an administrator and X-Ezacto-Invoice-Elevation bound to this base token and draft invoice. Browser sessions retain their existing policy.",
        "tags": [
          "invoices"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceCommandEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/line-items",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Ezacto-Invoice-Elevation",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^ezi_[0-9a-f]{64}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceLineInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{id}/line-items/{lineId}": {
      "patch": {
        "operationId": "updateInvoiceLine",
        "summary": "Update a parent-owned invoice line",
        "description": " API-token edits require an administrator and X-Ezacto-Invoice-Elevation bound to this base token and draft invoice. Browser sessions retain their existing policy.",
        "tags": [
          "invoices"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceCommandEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/line-items/:lineId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "lineId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Ezacto-Invoice-Elevation",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^ezi_[0-9a-f]{64}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceLineUpdateInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteInvoiceLine",
        "summary": "Delete a parent-owned invoice line",
        "description": " API-token edits require an administrator and X-Ezacto-Invoice-Elevation bound to this base token and draft invoice. Browser sessions retain their existing policy.",
        "tags": [
          "invoices"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceCommandEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/line-items/:lineId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "lineId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Ezacto-Invoice-Elevation",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^ezi_[0-9a-f]{64}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VersionedRowDeleteInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{id}/messages": {
      "get": {
        "operationId": "listInvoiceMessages",
        "summary": "List invoice lifecycle messages",
        "tags": [
          "invoice-messages"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceMessageListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/messages",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "post": {
        "operationId": "createInvoiceMessage",
        "summary": "Create an invoice lifecycle message",
        "tags": [
          "invoice-messages"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceCommandEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/messages",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceMessageInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{id}/transitions": {
      "post": {
        "operationId": "transitionInvoice",
        "summary": "Create the message equivalent of an invoice transition",
        "tags": [
          "invoice-messages"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceCommandEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/transitions",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceTransitionInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{id}/deliveries": {
      "post": {
        "operationId": "deliverInvoiceEmail",
        "summary": "Confirm and durably enqueue invoice email delivery",
        "description": "One email: To the recipients, Cc the copies, the organization's always-Cc addresses and, when send_me_a_copy is true, the person sending. The subject and message are templates; the body is the message followed by the invoice summary.",
        "tags": [
          "invoice-messages"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "202": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceCommandEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/deliveries",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceEmailDeliveryInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{id}/deliveries/preview": {
      "post": {
        "operationId": "previewInvoiceEmail",
        "summary": "Compose the invoice email a delivery would send, without sending or recording anything",
        "tags": [
          "invoice-messages"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceEmailPreviewEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/deliveries/preview",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceEmailPreviewInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{id}/deliveries/preview/document": {
      "get": {
        "operationId": "downloadInvoiceEmailPreviewDocument",
        "summary": "Download the invoice PDF a delivery would carry, stamped PREVIEW on every page",
        "tags": [
          "invoice-messages"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment content",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/deliveries/preview/document",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "append_pdfs",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ]
      }
    },
    "/api/v1/invoices/{id}/deliveries/preview/send": {
      "post": {
        "operationId": "sendInvoiceEmailPreview",
        "summary": "Send the invoice email, stamped PREVIEW, to the signed-in user only",
        "description": "Not a delivery: no invoice message, no delivery record, no event. Limited to a few per invoice per hour.",
        "tags": [
          "invoice-messages"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "202": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceEmailPreviewSentEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceEmailPreviewSentEnvelope"
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/deliveries/preview/send",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceEmailPreviewInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{id}/payments": {
      "get": {
        "operationId": "listInvoicePayments",
        "summary": "List effective invoice payments",
        "tags": [
          "invoice-payments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicePaymentListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/payments",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "post": {
        "operationId": "recordInvoicePayment",
        "summary": "Record a retry-safe manual invoice payment",
        "tags": [
          "invoice-payments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceCommandEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/payments",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoicePaymentInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{id}/payments/{paymentId}": {
      "patch": {
        "operationId": "updateInvoicePayment",
        "summary": "Correct a retry-safe manual payment",
        "tags": [
          "invoice-payments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceCommandEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/payments/:paymentId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "paymentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoicePaymentUpdateInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteInvoicePayment",
        "summary": "Delete a retry-safe manual payment",
        "tags": [
          "invoice-payments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceCommandEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/payments/:paymentId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "paymentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VersionedRowDeleteInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/retainers": {
      "get": {
        "operationId": "listRetainers",
        "summary": "List retainers with live balances",
        "tags": [
          "retainers"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetainerPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/retainers",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*(,[1-9][0-9]*)*$"
            }
          }
        ]
      },
      "post": {
        "operationId": "createRetainer",
        "summary": "Create a single-denomination retainer",
        "tags": [
          "retainers"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetainerEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/retainers",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetainerInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/retainers/{id}": {
      "get": {
        "operationId": "getRetainer",
        "summary": "Get a retainer",
        "tags": [
          "retainers"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetainerEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/retainers/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateRetainer",
        "summary": "Update a retainer",
        "tags": [
          "retainers"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetainerEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/retainers/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetainerPatch"
              }
            }
          }
        }
      }
    },
    "/api/v1/retainers/{id}/ledger": {
      "get": {
        "operationId": "listRetainerLedger",
        "summary": "List append-only retainer movements",
        "tags": [
          "retainers"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetainerLedgerListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/retainers/:id/ledger",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "post": {
        "operationId": "appendRetainerLedger",
        "summary": "Append a stable retainer movement",
        "tags": [
          "retainers"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetainerLedgerMutationEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/retainers/:id/ledger",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetainerLedgerInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/retainers/{id}/drawdowns": {
      "post": {
        "operationId": "drawDownRetainer",
        "summary": "Draw down a retainer and return its new balance",
        "tags": [
          "retainers"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetainerLedgerMutationEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/retainers/:id/drawdowns",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetainerDrawdownInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/recurring-invoices": {
      "get": {
        "operationId": "listRecurringInvoices",
        "summary": "List recurring invoice definitions",
        "tags": [
          "recurring-invoices"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecurringInvoicePage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/recurring-invoices",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ]
      },
      "post": {
        "operationId": "createRecurringInvoice",
        "summary": "Create a recurring invoice definition",
        "tags": [
          "recurring-invoices"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecurringInvoiceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/recurring-invoices",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecurringInvoiceInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/recurring-invoices/{id}": {
      "get": {
        "operationId": "getRecurringInvoice",
        "summary": "Get a recurring invoice definition",
        "tags": [
          "recurring-invoices"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecurringInvoiceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/recurring-invoices/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateRecurringInvoice",
        "summary": "Replace a recurring invoice definition",
        "tags": [
          "recurring-invoices"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecurringInvoiceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/recurring-invoices/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecurringInvoiceInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteRecurringInvoice",
        "summary": "Delete a recurring invoice definition",
        "tags": [
          "recurring-invoices"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/recurring-invoices/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/recurring-invoices/{id}/claim-backfill": {
      "post": {
        "operationId": "backfillRecurringInvoiceClaims",
        "summary": "Rehearse or apply the claims a band was issued too early to make",
        "tags": [
          "recurring-invoices"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BandClaimBackfillEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/recurring-invoices/:id/claim-backfill",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BandClaimBackfillInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/recurring-invoices/{id}/generations": {
      "post": {
        "operationId": "generateRecurringInvoice",
        "summary": "Issue the invoice this definition is due for",
        "tags": [
          "recurring-invoices"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecurringGenerationEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/recurring-invoices/:id/generations",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/invoices/{invoiceId}/attachments": {
      "get": {
        "operationId": "listInvoiceAttachments",
        "summary": "List attachments owned by a invoice",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:invoiceId/attachments",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "post": {
        "operationId": "createInvoiceAttachment",
        "summary": "Upload an attachment owned by a invoice",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:invoiceId/attachments",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AttachmentUploadInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{invoiceId}/attachments/{attachmentId}": {
      "get": {
        "operationId": "getInvoiceAttachment",
        "summary": "Get metadata for a invoice attachment",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:invoiceId/attachments/:attachmentId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "attachmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/invoices/{invoiceId}/attachments/{attachmentId}/content": {
      "get": {
        "operationId": "downloadInvoiceAttachment",
        "summary": "Download an attachment owned by a invoice",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment content",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:invoiceId/attachments/:attachmentId/content",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "attachmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/recurring-invoices/{recurringInvoiceId}/attachments": {
      "get": {
        "operationId": "listRecurringInvoiceAttachments",
        "summary": "List attachments owned by a recurringinvoice",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/recurring-invoices/:recurringInvoiceId/attachments",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "recurringInvoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "post": {
        "operationId": "createRecurringInvoiceAttachment",
        "summary": "Upload an attachment owned by a recurringinvoice",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/recurring-invoices/:recurringInvoiceId/attachments",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "recurringInvoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AttachmentUploadInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/recurring-invoices/{recurringInvoiceId}/attachments/{attachmentId}": {
      "get": {
        "operationId": "getRecurringInvoiceAttachment",
        "summary": "Get metadata for a recurringinvoice attachment",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/recurring-invoices/:recurringInvoiceId/attachments/:attachmentId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "recurringInvoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "attachmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "setRecurringInvoiceAttachmentThrough",
        "summary": "Set the last issue date a recurring definition's file goes with",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/recurring-invoices/:recurringInvoiceId/attachments/:attachmentId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "recurringInvoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "attachmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecurringAttachmentThroughInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "removeRecurringInvoiceAttachment",
        "summary": "Stop a file going with the invoices a recurring definition issues",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/recurring-invoices/:recurringInvoiceId/attachments/:attachmentId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "recurringInvoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "attachmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/recurring-invoices/{recurringInvoiceId}/attachments/{attachmentId}/content": {
      "get": {
        "operationId": "downloadRecurringInvoiceAttachment",
        "summary": "Download an attachment owned by a recurringinvoice",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment content",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/recurring-invoices/:recurringInvoiceId/attachments/:attachmentId/content",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "recurringInvoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "attachmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/estimates/{estimateId}/attachments": {
      "get": {
        "operationId": "listEstimateAttachments",
        "summary": "List attachments owned by a estimate",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/estimates/:estimateId/attachments",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "estimateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "post": {
        "operationId": "createEstimateAttachment",
        "summary": "Upload an attachment owned by a estimate",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/estimates/:estimateId/attachments",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "estimateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AttachmentUploadInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/estimates/{estimateId}/attachments/{attachmentId}": {
      "get": {
        "operationId": "getEstimateAttachment",
        "summary": "Get metadata for a estimate attachment",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/estimates/:estimateId/attachments/:attachmentId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "estimateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "attachmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/estimates/{estimateId}/attachments/{attachmentId}/content": {
      "get": {
        "operationId": "downloadEstimateAttachment",
        "summary": "Download an attachment owned by a estimate",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment content",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/estimates/:estimateId/attachments/:attachmentId/content",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "estimateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "attachmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/expenses/{expenseId}/attachments": {
      "get": {
        "operationId": "listExpenseAttachments",
        "summary": "List attachments owned by a expense",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/expenses/:expenseId/attachments",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "expenseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "post": {
        "operationId": "createExpenseAttachment",
        "summary": "Upload an attachment owned by a expense",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/expenses/:expenseId/attachments",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "expenseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AttachmentUploadInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/expenses/{expenseId}/attachments/{attachmentId}": {
      "get": {
        "operationId": "getExpenseAttachment",
        "summary": "Get metadata for a expense attachment",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/expenses/:expenseId/attachments/:attachmentId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "expenseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "attachmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/expenses/{expenseId}/attachments/{attachmentId}/content": {
      "get": {
        "operationId": "downloadExpenseAttachment",
        "summary": "Download an attachment owned by a expense",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment content",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/expenses/:expenseId/attachments/:attachmentId/content",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "expenseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "attachmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/projects/{projectId}/attachments": {
      "get": {
        "operationId": "listProjectAttachments",
        "summary": "List attachments owned by a project",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/projects/:projectId/attachments",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "post": {
        "operationId": "createProjectAttachment",
        "summary": "Upload an attachment owned by a project",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/projects/:projectId/attachments",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AttachmentUploadInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/attachments/{attachmentId}": {
      "get": {
        "operationId": "getProjectAttachment",
        "summary": "Get metadata for a project attachment",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/projects/:projectId/attachments/:attachmentId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "attachmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/projects/{projectId}/attachments/{attachmentId}/content": {
      "get": {
        "operationId": "downloadProjectAttachment",
        "summary": "Download an attachment owned by a project",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment content",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/projects/:projectId/attachments/:attachmentId/content",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "attachmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/staff-payments/actuals": {
      "get": {
        "operationId": "getPaymentActuals",
        "summary": "Review captured contractor time and cost rates for a work month",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentActualsEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/staff-payments/actuals",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "operationId": "confirmPaymentActuals",
        "summary": "Confirm reviewed contractor actuals as the monthly amount owed",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/staff-payments/actuals",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmPaymentActuals"
              }
            }
          }
        }
      }
    },
    "/api/v1/staff-payments/reconciliation": {
      "get": {
        "operationId": "getPaymentReconciliation",
        "summary": "Propose contractor earnings for a work month with missing-rate and changed-source exceptions",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentReconciliationEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/staff-payments/reconciliation",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/staff-payments/provider-settings": {
      "post": {
        "operationId": "configureStaffPaymentProvider",
        "summary": "Set the organization payout provider or a person override",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/staff-payments/provider-settings",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StaffPaymentProviderCommand"
              }
            }
          }
        }
      }
    },
    "/api/v1/staff-payments": {
      "get": {
        "operationId": "getStaffPaymentReport",
        "summary": "Monthly staff payment register and audit history",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StaffPaymentReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/staff-payments",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/staff-payments/events": {
      "post": {
        "operationId": "recordStaffPaymentEvent",
        "summary": "Record a staff payment, obligation, correction, or historical settlement",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/staff-payments/events",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StaffPaymentCommand"
              }
            }
          }
        }
      }
    },
    "/api/v1/staff-payments/allocations": {
      "get": {
        "operationId": "getPaymentAllocationReport",
        "summary": "Reconcile earned, paid, reserved and remaining by month, project and entry",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentAllocationReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/staff-payments/allocations",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "operationId": "allocatePayment",
        "summary": "Allocate part of a payment to a month, project, or reviewed time entry and hours",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/staff-payments/allocations",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AllocatePayment"
              }
            }
          }
        }
      }
    },
    "/api/v1/staff-payments/allocations/preview": {
      "post": {
        "operationId": "previewPaymentAllocation",
        "summary": "Preview what a payment allocation would record and what remains, without saving",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentAllocationPreviewEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/staff-payments/allocations/preview",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AllocatePayment"
              }
            }
          }
        }
      }
    },
    "/api/v1/staff-payments/allocations/reversals": {
      "post": {
        "operationId": "reversePaymentAllocation",
        "summary": "Reverse a payment allocation with a reason, keeping its history",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/staff-payments/allocations/reversals",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReversePaymentAllocation"
              }
            }
          }
        }
      }
    },
    "/api/v1/me/payments": {
      "get": {
        "operationId": "getMyPayments",
        "summary": "Own payment summary and upcoming payments for the signed-in person",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MyPaymentsEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/me/payments",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/invoices/{id}/provider-alerts": {
      "get": {
        "operationId": "listInvoiceProviderAlerts",
        "summary": "List verified Stripe refund and dispute reports without changing receipts",
        "tags": [
          "invoices"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceProviderAlertListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/provider-alerts",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/invoices/{id}/provider-alerts/{alertId}/review": {
      "post": {
        "operationId": "reviewInvoiceProviderAlert",
        "summary": "Mark a provider report reviewed without an accounting mutation",
        "tags": [
          "invoices"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceProviderAlertEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/provider-alerts/:alertId/review",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "alertId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewInvoiceProviderAlertInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/bank-feed-status": {
      "get": {
        "operationId": "getBankFeedStatus",
        "summary": "Read configured bank feed health without exposing credentials",
        "tags": [
          "invoices"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankFeedStatusEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/bank-feed-status",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/bank-feeds/sync": {
      "post": {
        "operationId": "syncBankFeeds",
        "summary": "Read due bank feed pages without creating invoice payments",
        "tags": [
          "invoices"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankFeedSyncEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/bank-feeds/sync",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BankFeedSyncInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/bank-deposit-accounts": {
      "get": {
        "operationId": "listBankDepositAccounts",
        "summary": "List bank feed accounts visible to the review queue",
        "tags": [
          "invoices"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankDepositAccountsEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/bank-deposit-accounts",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/bank-deposits": {
      "get": {
        "operationId": "listBankDeposits",
        "summary": "Review staged credits without creating receipts",
        "tags": [
          "invoices"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankDepositListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/bank-deposits",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unmatched",
                "suggested",
                "confirmed",
                "rejected"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/api/v1/bank-deposits/{id}/invoices": {
      "get": {
        "operationId": "listBankDepositInvoices",
        "summary": "Find same-currency invoices for an explicit assignment",
        "tags": [
          "invoices"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankDepositInvoicesEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/bank-deposits/:id/invoices",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/bank-deposits/{id}/assign": {
      "post": {
        "operationId": "assignBankDeposit",
        "summary": "Choose the invoice to review for this credit",
        "tags": [
          "invoices"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankDepositEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/bank-deposits/:id/assign",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BankDepositAssignInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/bank-deposits/{id}/reject": {
      "post": {
        "operationId": "rejectBankDeposit",
        "summary": "Reject this credit without altering an invoice",
        "tags": [
          "invoices"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankDepositEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/bank-deposits/:id/reject",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BankDepositDecisionInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/bank-deposits/{id}/reopen": {
      "post": {
        "operationId": "reopenBankDeposit",
        "summary": "Reopen a rejected credit for review",
        "tags": [
          "invoices"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankDepositEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/bank-deposits/:id/reopen",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BankDepositDecisionInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/bank-deposits/{id}/confirm": {
      "post": {
        "operationId": "confirmBankDeposit",
        "summary": "Explicitly confirm one credit against one invoice",
        "tags": [
          "invoices"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankDepositEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/bank-deposits/:id/confirm",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BankDepositConfirmInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/bank-deposits/{id}/verify-source": {
      "post": {
        "operationId": "verifyBankDepositSource",
        "summary": "Record an administrator verification of an uncertain external credit",
        "tags": [
          "invoices"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankDepositEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/bank-deposits/:id/verify-source",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BankDepositVerifyInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/deel-sync": {
      "get": {
        "operationId": "getDeelSync",
        "summary": "Deel time sync mode, schedule and recent runs",
        "description": "The sync is manual unless an administrator sets it to automatic. Automatic runs once a day at run_time in the organization timezone, through the hourly cron. Nothing is sent to Deel unless configured is true.",
        "tags": [
          "deel-sync"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeelSyncStatus"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/deel-sync",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/deel-sync/settings": {
      "patch": {
        "operationId": "updateDeelSyncSettings",
        "summary": "Set the Deel sync mode and automatic run time",
        "tags": [
          "deel-sync"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/deel-sync/settings",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeelSyncSettingsCommand"
              }
            }
          }
        }
      }
    },
    "/api/v1/deel-sync/preview": {
      "post": {
        "operationId": "previewDeelSync",
        "summary": "Preview the timesheets a Deel sync would create, without sending any",
        "tags": [
          "deel-sync"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeelSyncPreview"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeelSyncPreview"
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeelSyncPreview"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/deel-sync/preview",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeelSyncWindow"
              }
            }
          }
        }
      }
    },
    "/api/v1/deel-sync/runs": {
      "post": {
        "operationId": "runDeelSync",
        "summary": "Send the timesheets from a preview to Deel",
        "description": "Sends only when the plan still holds exactly the entry_ids from the preview. If the plan has changed, nothing is sent and the response is 409 deel_sync_stale; preview again.",
        "tags": [
          "deel-sync"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeelSyncRunResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeelSyncRunResult"
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeelSyncRunResult"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/deel-sync/runs",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeelSyncRunCommand"
              }
            }
          }
        }
      }
    },
    "/api/v1/deel-staging/payment-status": {
      "post": {
        "operationId": "refreshDeelPaymentStatus",
        "summary": "Refresh provider payment status for previously staged timesheets",
        "tags": [
          "deel-sync"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeelPaymentStatusRefreshEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/deel-staging/payment-status",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeelPaymentStatusMonth"
              }
            }
          }
        }
      }
    },
    "/api/v1/deel-staging": {
      "get": {
        "operationId": "getDeelStaging",
        "summary": "Inspect configured administrator-reviewed hour staging availability",
        "tags": [
          "deel-sync"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeelStagingStatusEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/deel-staging",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/deel-staging/preview": {
      "post": {
        "operationId": "previewDeelStaging",
        "summary": "Review stopped hours for selected Deel people",
        "tags": [
          "deel-sync"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeelStagePreviewEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/deel-staging/preview",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeelStageSelection"
              }
            }
          }
        }
      }
    },
    "/api/v1/deel-staging/commands": {
      "post": {
        "operationId": "stageDeelHours",
        "summary": "Stage administrator-reviewed hours once; payment completes in Deel",
        "tags": [
          "deel-sync"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeelStageResultEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/deel-staging/commands",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeelStageCommand"
              }
            }
          }
        }
      }
    },
    "/api/v1/deel-staging/status": {
      "post": {
        "operationId": "getDeelStageStatus",
        "summary": "Recover the status of an exact staging command without sending hours",
        "tags": [
          "deel-sync"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeelStageStatusEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/deel-staging/status",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeelStageCommand"
              }
            }
          }
        }
      }
    },
    "/api/v1/payment-runs/report": {
      "get": {
        "operationId": "getPaymentRunReport",
        "summary": "Payment ledger and individual transfer outcomes over a period range",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRunReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/payment-runs/report",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/payment-runs/preview": {
      "post": {
        "operationId": "previewPaymentRun",
        "summary": "Prepare a payment run for review without sending money",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRunEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/payment-runs/preview",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentRunCommand"
              }
            }
          }
        }
      }
    },
    "/api/v1/payment-runs/{id}/approve": {
      "post": {
        "operationId": "approvePaymentRun",
        "summary": "Authorize and reserve a payment run for immediate or scheduled execution",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRunEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/payment-runs/:id/approve",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentRunApproval"
              }
            }
          }
        }
      }
    },
    "/api/v1/payment-runs/{id}/cancel": {
      "post": {
        "operationId": "cancelPaymentRun",
        "summary": "Cancel payments that have not entered transfer creation",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRunEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/payment-runs/:id/cancel",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/payment-runs/{id}/items/{itemId}/reconcile": {
      "post": {
        "operationId": "reconcilePaymentRunItem",
        "summary": "Request a status check without initiating a replacement transfer",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRunEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/payment-runs/:id/items/:itemId/reconcile",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/payment-runs/advances": {
      "get": {
        "operationId": "getAdvanceCreditReport",
        "summary": "Reconcile contractor advance credit by settlement and application date",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdvanceCreditReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/payment-runs/advances",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/payment-runs/advances/applications": {
      "post": {
        "operationId": "applyAdvanceCredit",
        "summary": "Apply settled advance credit to reviewed earnings without moving funds",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/payment-runs/advances/applications",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyAdvanceCredit"
              }
            }
          }
        }
      }
    },
    "/api/v1/payment-runs/advances/reversals": {
      "post": {
        "operationId": "reverseAdvanceCredit",
        "summary": "Reverse an advance application and restore credit",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/payment-runs/advances/reversals",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReverseAdvanceCredit"
              }
            }
          }
        }
      }
    },
    "/api/v1/payment-runs/advances/returns": {
      "post": {
        "operationId": "returnAdvanceCredit",
        "summary": "Record a confirmed return of unapplied advance credit",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/payment-runs/advances/returns",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnAdvanceCredit"
              }
            }
          }
        }
      }
    },
    "/api/v1/staff-invoices": {
      "get": {
        "operationId": "getStaffInvoiceReport",
        "summary": "Reconcile contractor payable invoices against existing reviewed earnings",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StaffInvoiceReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/staff-invoices",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "operationId": "saveStaffInvoice",
        "summary": "Record an immutable contractor invoice version without changing amounts owed",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StaffInvoiceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/staff-invoices",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveStaffInvoice"
              }
            }
          }
        }
      }
    },
    "/api/v1/me/staff-invoices": {
      "get": {
        "operationId": "getMyStaffInvoices",
        "summary": "Read only your received payable invoices when own-money viewing is enabled",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StaffInvoiceReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/me/staff-invoices",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/staff-invoices/{invoiceId}/documents": {
      "post": {
        "operationId": "uploadStaffInvoiceDocument",
        "summary": "Stage a contractor invoice document for explicit inclusion in a version",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StaffInvoiceDocumentEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/staff-invoices/:invoiceId/documents",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AttachmentUploadInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/staff-invoices/{invoiceId}/documents/{documentId}/content": {
      "get": {
        "operationId": "getStaffInvoiceDocumentContent",
        "summary": "Download an authorized contractor invoice document",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment content",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/staff-invoices/:invoiceId/documents/:documentId/content",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/staff-payments/contractor-review": {
      "get": {
        "operationId": "getContractorReview",
        "summary": "Review contractor earnings, invoices, existing payments, advance credit and allocation proposals without executing them",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContractorReviewEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/staff-payments/contractor-review",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/staff-payments/contractor-review/acceptances": {
      "get": {
        "operationId": "getContractorAcceptances",
        "summary": "Read immutable contractor reconciliation confirmations",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContractorAcceptancesEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/staff-payments/contractor-review/acceptances",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "operationId": "acceptContractorReview",
        "summary": "Explicitly confirm monthly receipt allocations and settled advance credit without authorizing a transfer",
        "tags": [
          "staff-payments"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContractorAcceptanceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/staff-payments/contractor-review/acceptances",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptContractorReview"
              }
            }
          }
        }
      }
    },
    "/api/v1/scheduled-runs/{id}/review-link": {
      "post": {
        "operationId": "consumeScheduledReviewLink",
        "summary": "Record the single authenticated opening of an expiring email review link; never confirm or execute",
        "tags": [
          "scheduled-runs"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledReviewLinkEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/scheduled-runs/:id/review-link",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduledReviewLinkInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/scheduled-runs/{id}/items/{itemId}/report": {
      "get": {
        "operationId": "downloadScheduledRunReport",
        "summary": "Download the exact saved report an administrator is reviewing",
        "tags": [
          "scheduled-runs"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment content",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/scheduled-runs/:id/items/:itemId/report",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/api/v1/scheduled-runs/{id}/retry": {
      "post": {
        "operationId": "retryScheduledRun",
        "summary": "Authorize another bounded attempt window for exhausted failed items only",
        "tags": [
          "scheduled-runs"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledRunEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/scheduled-runs/:id/retry",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/api/v1/scheduled-runs/{id}": {
      "get": {
        "operationId": "getScheduledRun",
        "summary": "Read a proposed run and the concrete items it would act on",
        "tags": [
          "scheduled-runs"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledRunEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/scheduled-runs/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/api/v1/scheduled-runs/{id}/confirm": {
      "post": {
        "operationId": "confirmScheduledRun",
        "summary": "Confirm a proposed run; a second confirmation changes nothing",
        "description": "Refused with 409 once the run has lapsed, which also settles it as expired, or if it was cancelled.",
        "tags": [
          "scheduled-runs"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledRunEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/scheduled-runs/:id/confirm",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduledRunConfirmInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/scheduled-runs/{id}/cancel": {
      "post": {
        "operationId": "cancelScheduledRun",
        "summary": "Cancel a proposed run that has not been confirmed",
        "tags": [
          "scheduled-runs"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledRunEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/scheduled-runs/:id/cancel",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/api/v1/scheduled-jobs": {
      "get": {
        "operationId": "listScheduledJobs",
        "summary": "List monthly job definitions and their latest proposal status",
        "tags": [
          "scheduled-jobs"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledJobsPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/scheduled-jobs",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ]
      },
      "post": {
        "operationId": "createScheduledJob",
        "summary": "Create a monthly job requiring authenticated confirmation",
        "tags": [
          "scheduled-jobs"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledJobEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/scheduled-jobs",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduledJobCreate"
              }
            }
          }
        }
      }
    },
    "/api/v1/scheduled-jobs/{id}": {
      "get": {
        "operationId": "getScheduledJob",
        "summary": "Read a month-end job definition",
        "tags": [
          "scheduled-jobs"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledJobEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/scheduled-jobs/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateScheduledJob",
        "summary": "Update or pause a job against its reviewed version",
        "tags": [
          "scheduled-jobs"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledJobEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/scheduled-jobs/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduledJobPatch"
              }
            }
          }
        }
      }
    },
    "/api/v1/report-definitions/registry": {
      "get": {
        "operationId": "getReportDefinitionRegistry",
        "summary": "List report builder fields and metrics",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportDefinitionRegistryEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/report-definitions/registry",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/report-definitions": {
      "get": {
        "operationId": "listSavedReports",
        "summary": "List report definitions visible to the acting user",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedReportListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/report-definitions",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "view",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "yours",
                "shared"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "custom_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ]
      },
      "post": {
        "operationId": "createSavedReport",
        "summary": "Save a report definition",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/report-definitions",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavedReportInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/report-views": {
      "post": {
        "operationId": "createReportView",
        "summary": "Save the report on screen: a report kind and its address, private to the author",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/report-views",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavedReportViewInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/report-definitions/preview": {
      "post": {
        "operationId": "previewReportDefinition",
        "summary": "Run an unsaved report definition",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportRunnerEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/report-definitions/preview",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavedReportInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/report-definitions/{reportId}": {
      "get": {
        "operationId": "getSavedReport",
        "summary": "Read a saved report definition",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/report-definitions/:reportId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateSavedReport",
        "summary": "Update a saved report at an expected version",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/report-definitions/:reportId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavedReportUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteSavedReport",
        "summary": "Delete a saved report you own, or any saved report as an administrator",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/report-definitions/:reportId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/report-definitions/{reportId}/duplicate": {
      "post": {
        "operationId": "duplicateSavedReport",
        "summary": "Duplicate a visible report into the acting user's library",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/report-definitions/:reportId/duplicate",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/report-definitions/{reportId}/pin": {
      "post": {
        "operationId": "pinSavedReport",
        "summary": "Pin a visible saved report",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/report-definitions/:reportId/pin",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "operationId": "unpinSavedReport",
        "summary": "Unpin a visible saved report",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/report-definitions/:reportId/pin",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/report-definitions/{reportId}/shares/{userId}": {
      "post": {
        "operationId": "shareSavedReport",
        "summary": "Share an owned report with a teammate",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/report-definitions/:reportId/shares/:userId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "delete": {
        "operationId": "unshareSavedReport",
        "summary": "Revoke a teammate's report share",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/report-definitions/:reportId/shares/:userId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/report-definitions/{reportId}/role-shares/{profile}": {
      "post": {
        "operationId": "shareSavedReportWithRole",
        "summary": "Share an owned report with everyone in a role",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/report-definitions/:reportId/role-shares/:profile",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "profile",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "operationId": "unshareSavedReportWithRole",
        "summary": "Revoke a role's access to an owned report",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/report-definitions/:reportId/role-shares/:profile",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "profile",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/report-definitions/{reportId}/run": {
      "post": {
        "operationId": "runSavedReport",
        "summary": "Run the exact current version of a saved report",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportRunnerEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/report-definitions/:reportId/run",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/reports/my-hours": {
      "get": {
        "operationId": "getMyHoursReport",
        "summary": "Report the acting user's own tracked hours by project",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MyHoursReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/reports/my-hours",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/reports/time": {
      "get": {
        "operationId": "getTimeReport",
        "summary": "Report tracked time by client, project, task and teammate",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/reports/time",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "include_fixed_fee",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ]
      }
    },
    "/api/v1/reports/invoiced": {
      "get": {
        "operationId": "getInvoicedReport",
        "summary": "List invoices issued in a period with paid and balance amounts",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicedReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/reports/invoiced",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "open",
                "paid",
                "closed"
              ]
            }
          }
        ]
      }
    },
    "/api/v1/reports/payments-received": {
      "get": {
        "operationId": "getPaymentsReceivedReport",
        "summary": "List invoice payments received in a period",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentsReceivedReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/reports/payments-received",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/reports/receivables": {
      "get": {
        "operationId": "getReceivablesReport",
        "summary": "Age outstanding invoice balances by client as of a date",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceivablesReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/reports/receivables",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "as_of",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "due_state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "not_due",
                "past_due"
              ]
            }
          }
        ]
      }
    },
    "/api/v1/reports/contractor": {
      "get": {
        "operationId": "getContractorCostReport",
        "summary": "Total what each person cost over a period",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContractorCostReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/reports/contractor",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ]
      }
    },
    "/api/v1/reports/month-end": {
      "get": {
        "operationId": "getMonthEndManifest",
        "summary": "What a month-end pack would send, before anybody sends it",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonthEndManifestEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/reports/month-end",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ]
      }
    },
    "/api/v1/reports/banded-months": {
      "get": {
        "operationId": "getBandedMonthReport",
        "summary": "What a banded month was worth at full rates, against what it charged",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BandedMonthReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/reports/banded-months",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ]
      }
    },
    "/api/v1/reports/band-cost-alert": {
      "get": {
        "operationId": "getBandCostAlert",
        "summary": "Read the organisation cost-share threshold for banded work",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BandCostAlertEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/reports/band-cost-alert",
        "x-ezacto-generate-client": true
      },
      "post": {
        "operationId": "setBandCostAlert",
        "summary": "Set the organisation cost-share threshold for banded work",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BandCostAlertEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/reports/band-cost-alert",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BandCostAlertInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/profitability": {
      "get": {
        "operationId": "getProfitabilityReport",
        "summary": "Revenue, cost and profit per project against the window before it",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfitabilityReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/reports/profitability",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "project_status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "active",
                "archived"
              ]
            }
          },
          {
            "name": "billing_method",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "non_billable",
                "time_materials",
                "fixed_fee"
              ]
            }
          },
          {
            "name": "manager_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "tag_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/reports/detailed-expense": {
      "get": {
        "operationId": "getDetailedExpenseReport",
        "summary": "List every expense in a period, one row each",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetailedExpenseReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/reports/detailed-expense",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "category_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "billable",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "reimbursable",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invoice_state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "invoiced",
                "uninvoiced"
              ]
            }
          },
          {
            "name": "active_projects_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ]
      }
    },
    "/api/v1/reports/uninvoiced": {
      "get": {
        "operationId": "getUninvoicedReport",
        "summary": "Report uninvoiced tracked time and expenses",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UninvoicedReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/reports/uninvoiced",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/reports/detailed-time": {
      "get": {
        "operationId": "getDetailedTimeReport",
        "summary": "List tracked time by date, task and person",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetailedTimeReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/reports/detailed-time",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "self",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "include_fixed_fee",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "direct_client_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "contractors_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{3}$"
            }
          },
          {
            "name": "project_status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "active",
                "archived"
              ]
            }
          },
          {
            "name": "billing_method",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "non_billable",
                "time_materials",
                "fixed_fee"
              ]
            }
          },
          {
            "name": "manager_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "task_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "role_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "tag_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "hours",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "billable",
                "non_billable",
                "uninvoiced",
                "claimed",
                "unclaimed"
              ]
            }
          },
          {
            "name": "grain",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "day",
                "entry"
              ]
            }
          },
          {
            "name": "audience",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "internal",
                "client"
              ]
            }
          },
          {
            "name": "invoice_state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "invoiced",
                "uninvoiced"
              ]
            }
          },
          {
            "name": "active_projects_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "notes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ]
      }
    },
    "/api/v1/reports/detailed-time/export": {
      "get": {
        "operationId": "downloadDetailedTimeReport",
        "summary": "Download the detailed time report as a PDF, CSV or Excel workbook",
        "description": "Takes every filter of getDetailedTimeReport, with the same defaults but one: an absent audience is client, so only the notes a client may read are in the file unless audience=internal is asked for. Hours only. The file is named detailed-time-<from>-to-<to>[-<client>].<format>. A PDF is refused above 5000 rows (422, field format); CSV and Excel take the report's whole range.",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment content",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/reports/detailed-time/export",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "self",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "include_fixed_fee",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "direct_client_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "contractors_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{3}$"
            }
          },
          {
            "name": "project_status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "active",
                "archived"
              ]
            }
          },
          {
            "name": "billing_method",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "non_billable",
                "time_materials",
                "fixed_fee"
              ]
            }
          },
          {
            "name": "manager_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "task_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "role_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "tag_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "hours",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "billable",
                "non_billable",
                "uninvoiced",
                "claimed",
                "unclaimed"
              ]
            }
          },
          {
            "name": "grain",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "day",
                "entry"
              ]
            }
          },
          {
            "name": "audience",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "internal",
                "client"
              ]
            }
          },
          {
            "name": "invoice_state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "invoiced",
                "uninvoiced"
              ]
            }
          },
          {
            "name": "active_projects_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "notes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "pdf",
                "csv",
                "xlsx"
              ]
            }
          }
        ]
      }
    },
    "/api/v1/reports/detailed-time/actions": {
      "post": {
        "operationId": "executeDetailedTimeAction",
        "summary": "Apply a confirmed idempotent action to selected time rows",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportTimeActionEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/reports/detailed-time/actions",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportTimeActionInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/client-rollups/{clientId}": {
      "get": {
        "operationId": "getClientRollupReport",
        "summary": "Roll up reporting metrics through a client subtree",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientRollupReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/reports/client-rollups/:clientId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ]
      }
    },
    "/api/v1/reports/project-budgets": {
      "get": {
        "operationId": "listProjectBudgetSummaries",
        "summary": "Report budget consumption for every visible project",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectBudgetSummaryListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/reports/project-budgets",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ]
      }
    },
    "/api/v1/reports/project-budget/{projectId}": {
      "get": {
        "operationId": "getProjectBudgetReport",
        "summary": "Report project budget consumption",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectBudgetReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/reports/project-budget/:projectId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ]
      }
    },
    "/api/v1/admin/modules": {
      "get": {
        "operationId": "listModules",
        "summary": "List module enabled states",
        "tags": [
          "admin-modules"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModuleListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/admin/modules",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/admin/modules/{module}": {
      "patch": {
        "operationId": "updateModule",
        "summary": "Enable or disable a module",
        "tags": [
          "admin-modules"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModuleListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/admin/modules/:module",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "module",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModulePatch"
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/sign-in-methods": {
      "get": {
        "operationId": "listSignInMethods",
        "summary": "List sign-in methods with their configured and enabled states",
        "tags": [
          "admin-modules"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignInMethodListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/admin/sign-in-methods",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/admin/sign-in-methods/{method}": {
      "patch": {
        "operationId": "updateSignInMethod",
        "summary": "Switch a sign-in method on or off",
        "tags": [
          "admin-modules"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignInMethodListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/admin/sign-in-methods/:method",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "method",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModulePatch"
              }
            }
          }
        }
      }
    },
    "/api/v1/profile/retention-policy": {
      "get": {
        "operationId": "getAccountRetentionPolicy",
        "summary": "Read the operator's published erasure and retention disclosure",
        "description": "Requires a staff session or a token with time_entries:read.",
        "tags": [
          "profile"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountRetentionEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/profile/retention-policy",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/admin/retention-policy": {
      "post": {
        "operationId": "publishAccountRetentionPolicy",
        "summary": "Publish an operator erasure and retention policy version",
        "tags": [
          "admin-modules"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountRetentionEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/admin/retention-policy",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountRetentionPublication"
              }
            }
          }
        }
      }
    },
    "/account-deletion/requests/{id}/status": {
      "post": {
        "operationId": "readAccountDeletionTrackingStatus",
        "summary": "Read minimal deletion status with its private tracking capability",
        "tags": [
          "profile"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionTrackingEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/account-deletion/requests/:id/status",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountDeletionTrackingInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/retention-reviews": {
      "get": {
        "operationId": "listDueRetentionReviews",
        "summary": "List due retained-record and downstream review obligations",
        "tags": [
          "admin-modules"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetentionReviewListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/admin/retention-reviews",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/admin/deletion-requests/{id}/retention-reviews": {
      "get": {
        "operationId": "readRetentionReviews",
        "summary": "Read recorded retention and cleanup evidence",
        "tags": [
          "admin-modules"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetentionReviewListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/admin/deletion-requests/:id/retention-reviews",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/admin/deletion-requests/{id}/retention-reviews/{area}": {
      "patch": {
        "operationId": "recordRetentionReview",
        "summary": "Record an operator review with evidence and compare-and-swap",
        "tags": [
          "admin-modules"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetentionReviewEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/admin/deletion-requests/:id/retention-reviews/:area",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "area",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetentionReviewInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/deletion-requests/{id}/completion": {
      "post": {
        "operationId": "completeReviewedDeletionRequest",
        "summary": "Confirm a reviewed request outcome with remaining retention disclosed",
        "tags": [
          "admin-modules"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletionCompletionEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/admin/deletion-requests/:id/completion",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeletionCompletionInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/deletion-requests/{id}/closure": {
      "get": {
        "operationId": "previewAccountClosure",
        "summary": "Review actual account data before irreversible access closure",
        "tags": [
          "admin-modules"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountClosurePreviewEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/admin/deletion-requests/:id/closure",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "operationId": "closeAccountAccess",
        "summary": "Erase local credentials and optional profile under reviewed retention decisions",
        "tags": [
          "admin-modules"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountClosureRecordEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/admin/deletion-requests/:id/closure",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountClosureInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/deletion-requests/{id}/apple-cleanup": {
      "post": {
        "operationId": "retryAccountAppleCleanup",
        "summary": "Retry server-managed Apple cleanup after local account closure",
        "tags": [
          "admin-modules"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppleCleanupStatusEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/admin/deletion-requests/:id/apple-cleanup",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyObject"
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/deletion-requests": {
      "get": {
        "operationId": "listAccountDeletionRequests",
        "summary": "List account deletion requests",
        "tags": [
          "admin-modules"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/admin/deletion-requests",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/admin/deletion-requests/{id}": {
      "get": {
        "operationId": "getAccountDeletionRequestForAdmin",
        "summary": "Read an account deletion request",
        "tags": [
          "admin-modules"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionDetailEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/admin/deletion-requests/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateAccountDeletionRequest",
        "summary": "Update request progress without completing erasure",
        "tags": [
          "admin-modules"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionDetailEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/admin/deletion-requests/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountDeletionUpdate"
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/deletion-requests/{id}/notification": {
      "post": {
        "operationId": "retryAccountDeletionNotification",
        "summary": "Retry an unavailable or failed administrator notification",
        "tags": [
          "admin-modules"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionDetailEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/admin/deletion-requests/:id/notification",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/backup/offsite/check": {
      "post": {
        "operationId": "checkOffsiteBackupDestination",
        "summary": "Verify the deployment-configured encrypted off-site backup destination",
        "tags": [
          "backup"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OffsiteBackupCheckEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/backup/offsite/check",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/backup/status": {
      "get": {
        "operationId": "getBackupStatus",
        "summary": "The last completed and last failed backup run, and recent history",
        "tags": [
          "backup"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupStatusEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/backup/status",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/backup/runs": {
      "get": {
        "operationId": "listBackupRuns",
        "summary": "List backup runs, newest first, a page at a time",
        "description": "The history behind the backup status, which holds only the latest runs. page.total counts everything the filters match, not only this page.",
        "tags": [
          "backup"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupRunPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/backup/runs",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "running",
                "completed",
                "failed"
              ]
            }
          },
          {
            "name": "trigger",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "nightly",
                "manual"
              ]
            }
          }
        ]
      }
    },
    "/api/v1/backup/download-links": {
      "post": {
        "operationId": "createBackupDownloadLink",
        "summary": "Create a single-use, ten-minute link that downloads a backup as one ZIP",
        "description": "Administrator session only; an API token is refused. The backup carries credential hashes and authenticator seeds, so the link is a secret: it works once, expires in ten minutes, and the token in url is shown only in this response. Where the administrator has an authenticator enrolled, code must be a current authenticator or recovery code. run_id defaults to the latest completed run. Following the link answers 404 to anything that is not a live link, whatever the reason.",
        "tags": [
          "backup"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupDownloadLinkEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/backup/download-links",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackupDownloadLinkInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/integrations/quickbooks": {
      "get": {
        "operationId": "getQuickBooksConnection",
        "summary": "Whether QuickBooks is configured, and the connected company",
        "tags": [
          "integrations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuickBooksStatusEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/integrations/quickbooks",
        "x-ezacto-generate-client": true
      },
      "delete": {
        "operationId": "disconnectQuickBooks",
        "summary": "Disconnect the QuickBooks company and revoke the grant",
        "tags": [
          "integrations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/integrations/quickbooks",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/integrations/quickbooks/authorize": {
      "post": {
        "operationId": "startQuickBooksAuthorization",
        "summary": "Begin connecting a QuickBooks company",
        "tags": [
          "integrations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuickBooksAuthorizeEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/integrations/quickbooks/authorize",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/integrations/quickbooks/settings": {
      "post": {
        "operationId": "updateQuickBooksSettings",
        "summary": "Whether mirrored invoices offer QuickBooks payment links",
        "tags": [
          "integrations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuickBooksConnectionEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/integrations/quickbooks/settings",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuickBooksSettingsInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/integrations/quickbooks/reconciliation": {
      "get": {
        "operationId": "getQuickBooksReconciliation",
        "summary": "Differences between our invoices and the QuickBooks company, listed and never corrected",
        "tags": [
          "integrations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuickBooksReconciliationEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/integrations/quickbooks/reconciliation",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/invoices/{id}/quickbooks": {
      "get": {
        "operationId": "getInvoiceQuickBooks",
        "summary": "Whether this invoice and its payments are mirrored in QuickBooks, and how the last attempt went",
        "tags": [
          "integrations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceQuickBooksEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/quickbooks",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/invoices/{id}/quickbooks/sync": {
      "post": {
        "operationId": "syncInvoiceQuickBooks",
        "summary": "Mirror this invoice and its unmirrored payments to QuickBooks now",
        "tags": [
          "integrations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceQuickBooksEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/quickbooks/sync",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/integrations/quickbooks/callback": {
      "get": {
        "operationId": "completeQuickBooksAuthorization",
        "summary": "Where Intuit returns an administrator after they approve",
        "tags": [
          "integrations"
        ],
        "security": [],
        "responses": {
          "302": {
            "description": "Redirect response",
            "headers": {
              "Location": {
                "description": "Redirect target",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/integrations/quickbooks/callback",
        "x-ezacto-generate-client": false,
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "realmId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/integrations/wise": {
      "get": {
        "operationId": "getWiseConnection",
        "summary": "Whether Wise is configured, and which profile pays",
        "tags": [
          "integrations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WiseStatusEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/integrations/wise",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/integrations/wise/recipients": {
      "get": {
        "operationId": "listWiseRecipients",
        "summary": "The Wise destinations the organisation can pay",
        "tags": [
          "integrations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WiseRecipientListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/integrations/wise/recipients",
        "x-ezacto-generate-client": true
      },
      "post": {
        "operationId": "onboardWiseRecipient",
        "summary": "Create a Wise destination from a contractor's email and link it",
        "tags": [
          "integrations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WiseLinkEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/integrations/wise/recipients",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WiseOnboardInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/integrations/wise/proposals": {
      "get": {
        "operationId": "listWisePayoutProposals",
        "summary": "People with no payout destination, and who at Wise they might be",
        "tags": [
          "integrations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WiseProposalListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/integrations/wise/proposals",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/integrations/wise/destinations/{userId}": {
      "get": {
        "operationId": "getWisePayoutDestination",
        "summary": "Where one person is currently paid, if anywhere",
        "tags": [
          "integrations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WiseDestinationEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/integrations/wise/destinations/:userId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "delete": {
        "operationId": "removeWisePayoutDestination",
        "summary": "Remove a person's Wise payout destination",
        "tags": [
          "integrations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/integrations/wise/destinations/:userId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/integrations/wise/contacts": {
      "post": {
        "operationId": "shareWiseProfile",
        "summary": "Point a person at their own Wise profile, found by a Wisetag",
        "tags": [
          "integrations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WiseContactEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/integrations/wise/contacts",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WiseContactInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/integrations/wise/recipients/link": {
      "post": {
        "operationId": "linkWiseRecipient",
        "summary": "Point a person at the Wise destination they are paid through",
        "tags": [
          "integrations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WiseLinkEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/integrations/wise/recipients/link",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WiseLinkInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/integrations/wise/recipients/{accountId}": {
      "delete": {
        "operationId": "unlinkWiseRecipient",
        "summary": "Detach a person's Wise payout destination",
        "tags": [
          "integrations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/integrations/wise/recipients/:accountId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/settings/sso-domains": {
      "get": {
        "operationId": "listSsoProvisioningDomains",
        "summary": "List SSO provisioning domains and their DNS challenges",
        "tags": [
          "sso-domains"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SsoDomainListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/sso-domains",
        "x-ezacto-generate-client": true
      },
      "post": {
        "operationId": "addSsoProvisioningDomain",
        "summary": "Claim a domain and issue its DNS challenge",
        "tags": [
          "sso-domains"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SsoDomainEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/sso-domains",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SsoDomainInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/settings/sso-domains/{id}": {
      "delete": {
        "operationId": "removeSsoProvisioningDomain",
        "summary": "Remove a provisioning domain",
        "tags": [
          "sso-domains"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/sso-domains/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/settings/sso-domains/{id}/verify": {
      "post": {
        "operationId": "verifySsoProvisioningDomain",
        "summary": "Check the DNS challenge and record the result",
        "tags": [
          "sso-domains"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SsoDomainCheckEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/sso-domains/:id/verify",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/brand": {
      "get": {
        "operationId": "getBrand",
        "summary": "Get the organisation name and brand marks for any principal",
        "tags": [
          "brand-assets"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/brand",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/settings/brand-assets": {
      "get": {
        "operationId": "listBrandAssets",
        "summary": "List the brand marks stored on this instance",
        "tags": [
          "brand-assets"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandAssetListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/brand-assets",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/settings/brand-assets/{slot}": {
      "post": {
        "operationId": "uploadBrandAsset",
        "summary": "Store a brand mark, replacing whatever the slot held",
        "tags": [
          "brand-assets"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandAssetEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/brand-assets/:slot",
        "x-ezacto-generate-client": false,
        "parameters": [
          {
            "name": "slot",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/BrandAssetUploadInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "removeBrandAsset",
        "summary": "Discard a stored brand mark and fall back to configuration",
        "tags": [
          "brand-assets"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/brand-assets/:slot",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "slot",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/settings/theme": {
      "get": {
        "operationId": "getInstanceTheme",
        "summary": "The palette this instance wears, or null for the built-in theme",
        "tags": [
          "instance-theme"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceThemeEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/theme",
        "x-ezacto-generate-client": true
      },
      "post": {
        "operationId": "setInstanceTheme",
        "summary": "Replace the instance palette, subject to the contrast rule",
        "tags": [
          "instance-theme"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceThemeEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/theme",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstanceThemeInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "clearInstanceTheme",
        "summary": "Return this instance to the built-in theme",
        "tags": [
          "instance-theme"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/theme",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/invoices/{id}/payment-link": {
      "post": {
        "operationId": "getInvoicePaymentLink",
        "summary": "The URL a client pays this invoice at, minted once and reused",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicePaymentLinkEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/payment-link",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/invoices/{id}/released-time": {
      "post": {
        "operationId": "releaseInvoicedTime",
        "summary": "Hand this invoice's time entries back, once it no longer stands",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReleasedTimeEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/released-time",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/invoices/{id}/document-preference": {
      "get": {
        "operationId": "getInvoiceDocumentPreference",
        "summary": "Whether this invoice will carry its document, and why",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDocumentPreferenceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/document-preference",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "post": {
        "operationId": "setInvoiceDocumentPreference",
        "summary": "Attach this invoice's document, refuse it, or follow the organization",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDocumentPreferenceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/document-preference",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceDocumentPreferenceInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{id}/email-defaults": {
      "get": {
        "operationId": "getInvoiceEmailDefaults",
        "summary": "What the Send dialog opens on for this invoice: subject, message, To, Cc, copies, and whether email can be delivered",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceEmailDefaultsEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/email-defaults",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/clients/{id}/invoice-sending": {
      "get": {
        "operationId": "getClientInvoiceSending",
        "summary": "Who this client's invoices go to and what they carry",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientInvoiceSendingEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/clients/:id/invoice-sending",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "post": {
        "operationId": "setClientInvoiceSending",
        "summary": "Save who this client's invoices go to and what they carry",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientInvoiceSendingEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/clients/:id/invoice-sending",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientInvoiceSendingInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/settings/invoice-sending": {
      "get": {
        "operationId": "getOrganizationInvoiceSending",
        "summary": "The addresses copied on every invoice email",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationInvoiceSendingEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/invoice-sending",
        "x-ezacto-generate-client": true
      },
      "post": {
        "operationId": "setOrganizationInvoiceSending",
        "summary": "Set the addresses copied on every invoice email",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationInvoiceSendingEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/invoice-sending",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationInvoiceSendingInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/settings/invoice-documents": {
      "get": {
        "operationId": "getOrganizationInvoiceDocuments",
        "summary": "Whether invoices carry their document by default",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationInvoiceDocumentsEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/invoice-documents",
        "x-ezacto-generate-client": true
      },
      "post": {
        "operationId": "setOrganizationInvoiceDocuments",
        "summary": "Set whether invoices carry their document by default",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationInvoiceDocumentsEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/invoice-documents",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationInvoiceDocumentsInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{id}/hours-report": {
      "get": {
        "operationId": "downloadInvoiceHoursReport",
        "summary": "Download the hours an invoice billed as a PDF, CSV or Excel workbook",
        "tags": [
          "money"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment content",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/hours-report",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "pdf",
                "csv",
                "xlsx"
              ]
            }
          },
          {
            "name": "detail",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "detailed",
                "summary"
              ]
            }
          }
        ]
      }
    },
    "/api/v1/invoices/{id}/hours-reconciliation": {
      "get": {
        "operationId": "getInvoiceHoursReconciliation",
        "summary": "Compare the hours an invoice bills with the time entries it claims",
        "tags": [
          "money"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceHoursReconciliationEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/hours-reconciliation",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/invoices/{id}/hours-reconciliation/release": {
      "post": {
        "operationId": "releaseInvoiceLineTime",
        "summary": "Explicitly release selected whole entries from a saved draft line to match its billed hours",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceLineTimeReleaseEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/hours-reconciliation/release",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceLineTimeReleaseInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/settings/invoice-defaults": {
      "get": {
        "operationId": "getInvoiceDefaults",
        "summary": "The company information invoices print and the values new drafts start with",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDefaultsEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/invoice-defaults",
        "x-ezacto-generate-client": true
      },
      "post": {
        "operationId": "updateInvoiceDefaults",
        "summary": "Change the company information or the default notes and subject",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDefaultsEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/invoice-defaults",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceDefaultsInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/settings/notifications": {
      "get": {
        "operationId": "getNotificationSettings",
        "summary": "Company settings for the mail the instance sends its own people",
        "tags": [
          "admin-modules"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationSettingsEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/notifications",
        "x-ezacto-generate-client": true
      },
      "post": {
        "operationId": "setNotificationSettings",
        "summary": "Change the company settings for budget alerts and reminders",
        "tags": [
          "admin-modules"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationSettingsEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/notifications",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationSettingsInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/settings/timesheet-auto-approval": {
      "get": {
        "operationId": "getTimesheetAutoApproval",
        "summary": "The automatic timesheet approval policy",
        "tags": [
          "admin-modules"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetAutoApprovalEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/timesheet-auto-approval",
        "x-ezacto-generate-client": true
      },
      "post": {
        "operationId": "setTimesheetAutoApproval",
        "summary": "Turn automatic timesheet approval on or off, or change its window",
        "tags": [
          "admin-modules"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetAutoApprovalEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/timesheet-auto-approval",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimesheetAutoApprovalInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{id}/thank-you-preference": {
      "get": {
        "operationId": "getInvoiceThankYouPreference",
        "summary": "Whether this invoice will thank its client when it settles, and why",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceThankYouPreferenceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/thank-you-preference",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "post": {
        "operationId": "setInvoiceThankYouPreference",
        "summary": "Thank this invoice's client, refuse to, or follow the organization",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceThankYouPreferenceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/thank-you-preference",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/settings/invoice-thank-you": {
      "get": {
        "operationId": "getOrganizationInvoiceThankYou",
        "summary": "Whether settled invoices thank their client by default",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationInvoiceThankYouEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/invoice-thank-you",
        "x-ezacto-generate-client": true
      },
      "post": {
        "operationId": "setOrganizationInvoiceThankYou",
        "summary": "Set whether settled invoices thank their client by default",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationInvoiceThankYouEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/invoice-thank-you",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/settings/invoice-reminders": {
      "get": {
        "operationId": "getOrganizationInvoiceReminders",
        "summary": "The default payment reminder policy for overdue invoices",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationInvoiceRemindersEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/invoice-reminders",
        "x-ezacto-generate-client": true
      },
      "post": {
        "operationId": "setOrganizationInvoiceReminders",
        "summary": "Set, or switch off, the default payment reminder policy",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationInvoiceRemindersEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/settings/invoice-reminders",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationInvoiceRemindersInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{id}/reminder-preference": {
      "get": {
        "operationId": "getInvoiceReminderPreference",
        "summary": "Whether this invoice will be reminded, and when the next one is booked",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceReminderPreferenceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/reminder-preference",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "post": {
        "operationId": "setInvoiceReminderPreference",
        "summary": "Switch reminders off for this invoice, back on, or follow the organization",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceReminderPreferenceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/reminder-preference",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceReminderPreferenceInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/recurring-invoices/incomplete": {
      "get": {
        "operationId": "listIncompleteRecurringInvoices",
        "summary": "Recurring definitions an import could not finish, and what bills against them",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IncompleteRecurringInvoiceListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/recurring-invoices/incomplete",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/recurring-invoices/{id}/completion": {
      "post": {
        "operationId": "completeRecurringInvoiceDefinition",
        "summary": "Give an unfinished recurring definition its terms",
        "tags": [
          "money"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecurringInvoiceCompletionEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/recurring-invoices/:id/completion",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/users/{id}/payout-accounts": {
      "get": {
        "operationId": "listPayoutAccounts",
        "summary": "The payout accounts a person is currently payable through",
        "tags": [
          "payout-accounts"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutAccountListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:id/payout-accounts",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "post": {
        "operationId": "linkPayoutAccount",
        "summary": "Link a person to their account at a payout provider",
        "tags": [
          "payout-accounts"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutAccountEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:id/payout-accounts",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayoutAccountInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/payout-accounts/{id}": {
      "delete": {
        "operationId": "detachPayoutAccount",
        "summary": "Detach a payout account; re-attaching is a new link",
        "tags": [
          "payout-accounts"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/payout-accounts/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/payout-providers": {
      "get": {
        "operationId": "listPayoutProviders",
        "summary": "The payout providers an administrator has made available",
        "tags": [
          "payout-accounts"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutProviderListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/payout-providers",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/payout-providers/{provider}": {
      "patch": {
        "operationId": "setPayoutProviderEnabled",
        "summary": "Enable or disable a payout provider for new links",
        "description": "Disabling a provider stops new links to it. Accounts already linked are kept.",
        "tags": [
          "payout-accounts"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/payout-providers/:provider",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "deel",
                "wise"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayoutProviderSettingInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/users/{id}/payout-preference": {
      "get": {
        "operationId": "getPayoutPreference",
        "summary": "A person's default payout provider, and the organization's",
        "description": "Their own choice, or an administrator's. effective_provider is the default used for their payouts: their choice, else the organization default.",
        "tags": [
          "payout-accounts"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutPreferenceEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:id/payout-preference",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "setPayoutPreference",
        "summary": "Choose a person's default payout provider",
        "description": "A person chooses their own; an administrator may choose it for them. Only a provider the person holds and the instance has enabled. Null returns to the organization default. expected_version must match the current version, or the answer is 409.",
        "tags": [
          "payout-accounts"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "description": "No content"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "description": "No content"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:id/payout-preference",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayoutPreferenceInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/payout-preferences": {
      "get": {
        "operationId": "listPayoutPreferences",
        "summary": "Every person's default payout provider, for administrators",
        "tags": [
          "payout-accounts"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutPreferenceRosterEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/payout-preferences",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/integrations/bill": {
      "get": {
        "operationId": "getBillStatus",
        "summary": "Whether this deployment can reach BILL, and how it can deliver",
        "tags": [
          "integrations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillStatusEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/integrations/bill",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/integrations/bill/clients/{id}": {
      "get": {
        "operationId": "getBillClientDelivery",
        "summary": "Whether this client is billed through BILL",
        "tags": [
          "integrations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillClientDeliveryEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/integrations/bill/clients/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "post": {
        "operationId": "setBillClientDelivery",
        "summary": "Bill this client through BILL, or stop",
        "tags": [
          "integrations"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillClientDeliveryEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/integrations/bill/clients/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillClientDeliveryInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/two-factor": {
      "get": {
        "operationId": "getTwoFactorStatus",
        "summary": "Report whether a second factor is enrolled, pending, or absent",
        "tags": [
          "two-factor"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TwoFactorStatusEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/two-factor",
        "x-ezacto-generate-client": true
      },
      "post": {
        "operationId": "beginTwoFactorEnrolment",
        "summary": "Issue a TOTP seed and recovery codes, pending confirmation",
        "tags": [
          "two-factor"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TwoFactorEnrolmentEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/two-factor",
        "x-ezacto-generate-client": true
      },
      "delete": {
        "operationId": "disableTwoFactor",
        "summary": "Remove the second factor, on presentation of a current code",
        "tags": [
          "two-factor"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TwoFactorStatusEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/two-factor",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TwoFactorCodeInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/two-factor/confirm": {
      "post": {
        "operationId": "confirmTwoFactorEnrolment",
        "summary": "Prove the authenticator holds the seed and turn the factor on",
        "tags": [
          "two-factor"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TwoFactorStatusEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/two-factor/confirm",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TwoFactorCodeInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/two-factor/email": {
      "post": {
        "operationId": "enableTwoFactorEmail",
        "summary": "Turn on the emailed second factor",
        "description": "Needs a verified email address. A code is mailed at password sign-in; magic-link and federated sign-in never use this factor.",
        "tags": [
          "two-factor"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TwoFactorStatusEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/two-factor/email",
        "x-ezacto-generate-client": true
      },
      "delete": {
        "operationId": "disableTwoFactorEmail",
        "summary": "Turn off the emailed second factor",
        "tags": [
          "two-factor"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TwoFactorStatusEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/two-factor/email",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/users/{id}/two-factor/email": {
      "get": {
        "operationId": "getUserTwoFactorEmail",
        "summary": "Whether a user has the emailed second factor on (administrator)",
        "description": "Lets an administrator see the state before turning it off. Administrators only; session only.",
        "tags": [
          "two-factor"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TwoFactorEmailStateEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:id/two-factor/email",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "delete": {
        "operationId": "disableUserTwoFactorEmail",
        "summary": "Turn off a user's emailed second factor (administrator)",
        "description": "Lockout recovery for a user who lost their mailbox. Administrators only; the change is recorded in the activity log.",
        "tags": [
          "two-factor"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TwoFactorEmailDisabledEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:id/two-factor/email",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/users/{id}/emails": {
      "post": {
        "operationId": "addUserEmail",
        "summary": "Add a second email address and send its verification",
        "tags": [
          "users"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "202": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserEmailAcceptedEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/users/:id/emails",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserEmailInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/team/status": {
      "get": {
        "operationId": "getTeamStatus",
        "summary": "Get Team module availability for navigation",
        "tags": [
          "team"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamStatusEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/team/status",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/team/people": {
      "get": {
        "operationId": "listTeamPeople",
        "summary": "List Team people with authoritative utilization",
        "tags": [
          "team"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamPersonSummaryPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/team/people",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ]
      }
    },
    "/api/v1/team/people/{id}": {
      "get": {
        "operationId": "getTeamPerson",
        "summary": "Get a Team person editor record",
        "tags": [
          "team"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamPersonEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/team/people/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateTeamPerson",
        "summary": "Update a Team person with optimistic concurrency",
        "tags": [
          "team"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamCommandReceiptEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/team/people/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamPersonPatch"
              }
            }
          }
        }
      }
    },
    "/api/v1/team/catalog": {
      "get": {
        "operationId": "getTeamCatalog",
        "summary": "Get roles, departments, and assignable projects",
        "tags": [
          "team"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamCatalogEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/team/catalog",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/team/people/{id}/project-assignments/replace": {
      "post": {
        "operationId": "replaceTeamPersonProjectAssignments",
        "summary": "Replace a person's active project assignments",
        "tags": [
          "team"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamCommandReceiptEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/team/people/:id/project-assignments/replace",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamAssignmentReplaceInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/team/people/{id}/notifications": {
      "post": {
        "operationId": "updateTeamPersonNotifications",
        "summary": "Save a person's reminder and digest preferences",
        "tags": [
          "team"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamCommandReceiptEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/team/people/:id/notifications",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamNotificationInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/team/people/{id}/rates": {
      "post": {
        "operationId": "appendTeamPersonRate",
        "summary": "Append an effective-dated person rate",
        "tags": [
          "team"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamCommandReceiptEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/team/people/:id/rates",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamRateInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/team/people/{id}/rates/{rateId}": {
      "delete": {
        "operationId": "removeTeamPersonRate",
        "summary": "Remove a person rate that has priced nothing",
        "tags": [
          "team"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamCommandReceiptEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/team/people/:id/rates/:rateId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "rateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamRateRemovalInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/team/people/{id}/cost-rate-backfill": {
      "post": {
        "operationId": "backfillTeamPersonCostRate",
        "summary": "Rehearse or apply a cost rate over hours tracked before the person had one",
        "tags": [
          "team"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CostRateBackfillEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/team/people/:id/cost-rate-backfill",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CostRateBackfillInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/clients/{id}/ancestors": {
      "get": {
        "operationId": "listClientAncestors",
        "summary": "List ancestors of a client in the hierarchy",
        "tags": [
          "client-tree"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientHierarchyListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/clients/:id/ancestors",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/clients/{id}/descendants": {
      "get": {
        "operationId": "listClientDescendants",
        "summary": "List descendants of a client in the hierarchy",
        "tags": [
          "client-tree"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientHierarchyListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/clients/:id/descendants",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/clients/{id}/rate-card": {
      "get": {
        "operationId": "getClientRateCard",
        "summary": "Get the rate card attached to a client",
        "description": "The card attached directly to this client, with every version, oldest first; inheritance is not applied (use the effective lookup for that). 404 `rate_card_not_found` when the client has no card. Billable rates are money: only the profiles that may see billable rates (administrator, accounting, executive manager, and a project manager granted `billable_rates_manager`) read a card, and everyone else is 403 `money_forbidden`.",
        "tags": [
          "client-rate-cards"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientRateCardEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/clients/:id/rate-card",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "post": {
        "operationId": "createClientRateCard",
        "summary": "Attach a named rate card to a client",
        "description": "A client has at most one card (409 `rate_card_exists`); change its rates by adding a version. The card starts with no versions and prices nothing until one is added. Same visibility rule as reading, and the caller must also be allowed to write clients.",
        "tags": [
          "client-rate-cards"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientRateCardEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/clients/:id/rate-card",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientRateCardInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/clients/{id}/rate-card/versions": {
      "post": {
        "operationId": "createClientRateCardVersion",
        "summary": "Append a version to a client's rate card",
        "description": "Versions are append-only and effective-dated: the version in force on a date is the one with the latest `start_date` on or before it, and a null `start_date` means all prior dates. A new version must start after every existing one (409 `rate_card_version_order`); a correction is simply a later version. A line with a null `task_id` is the card default; a task line wins for that task. An empty `lines` array retires the card, so it is skipped and the next ancestor's card applies. Adding a version prices work resolved afterwards; it never changes an existing entry, snapshot or invoice, and existing entries change only through the audited reprice.",
        "tags": [
          "client-rate-cards"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientRateCardEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/clients/:id/rate-card/versions",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientRateCardVersionInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/clients/{id}/effective-rate-card": {
      "get": {
        "operationId": "getClientEffectiveRateCard",
        "summary": "Look up the card rate that prices a task for a client",
        "description": "Walks the client and its ancestors through `parent_client_id` only (never the bill-to client), nearest first, with the same rules the rate resolver uses: a card with no version in force, an empty version, or no line for the task and no default line is skipped. `supplied_by_client_id` is the node whose card priced it and `depth` how far up that node sits (0 is the client itself). The card prices only projects billed by people that use default rates. `spent_date` defaults to today in the instance time zone. 404 `rate_card_not_found` when no card prices it.",
        "tags": [
          "client-rate-cards"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EffectiveClientRateCardEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/clients/:id/effective-rate-card",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "task_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "spent_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ]
      }
    },
    "/api/v1/estimate-templates": {
      "get": {
        "operationId": "listEstimateTemplates",
        "summary": "List reusable quote content",
        "description": "Requires invoices:write. Archived templates remain visible for audit; only active templates can create drafts. At most 1000 rows with an explicit truncated indicator.",
        "tags": [
          "estimates"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EstimateTemplateListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/estimate-templates",
        "x-ezacto-generate-client": true
      },
      "post": {
        "operationId": "createEstimateTemplate",
        "summary": "Save reusable quote content",
        "description": "Creates audited reusable content without customer, document or delivery identity.",
        "tags": [
          "estimates"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EstimateTemplateEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/estimate-templates",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EstimateTemplateInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/estimate-templates/{id}": {
      "patch": {
        "operationId": "updateEstimateTemplate",
        "summary": "Edit or archive reusable quote content",
        "description": "Requires the current version; changes never rewrite estimates already created. Archiving is final.",
        "tags": [
          "estimates"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EstimateTemplateEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/estimate-templates/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EstimateTemplateUpdateInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/migration-loads/{id}": {
      "get": {
        "operationId": "getMigrationLoadStatus",
        "summary": "Read migration progress (administrator session)",
        "description": "Reports safe aggregate progress and an error code. During import quarantine the operator uses Cloudflare CLI status; ordinary application traffic remains unavailable.",
        "tags": [
          "migration"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationLoadStatusEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/migration-loads/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/invoice-elevations/email-code": {
      "post": {
        "operationId": "sendInvoiceElevationEmailCode",
        "summary": "Send a second-factor code and rotate its bound elevation challenge",
        "description": "Requires the original administrator API token and pending challenge. The replacement remains bound to its original password verification, base token and invoice. Use the returned challenge token; the earlier one is no longer valid.",
        "tags": [
          "invoice-elevations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceElevationChallengeEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoice-elevations/email-code",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceElevationEmailInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/invoice-elevations": {
      "post": {
        "operationId": "createInvoiceElevation",
        "summary": "Reauthenticate an administrator for temporary draft invoice edits",
        "description": "Requires an administrator API token with invoices:write, live password authentication, and the same verified user credentials. Confirmed authenticator or email MFA requires a bound second step. The returned capability belongs to this base token and invoice, lasts at most 15 minutes, and is returned once. Credential responses cannot be replayed from the HTTP cache.",
        "tags": [
          "invoice-elevations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceElevationStartEnvelope"
                }
              }
            }
          },
          "202": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceElevationStartEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoice-elevations",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceElevationInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/invoice-elevations/verify": {
      "post": {
        "operationId": "verifyInvoiceElevation",
        "summary": "Complete the bound second factor for a draft invoice elevation",
        "description": "A valid MFA challenge can only be completed by its original administrator and base API token. The verified capability never creates a browser session.",
        "tags": [
          "invoice-elevations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceElevationIssuedEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoice-elevations/verify",
        "x-ezacto-generate-client": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceElevationVerifyInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/invoice-elevations/{id}": {
      "delete": {
        "operationId": "revokeInvoiceElevation",
        "summary": "Revoke this administrator token’s temporary invoice capability",
        "tags": [
          "invoice-elevations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoice-elevations/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/invoices/{id}/unlink-time": {
      "post": {
        "operationId": "unlinkElevatedInvoiceTime",
        "summary": "Atomically unlink selected time from one draft invoice",
        "description": "Administrator API token only; requires invoices:write, time_entries:write and X-Ezacto-Invoice-Elevation bound to this invoice. All selected stopped entries must still belong to the same current draft. The whole command and its before/after audit commit together. Invoice line amounts remain unchanged.",
        "tags": [
          "invoice-elevations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ElevatedInvoiceTimeUnlinkEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermissionOrModuleDisabled"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/invoices/:id/unlink-time",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "X-Ezacto-Invoice-Elevation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^ezi_[0-9a-f]{64}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ElevatedInvoiceTimeUnlinkInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/webhook-subscriptions": {
      "get": {
        "operationId": "listWebhookSubscriptions",
        "summary": "List subscriptions and webhook configuration",
        "description": "Administrator session only. Events contain identifiers, resource sequence and relative API links. Secret issuance is returned once and cannot be replayed from the idempotency cache. Public demo delivery is disabled.",
        "tags": [
          "outbound-webhooks"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionsEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/webhook-subscriptions",
        "x-ezacto-generate-client": true
      },
      "post": {
        "operationId": "createWebhookSubscription",
        "summary": "Create an endpoint and issue its signing secret once",
        "description": "Administrator session only. Events contain identifiers, resource sequence and relative API links. Secret issuance is returned once and cannot be replayed from the idempotency cache. Public demo delivery is disabled.",
        "tags": [
          "outbound-webhooks"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSecretEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/webhook-subscriptions",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreateInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/webhook-subscriptions/{id}": {
      "patch": {
        "operationId": "setWebhookSubscriptionActive",
        "summary": "Pause or resume an endpoint at its current version",
        "description": "Administrator session only. Events contain identifiers, resource sequence and relative API links. Secret issuance is returned once and cannot be replayed from the idempotency cache. Public demo delivery is disabled.",
        "tags": [
          "outbound-webhooks"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/webhook-subscriptions/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookActiveInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteWebhookSubscription",
        "summary": "Delete an endpoint and erase its sealed signing secrets",
        "description": "Administrator session only. Events contain identifiers, resource sequence and relative API links. Secret issuance is returned once and cannot be replayed from the idempotency cache. Public demo delivery is disabled.",
        "tags": [
          "outbound-webhooks"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/webhook-subscriptions/:id",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookVersionInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/webhook-subscriptions/{id}/rotate-secret": {
      "post": {
        "operationId": "rotateWebhookSecret",
        "summary": "Rotate a signing secret with a bounded overlap",
        "description": "Administrator session only. Events contain identifiers, resource sequence and relative API links. Secret issuance is returned once and cannot be replayed from the idempotency cache. Public demo delivery is disabled.",
        "tags": [
          "outbound-webhooks"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSecretEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/webhook-subscriptions/:id/rotate-secret",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookRotateInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/webhook-deliveries": {
      "get": {
        "operationId": "listWebhookDeliveries",
        "summary": "Page through webhook delivery results",
        "description": "Administrator session only. Events contain identifiers, resource sequence and relative API links. Secret issuance is returned once and cannot be replayed from the idempotency cache. Public demo delivery is disabled.",
        "tags": [
          "outbound-webhooks"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/webhook-deliveries",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "subscription_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "processing",
                "delivered",
                "failed"
              ]
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/webhook-deliveries/{id}/replay": {
      "post": {
        "operationId": "replayWebhookDelivery",
        "summary": "Replay a settled delivery from the last seven days",
        "description": "Administrator session only. Events contain identifiers, resource sequence and relative API links. Secret issuance is returned once and cannot be replayed from the idempotency cache. Public demo delivery is disabled.",
        "tags": [
          "outbound-webhooks"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "202": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/webhook-deliveries/:id/replay",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookReplayInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/csv-import-capabilities": {
      "get": {
        "operationId": "getCsvImportCapabilities",
        "summary": "Discover private CSV staging support",
        "tags": [
          "csv-import"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CsvImportCapabilitiesEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/csv-import-capabilities",
        "x-ezacto-generate-client": true
      }
    },
    "/api/v1/csv-imports": {
      "post": {
        "operationId": "uploadCsvImport",
        "summary": "Stream CSV bytes into private administrator staging",
        "tags": [
          "csv-import"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CsvImportRunEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/csv-imports",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "X-CSV-SHA256",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          {
            "name": "X-CSV-Bytes",
            "in": "header",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5242880
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "$ref": "#/components/schemas/CsvImportUploadBytes"
              }
            }
          }
        }
      }
    },
    "/api/v1/csv-imports/{runId}/mapping": {
      "get": {
        "operationId": "getCsvImportMapping",
        "summary": "Read current administrator-owned source and mapping choices",
        "tags": [
          "csv-import"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CsvImportMappingStateEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/csv-imports/:runId/mapping",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "operationId": "mapCsvImport",
        "summary": "Explicitly register the workspace and set source, zone, mapping and exclusions",
        "tags": [
          "csv-import"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CsvImportRunEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/csv-imports/:runId/mapping",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CsvImportMapping"
              }
            }
          }
        }
      }
    },
    "/api/v1/csv-imports/{runId}/preview": {
      "post": {
        "operationId": "previewCsvImport",
        "summary": "Compute an immutable preview without writing organization rows",
        "tags": [
          "csv-import"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CsvImportPreviewEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/csv-imports/:runId/preview",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CsvImportPreviewRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/csv-imports/{runId}": {
      "get": {
        "operationId": "getCsvImport",
        "summary": "Read private run status, tallies and retention deadline",
        "tags": [
          "csv-import"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CsvImportRunEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/csv-imports/:runId",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/csv-imports/{runId}/errors": {
      "get": {
        "operationId": "listCsvImportErrors",
        "summary": "Read paginated static physical-line diagnostics",
        "tags": [
          "csv-import"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CsvImportErrorPageEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/csv-imports/:runId/errors",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "preview_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "invalid",
                "unsupported",
                "warning"
              ]
            }
          }
        ]
      }
    },
    "/api/v1/csv-imports/{runId}/catalog": {
      "get": {
        "operationId": "listCsvImportCatalog",
        "summary": "Read immutable private source labels and explicit destination candidates",
        "tags": [
          "csv-import"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CsvImportCatalogPageEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/csv-imports/:runId/catalog",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "preview_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "people",
                "clients",
                "projects",
                "tasks"
              ]
            }
          },
          {
            "name": "source_key",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/csv-imports/{runId}/diagnostics": {
      "get": {
        "operationId": "downloadCsvImportDiagnostics",
        "summary": "Download static diagnostics JSON without CSV cells or notes",
        "tags": [
          "csv-import"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment content",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/csv-imports/:runId/diagnostics",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "preview_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/csv-imports/{runId}/input": {
      "delete": {
        "operationId": "purgeCsvImportInput",
        "summary": "Purge private input and diagnostics, preserving minimal dedup facts and imported time",
        "tags": [
          "csv-import"
        ],
        "security": [
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/csv-imports/:runId/input",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/csv-imports/{runId}/apply": {
      "post": {
        "operationId": "applyCsvImport",
        "summary": "Confirm and queue the immutable reviewed CSV selection",
        "description": "Container-only administrator session operation. Current native session, owned stage and target incarnation are checked before content. No source values or credentials are returned. Cancel stops future writes and retains committed time and setup.",
        "tags": [
          "csv-imports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CsvImportApplyEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/csv-imports/:runId/apply",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CsvImportApplyCommand"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "getCsvImportApply",
        "summary": "Recover authoritative CSV progress and a pending command receipt",
        "description": "Container-only administrator session operation. Current native session, owned stage and target incarnation are checked before content. No source values or credentials are returned. Cancel stops future writes and retains committed time and setup.",
        "tags": [
          "csv-imports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CsvImportApplyEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/csv-imports/:runId/apply",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "command_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v1/csv-imports/{runId}/resume": {
      "post": {
        "operationId": "resumeCsvImport",
        "summary": "Explicitly resume the same sealed selection under a current session",
        "description": "Container-only administrator session operation. Current native session, owned stage and target incarnation are checked before content. No source values or credentials are returned. Cancel stops future writes and retains committed time and setup.",
        "tags": [
          "csv-imports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CsvImportApplyEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/csv-imports/:runId/resume",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CsvImportApplyCommand"
              }
            }
          }
        }
      }
    },
    "/api/v1/csv-imports/{runId}/cancel": {
      "post": {
        "operationId": "cancelCsvImport",
        "summary": "Stop future CSV writes without rolling back committed rows",
        "description": "Container-only administrator session operation. Current native session, owned stage and target incarnation are checked before content. No source values or credentials are returned. Cancel stops future writes and retains committed time and setup.",
        "tags": [
          "csv-imports"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CsvImportApplyEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/MalformedRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientPermission"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/StateConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "x-ezacto-runtime-path": "/api/v1/csv-imports/:runId/cancel",
        "x-ezacto-generate-client": true,
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CsvImportCancelCommand"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      },
      "cookieSession": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__Host-ezacto_session"
      }
    },
    "responses": {
      "MalformedRequest": {
        "description": "Malformed request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "AuthenticationRequired": {
        "description": "Authentication required",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "InsufficientPermission": {
        "description": "Insufficient permission",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "InsufficientPermissionOrModuleDisabled": {
        "description": "Insufficient permission, or `module_disabled`: the operator of this instance switched the module off",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "ResourceNotFound": {
        "description": "Resource not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "StateConflict": {
        "description": "State conflict",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "PayloadTooLarge": {
        "description": "Payload too large",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "ValidationFailed": {
        "description": "Validation failed",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Rate limited",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "Service unavailable",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      }
    },
    "schemas": {
      "GithubReaderInstallationsEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "account": {
                      "type": "string"
                    },
                    "repository_selection": {
                      "type": "string",
                      "enum": [
                        "all",
                        "selected"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "account",
                    "repository_selection"
                  ],
                  "additionalProperties": false
                }
              },
              "next_page": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "items",
              "next_page"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "GithubReaderRepositoriesEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "full_name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "full_name"
                  ],
                  "additionalProperties": false
                }
              },
              "next_page": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "items",
              "next_page"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "GithubReaderSetupRequest": {
        "type": "object",
        "properties": {
          "organization": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39
          }
        },
        "additionalProperties": false
      },
      "GithubReaderSetupEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "registration_url": {
                "type": "string"
              },
              "manifest": {
                "type": "string"
              }
            },
            "required": [
              "registration_url",
              "manifest"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "GithubReaderResource": {
        "type": "object",
        "properties": {
          "repository_id": {
            "type": "string"
          },
          "full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "task_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "renamed",
              "transferred",
              "deleted",
              "access_lost"
            ]
          },
          "checkpoint_status": {
            "type": "string",
            "enum": [
              "idle",
              "running",
              "complete"
            ]
          },
          "attempts": {
            "type": "integer",
            "minimum": 0
          },
          "next_retry_at": {
            "type": "integer",
            "minimum": 0
          },
          "failure_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "items_visible": {
            "type": "integer",
            "minimum": 0
          },
          "items_unavailable": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "repository_id",
          "full_name",
          "project_id",
          "task_id",
          "state",
          "checkpoint_status",
          "attempts",
          "next_retry_at",
          "failure_code",
          "items_visible",
          "items_unavailable"
        ],
        "additionalProperties": false
      },
      "GithubReaderConnection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "generation": {
            "type": "integer",
            "minimum": 0
          },
          "installation_id": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "disconnecting",
              "disconnected",
              "revoked"
            ]
          },
          "deferred_until": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "failure_codes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GithubReaderResource"
            }
          }
        },
        "required": [
          "id",
          "generation",
          "installation_id",
          "state",
          "deferred_until",
          "failure_codes",
          "resources"
        ],
        "additionalProperties": false
      },
      "GithubReaderStatusEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "app": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "installation_url": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "slug",
                      "installation_url"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "configured": {
                "type": "boolean"
              },
              "publication_enabled": {
                "type": "boolean"
              },
              "setup_supported": {
                "type": "boolean"
              },
              "available": {
                "type": "boolean"
              },
              "owned_acceptance_required": {
                "type": "boolean"
              },
              "connections": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/GithubReaderConnection"
                }
              }
            },
            "required": [
              "app",
              "configured",
              "setup_supported",
              "available",
              "owned_acceptance_required",
              "connections"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "GithubReaderMapRequest": {
        "type": "object",
        "properties": {
          "command_id": {
            "type": "string",
            "format": "uuid"
          },
          "expected_generation": {
            "type": "integer",
            "minimum": 0
          },
          "installation_id": {
            "type": "string"
          },
          "repository_id": {
            "type": "string"
          },
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "task_id": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "command_id",
          "expected_generation",
          "installation_id",
          "repository_id",
          "project_id",
          "task_id"
        ],
        "additionalProperties": false
      },
      "GithubReaderMapEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "connection_id": {
                "type": "string"
              },
              "generation": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "connection_id",
              "generation"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "GithubReaderDisconnectRequest": {
        "type": "object",
        "properties": {
          "command_id": {
            "type": "string",
            "format": "uuid"
          },
          "expected_generation": {
            "type": "integer",
            "minimum": 0
          },
          "connection_id": {
            "type": "string"
          }
        },
        "required": [
          "command_id",
          "expected_generation",
          "connection_id"
        ],
        "additionalProperties": false
      },
      "GithubReaderDisconnectEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "generation": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "generation"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "GithubReaderReconcileRequest": {
        "type": "object",
        "properties": {},
        "required": [],
        "additionalProperties": false
      },
      "GithubReaderMetadataEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "unverified",
                  "verified",
                  "unavailable"
                ]
              },
              "item": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "url": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "open",
                          "closed"
                        ]
                      },
                      "updated_at": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "url",
                      "title",
                      "state",
                      "updated_at"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "status",
              "item"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "GithubPublicationsEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "policies": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "connection_id": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "generation": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "connection_id",
                    "enabled",
                    "generation"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 100
              },
              "publications": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "connection_id": {
                      "type": "string"
                    },
                    "entry_id": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "destination": {
                      "type": "string"
                    },
                    "spent_date": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "seconds": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string"
                    },
                    "source_version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "remote_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "failure_code": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "next_retry_at": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "connection_id",
                    "entry_id",
                    "destination",
                    "spent_date",
                    "seconds",
                    "status",
                    "source_version",
                    "version",
                    "remote_id",
                    "failure_code",
                    "next_retry_at"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 100
              },
              "candidates": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "link_id": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "entry_id": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "link_id",
                    "entry_id"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 100
              }
            },
            "required": [
              "policies",
              "publications",
              "candidates"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "GithubPublicationPreviewEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "link_id": {
                "type": "integer",
                "minimum": 0
              },
              "connection_id": {
                "type": "string"
              },
              "destination": {
                "type": "string"
              },
              "spent_date": {
                "type": "string"
              },
              "seconds": {
                "type": "integer",
                "minimum": 0
              },
              "source_version": {
                "type": "string"
              },
              "policy_enabled": {
                "type": "boolean"
              }
            },
            "required": [
              "link_id",
              "connection_id",
              "destination",
              "spent_date",
              "seconds",
              "source_version",
              "policy_enabled"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "GithubPublicationPolicyRequest": {
        "type": "object",
        "properties": {
          "connection_id": {
            "type": "string"
          },
          "expected_generation": {
            "type": "integer",
            "minimum": 0
          },
          "enabled": {
            "type": "boolean"
          },
          "confirm_permission": {
            "type": "boolean"
          },
          "command_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "connection_id",
          "expected_generation",
          "enabled",
          "confirm_permission",
          "command_id"
        ],
        "additionalProperties": false
      },
      "GithubPublicationConsentRequest": {
        "type": "object",
        "properties": {
          "link_id": {
            "type": "integer",
            "minimum": 0
          },
          "source_version": {
            "type": "string"
          },
          "command_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "link_id",
          "source_version",
          "command_id"
        ],
        "additionalProperties": false
      },
      "GithubPublicationActionRequest": {
        "type": "object",
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "action": {
            "type": "string",
            "enum": [
              "retry",
              "adopt",
              "restore",
              "unlink"
            ]
          },
          "confirm": {
            "type": "boolean"
          },
          "command_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "expected_version",
          "action",
          "confirm",
          "command_id"
        ],
        "additionalProperties": false
      },
      "WebhookSubscription": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "invoice.created",
                "invoice.sent",
                "invoice.viewed",
                "invoice.updated",
                "invoice.drafted",
                "invoice.reopened",
                "invoice.cancelled",
                "invoice.written_off",
                "invoice.closed",
                "invoice.unpaid",
                "invoice.partially_paid",
                "invoice.paid",
                "payment.recorded",
                "payment.updated",
                "payment.deleted",
                "time_entry.created_on_behalf",
                "time_entry.updated_on_behalf",
                "time_entry.stopped_on_behalf",
                "time_entry.deleted_on_behalf"
              ]
            },
            "minItems": 1,
            "maxItems": 19,
            "uniqueItems": true
          },
          "is_active": {
            "type": "boolean"
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "generation": {
            "type": "integer",
            "minimum": 1
          },
          "previous_valid_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "url",
          "events",
          "is_active",
          "version",
          "generation",
          "previous_valid_until",
          "created_at",
          "updated_at",
          "deleted_at"
        ],
        "additionalProperties": false
      },
      "WebhookSubscriptionsEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookSubscription"
            }
          },
          "configuration": {
            "type": "object",
            "properties": {
              "ready": {
                "type": "boolean"
              },
              "event_types": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "invoice.created",
                    "invoice.sent",
                    "invoice.viewed",
                    "invoice.updated",
                    "invoice.drafted",
                    "invoice.reopened",
                    "invoice.cancelled",
                    "invoice.written_off",
                    "invoice.closed",
                    "invoice.unpaid",
                    "invoice.partially_paid",
                    "invoice.paid",
                    "payment.recorded",
                    "payment.updated",
                    "payment.deleted",
                    "time_entry.created_on_behalf",
                    "time_entry.updated_on_behalf",
                    "time_entry.stopped_on_behalf",
                    "time_entry.deleted_on_behalf"
                  ]
                },
                "minItems": 1,
                "maxItems": 19,
                "uniqueItems": true
              },
              "max_subscriptions": {
                "type": "integer",
                "minimum": 0
              },
              "rotation_overlap_seconds": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "ready",
              "event_types",
              "max_subscriptions",
              "rotation_overlap_seconds"
            ],
            "additionalProperties": false
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              }
            },
            "required": [
              "self"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data",
          "configuration",
          "links"
        ],
        "additionalProperties": false
      },
      "WebhookSubscriptionEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/WebhookSubscription"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "WebhookSecretEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/WebhookSubscription"
          },
          "signing_secret": {
            "type": "string",
            "pattern": "^ezwh_[A-Za-z0-9_-]{43}$",
            "description": "Copy once. Store securely at the receiver; never logged or returned by list endpoints."
          }
        },
        "required": [
          "data",
          "signing_secret"
        ],
        "additionalProperties": false
      },
      "WebhookCreateInput": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2048
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "invoice.created",
                "invoice.sent",
                "invoice.viewed",
                "invoice.updated",
                "invoice.drafted",
                "invoice.reopened",
                "invoice.cancelled",
                "invoice.written_off",
                "invoice.closed",
                "invoice.unpaid",
                "invoice.partially_paid",
                "invoice.paid",
                "payment.recorded",
                "payment.updated",
                "payment.deleted",
                "time_entry.created_on_behalf",
                "time_entry.updated_on_behalf",
                "time_entry.stopped_on_behalf",
                "time_entry.deleted_on_behalf"
              ]
            },
            "minItems": 1,
            "maxItems": 19,
            "uniqueItems": true
          }
        },
        "required": [
          "url",
          "events"
        ],
        "additionalProperties": false
      },
      "WebhookActiveInput": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "required": [
          "version",
          "is_active"
        ],
        "additionalProperties": false
      },
      "WebhookRotateInput": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "overlap_seconds": {
            "type": "integer",
            "minimum": 0,
            "maximum": 86400,
            "default": 900
          }
        },
        "required": [
          "version"
        ],
        "additionalProperties": false
      },
      "WebhookVersionInput": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "version"
        ],
        "additionalProperties": false
      },
      "WebhookReplayInput": {
        "type": "object",
        "properties": {},
        "required": [],
        "additionalProperties": false
      },
      "WebhookDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "subscription_id": {
            "type": "string",
            "format": "uuid"
          },
          "event_id": {
            "type": "string"
          },
          "event_type": {
            "type": "string",
            "enum": [
              "invoice.created",
              "invoice.sent",
              "invoice.viewed",
              "invoice.updated",
              "invoice.drafted",
              "invoice.reopened",
              "invoice.cancelled",
              "invoice.written_off",
              "invoice.closed",
              "invoice.unpaid",
              "invoice.partially_paid",
              "invoice.paid",
              "payment.recorded",
              "payment.updated",
              "payment.deleted",
              "time_entry.created_on_behalf",
              "time_entry.updated_on_behalf",
              "time_entry.stopped_on_behalf",
              "time_entry.deleted_on_behalf"
            ]
          },
          "payload_json": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "delivered",
              "failed"
            ]
          },
          "attempt_count": {
            "type": "integer",
            "minimum": 0
          },
          "cycle_attempts": {
            "type": "integer",
            "minimum": 0
          },
          "replay_count": {
            "type": "integer",
            "minimum": 0
          },
          "last_status": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "last_error_code": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "timeout",
                  "network_error",
                  "destination_forbidden",
                  "redirect",
                  "http_error",
                  "signing_secret_unavailable",
                  "invalid_payload",
                  "subscription_deleted",
                  "delivery_expired",
                  "attempt_abandoned"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_attempt_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivered_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "failed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "subscription_id",
          "event_id",
          "event_type",
          "payload_json",
          "status",
          "attempt_count",
          "cycle_attempts",
          "replay_count",
          "last_status",
          "last_error_code",
          "next_attempt_at",
          "last_attempt_at",
          "delivered_at",
          "failed_at",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "WebhookDeliveryEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/WebhookDelivery"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "WebhookDeliveryPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookDelivery"
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "self",
              "next"
            ],
            "additionalProperties": false
          },
          "page": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer",
                "minimum": 0
              },
              "next_cursor": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "per_page",
              "next_cursor"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data",
          "links",
          "page"
        ],
        "additionalProperties": false
      },
      "InvoiceElevationChallengeEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InvoiceElevationChallenge"
          }
        },
        "additionalProperties": false
      },
      "InvoiceElevationEmailInput": {
        "type": "object",
        "required": [
          "challenge_token"
        ],
        "properties": {
          "challenge_token": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$",
            "writeOnly": true
          }
        },
        "additionalProperties": false
      },
      "InvoiceElevationInput": {
        "type": "object",
        "required": [
          "invoice_id",
          "email",
          "password"
        ],
        "properties": {
          "invoice_id": {
            "type": "integer",
            "minimum": 1
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 320
          },
          "password": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024,
            "writeOnly": true,
            "description": "At most 4096 UTF-8 bytes; never an argv argument or a stored CLI setting."
          }
        },
        "additionalProperties": false
      },
      "InvoiceElevationVerifyInput": {
        "type": "object",
        "required": [
          "challenge_token",
          "code"
        ],
        "properties": {
          "challenge_token": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$",
            "writeOnly": true
          },
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "writeOnly": true
          }
        },
        "additionalProperties": false
      },
      "InvoiceElevationIssued": {
        "type": "object",
        "required": [
          "status",
          "credential",
          "id",
          "invoice_id",
          "expires_at",
          "scope"
        ],
        "properties": {
          "status": {
            "type": "string",
            "const": "elevated"
          },
          "credential": {
            "type": "string",
            "pattern": "^ezi_[0-9a-f]{64}$",
            "description": "Returned once; keep only in process memory and send as X-Ezacto-Invoice-Elevation with the original API token."
          },
          "id": {
            "type": "string"
          },
          "invoice_id": {
            "type": "integer",
            "minimum": 1
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "scope": {
            "type": "string",
            "const": "invoice_drafts:write"
          }
        },
        "additionalProperties": false
      },
      "InvoiceElevationChallenge": {
        "type": "object",
        "required": [
          "status",
          "challenge_token",
          "expires_at",
          "methods"
        ],
        "properties": {
          "status": {
            "type": "string",
            "const": "challenge_required"
          },
          "challenge_token": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "methods": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "totp",
                "email"
              ]
            },
            "minItems": 1,
            "maxItems": 2
          }
        },
        "additionalProperties": false
      },
      "InvoiceElevationStartEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InvoiceElevationIssued"
              },
              {
                "$ref": "#/components/schemas/InvoiceElevationChallenge"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "InvoiceElevationIssuedEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InvoiceElevationIssued"
          }
        },
        "additionalProperties": false
      },
      "ElevatedInvoiceTimeUnlinkInput": {
        "type": "object",
        "required": [
          "expected_version",
          "entry_ids",
          "confirmed"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "entry_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1
            },
            "minItems": 1,
            "maxItems": 1000,
            "uniqueItems": true
          },
          "confirmed": {
            "type": "boolean",
            "const": true
          }
        },
        "additionalProperties": false
      },
      "ElevatedInvoiceTimeUnlink": {
        "type": "object",
        "required": [
          "invoice_id",
          "command_id",
          "elevation_id",
          "released_entry_ids",
          "recorded_at",
          "replayed"
        ],
        "properties": {
          "invoice_id": {
            "type": "integer",
            "minimum": 1
          },
          "command_id": {
            "type": "string"
          },
          "elevation_id": {
            "type": "string"
          },
          "released_entry_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1
            }
          },
          "recorded_at": {
            "type": "string",
            "format": "date-time"
          },
          "replayed": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ElevatedInvoiceTimeUnlinkEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ElevatedInvoiceTimeUnlink"
          }
        },
        "additionalProperties": false
      },
      "OrganizationHoliday": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "date",
          "name",
          "version",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "OrganizationHolidayInput": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          }
        },
        "required": [
          "date",
          "name"
        ],
        "additionalProperties": false
      },
      "OrganizationHolidayUpdateInput": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "version": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "date",
          "name",
          "version"
        ],
        "additionalProperties": false
      },
      "OrganizationHolidayDeleteInput": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "version"
        ],
        "additionalProperties": false
      },
      "OrganizationHolidayEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/OrganizationHoliday"
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              }
            },
            "required": [
              "self"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data",
          "links"
        ],
        "additionalProperties": false
      },
      "OrganizationHolidayPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrganizationHoliday"
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "self",
              "next"
            ],
            "additionalProperties": false
          },
          "page": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer",
                "minimum": 1
              },
              "next_cursor": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "per_page",
              "next_cursor"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data",
          "links",
          "page"
        ],
        "additionalProperties": false
      },
      "PlanningPlaceholder": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "is_active": {
            "type": "boolean"
          },
          "version": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "id",
          "name",
          "is_active",
          "version"
        ],
        "additionalProperties": false
      },
      "PlanningPlaceholderInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "PlanningPlaceholderUpdateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "version": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "name",
          "version"
        ],
        "additionalProperties": false
      },
      "PlanningVersionInput": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "version"
        ],
        "additionalProperties": false
      },
      "PlanningPlaceholderEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PlanningPlaceholder"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "PlanningPlaceholderPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanningPlaceholder"
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "self",
              "next"
            ],
            "additionalProperties": false
          },
          "page": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer",
                "minimum": 1
              },
              "next_cursor": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "per_page",
              "next_cursor"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data",
          "links",
          "page"
        ],
        "additionalProperties": false
      },
      "PlaceholderAllocation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "placeholder_id": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_name": {
            "type": "string"
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "type": "string",
            "format": "date"
          },
          "planned_seconds_per_week": {
            "type": "integer",
            "minimum": 1
          },
          "state": {
            "type": "string",
            "enum": [
              "open",
              "assigned",
              "archived"
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "assigned_allocation_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "placeholder_id",
          "name",
          "project_id",
          "project_name",
          "start_date",
          "end_date",
          "planned_seconds_per_week",
          "state",
          "version",
          "assigned_allocation_id"
        ],
        "additionalProperties": false
      },
      "PlaceholderAllocationInput": {
        "type": "object",
        "properties": {
          "placeholder_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "type": "string",
            "format": "date"
          },
          "planned_seconds_per_week": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "placeholder_id",
          "project_id",
          "start_date",
          "end_date",
          "planned_seconds_per_week"
        ],
        "additionalProperties": false
      },
      "PlaceholderAllocationUpdateInput": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "type": "string",
            "format": "date"
          },
          "planned_seconds_per_week": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "version"
        ],
        "additionalProperties": false,
        "minProperties": 2
      },
      "PlaceholderAllocationEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PlaceholderAllocation"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "PlaceholderAllocationPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlaceholderAllocation"
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "self",
              "next"
            ],
            "additionalProperties": false
          },
          "page": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer",
                "minimum": 1
              },
              "next_cursor": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "per_page",
              "next_cursor"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data",
          "links",
          "page"
        ],
        "additionalProperties": false
      },
      "PlaceholderAssignmentInput": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "version",
          "user_id",
          "idempotency_key"
        ],
        "additionalProperties": false
      },
      "PlaceholderAssignment": {
        "type": "object",
        "properties": {
          "allocation": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "minimum": 1
              },
              "version": {
                "type": "integer",
                "minimum": 0
              },
              "user_id": {
                "type": "integer",
                "minimum": 1
              },
              "project_id": {
                "type": "integer",
                "minimum": 1
              },
              "start_date": {
                "type": "string",
                "format": "date"
              },
              "end_date": {
                "type": "string",
                "format": "date"
              },
              "planned_seconds_per_week": {
                "type": "integer",
                "minimum": 1
              }
            },
            "required": [
              "id",
              "version",
              "user_id",
              "project_id",
              "start_date",
              "end_date",
              "planned_seconds_per_week"
            ],
            "additionalProperties": false
          },
          "placeholder": {
            "$ref": "#/components/schemas/PlaceholderAllocation"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "enum": [
                    "over_allocated"
                  ]
                },
                "week_start": {
                  "type": "string",
                  "format": "date"
                },
                "planned_seconds": {
                  "type": "integer",
                  "minimum": 0
                },
                "capacity_seconds": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Available weekly capacity after current personal leave and organization holidays."
                }
              },
              "required": [
                "code",
                "week_start",
                "planned_seconds",
                "capacity_seconds"
              ],
              "additionalProperties": false
            }
          },
          "prerequisites": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "enum": [
                    "project_access_missing"
                  ]
                }
              },
              "required": [
                "code"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "allocation",
          "placeholder",
          "warnings",
          "prerequisites"
        ],
        "additionalProperties": false
      },
      "PlaceholderAssignmentEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PlaceholderAssignment"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "ResourceCalendarAllocation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_name": {
            "type": "string"
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "type": "string",
            "format": "date"
          },
          "planned_seconds_per_week": {
            "type": "integer",
            "minimum": 1,
            "maximum": 604800
          }
        },
        "required": [
          "id",
          "version",
          "user_id",
          "project_id",
          "project_name",
          "start_date",
          "end_date",
          "planned_seconds_per_week"
        ],
        "additionalProperties": false
      },
      "ResourceCalendarProject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "is_active"
        ],
        "additionalProperties": false
      },
      "ResourceCalendarAllocationPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceCalendarAllocation"
            },
            "maxItems": 100
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "self",
              "next"
            ],
            "additionalProperties": false
          },
          "page": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              },
              "next_cursor": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "per_page",
              "next_cursor"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data",
          "links",
          "page"
        ],
        "additionalProperties": false
      },
      "ResourceCalendarProjectPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceCalendarProject"
            },
            "maxItems": 100
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "self",
              "next"
            ],
            "additionalProperties": false
          },
          "page": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              },
              "next_cursor": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "per_page",
              "next_cursor"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data",
          "links",
          "page"
        ],
        "additionalProperties": false
      },
      "ResourceCalendarContextEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ResourceCalendarContext"
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              }
            },
            "required": [
              "self"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data",
          "links"
        ],
        "additionalProperties": false
      },
      "ResourceCalendarContext": {
        "type": "object",
        "properties": {
          "time_zone": {
            "type": "string"
          },
          "week_start_day": {
            "type": "string",
            "enum": [
              "saturday",
              "sunday",
              "monday"
            ]
          },
          "today": {
            "type": "string",
            "format": "date"
          },
          "current_week_start": {
            "type": "string",
            "format": "date"
          }
        },
        "required": [
          "time_zone",
          "week_start_day",
          "today",
          "current_week_start"
        ],
        "additionalProperties": false
      },
      "ResourceCalendarProjectHours": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "planned_seconds": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "project_id",
          "planned_seconds"
        ],
        "additionalProperties": false
      },
      "ResourceCalendarWeek": {
        "type": "object",
        "properties": {
          "week_start": {
            "type": "string",
            "format": "date"
          },
          "planned_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "available_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "tracked_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "person_planned_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "person_other_scope_planned_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "over_allocated": {
            "type": "boolean"
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceCalendarProjectHours"
            },
            "maxItems": 20000
          },
          "other_scope_planned_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "other_scope_tracked_seconds": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "week_start",
          "planned_seconds",
          "available_seconds",
          "tracked_seconds",
          "person_planned_seconds",
          "person_other_scope_planned_seconds",
          "over_allocated",
          "projects",
          "other_scope_planned_seconds",
          "other_scope_tracked_seconds"
        ],
        "additionalProperties": false
      },
      "ResourceCalendarPerson": {
        "type": "object",
        "properties": {
          "person_id": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "weeks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceCalendarWeek"
            },
            "maxItems": 53
          }
        },
        "required": [
          "person_id",
          "name",
          "weeks"
        ],
        "additionalProperties": false
      },
      "ResourceCalendarUnassigned": {
        "type": "object",
        "properties": {
          "week_start": {
            "type": "string",
            "format": "date"
          },
          "placeholder_id": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "planned_seconds": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "week_start",
          "placeholder_id",
          "name",
          "project_id",
          "planned_seconds"
        ],
        "additionalProperties": false
      },
      "ResourceCalendar": {
        "type": "object",
        "properties": {
          "context": {
            "$ref": "#/components/schemas/ResourceCalendarContext"
          },
          "view": {
            "type": "string",
            "enum": [
              "project",
              "team"
            ]
          },
          "revision": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "week_starts": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date"
            },
            "maxItems": 53
          },
          "people": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceCalendarPerson"
            },
            "maxItems": 100
          },
          "unassigned": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceCalendarUnassigned"
            },
            "maxItems": 5300
          },
          "unassigned_truncated": {
            "type": "boolean"
          },
          "has_other_scope": {
            "type": "boolean"
          }
        },
        "required": [
          "context",
          "view",
          "revision",
          "week_starts",
          "people",
          "unassigned",
          "unassigned_truncated",
          "has_other_scope"
        ],
        "additionalProperties": false
      },
      "ResourceCalendarEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ResourceCalendar"
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "self",
              "next"
            ],
            "additionalProperties": false
          },
          "page": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              },
              "next_cursor": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "per_page",
              "next_cursor"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data",
          "links",
          "page"
        ],
        "additionalProperties": false
      },
      "CalendarManualCleanupList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "generation",
                "credential_revision",
                "reason",
                "created_at"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "generation": {
                  "type": "integer",
                  "minimum": 1
                },
                "credential_revision": {
                  "type": "integer",
                  "minimum": 1
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "disconnect",
                    "reauth"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "CalendarManualCleanupInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "obligation_id",
          "generation",
          "credential_revision",
          "confirm_removed"
        ],
        "properties": {
          "obligation_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "generation": {
            "type": "integer",
            "minimum": 1
          },
          "credential_revision": {
            "type": "integer",
            "minimum": 1
          },
          "confirm_removed": {
            "const": true
          }
        }
      },
      "CalendarAuthorizationInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "generation"
        ],
        "properties": {
          "generation": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "CalendarAuthorizationEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "authorization_url"
            ],
            "properties": {
              "authorization_url": {
                "type": "string"
              }
            }
          }
        }
      },
      "CalendarCleanupEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CalendarCleanupStatus"
          }
        }
      },
      "CalendarConnectionList": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "provider",
                "status",
                "generation",
                "last_synced_at",
                "last_error",
                "syncing",
                "cleanup_pending",
                "available"
              ],
              "properties": {
                "provider": {
                  "type": "string",
                  "enum": [
                    "google",
                    "microsoft"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "connected",
                    "needs_reauth",
                    "disconnected"
                  ]
                },
                "generation": {
                  "type": "integer",
                  "minimum": 0
                },
                "last_synced_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "last_error": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "credential_unavailable",
                    "authorization",
                    "unavailable",
                    "invalid_source",
                    "limit",
                    "changed",
                    null
                  ]
                },
                "syncing": {
                  "type": "boolean"
                },
                "cleanup_pending": {
                  "type": "boolean"
                },
                "available": {
                  "type": "boolean"
                }
              }
            }
          }
        }
      },
      "CalendarRefreshInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "past_days": {
            "type": "integer",
            "minimum": 0,
            "maximum": 90
          },
          "future_days": {
            "type": "integer",
            "minimum": 0,
            "maximum": 90
          }
        }
      },
      "CalendarDisconnectInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "generation"
        ],
        "properties": {
          "generation": {
            "type": "integer",
            "minimum": 1
          }
        }
      },
      "CalendarRefreshResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "state",
              "applied"
            ],
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "connected",
                  "needs_reauth"
                ]
              },
              "applied": {
                "type": "integer",
                "minimum": 0,
                "maximum": 90
              }
            }
          }
        }
      },
      "CalendarOperatorCleanupList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "data",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "user_id",
                "provider",
                "instance_nonce",
                "generation",
                "credential_revision",
                "key_id",
                "request_id",
                "reason",
                "review_instance",
                "status",
                "created_at",
                "provider_cleanup_in_progress"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                "user_id": {
                  "type": "integer",
                  "minimum": 1
                },
                "provider": {
                  "type": "string",
                  "enum": [
                    "google",
                    "microsoft"
                  ]
                },
                "instance_nonce": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                "generation": {
                  "type": "integer",
                  "minimum": 1
                },
                "credential_revision": {
                  "type": "integer",
                  "minimum": 1
                },
                "key_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                "request_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "disconnect",
                    "closure",
                    "reauth",
                    "restore",
                    "reset"
                  ]
                },
                "review_instance": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "manual_required"
                  ]
                },
                "created_at": {
                  "type": "string"
                },
                "provider_cleanup_in_progress": {
                  "type": "boolean"
                }
              }
            }
          },
          "page": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "next_cursor"
            ],
            "properties": {
              "next_cursor": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        }
      },
      "CalendarOperatorCleanupInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "user_id",
          "provider",
          "instance_nonce",
          "generation",
          "credential_revision",
          "key_id",
          "request_id",
          "reason",
          "review_instance",
          "expected_status",
          "evidence_reference",
          "confirm_provider_removed"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "provider": {
            "type": "string",
            "enum": [
              "google",
              "microsoft"
            ]
          },
          "instance_nonce": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "generation": {
            "type": "integer",
            "minimum": 1
          },
          "credential_revision": {
            "type": "integer",
            "minimum": 1
          },
          "key_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "type": "string",
            "enum": [
              "disconnect",
              "closure",
              "reauth",
              "restore",
              "reset"
            ]
          },
          "review_instance": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "expected_status": {
            "type": "string",
            "enum": [
              "pending",
              "manual_required"
            ]
          },
          "evidence_reference": {
            "type": "string",
            "minLength": 20,
            "maxLength": 1000
          },
          "confirm_provider_removed": {
            "type": "boolean",
            "const": true
          }
        }
      },
      "CalendarOperatorCleanupReceiptEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "obligation_id",
              "kind",
              "provider_verified",
              "attested_at",
              "evidence_sha256"
            ],
            "properties": {
              "obligation_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "kind": {
                "type": "string",
                "enum": [
                  "operator_attestation"
                ]
              },
              "provider_verified": {
                "type": "boolean",
                "const": false
              },
              "attested_at": {
                "type": "string"
              },
              "evidence_sha256": {
                "type": "string",
                "minLength": 64,
                "maxLength": 64
              }
            }
          }
        }
      },
      "CalendarFeedInput": {
        "type": "object",
        "properties": {
          "scope": {
            "type": "string",
            "enum": [
              "self",
              "project",
              "team"
            ]
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "from_date": {
            "type": "string"
          },
          "through_date": {
            "type": "string"
          },
          "include_names": {
            "type": "boolean"
          },
          "expires_at": {
            "type": "string"
          }
        },
        "required": [
          "scope",
          "project_id",
          "from_date",
          "through_date",
          "include_names"
        ],
        "additionalProperties": false
      },
      "CalendarFeed": {
        "type": "object",
        "properties": {
          "scope": {
            "type": "string",
            "enum": [
              "self",
              "project",
              "team"
            ]
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "from_date": {
            "type": "string"
          },
          "through_date": {
            "type": "string"
          },
          "include_names": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "issued_at": {
            "type": "string"
          },
          "expires_at": {
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "credential_generation": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "scope",
          "project_id",
          "from_date",
          "through_date",
          "include_names",
          "id",
          "issued_at",
          "expires_at",
          "revoked_at",
          "credential_generation"
        ],
        "additionalProperties": false
      },
      "CalendarFeedList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalendarFeed"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "CalendarFeedIssued": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "feed": {
                "$ref": "#/components/schemas/CalendarFeed"
              },
              "username": {
                "type": "string"
              },
              "password": {
                "type": "string"
              }
            },
            "required": [
              "feed",
              "username",
              "password"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "AttachmentUploadInput": {
        "type": "object",
        "required": [
          "file"
        ],
        "properties": {
          "file": {
            "type": "string",
            "format": "binary"
          }
        },
        "additionalProperties": false
      },
      "Attachment": {
        "type": "object",
        "required": [
          "id",
          "name",
          "content_hash",
          "byte_size",
          "content_type",
          "uploaded_by_user_id",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "content_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "byte_size": {
            "type": "integer",
            "minimum": 0
          },
          "content_type": {
            "type": "string"
          },
          "uploaded_by_user_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "through": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "RecurringAttachmentThroughInput": {
        "type": "object",
        "required": [
          "through"
        ],
        "properties": {
          "through": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "AttachmentEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Attachment"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "AttachmentListEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attachment"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "PaymentActualsEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "month",
              "currency",
              "completed",
              "people"
            ],
            "additionalProperties": false,
            "properties": {
              "month": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              },
              "completed": {
                "type": "boolean"
              },
              "people": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "user_id",
                    "name",
                    "entries"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "user_id": {
                      "type": "integer"
                    },
                    "name": {
                      "type": "string"
                    },
                    "entries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "entry_id",
                          "project_id",
                          "project_name",
                          "spent_date",
                          "rounded_seconds",
                          "cost_rate_cents",
                          "selected_seconds"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "entry_id": {
                            "type": "integer"
                          },
                          "project_id": {
                            "type": "integer"
                          },
                          "project_name": {
                            "type": "string"
                          },
                          "spent_date": {
                            "type": "string"
                          },
                          "rounded_seconds": {
                            "type": "integer"
                          },
                          "cost_rate_cents": {
                            "anyOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "selected_seconds": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "PaymentReconciliationEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "month",
              "currency",
              "completed",
              "people"
            ],
            "additionalProperties": false,
            "properties": {
              "month": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              },
              "completed": {
                "type": "boolean"
              },
              "people": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "user_id",
                    "name",
                    "proposed_cents",
                    "confirmed_cents",
                    "status",
                    "exceptions"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "user_id": {
                      "type": "integer"
                    },
                    "name": {
                      "type": "string"
                    },
                    "proposed_cents": {
                      "type": "integer"
                    },
                    "confirmed_cents": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "new",
                        "converged",
                        "differs",
                        "attention"
                      ]
                    },
                    "exceptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "code",
                          "entry_ids"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "code": {
                            "type": "string",
                            "enum": [
                              "missing_rate",
                              "changed_source"
                            ]
                          },
                          "entry_ids": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ConfirmPaymentActuals": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "month",
          "expected_version",
          "currency",
          "entries",
          "note"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "user_id": {
            "type": "integer"
          },
          "month": {
            "type": "string"
          },
          "expected_version": {
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "entries": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "entry_id",
                "project_id",
                "project_name",
                "spent_date",
                "rounded_seconds",
                "cost_rate_cents",
                "selected_seconds"
              ],
              "additionalProperties": false,
              "properties": {
                "entry_id": {
                  "type": "integer"
                },
                "project_id": {
                  "type": "integer"
                },
                "project_name": {
                  "type": "string"
                },
                "spent_date": {
                  "type": "string"
                },
                "rounded_seconds": {
                  "type": "integer"
                },
                "cost_rate_cents": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "selected_seconds": {
                  "type": "integer"
                }
              }
            }
          },
          "note": {
            "type": "string"
          }
        }
      },
      "StaffPaymentProviderCommand": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "expected_version",
          "provider",
          "note"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "provider": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "wise",
                  "deel"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "note": {
            "type": "string"
          }
        }
      },
      "StaffPaymentProviderEvent": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "expected_version",
          "provider",
          "note",
          "version",
          "actor_id",
          "actor_name",
          "recorded_at",
          "request_id"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "provider": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "wise",
                  "deel"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "note": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          },
          "actor_id": {
            "type": "integer"
          },
          "actor_name": {
            "type": "string"
          },
          "recorded_at": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          }
        }
      },
      "StaffPaymentProviderSettings": {
        "type": "object",
        "required": [
          "default_provider",
          "version",
          "events"
        ],
        "additionalProperties": false,
        "properties": {
          "default_provider": {
            "type": "string",
            "enum": [
              "wise",
              "deel"
            ]
          },
          "version": {
            "type": "integer"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StaffPaymentProviderEvent"
            }
          }
        }
      },
      "StaffPaymentCommand": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "month",
          "expected_version",
          "kind",
          "amount_cents",
          "currency",
          "paid_on",
          "due_on",
          "reference",
          "note",
          "payment_id",
          "source"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "month": {
            "type": "string"
          },
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "kind": {
            "type": "string",
            "enum": [
              "amount",
              "payment",
              "void",
              "opening",
              "reopen",
              "note"
            ]
          },
          "amount_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "paid_on": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "due_on": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reference": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "payment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "wise",
              "deel",
              "historical"
            ]
          }
        }
      },
      "StaffPaymentEvent": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "month",
          "expected_version",
          "kind",
          "amount_cents",
          "currency",
          "paid_on",
          "due_on",
          "reference",
          "note",
          "payment_id",
          "source",
          "version",
          "actor_id",
          "actor_name",
          "recorded_at",
          "request_id"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "month": {
            "type": "string"
          },
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "kind": {
            "type": "string",
            "enum": [
              "amount",
              "payment",
              "void",
              "opening",
              "reopen",
              "note"
            ]
          },
          "amount_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "paid_on": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "due_on": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reference": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "payment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "wise",
              "deel",
              "historical",
              "advance_credit"
            ]
          },
          "version": {
            "type": "integer"
          },
          "actor_id": {
            "type": "integer"
          },
          "actor_name": {
            "type": "string"
          },
          "recorded_at": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          }
        }
      },
      "StaffPaymentRow": {
        "type": "object",
        "required": [
          "is_contractor",
          "user_id",
          "name",
          "active",
          "wise_ready",
          "deel_ready",
          "payout_provider",
          "provider_override",
          "provider_version",
          "month",
          "version",
          "amount_cents",
          "currency",
          "has_hours",
          "amount_basis",
          "paid_cents",
          "balance_cents",
          "reserved_cents",
          "available_cents",
          "due_on",
          "settled_through",
          "status",
          "overdue",
          "events"
        ],
        "additionalProperties": false,
        "properties": {
          "deel_staging": {
            "type": "object",
            "required": [
              "status",
              "paid_entries",
              "paid_seconds",
              "processing_entries",
              "pending_entries",
              "approved_entries",
              "rejected_entries",
              "unchecked_entries",
              "status_checked_at",
              "status_check_failed",
              "staged_entries",
              "unstaged_entries",
              "unresolved_entries",
              "changed_entries",
              "zero_duration_entries",
              "unsyncable_entries",
              "staged_seconds",
              "unstaged_seconds",
              "last_staged_at"
            ],
            "additionalProperties": false,
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "not_staged",
                  "partially_staged",
                  "staged",
                  "attention",
                  "no_hours",
                  "partially_paid",
                  "paid",
                  "processing"
                ]
              },
              "paid_entries": {
                "type": "integer"
              },
              "paid_seconds": {
                "type": "integer"
              },
              "processing_entries": {
                "type": "integer"
              },
              "pending_entries": {
                "type": "integer"
              },
              "approved_entries": {
                "type": "integer"
              },
              "rejected_entries": {
                "type": "integer"
              },
              "unchecked_entries": {
                "type": "integer"
              },
              "status_checked_at": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status_check_failed": {
                "type": "boolean"
              },
              "staged_entries": {
                "type": "integer"
              },
              "unstaged_entries": {
                "type": "integer"
              },
              "unresolved_entries": {
                "type": "integer"
              },
              "changed_entries": {
                "type": "integer"
              },
              "zero_duration_entries": {
                "type": "integer"
              },
              "unsyncable_entries": {
                "type": "integer"
              },
              "staged_seconds": {
                "type": "integer"
              },
              "unstaged_seconds": {
                "type": "integer"
              },
              "last_staged_at": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "is_contractor": {
            "type": "boolean"
          },
          "user_id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "wise_ready": {
            "type": "boolean"
          },
          "deel_ready": {
            "type": "boolean"
          },
          "payout_provider": {
            "type": "string",
            "enum": [
              "wise",
              "deel"
            ]
          },
          "provider_override": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "wise",
                  "deel"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "provider_version": {
            "type": "integer"
          },
          "month": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          },
          "amount_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "has_hours": {
            "type": "boolean"
          },
          "amount_basis": {
            "type": "string",
            "enum": [
              "ledger",
              "contractor_cost"
            ]
          },
          "paid_cents": {
            "type": "integer"
          },
          "balance_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "reserved_cents": {
            "type": "integer"
          },
          "available_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "due_on": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "settled_through": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "in_progress",
              "pending",
              "partial",
              "paid",
              "settled"
            ]
          },
          "overdue": {
            "type": "boolean"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StaffPaymentEvent"
            }
          }
        }
      },
      "StaffPaymentReport": {
        "type": "object",
        "required": [
          "month",
          "as_of",
          "rows",
          "provider_settings"
        ],
        "additionalProperties": false,
        "properties": {
          "month": {
            "type": "string"
          },
          "as_of": {
            "type": "string"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StaffPaymentRow"
            }
          },
          "provider_settings": {
            "$ref": "#/components/schemas/StaffPaymentProviderSettings"
          }
        }
      },
      "StaffPaymentReportEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/StaffPaymentReport"
          }
        }
      },
      "AllocatePayment": {
        "type": "object",
        "required": [
          "id",
          "payment_kind",
          "payment_id",
          "user_id",
          "month",
          "scope",
          "project_id",
          "entry_id",
          "seconds",
          "amount_cents",
          "reason"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "payment_kind": {
            "type": "string",
            "enum": [
              "event",
              "run_item"
            ]
          },
          "payment_id": {
            "type": "string"
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "month": {
            "type": "string"
          },
          "scope": {
            "type": "string",
            "enum": [
              "month",
              "project",
              "entry"
            ]
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "entry_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "amount_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "ReversePaymentAllocation": {
        "type": "object",
        "required": [
          "id",
          "allocation_id",
          "reason"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "allocation_id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "PaymentAllocationPreview": {
        "type": "object",
        "required": [
          "scope",
          "currency",
          "seconds",
          "rate_cents",
          "amount_cents",
          "payment_cents",
          "payment_allocated_cents",
          "payment_remaining_cents",
          "earning_cents",
          "earning_allocated_cents",
          "earning_remaining_cents",
          "earning_remaining_seconds"
        ],
        "additionalProperties": false,
        "properties": {
          "scope": {
            "type": "string",
            "enum": [
              "month",
              "project",
              "entry"
            ]
          },
          "currency": {
            "type": "string"
          },
          "seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "rate_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "amount_cents": {
            "type": "integer"
          },
          "payment_cents": {
            "type": "integer"
          },
          "payment_allocated_cents": {
            "type": "integer"
          },
          "payment_remaining_cents": {
            "type": "integer"
          },
          "earning_cents": {
            "type": "integer"
          },
          "earning_allocated_cents": {
            "type": "integer"
          },
          "earning_remaining_cents": {
            "type": "integer"
          },
          "earning_remaining_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "PaymentAllocationPreviewEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PaymentAllocationPreview"
          }
        }
      },
      "PaymentAllocation": {
        "type": "object",
        "required": [
          "id",
          "payment_kind",
          "payment_id",
          "user_id",
          "month",
          "currency",
          "scope",
          "project_id",
          "project_name",
          "entry_id",
          "seconds",
          "rate_cents",
          "amount_cents",
          "state",
          "reason",
          "actor_id",
          "recorded_at"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "payment_kind": {
            "type": "string",
            "enum": [
              "event",
              "run_item"
            ]
          },
          "payment_id": {
            "type": "string"
          },
          "user_id": {
            "type": "integer"
          },
          "month": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "scope": {
            "type": "string",
            "enum": [
              "month",
              "project",
              "entry"
            ]
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "project_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "entry_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "rate_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "amount_cents": {
            "type": "integer"
          },
          "state": {
            "type": "string",
            "enum": [
              "applied",
              "reserved",
              "released",
              "reversed"
            ]
          },
          "reason": {
            "type": "string"
          },
          "actor_id": {
            "type": "integer"
          },
          "recorded_at": {
            "type": "string"
          }
        }
      },
      "PaymentAllocationEntry": {
        "type": "object",
        "required": [
          "entry_id",
          "spent_date",
          "selected_seconds",
          "rate_cents",
          "reviewed_rounded_seconds",
          "current_rounded_seconds",
          "current_rate_cents",
          "earned_cents",
          "applied_cents",
          "reserved_cents",
          "applied_seconds",
          "reserved_seconds",
          "remaining_cents",
          "remaining_seconds",
          "source_changed",
          "over_allocated"
        ],
        "additionalProperties": false,
        "properties": {
          "entry_id": {
            "type": "integer"
          },
          "spent_date": {
            "type": "string"
          },
          "selected_seconds": {
            "type": "integer"
          },
          "rate_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "reviewed_rounded_seconds": {
            "type": "integer"
          },
          "current_rounded_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "current_rate_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "earned_cents": {
            "type": "integer"
          },
          "applied_cents": {
            "type": "integer"
          },
          "reserved_cents": {
            "type": "integer"
          },
          "applied_seconds": {
            "type": "integer"
          },
          "reserved_seconds": {
            "type": "integer"
          },
          "remaining_cents": {
            "type": "integer"
          },
          "remaining_seconds": {
            "type": "integer"
          },
          "source_changed": {
            "type": "boolean"
          },
          "over_allocated": {
            "type": "boolean"
          }
        }
      },
      "PaymentAllocationProject": {
        "type": "object",
        "required": [
          "project_id",
          "project_name",
          "earned_cents",
          "applied_cents",
          "reserved_cents",
          "remaining_cents",
          "entries"
        ],
        "additionalProperties": false,
        "properties": {
          "project_id": {
            "type": "integer"
          },
          "project_name": {
            "type": "string"
          },
          "earned_cents": {
            "type": "integer"
          },
          "applied_cents": {
            "type": "integer"
          },
          "reserved_cents": {
            "type": "integer"
          },
          "remaining_cents": {
            "type": "integer"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentAllocationEntry"
            }
          }
        }
      },
      "UnallocatedPayment": {
        "type": "object",
        "required": [
          "payment_kind",
          "payment_id",
          "amount_cents",
          "allocated_cents",
          "unallocated_cents",
          "state"
        ],
        "additionalProperties": false,
        "properties": {
          "payment_kind": {
            "type": "string",
            "enum": [
              "event",
              "run_item"
            ]
          },
          "payment_id": {
            "type": "string"
          },
          "amount_cents": {
            "type": "integer"
          },
          "allocated_cents": {
            "type": "integer"
          },
          "unallocated_cents": {
            "type": "integer"
          },
          "state": {
            "type": "string",
            "enum": [
              "applied",
              "reserved"
            ]
          }
        }
      },
      "PaymentAllocationPerson": {
        "type": "object",
        "required": [
          "user_id",
          "name",
          "currency",
          "earned_cents",
          "paid_cents",
          "reserved_cents",
          "allocated_applied_cents",
          "allocated_reserved_cents",
          "remaining_cents",
          "projects",
          "unallocated_payments",
          "allocations"
        ],
        "additionalProperties": false,
        "properties": {
          "user_id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "earned_cents": {
            "type": "integer"
          },
          "paid_cents": {
            "type": "integer"
          },
          "reserved_cents": {
            "type": "integer"
          },
          "allocated_applied_cents": {
            "type": "integer"
          },
          "allocated_reserved_cents": {
            "type": "integer"
          },
          "remaining_cents": {
            "type": "integer"
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentAllocationProject"
            }
          },
          "unallocated_payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnallocatedPayment"
            }
          },
          "allocations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentAllocation"
            }
          }
        }
      },
      "PaymentAllocationReport": {
        "type": "object",
        "required": [
          "month",
          "people"
        ],
        "additionalProperties": false,
        "properties": {
          "month": {
            "type": "string"
          },
          "people": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentAllocationPerson"
            }
          }
        }
      },
      "PaymentAllocationReportEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PaymentAllocationReport"
          }
        }
      },
      "MyPayments": {
        "type": "object",
        "required": [
          "month",
          "hours_seconds",
          "status",
          "owed",
          "paid_cents",
          "balance_cents",
          "payments",
          "upcoming"
        ],
        "additionalProperties": false,
        "properties": {
          "month": {
            "type": "string"
          },
          "hours_seconds": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending_review",
              "in_progress",
              "pending",
              "partial",
              "paid",
              "settled"
            ]
          },
          "owed": {
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "amount_cents",
                  "currency"
                ],
                "additionalProperties": false,
                "properties": {
                  "amount_cents": {
                    "type": "integer"
                  },
                  "currency": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "paid_cents": {
            "type": "integer"
          },
          "balance_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "payments": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "amount_cents",
                "currency",
                "paid_on"
              ],
              "additionalProperties": false,
              "properties": {
                "amount_cents": {
                  "type": "integer"
                },
                "currency": {
                  "type": "string"
                },
                "paid_on": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "credit_application"
                  ]
                }
              }
            }
          },
          "upcoming": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "amount_cents",
                "currency",
                "scheduled_on",
                "status"
              ],
              "additionalProperties": false,
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "advance"
                  ]
                },
                "amount_cents": {
                  "type": "integer"
                },
                "currency": {
                  "type": "string"
                },
                "scheduled_on": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "scheduled",
                    "processing"
                  ]
                }
              }
            }
          }
        }
      },
      "MyPaymentsEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MyPayments"
          }
        }
      },
      "InvoiceProviderAlert": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "event_type": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "refund",
              "dispute"
            ]
          },
          "amount_cents": {
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "provider_status": {
            "type": "string"
          },
          "occurred_at": {
            "type": "string"
          },
          "reviewed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reviewed_by": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "event_type",
          "kind",
          "amount_cents",
          "currency",
          "provider_status",
          "occurred_at",
          "reviewed_at",
          "reviewed_by"
        ],
        "additionalProperties": false
      },
      "InvoiceProviderAlertEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InvoiceProviderAlert"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "InvoiceProviderAlertListEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceProviderAlert"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "ReviewInvoiceProviderAlertInput": {
        "type": "object",
        "properties": {},
        "required": [],
        "additionalProperties": false
      },
      "BankFeedStatusEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "provider",
                "configured",
                "account_name",
                "last_synced_at",
                "last_error",
                "next_poll_at"
              ],
              "properties": {
                "provider": {
                  "type": "string",
                  "enum": [
                    "mercury",
                    "wise"
                  ]
                },
                "configured": {
                  "type": "boolean"
                },
                "account_name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_synced_at": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_error": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "next_poll_at": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "BankFeedSyncInput": {
        "type": "object",
        "required": [],
        "properties": {},
        "additionalProperties": false
      },
      "BankFeedSyncEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "checked",
              "failed"
            ],
            "properties": {
              "checked": {
                "type": "integer"
              },
              "failed": {
                "type": "integer"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "BankReviewInvoice": {
        "type": "object",
        "required": [
          "id",
          "number",
          "currency",
          "due_amount_cents",
          "version",
          "state"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "number": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "due_amount_cents": {
            "type": "integer"
          },
          "version": {
            "type": "integer"
          },
          "state": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "BankFeedAccount": {
        "type": "object",
        "required": [
          "id",
          "provider",
          "name"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "provider": {
            "type": "string",
            "enum": [
              "mercury",
              "wise"
            ]
          },
          "name": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "BankDeposit": {
        "type": "object",
        "required": [
          "id",
          "account_id",
          "account_name",
          "provider",
          "provider_transaction_id",
          "currency",
          "posted_at",
          "amount_cents",
          "memo",
          "counterparty",
          "state",
          "version",
          "suggested_invoice",
          "source_status",
          "classification",
          "source_reason",
          "verified_at",
          "verified_by_user_id",
          "verification_reference",
          "confirmation_basis",
          "confirmation_ready",
          "payment_id",
          "confirmed_invoice_id"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "account_id": {
            "type": "integer"
          },
          "account_name": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "enum": [
              "mercury",
              "wise"
            ]
          },
          "provider_transaction_id": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "posted_at": {
            "type": "string"
          },
          "amount_cents": {
            "type": "integer"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "counterparty": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "unmatched",
              "suggested",
              "confirmed",
              "rejected"
            ]
          },
          "version": {
            "type": "integer"
          },
          "suggested_invoice": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BankReviewInvoice"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_status": {
            "type": "string",
            "enum": [
              "final",
              "pending",
              "reversed",
              "ineligible",
              "unknown"
            ]
          },
          "classification": {
            "type": "string",
            "enum": [
              "external_credit",
              "internal_transfer",
              "ambiguous_credit"
            ]
          },
          "source_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "verified_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "verified_by_user_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "verification_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmation_basis": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "provider",
                  "operator"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmation_ready": {
            "type": "boolean"
          },
          "payment_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmed_invoice_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "BankDepositAccountsEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BankFeedAccount"
            }
          }
        },
        "additionalProperties": false
      },
      "BankDepositListEnvelope": {
        "type": "object",
        "required": [
          "data",
          "page",
          "per_page",
          "total"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BankDeposit"
            }
          },
          "page": {
            "type": "integer"
          },
          "per_page": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "BankDepositInvoicesEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BankReviewInvoice"
            }
          }
        },
        "additionalProperties": false
      },
      "BankDepositEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/BankDeposit"
          }
        },
        "additionalProperties": false
      },
      "BankDepositAssignInput": {
        "type": "object",
        "required": [
          "expected_version",
          "invoice_id"
        ],
        "properties": {
          "expected_version": {
            "type": "integer"
          },
          "invoice_id": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "BankDepositDecisionInput": {
        "type": "object",
        "required": [
          "expected_version"
        ],
        "properties": {
          "expected_version": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "BankDepositConfirmInput": {
        "type": "object",
        "required": [
          "expected_version",
          "invoice_id",
          "expected_invoice_version",
          "confirm_overpayment"
        ],
        "properties": {
          "expected_version": {
            "type": "integer"
          },
          "invoice_id": {
            "type": "integer"
          },
          "expected_invoice_version": {
            "type": "integer"
          },
          "confirm_overpayment": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "BankDepositVerifyInput": {
        "type": "object",
        "required": [
          "expected_version",
          "verification_reference",
          "confirm_posted_funds",
          "confirm_external_credit"
        ],
        "properties": {
          "expected_version": {
            "type": "integer"
          },
          "verification_reference": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "confirm_posted_funds": {
            "const": true
          },
          "confirm_external_credit": {
            "const": true
          }
        },
        "additionalProperties": false
      },
      "DeelSyncSettingsCommand": {
        "type": "object",
        "required": [
          "mode",
          "run_time"
        ],
        "additionalProperties": false,
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "manual",
              "automatic"
            ]
          },
          "run_time": {
            "type": "string",
            "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
          }
        }
      },
      "DeelSyncWindow": {
        "type": "object",
        "required": [
          "from",
          "to"
        ],
        "additionalProperties": false,
        "properties": {
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          }
        }
      },
      "DeelSyncRun": {
        "type": "object",
        "required": [
          "id",
          "started_at",
          "finished_at",
          "outcome",
          "timesheets_submitted",
          "entries_transferred",
          "detail"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer"
          },
          "started_at": {
            "type": "string"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "outcome": {
            "type": "string",
            "enum": [
              "running",
              "completed",
              "failed"
            ]
          },
          "timesheets_submitted": {
            "type": "integer"
          },
          "entries_transferred": {
            "type": "integer"
          },
          "detail": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "DeelSyncStatus": {
        "type": "object",
        "required": [
          "configured",
          "reason",
          "mode",
          "run_time",
          "updated_at",
          "updated_by_user_id",
          "runs"
        ],
        "additionalProperties": false,
        "properties": {
          "configured": {
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "mode": {
            "type": "string",
            "enum": [
              "manual",
              "automatic"
            ]
          },
          "run_time": {
            "type": "string",
            "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
          },
          "updated_at": {
            "type": "string"
          },
          "updated_by_user_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "runs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeelSyncRun"
            }
          }
        }
      },
      "DeelSyncPreview": {
        "type": "object",
        "required": [
          "status",
          "window",
          "entry_ids",
          "timesheets",
          "already_transferred",
          "conflicts",
          "unsyncable",
          "unmatched"
        ],
        "additionalProperties": false,
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ready"
            ]
          },
          "window": {
            "type": "object",
            "required": [
              "from",
              "to"
            ],
            "additionalProperties": false,
            "properties": {
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              }
            }
          },
          "entry_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "timesheets": {
            "type": "integer"
          },
          "already_transferred": {
            "type": "integer"
          },
          "conflicts": {
            "type": "array",
            "items": {}
          },
          "unsyncable": {
            "type": "array",
            "items": {}
          },
          "unmatched": {
            "type": "array",
            "items": {}
          }
        }
      },
      "DeelSyncRunCommand": {
        "type": "object",
        "required": [
          "from",
          "to",
          "entry_ids"
        ],
        "additionalProperties": false,
        "properties": {
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "entry_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        }
      },
      "DeelSyncRunResult": {
        "type": "object",
        "required": [
          "status",
          "run_id",
          "timesheets_submitted",
          "entries_transferred",
          "failed",
          "reconciliation",
          "error"
        ],
        "additionalProperties": false,
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "completed",
              "failed"
            ]
          },
          "run_id": {
            "type": "integer"
          },
          "timesheets_submitted": {
            "type": "integer"
          },
          "entries_transferred": {
            "type": "integer"
          },
          "failed": {
            "type": "array",
            "items": {}
          },
          "reconciliation": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "DeelPaymentStatusMonth": {
        "type": "object",
        "required": [
          "month"
        ],
        "additionalProperties": false,
        "properties": {
          "month": {
            "type": "string"
          }
        }
      },
      "DeelPaymentStatusRefreshEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "configured",
              "checked",
              "failed",
              "remaining",
              "retry_after_ms"
            ],
            "additionalProperties": false,
            "properties": {
              "configured": {
                "type": "boolean"
              },
              "checked": {
                "type": "integer"
              },
              "failed": {
                "type": "integer"
              },
              "remaining": {
                "type": "integer"
              },
              "retry_after_ms": {
                "type": "integer"
              }
            }
          }
        }
      },
      "DeelStagingStatusEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "configured",
              "reason",
              "start_date",
              "last_complete_date"
            ],
            "additionalProperties": false,
            "properties": {
              "configured": {
                "type": "boolean"
              },
              "reason": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "start_date": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_complete_date": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        }
      },
      "DeelStageSelection": {
        "type": "object",
        "required": [
          "from",
          "to",
          "user_ids"
        ],
        "additionalProperties": false,
        "properties": {
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "user_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "uniqueItems": true,
            "items": {
              "type": "integer",
              "minimum": 1
            }
          }
        }
      },
      "DeelStageCommand": {
        "type": "object",
        "required": [
          "from",
          "to",
          "user_ids",
          "command_id",
          "preview_fingerprint"
        ],
        "additionalProperties": false,
        "properties": {
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "user_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "uniqueItems": true,
            "items": {
              "type": "integer",
              "minimum": 1
            }
          },
          "command_id": {
            "type": "string",
            "format": "uuid"
          },
          "preview_fingerprint": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        }
      },
      "DeelStagePerson": {
        "type": "object",
        "required": [
          "user_id",
          "contract_id",
          "seconds",
          "entries"
        ],
        "additionalProperties": false,
        "properties": {
          "user_id": {
            "type": "integer"
          },
          "contract_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "seconds": {
            "type": "integer"
          },
          "entries": {
            "type": "integer"
          }
        }
      },
      "DeelStageUnmatched": {
        "type": "object",
        "required": [
          "user_id",
          "reason"
        ],
        "additionalProperties": false,
        "properties": {
          "user_id": {
            "type": "integer"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "DeelStagePreview": {
        "type": "object",
        "required": [
          "status",
          "from",
          "to",
          "user_ids",
          "preview_fingerprint",
          "entry_ids",
          "seconds",
          "timesheets",
          "already_staged",
          "already_staged_entry_ids",
          "people",
          "conflict_entry_ids",
          "unsyncable_entry_ids",
          "zero_duration_entry_ids",
          "unmatched",
          "unresolved_entry_ids"
        ],
        "additionalProperties": false,
        "properties": {
          "status": {
            "const": "ready"
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "user_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "uniqueItems": true,
            "items": {
              "type": "integer",
              "minimum": 1
            }
          },
          "preview_fingerprint": {
            "type": "string"
          },
          "entry_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "seconds": {
            "type": "integer"
          },
          "timesheets": {
            "type": "integer"
          },
          "already_staged": {
            "type": "integer"
          },
          "already_staged_entry_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "people": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeelStagePerson"
            }
          },
          "conflict_entry_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "unsyncable_entry_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "zero_duration_entry_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "unmatched": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeelStageUnmatched"
            }
          },
          "unresolved_entry_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        }
      },
      "DeelStagePreviewEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DeelStagePreview"
          }
        }
      },
      "DeelStageResult": {
        "type": "object",
        "required": [
          "status",
          "command_id",
          "run_id",
          "timesheets_staged",
          "entries_staged",
          "already_staged",
          "unresolved_entry_ids",
          "code"
        ],
        "additionalProperties": false,
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "staged",
              "attention",
              "running",
              "stale",
              "busy"
            ]
          },
          "command_id": {
            "type": "string"
          },
          "run_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "timesheets_staged": {
            "type": "integer"
          },
          "entries_staged": {
            "type": "integer"
          },
          "already_staged": {
            "type": "integer"
          },
          "unresolved_entry_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "DeelStageResultEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DeelStageResult"
          }
        }
      },
      "DeelStageStatusEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DeelStageResult"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "PaymentSelection": {
        "type": "object",
        "required": [
          "user_id",
          "month",
          "amount_cents",
          "expected_version"
        ],
        "additionalProperties": false,
        "properties": {
          "user_id": {
            "type": "integer"
          },
          "month": {
            "type": "string"
          },
          "amount_cents": {
            "type": "integer"
          },
          "expected_version": {
            "type": "integer"
          },
          "purpose": {
            "type": "string",
            "enum": [
              "earnings",
              "advance"
            ]
          },
          "currency": {
            "type": "string"
          },
          "advance_project_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "advance_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "PaymentRunCommand": {
        "type": "object",
        "required": [
          "id",
          "name",
          "source_currency",
          "scheduled_at",
          "timezone",
          "items"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "source_currency": {
            "type": "string"
          },
          "scheduled_at": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentSelection"
            }
          }
        }
      },
      "PaymentQuote": {
        "type": "object",
        "required": [
          "id",
          "profile_id",
          "recipient_id",
          "recipient_name",
          "source_currency",
          "target_currency",
          "target_cents",
          "source_cents",
          "fee_cents",
          "rate",
          "expires_at",
          "estimated_arrival"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "profile_id": {
            "type": "string"
          },
          "recipient_id": {
            "type": "string"
          },
          "recipient_name": {
            "type": "string"
          },
          "source_currency": {
            "type": "string"
          },
          "target_currency": {
            "type": "string"
          },
          "target_cents": {
            "type": "integer"
          },
          "source_cents": {
            "type": "integer"
          },
          "fee_cents": {
            "type": "integer"
          },
          "rate": {
            "type": "number"
          },
          "expires_at": {
            "type": "string"
          },
          "estimated_arrival": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "PaymentDestination": {
        "type": "object",
        "required": [
          "id",
          "external_id",
          "kind"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer"
          },
          "external_id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "account",
              "contact"
            ]
          }
        }
      },
      "PaymentItem": {
        "type": "object",
        "required": [
          "user_id",
          "month",
          "amount_cents",
          "expected_version",
          "purpose",
          "advance_project_id",
          "advance_reason",
          "id",
          "run_id",
          "name",
          "currency",
          "destination",
          "quote",
          "execution_quote",
          "max_source_cents",
          "state",
          "transfer_id",
          "provider_status",
          "failure",
          "attempts",
          "next_attempt_at",
          "updated_at",
          "version",
          "lease_token",
          "lease_until"
        ],
        "additionalProperties": false,
        "properties": {
          "user_id": {
            "type": "integer"
          },
          "month": {
            "type": "string"
          },
          "amount_cents": {
            "type": "integer"
          },
          "expected_version": {
            "type": "integer"
          },
          "purpose": {
            "type": "string",
            "enum": [
              "earnings",
              "advance"
            ]
          },
          "advance_project_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "advance_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string"
          },
          "run_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "destination": {
            "$ref": "#/components/schemas/PaymentDestination"
          },
          "quote": {
            "$ref": "#/components/schemas/PaymentQuote"
          },
          "execution_quote": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaymentQuote"
              },
              {
                "type": "null"
              }
            ]
          },
          "max_source_cents": {
            "type": "integer"
          },
          "state": {
            "type": "string",
            "enum": [
              "draft",
              "queued",
              "creating",
              "funding",
              "processing",
              "paid",
              "failed",
              "attention",
              "cancelled"
            ]
          },
          "transfer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "provider_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "failure": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "attempts": {
            "type": "integer"
          },
          "next_attempt_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          },
          "lease_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "lease_until": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "PaymentRun": {
        "type": "object",
        "required": [
          "id",
          "name",
          "source_currency",
          "scheduled_at",
          "timezone",
          "state",
          "actor_id",
          "approved_by",
          "created_at",
          "approved_at",
          "request_id",
          "items"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "source_currency": {
            "type": "string"
          },
          "scheduled_at": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "draft",
              "approved",
              "cancelled"
            ]
          },
          "actor_id": {
            "type": "integer"
          },
          "approved_by": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "approved_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "request_id": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentItem"
            }
          }
        }
      },
      "PaymentRunApproval": {
        "type": "object",
        "required": [
          "limits"
        ],
        "additionalProperties": false,
        "properties": {
          "limits": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "item_id",
                "max_source_cents"
              ],
              "additionalProperties": false,
              "properties": {
                "item_id": {
                  "type": "string"
                },
                "max_source_cents": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "PaymentRunEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PaymentRun"
          }
        }
      },
      "PaymentRunReport": {
        "type": "object",
        "required": [
          "from",
          "to",
          "ledgers",
          "runs"
        ],
        "additionalProperties": false,
        "properties": {
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "ledgers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StaffPaymentReport"
            }
          },
          "runs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentRun"
            }
          }
        }
      },
      "PaymentRunReportEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PaymentRunReport"
          }
        }
      },
      "ApplyAdvanceCredit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "advance_item_id": {
            "type": "string"
          },
          "user_id": {
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "month": {
            "type": "string"
          },
          "amount_cents": {
            "type": "integer"
          },
          "scope": {
            "type": "string",
            "enum": [
              "month",
              "project",
              "entry"
            ]
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "entry_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "reason",
          "advance_item_id",
          "user_id",
          "currency",
          "month",
          "amount_cents",
          "scope",
          "project_id",
          "entry_id"
        ],
        "additionalProperties": false
      },
      "ReverseAdvanceCredit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "reason",
          "application_id"
        ],
        "additionalProperties": false
      },
      "ReturnAdvanceCredit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "advance_item_id": {
            "type": "string"
          },
          "amount_cents": {
            "type": "integer"
          },
          "reference": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "reason",
          "advance_item_id",
          "amount_cents",
          "reference"
        ],
        "additionalProperties": false
      },
      "AdvanceCreditApplication": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "advance_item_id": {
            "type": "string"
          },
          "user_id": {
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "month": {
            "type": "string"
          },
          "amount_cents": {
            "type": "integer"
          },
          "scope": {
            "type": "string",
            "enum": [
              "month",
              "project",
              "entry"
            ]
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "entry_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "actor_id": {
            "type": "integer"
          },
          "recorded_at": {
            "type": "string"
          },
          "reversed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reversal_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "reason",
          "advance_item_id",
          "user_id",
          "currency",
          "month",
          "amount_cents",
          "scope",
          "project_id",
          "entry_id",
          "actor_id",
          "recorded_at",
          "reversed_at",
          "reversal_reason"
        ],
        "additionalProperties": false
      },
      "AdvanceCreditReturn": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "advance_item_id": {
            "type": "string"
          },
          "amount_cents": {
            "type": "integer"
          },
          "reference": {
            "type": "string"
          },
          "actor_id": {
            "type": "integer"
          },
          "recorded_at": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "reason",
          "advance_item_id",
          "amount_cents",
          "reference",
          "actor_id",
          "recorded_at"
        ],
        "additionalProperties": false
      },
      "AdvanceCredit": {
        "type": "object",
        "properties": {
          "advance_item_id": {
            "type": "string"
          },
          "user_id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "month": {
            "type": "string"
          },
          "advance_project_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "advance_reason": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "amount_cents": {
            "type": "integer"
          },
          "settled_cents": {
            "type": "integer"
          },
          "settled_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "applied_cents": {
            "type": "integer"
          },
          "returned_cents": {
            "type": "integer"
          },
          "reserved_cents": {
            "type": "integer"
          },
          "available_cents": {
            "type": "integer"
          },
          "opening_cents": {
            "type": "integer"
          },
          "period_settled_cents": {
            "type": "integer"
          },
          "period_applied_cents": {
            "type": "integer"
          },
          "period_returned_cents": {
            "type": "integer"
          },
          "closing_cents": {
            "type": "integer"
          },
          "applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdvanceCreditApplication"
            }
          },
          "returns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdvanceCreditReturn"
            }
          }
        },
        "required": [
          "advance_item_id",
          "user_id",
          "name",
          "currency",
          "month",
          "advance_project_id",
          "advance_reason",
          "state",
          "amount_cents",
          "settled_cents",
          "settled_at",
          "applied_cents",
          "returned_cents",
          "reserved_cents",
          "available_cents",
          "opening_cents",
          "period_settled_cents",
          "period_applied_cents",
          "period_returned_cents",
          "closing_cents",
          "applications",
          "returns"
        ],
        "additionalProperties": false
      },
      "AdvanceCreditReport": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "advances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdvanceCredit"
            }
          }
        },
        "required": [
          "from",
          "to",
          "advances"
        ],
        "additionalProperties": false
      },
      "AdvanceCreditReportEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AdvanceCreditReport"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "StaffInvoiceLine": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "entry_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "seconds": {
            "type": "integer"
          },
          "rate_cents": {
            "type": "integer"
          }
        },
        "required": [
          "description",
          "project_id",
          "entry_id",
          "seconds",
          "rate_cents"
        ],
        "additionalProperties": false
      },
      "SaveStaffInvoice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "invoice_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "expected_version": {
            "type": "integer"
          },
          "user_id": {
            "type": "integer"
          },
          "month": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "draft",
              "received",
              "void"
            ]
          },
          "from_review": {
            "type": "boolean"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StaffInvoiceLine"
            }
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "type": "string"
          },
          "acknowledge_paid_history": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "invoice_id",
          "expected_version",
          "user_id",
          "month",
          "currency",
          "reference",
          "kind",
          "from_review",
          "lines",
          "document_id",
          "reason",
          "acknowledge_paid_history"
        ],
        "additionalProperties": false
      },
      "StaffInvoiceVersion": {
        "type": "object",
        "properties": {
          "command_id": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          },
          "month": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "draft",
              "received",
              "void"
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StaffInvoiceLine"
            }
          },
          "amount_cents": {
            "type": "integer"
          },
          "review_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "type": "string"
          },
          "actor_id": {
            "type": "integer"
          },
          "recorded_at": {
            "type": "string"
          },
          "paid_cents_at_recording": {
            "type": "integer"
          },
          "has_payment_history": {
            "type": "boolean"
          }
        },
        "required": [
          "command_id",
          "version",
          "month",
          "currency",
          "kind",
          "lines",
          "amount_cents",
          "review_id",
          "document_id",
          "reason",
          "actor_id",
          "recorded_at",
          "paid_cents_at_recording",
          "has_payment_history"
        ],
        "additionalProperties": false
      },
      "StaffInvoice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "user_id": {
            "type": "integer"
          },
          "month": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "versions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StaffInvoiceVersion"
            }
          },
          "matched_cents": {
            "type": "integer"
          },
          "flags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "line_flags": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "id",
          "user_id",
          "month",
          "currency",
          "reference",
          "versions",
          "matched_cents",
          "flags",
          "line_flags"
        ],
        "additionalProperties": false
      },
      "StaffInvoicePerson": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "earned_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "paid_cents": {
            "type": "integer"
          },
          "invoiced_cents": {
            "type": "integer"
          },
          "matched_invoice_cents": {
            "type": "integer"
          },
          "uninvoiced_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StaffInvoice"
            }
          }
        },
        "required": [
          "user_id",
          "name",
          "currency",
          "earned_cents",
          "paid_cents",
          "invoiced_cents",
          "matched_invoice_cents",
          "uninvoiced_cents",
          "invoices"
        ],
        "additionalProperties": false
      },
      "StaffInvoiceReport": {
        "type": "object",
        "properties": {
          "month": {
            "type": "string"
          },
          "people": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StaffInvoicePerson"
            }
          }
        },
        "required": [
          "month",
          "people"
        ],
        "additionalProperties": false
      },
      "StaffInvoiceReportEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/StaffInvoiceReport"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "StaffInvoiceEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/StaffInvoice"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "StaffInvoiceDocumentInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "invoice_id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "byte_size": {
            "type": "integer"
          },
          "content_type": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "invoice_id",
          "name",
          "byte_size",
          "content_type"
        ],
        "additionalProperties": false
      },
      "StaffInvoiceDocumentEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/StaffInvoiceDocumentInfo"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "ContractorEarningsReview": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "user_id": {
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "amount_cents": {
            "type": "integer"
          },
          "expected_version": {
            "type": "integer"
          },
          "actor_id": {
            "type": "integer"
          },
          "note": {
            "type": "string"
          },
          "recorded_at": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "currency",
          "amount_cents",
          "expected_version",
          "actor_id",
          "note",
          "recorded_at"
        ],
        "additionalProperties": false
      },
      "ContractorReviewEntry": {
        "type": "object",
        "properties": {
          "entry_id": {
            "type": "integer"
          },
          "project_id": {
            "type": "integer"
          },
          "project_name": {
            "type": "string"
          },
          "spent_date": {
            "type": "string"
          },
          "rounded_seconds": {
            "type": "integer"
          },
          "cost_rate_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "selected_seconds": {
            "type": "integer"
          }
        },
        "required": [
          "entry_id",
          "project_id",
          "project_name",
          "spent_date",
          "rounded_seconds",
          "cost_rate_cents",
          "selected_seconds"
        ],
        "additionalProperties": false
      },
      "ContractorReviewEarnings": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "proposed_cents": {
            "type": "integer"
          },
          "confirmed_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "converged",
              "differs",
              "attention"
            ]
          },
          "exceptions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "enum": [
                    "missing_rate",
                    "changed_source"
                  ]
                },
                "entry_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                }
              },
              "required": [
                "code",
                "entry_ids"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "user_id",
          "name",
          "proposed_cents",
          "confirmed_cents",
          "status",
          "exceptions"
        ],
        "additionalProperties": false
      },
      "ContractorAllocationProposal": {
        "type": "object",
        "properties": {
          "payment_kind": {
            "type": "string",
            "enum": [
              "event",
              "run_item"
            ]
          },
          "payment_id": {
            "type": "string"
          },
          "amount_cents": {
            "type": "integer"
          },
          "scope": {
            "type": "string",
            "enum": [
              "month"
            ]
          }
        },
        "required": [
          "payment_kind",
          "payment_id",
          "amount_cents",
          "scope"
        ],
        "additionalProperties": false
      },
      "ContractorCreditProposal": {
        "type": "object",
        "properties": {
          "advance_item_id": {
            "type": "string"
          },
          "amount_cents": {
            "type": "integer"
          },
          "scope": {
            "type": "string",
            "enum": [
              "month"
            ]
          }
        },
        "required": [
          "advance_item_id",
          "amount_cents",
          "scope"
        ],
        "additionalProperties": false
      },
      "ContractorReviewItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "run_id": {
            "type": "string"
          },
          "run_name": {
            "type": "string"
          },
          "purpose": {
            "type": "string",
            "enum": [
              "earnings",
              "advance"
            ]
          },
          "amount_cents": {
            "type": "integer"
          },
          "state": {
            "type": "string",
            "enum": [
              "draft",
              "queued",
              "creating",
              "funding",
              "processing",
              "paid",
              "failed",
              "attention",
              "cancelled"
            ]
          },
          "phase": {
            "type": "string",
            "enum": [
              "draft",
              "queued",
              "processing",
              "settled",
              "failed",
              "attention",
              "cancelled"
            ]
          },
          "failure": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "attempts": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "run_id",
          "run_name",
          "purpose",
          "amount_cents",
          "state",
          "phase",
          "failure",
          "attempts"
        ],
        "additionalProperties": false
      },
      "ContractorCurrencyReview": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string"
          },
          "recorded_earnings_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "proposed_earnings_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "paid_cents": {
            "type": "integer"
          },
          "reserved_cents": {
            "type": "integer"
          },
          "available_to_pay_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "available_credit_cents": {
            "type": "integer"
          },
          "proposed_credit_cents": {
            "type": "integer"
          },
          "remaining_after_credit_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StaffInvoice"
            }
          },
          "advances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdvanceCredit"
            }
          },
          "allocations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentAllocation"
            }
          },
          "allocation_proposals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContractorAllocationProposal"
            }
          },
          "credit_proposals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContractorCreditProposal"
            }
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContractorReviewItem"
            }
          },
          "proposal_blocked": {
            "type": "boolean"
          },
          "flags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "currency",
          "recorded_earnings_cents",
          "proposed_earnings_cents",
          "paid_cents",
          "reserved_cents",
          "available_to_pay_cents",
          "available_credit_cents",
          "proposed_credit_cents",
          "remaining_after_credit_cents",
          "invoices",
          "advances",
          "allocations",
          "allocation_proposals",
          "credit_proposals",
          "items",
          "proposal_blocked",
          "flags"
        ],
        "additionalProperties": false
      },
      "ContractorReviewPerson": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "ledger_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "settled_through": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ledger_events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StaffPaymentEvent"
            }
          },
          "phase": {
            "type": "string",
            "enum": [
              "review",
              "queued",
              "processing",
              "settled",
              "failed",
              "attention"
            ]
          },
          "latest_review": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContractorEarningsReview"
              },
              {
                "type": "null"
              }
            ]
          },
          "earnings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContractorReviewEarnings"
              },
              {
                "type": "null"
              }
            ]
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContractorReviewEntry"
            }
          },
          "currencies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContractorCurrencyReview"
            }
          },
          "source_revision": {
            "type": "string"
          },
          "review_version": {
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "name",
          "active",
          "ledger_version",
          "settled_through",
          "ledger_events",
          "phase",
          "latest_review",
          "earnings",
          "entries",
          "currencies"
        ],
        "additionalProperties": false
      },
      "ContractorReview": {
        "type": "object",
        "properties": {
          "month": {
            "type": "string"
          },
          "completed": {
            "type": "boolean"
          },
          "credit_period": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              }
            },
            "required": [
              "from",
              "to"
            ],
            "additionalProperties": false
          },
          "version": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "people": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContractorReviewPerson"
            }
          }
        },
        "required": [
          "month",
          "completed",
          "credit_period",
          "version",
          "people"
        ],
        "additionalProperties": false
      },
      "AcceptContractorReview": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "user_id": {
            "type": "integer"
          },
          "month": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "review_version": {
            "type": "string"
          },
          "source_revision": {
            "type": "string"
          },
          "apply_allocations": {
            "type": "boolean"
          },
          "apply_credits": {
            "type": "boolean"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "month",
          "currency",
          "review_version",
          "source_revision",
          "apply_allocations",
          "apply_credits",
          "reason"
        ],
        "additionalProperties": false
      },
      "ContractorAcceptance": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "user_id": {
            "type": "integer"
          },
          "month": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "review_version": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "actor_id": {
            "type": "integer"
          },
          "recorded_at": {
            "type": "string"
          },
          "allocation_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "credit_application_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "state": {
            "type": "string",
            "enum": [
              "completed"
            ]
          }
        },
        "required": [
          "id",
          "user_id",
          "month",
          "currency",
          "review_version",
          "reason",
          "actor_id",
          "recorded_at",
          "allocation_ids",
          "credit_application_ids",
          "state"
        ],
        "additionalProperties": false
      },
      "ContractorAcceptanceEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ContractorAcceptance"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "ContractorAcceptancesEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContractorAcceptance"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "ContractorReviewEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ContractorReview"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "ScheduledReviewLinkInput": {
        "type": "object",
        "required": [
          "token"
        ],
        "additionalProperties": false,
        "properties": {
          "token": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}\\.[A-Za-z0-9_-]{43}$",
            "writeOnly": true
          }
        }
      },
      "ScheduledReviewLinkEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "path"
            ],
            "additionalProperties": false,
            "properties": {
              "path": {
                "type": "string"
              }
            }
          }
        }
      },
      "ScheduledRunConfirmInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "acknowledge_report_warnings": {
            "type": "boolean"
          }
        }
      },
      "ScheduledRunItem": {
        "type": "object",
        "required": [
          "report_people",
          "report_name",
          "report_warnings",
          "attempt_limit",
          "delivery_id",
          "delivery_status",
          "id",
          "subject_type",
          "subject_id",
          "description",
          "amount_cents",
          "currency",
          "target",
          "quantity_seconds",
          "client_name",
          "state",
          "attempt_count",
          "failure_reason",
          "completed_at"
        ],
        "additionalProperties": false,
        "properties": {
          "report_people": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "name",
                "seconds"
              ],
              "additionalProperties": false,
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "seconds": {
                  "type": "integer"
                }
              }
            }
          },
          "report_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "report_warnings": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "entryId",
                "kind",
                "match"
              ],
              "additionalProperties": false,
              "properties": {
                "entryId": {
                  "type": "integer"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "url",
                    "mention",
                    "ticket_reference",
                    "teammate_name"
                  ]
                },
                "match": {
                  "type": "string"
                }
              }
            }
          },
          "attempt_limit": {
            "type": "integer"
          },
          "delivery_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivery_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "integer"
          },
          "subject_type": {
            "type": "string"
          },
          "subject_id": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "amount_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "target": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "quantity_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "client_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "running",
              "done",
              "failed"
            ]
          },
          "attempt_count": {
            "type": "integer"
          },
          "failure_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ScheduledRun": {
        "type": "object",
        "required": [
          "id",
          "job_id",
          "occurrence_key",
          "state",
          "proposed_at",
          "expires_at",
          "confirmed_by",
          "confirmed_at",
          "settled_reason",
          "items"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer"
          },
          "job_id": {
            "type": "integer"
          },
          "occurrence_key": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "proposed",
              "confirmed",
              "cancelled",
              "expired",
              "completed"
            ]
          },
          "proposed_at": {
            "type": "string"
          },
          "expires_at": {
            "type": "string"
          },
          "confirmed_by": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "settled_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduledRunItem"
            }
          }
        }
      },
      "ScheduledRunEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ScheduledRun"
          }
        }
      },
      "ScheduledJobCreate": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "const": "month_end_pack"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "scope": {
            "type": "object",
            "properties": {
              "client_ids": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "required": [],
            "additionalProperties": false
          },
          "cadence": {
            "type": "string",
            "description": "Monthly M H D * * on the organization clock; skipped calendar days do not run."
          },
          "confirmation": {
            "type": "string",
            "const": "required"
          },
          "confirm_within_minutes": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20160
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "ScheduledJobPatch": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "const": "month_end_pack"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "scope": {
            "type": "object",
            "properties": {
              "client_ids": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "required": [],
            "additionalProperties": false
          },
          "cadence": {
            "type": "string",
            "description": "Monthly M H D * * on the organization clock; skipped calendar days do not run."
          },
          "confirmation": {
            "type": "string",
            "const": "required"
          },
          "confirm_within_minutes": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20160
          },
          "is_active": {
            "type": "boolean"
          },
          "expected_version": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "expected_version"
        ],
        "additionalProperties": false
      },
      "ScheduledJob": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "const": "month_end_pack"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "scope": {},
          "cadence": {
            "type": "string",
            "description": "Monthly M H D * * on the organization clock; skipped calendar days do not run."
          },
          "confirmation": {
            "type": "string",
            "enum": [
              "required",
              "none"
            ]
          },
          "confirm_within_minutes": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20160
          },
          "is_active": {
            "type": "boolean"
          },
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "created_by": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "last_checked_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_run_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "action",
          "name",
          "scope",
          "cadence",
          "confirmation",
          "confirm_within_minutes",
          "is_active",
          "id",
          "version",
          "created_by",
          "created_at",
          "updated_at",
          "last_checked_at",
          "last_error",
          "last_run_id"
        ],
        "additionalProperties": false
      },
      "ScheduledJobEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ScheduledJob"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "ScheduledJobsPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduledJob"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        },
        "required": [
          "data",
          "links",
          "page"
        ],
        "additionalProperties": false
      },
      "InvoiceReminderPolicy": {
        "type": "object",
        "required": [
          "first_after_days",
          "every_days"
        ],
        "properties": {
          "first_after_days": {
            "type": "integer",
            "minimum": 0
          },
          "every_days": {
            "type": "integer",
            "minimum": 1
          }
        },
        "additionalProperties": false
      },
      "FieldError": {
        "type": "object",
        "required": [
          "field",
          "code",
          "message"
        ],
        "properties": {
          "field": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "minimum_length": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          }
        },
        "additionalProperties": false
      },
      "ErrorDetail": {
        "type": "object",
        "required": [
          "code",
          "message",
          "fields"
        ],
        "properties": {
          "currentVersion": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "current": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Allocation"
              },
              {
                "$ref": "#/components/schemas/TimeOff"
              }
            ]
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldError"
            }
          }
        },
        "additionalProperties": false
      },
      "ErrorEnvelope": {
        "type": "object",
        "required": [
          "error",
          "request_id"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          },
          "request_id": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "SignupInput": {
        "type": "object",
        "required": [
          "organization_name",
          "first_name",
          "last_name",
          "email",
          "password"
        ],
        "properties": {
          "organization_name": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "password": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "AuthTokenInput": {
        "type": "object",
        "required": [
          "token"
        ],
        "properties": {
          "token": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "PasswordSignInInput": {
        "type": "object",
        "required": [
          "email",
          "password"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "password": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "EmailInput": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          }
        },
        "additionalProperties": false
      },
      "PasswordResetInput": {
        "type": "object",
        "required": [
          "token",
          "password"
        ],
        "properties": {
          "token": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "AuthAccepted": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "verification_sent",
              "reset_requested"
            ]
          }
        },
        "additionalProperties": false
      },
      "AuthAcceptedEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AuthAccepted"
          }
        },
        "additionalProperties": false
      },
      "AuthPrincipal": {
        "type": "object",
        "required": [
          "status",
          "user_id",
          "profile",
          "manager_grants"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "verified",
              "authenticated",
              "password_reset"
            ]
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "profile": {
            "type": "string",
            "enum": [
              "member",
              "project_manager",
              "people_admin",
              "accounting",
              "executive_manager",
              "administrator"
            ]
          },
          "manager_grants": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "AuthPrincipalEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AuthPrincipal"
          }
        },
        "additionalProperties": false
      },
      "Session": {
        "type": "object",
        "required": [
          "id",
          "created_at",
          "last_seen_at",
          "idle_expires_at",
          "absolute_expires_at",
          "revoked_at",
          "revocation_reason",
          "current"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_seen_at": {
            "type": "string",
            "format": "date-time"
          },
          "idle_expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "absolute_expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "revocation_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "user_revoked",
                  "privilege_change",
                  "password_reset",
                  "user_disabled"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "current": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "SessionEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Session"
          }
        },
        "additionalProperties": false
      },
      "SessionPage": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Session"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "EmailRecipient": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "EmailLog": {
        "type": "object",
        "required": [
          "id",
          "from",
          "reply_to",
          "to",
          "cc",
          "template",
          "subject",
          "provider",
          "provider_message_id",
          "provider_request_id",
          "provider_latency_ms",
          "status",
          "related_type",
          "related_id",
          "attempt_count",
          "reminder_attempt_lease_expires_at",
          "failure_code",
          "failure_reason",
          "viewed_at",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "from": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmailRecipient"
              },
              {
                "type": "null"
              }
            ]
          },
          "reply_to": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailRecipient"
            }
          },
          "to": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailRecipient"
            }
          },
          "cc": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailRecipient"
            }
          },
          "template": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "provider_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "provider_request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "provider_latency_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 3000000
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "sent",
              "bounced",
              "complained",
              "failed"
            ]
          },
          "related_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "related_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "attempt_count": {
            "type": "integer",
            "minimum": 0
          },
          "reminder_attempt_lease_expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "failure_code": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "queue_unavailable",
                  "provider_timeout",
                  "provider_rejected"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "failure_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "viewed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "EmailLogPage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailLog"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/CountedPageMetadata"
          }
        },
        "additionalProperties": false
      },
      "EmailReputationSnapshot": {
        "type": "object",
        "required": [
          "sent",
          "bounced",
          "complained",
          "failed",
          "bounce_rate_ppm",
          "complaint_rate_ppm"
        ],
        "properties": {
          "sent": {
            "type": "integer",
            "minimum": 0
          },
          "bounced": {
            "type": "integer",
            "minimum": 0
          },
          "complained": {
            "type": "integer",
            "minimum": 0
          },
          "failed": {
            "type": "integer",
            "minimum": 0
          },
          "bounce_rate_ppm": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000
          },
          "complaint_rate_ppm": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000
          }
        },
        "additionalProperties": false
      },
      "EmailIdentityReputation": {
        "type": "object",
        "required": [
          "sender",
          "sent",
          "bounced",
          "complained",
          "failed",
          "bounce_rate_ppm",
          "complaint_rate_ppm"
        ],
        "properties": {
          "sender": {
            "type": "string"
          },
          "sent": {
            "type": "integer",
            "minimum": 0
          },
          "bounced": {
            "type": "integer",
            "minimum": 0
          },
          "complained": {
            "type": "integer",
            "minimum": 0
          },
          "failed": {
            "type": "integer",
            "minimum": 0
          },
          "bounce_rate_ppm": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000
          },
          "complaint_rate_ppm": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000
          }
        },
        "additionalProperties": false
      },
      "EmailSuppression": {
        "type": "object",
        "required": [
          "id",
          "address",
          "reason",
          "first_seen_at",
          "last_seen_at",
          "event_count"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "address": {
            "type": "string",
            "format": "email"
          },
          "reason": {
            "type": "string",
            "enum": [
              "bounce",
              "complaint"
            ]
          },
          "first_seen_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_seen_at": {
            "type": "string",
            "format": "date-time"
          },
          "event_count": {
            "type": "integer",
            "minimum": 1
          }
        },
        "additionalProperties": false
      },
      "EmailSuppressionsPage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailSuppression"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        },
        "additionalProperties": false
      },
      "EmailSuppressionLiftInput": {
        "type": "object",
        "required": [
          "note"
        ],
        "properties": {
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "confirmation": {
            "type": "string",
            "maxLength": 254
          }
        },
        "additionalProperties": false
      },
      "EmailSuppressionLift": {
        "type": "object",
        "required": [
          "id",
          "address",
          "through_event_id",
          "actor_user_id",
          "note",
          "complaint_acknowledged",
          "lifted_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "address": {
            "type": "string",
            "format": "email"
          },
          "through_event_id": {
            "type": "integer",
            "minimum": 1
          },
          "actor_user_id": {
            "type": "integer",
            "minimum": 1
          },
          "note": {
            "type": "string"
          },
          "complaint_acknowledged": {
            "type": "boolean"
          },
          "lifted_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "EmailSuppressionLiftEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/EmailSuppressionLift"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "EmailHealth": {
        "type": "object",
        "required": [
          "reputation",
          "identities"
        ],
        "properties": {
          "reputation": {
            "$ref": "#/components/schemas/EmailReputationSnapshot"
          },
          "identities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailIdentityReputation"
            }
          }
        },
        "additionalProperties": false
      },
      "EmailHealthEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/EmailHealth"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "EmailTemplateVariable": {
        "type": "object",
        "required": [
          "name",
          "token",
          "description",
          "compatibility"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "token": {
            "type": "string",
            "pattern": "^%[a-z0-9_]+%$"
          },
          "description": {
            "type": "string"
          },
          "compatibility": {
            "type": "string",
            "enum": [
              "harvest",
              "native"
            ]
          }
        },
        "additionalProperties": false
      },
      "EmailTemplateVariableGroup": {
        "type": "object",
        "required": [
          "kind",
          "variables"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "invoice",
              "reminder",
              "thank_you",
              "auth_email_verification",
              "auth_password_reset"
            ]
          },
          "variables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailTemplateVariable"
            }
          }
        },
        "additionalProperties": false
      },
      "EmailTemplateVariableCatalog": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailTemplateVariableGroup"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "EmailTemplate": {
        "type": "object",
        "required": [
          "kind",
          "version",
          "subject_template",
          "text_template",
          "html_template",
          "unknown_variable_policy",
          "created_by_user_id",
          "created_at"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "invoice",
              "reminder",
              "thank_you",
              "auth_email_verification",
              "auth_password_reset"
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "subject_template": {
            "type": "string"
          },
          "text_template": {
            "type": "string"
          },
          "html_template": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "unknown_variable_policy": {
            "type": "string",
            "enum": [
              "error",
              "literal"
            ]
          },
          "created_by_user_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "EmailTemplatePage": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailTemplate"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "EmailTemplateEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/EmailTemplate"
          }
        },
        "additionalProperties": false
      },
      "EmailTemplateVersionInput": {
        "type": "object",
        "required": [
          "expected_version",
          "subject_template",
          "text_template"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 1
          },
          "subject_template": {
            "type": "string",
            "minLength": 1,
            "maxLength": 998
          },
          "text_template": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000000
          },
          "html_template": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000000
              },
              {
                "type": "null"
              }
            ]
          },
          "unknown_variable_policy": {
            "type": "string",
            "enum": [
              "error",
              "literal"
            ]
          }
        },
        "additionalProperties": false
      },
      "SenderIdentityEvidence": {
        "type": "object",
        "required": [
          "version",
          "source",
          "identity_kind",
          "verification_status",
          "dkim_status",
          "mail_from_domain",
          "mail_from_status",
          "observed_at"
        ],
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "source": {
            "type": "string",
            "enum": [
              "provider_api",
              "deployment_config"
            ]
          },
          "identity_kind": {
            "type": "string",
            "enum": [
              "email_address",
              "domain"
            ]
          },
          "verification_status": {
            "type": "string",
            "enum": [
              "pending",
              "verified",
              "failed",
              "temporary_failure",
              "operator_configured"
            ]
          },
          "dkim_status": {
            "type": "string",
            "enum": [
              "pending",
              "verified",
              "failed",
              "not_applicable"
            ]
          },
          "mail_from_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "mail_from_status": {
            "type": "string",
            "enum": [
              "pending",
              "verified",
              "failed",
              "not_configured"
            ]
          },
          "observed_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "SenderIdentity": {
        "type": "object",
        "required": [
          "id",
          "email",
          "display_name",
          "reply_to_email",
          "provider",
          "provider_identity",
          "is_default",
          "version",
          "archived_at",
          "evidence",
          "created_by_user_id",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "display_name": {
            "type": "string"
          },
          "reply_to_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ]
          },
          "provider": {
            "type": "string"
          },
          "provider_identity": {
            "type": "string"
          },
          "is_default": {
            "type": "boolean"
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "archived_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "evidence": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SenderIdentityEvidence"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_by_user_id": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "SenderIdentityPage": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SenderIdentity"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "SenderIdentityEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SenderIdentity"
          }
        },
        "additionalProperties": false
      },
      "SenderIdentityInput": {
        "type": "object",
        "required": [
          "email",
          "display_name",
          "provider",
          "provider_identity"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "reply_to_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email",
                "maxLength": 254
              },
              {
                "type": "null"
              }
            ]
          },
          "provider": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "provider_identity": {
            "type": "string",
            "minLength": 1,
            "maxLength": 320
          }
        },
        "additionalProperties": false
      },
      "SenderIdentityPatch": {
        "type": "object",
        "required": [
          "expected_version"
        ],
        "minProperties": 2,
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "reply_to_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email",
                "maxLength": 254
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "SenderIdentityVersionInput": {
        "type": "object",
        "required": [
          "expected_version"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "BackupRun": {
        "type": "object",
        "required": [
          "id",
          "status",
          "trigger",
          "started_at",
          "completed_at",
          "r2_prefix",
          "table_count",
          "total_rows",
          "error_message"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "completed",
              "failed"
            ]
          },
          "trigger": {
            "type": "string",
            "enum": [
              "nightly",
              "manual"
            ]
          },
          "started_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "r2_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "table_count": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "total_rows": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "BackupRunPage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BackupRun"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/CountedPageMetadata"
          }
        },
        "additionalProperties": false
      },
      "BackupDownloadLinkInput": {
        "type": "object",
        "properties": {
          "run_id": {
            "type": "integer",
            "minimum": 1
          },
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "additionalProperties": false
      },
      "BackupDownloadLinkEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "run_id",
              "url",
              "expires_at"
            ],
            "properties": {
              "id": {
                "type": "integer",
                "minimum": 1
              },
              "run_id": {
                "type": "integer",
                "minimum": 1
              },
              "url": {
                "type": "string"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "OffsiteBackupRun": {
        "type": "object",
        "required": [
          "id",
          "backup_run_id",
          "status",
          "started_at",
          "completed_at",
          "uploaded_objects",
          "total_objects",
          "error_message"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "backup_run_id": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "running",
              "completed",
              "failed"
            ]
          },
          "started_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "uploaded_objects": {
            "type": "integer",
            "minimum": 0
          },
          "total_objects": {
            "type": "integer",
            "minimum": 0
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "OffsiteBackupStatus": {
        "type": "object",
        "required": [
          "configured",
          "state",
          "destination",
          "last_completed",
          "latest",
          "error"
        ],
        "properties": {
          "configured": {
            "type": "boolean"
          },
          "state": {
            "type": "string",
            "enum": [
              "disabled",
              "misconfigured",
              "waiting",
              "running",
              "completed",
              "failed"
            ]
          },
          "destination": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_completed": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OffsiteBackupRun"
              },
              {
                "type": "null"
              }
            ]
          },
          "latest": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OffsiteBackupRun"
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "code",
                  "message"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "enum": [
                      "E14"
                    ]
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "OffsiteBackupCheckEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "verified",
              "checked_at"
            ],
            "properties": {
              "verified": {
                "type": "boolean",
                "enum": [
                  true
                ]
              },
              "checked_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "BackupStatusEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "last_completed",
              "last_failed",
              "recent_runs",
              "has_failure"
            ],
            "properties": {
              "last_completed": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/BackupRun"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_failed": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/BackupRun"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "recent_runs": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BackupRun"
                }
              },
              "has_failure": {
                "type": "boolean"
              },
              "offsite": {
                "$ref": "#/components/schemas/OffsiteBackupStatus"
              }
            },
            "additionalProperties": false
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "QuickBooksConnection": {
        "type": "object",
        "required": [
          "realm_id",
          "company_name",
          "scope",
          "allow_online_payment",
          "connected_at"
        ],
        "properties": {
          "realm_id": {
            "type": "string"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "scope": {
            "type": "string"
          },
          "allow_online_payment": {
            "type": "boolean"
          },
          "connected_at": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "QuickBooksStatusEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "configured",
              "connection"
            ],
            "properties": {
              "configured": {
                "type": "boolean"
              },
              "connection": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/QuickBooksConnection"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "authorization": {
                "type": "string",
                "enum": [
                  "ready",
                  "pending",
                  "unavailable"
                ]
              },
              "writes": {
                "type": "string",
                "enum": [
                  "ready",
                  "pending",
                  "unavailable"
                ]
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "QuickBooksAuthorizeEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "authorize_url"
            ],
            "properties": {
              "authorize_url": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "WiseConnection": {
        "type": "object",
        "required": [
          "profile_id",
          "profile_name",
          "payable_recipients",
          "webhooks_verifiable"
        ],
        "properties": {
          "profile_id": {
            "type": "string"
          },
          "profile_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payable_recipients": {
            "type": "integer"
          },
          "webhooks_verifiable": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "WiseRecipient": {
        "type": "object",
        "required": [
          "id",
          "holder_name",
          "currency",
          "type",
          "masked_summary",
          "email"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "holder_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "masked_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "WiseStatusEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "configured",
              "connection"
            ],
            "properties": {
              "configured": {
                "type": "boolean"
              },
              "connection": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/WiseConnection"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "WiseRecipientListEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WiseRecipient"
            }
          }
        },
        "additionalProperties": false
      },
      "WiseOnboardInput": {
        "type": "object",
        "required": [
          "user_id",
          "email",
          "legal_name",
          "currency"
        ],
        "properties": {
          "user_id": {
            "type": "integer"
          },
          "email": {
            "type": "string"
          },
          "legal_name": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "WiseDestinationEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "configured",
              "destination"
            ],
            "properties": {
              "configured": {
                "type": "boolean"
              },
              "destination": {
                "anyOf": [
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "kind",
                      "linked_at",
                      "linked_by_user_id",
                      "verified_at"
                    ],
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "account",
                          "contact"
                        ]
                      },
                      "linked_at": {
                        "type": "string"
                      },
                      "linked_by_user_id": {
                        "type": "integer"
                      },
                      "verified_at": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "WiseProposal": {
        "type": "object",
        "required": [
          "user_id",
          "name",
          "payroll_email",
          "matches"
        ],
        "properties": {
          "user_id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "payroll_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "matches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WiseRecipient"
            }
          }
        },
        "additionalProperties": false
      },
      "WiseProposalListEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WiseProposal"
            }
          }
        },
        "additionalProperties": false
      },
      "WiseContactInput": {
        "type": "object",
        "required": [
          "user_id",
          "identifier",
          "currency"
        ],
        "properties": {
          "user_id": {
            "type": "integer"
          },
          "identifier": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "WiseContactEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "user_id",
              "contact"
            ],
            "properties": {
              "user_id": {
                "type": "integer"
              },
              "contact": {
                "type": "object",
                "required": [
                  "id",
                  "name"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "WiseLinkInput": {
        "type": "object",
        "required": [
          "user_id",
          "recipient_id"
        ],
        "properties": {
          "user_id": {
            "type": "integer"
          },
          "recipient_id": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "WiseLinkEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "user_id",
              "recipient"
            ],
            "properties": {
              "user_id": {
                "type": "integer"
              },
              "recipient": {
                "$ref": "#/components/schemas/WiseRecipient"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "QuickBooksConnectionEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/QuickBooksConnection"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "QuickBooksSettingsInput": {
        "type": "object",
        "required": [
          "allow_online_payment"
        ],
        "properties": {
          "allow_online_payment": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "QuickBooksReconciliationEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "realm_id",
              "generated_at",
              "counts",
              "rows",
              "payment_divergences",
              "recovery"
            ],
            "properties": {
              "realm_id": {
                "type": "string"
              },
              "generated_at": {
                "type": "string",
                "format": "date-time"
              },
              "counts": {
                "type": "object",
                "additionalProperties": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "rows": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "status",
                    "issues",
                    "invoice_id",
                    "number",
                    "quickbooks_id",
                    "linked",
                    "ezacto_amount_cents",
                    "quickbooks_amount_cents",
                    "ezacto_currency",
                    "quickbooks_currency",
                    "ezacto_paid_cents",
                    "quickbooks_paid_cents",
                    "detail"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "matched",
                        "voided_in_quickbooks",
                        "missing_in_quickbooks",
                        "amount_differs",
                        "currency_differs",
                        "payments_differ",
                        "missing_here"
                      ]
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "invoice_id": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "number": {
                      "type": "string"
                    },
                    "quickbooks_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "linked": {
                      "type": "boolean"
                    },
                    "ezacto_amount_cents": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "quickbooks_amount_cents": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ezacto_currency": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "quickbooks_currency": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ezacto_paid_cents": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "quickbooks_paid_cents": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "detail": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "payment_divergences": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "quickbooks_payment_id",
                    "kind",
                    "quickbooks_updated_at",
                    "detected_at",
                    "receipts"
                  ],
                  "properties": {
                    "quickbooks_payment_id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "voided",
                        "deleted"
                      ]
                    },
                    "quickbooks_updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "detected_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "receipts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "payment_id",
                          "invoice_id",
                          "invoice_number",
                          "amount_cents"
                        ],
                        "properties": {
                          "payment_id": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "invoice_id": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "invoice_number": {
                            "type": "string"
                          },
                          "amount_cents": {
                            "type": "integer",
                            "minimum": 1
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              },
              "recovery": {
                "anyOf": [
                  {
                    "type": "object",
                    "required": [
                      "cdc_cursor",
                      "last_run_at",
                      "last_outcome"
                    ],
                    "properties": {
                      "cdc_cursor": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "last_run_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "last_outcome": {
                        "type": "string",
                        "enum": [
                          "caught_up",
                          "failed",
                          "full_reconcile_needed"
                        ]
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "InvoiceQuickBooksEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "connected",
              "invoice",
              "payments",
              "last_outcome"
            ],
            "properties": {
              "connected": {
                "type": "boolean"
              },
              "invoice": {
                "anyOf": [
                  {
                    "type": "object",
                    "required": [
                      "quickbooks_id",
                      "mirrored_at"
                    ],
                    "properties": {
                      "quickbooks_id": {
                        "type": "string"
                      },
                      "mirrored_at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "payments": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "payment_id",
                    "quickbooks_id",
                    "mirrored_at"
                  ],
                  "properties": {
                    "payment_id": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "quickbooks_id": {
                      "type": "string"
                    },
                    "mirrored_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "last_outcome": {
                "anyOf": [
                  {
                    "type": "object",
                    "required": [
                      "kind",
                      "reason",
                      "at"
                    ],
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "created",
                          "updated",
                          "adopted",
                          "linked",
                          "refused",
                          "failed"
                        ]
                      },
                      "reason": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "SenderEvidenceRefreshInput": {
        "type": "object",
        "required": [
          "expected_evidence_version"
        ],
        "properties": {
          "expected_evidence_version": {
            "type": "integer",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "EmailTestSendInput": {
        "type": "object",
        "required": [
          "template_kind",
          "template_version",
          "variables",
          "confirmed"
        ],
        "properties": {
          "template_kind": {
            "type": "string",
            "enum": [
              "invoice",
              "reminder",
              "thank_you"
            ]
          },
          "template_version": {
            "type": "integer",
            "minimum": 1
          },
          "variables": {
            "type": "object",
            "maxProperties": 32,
            "propertyNames": {
              "pattern": "^[a-z][a-z0-9_]{0,63}$"
            },
            "additionalProperties": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000
            }
          },
          "confirmed": {
            "const": true
          }
        },
        "additionalProperties": false
      },
      "EmailTestSend": {
        "type": "object",
        "required": [
          "status",
          "delivery_id",
          "sender_identity_id",
          "template_kind",
          "template_version",
          "recipient_email"
        ],
        "properties": {
          "status": {
            "const": "queued"
          },
          "delivery_id": {
            "type": "integer",
            "minimum": 1
          },
          "sender_identity_id": {
            "type": "integer",
            "minimum": 1
          },
          "template_kind": {
            "type": "string",
            "enum": [
              "invoice",
              "reminder",
              "thank_you"
            ]
          },
          "template_version": {
            "type": "integer",
            "minimum": 1
          },
          "recipient_email": {
            "type": "string",
            "format": "email"
          }
        },
        "additionalProperties": false
      },
      "EmailTestSendEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/EmailTestSend"
          }
        },
        "additionalProperties": false
      },
      "OutboxAggregate": {
        "type": "object",
        "required": [
          "type",
          "id",
          "sequence"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "sequence": {
            "type": "integer",
            "minimum": 1
          }
        },
        "additionalProperties": false
      },
      "ActivityLogActor": {
        "type": "object",
        "description": "Who caused the event. type and id are what the event recorded; name is resolved when the log is read, so it is the person's current name. name is null for a system actor and for an id that no user or contact carries any more.",
        "required": [
          "type",
          "id",
          "name"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "user",
              "contact",
              "system"
            ]
          },
          "id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "ActivityLog": {
        "type": "object",
        "required": [
          "event_id",
          "event_type",
          "aggregate",
          "actor",
          "payload",
          "occurred_at",
          "available_at",
          "recorded_at"
        ],
        "properties": {
          "event_id": {
            "type": "string"
          },
          "event_type": {
            "type": "string"
          },
          "aggregate": {
            "$ref": "#/components/schemas/OutboxAggregate"
          },
          "actor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ActivityLogActor"
              },
              {
                "type": "null"
              }
            ]
          },
          "payload": {
            "type": "object",
            "additionalProperties": true
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "available_at": {
            "type": "string",
            "format": "date-time"
          },
          "recorded_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ActivityLogPage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActivityLog"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        },
        "additionalProperties": false
      },
      "OutboxDelivery": {
        "type": "object",
        "required": [
          "subscriber_id",
          "event_id",
          "event_type",
          "aggregate",
          "status",
          "attempt_count",
          "next_attempt_at",
          "last_error_code",
          "delivered_at",
          "failed_at",
          "occurred_at",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "subscriber_id": {
            "type": "string"
          },
          "event_id": {
            "type": "string"
          },
          "event_type": {
            "type": "string"
          },
          "aggregate": {
            "$ref": "#/components/schemas/OutboxAggregate"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "delivered",
              "failed"
            ]
          },
          "attempt_count": {
            "type": "integer",
            "minimum": 0
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_error_code": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "subscriber_timeout",
                  "subscriber_rejected"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "delivered_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "failed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "OutboxDeliveryPage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OutboxDelivery"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/CountedPageMetadata"
          }
        },
        "additionalProperties": false
      },
      "OutboxDeliveryEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/OutboxDelivery"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "Links": {
        "type": "object",
        "required": [
          "self"
        ],
        "properties": {
          "self": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "PageLinks": {
        "type": "object",
        "required": [
          "self",
          "next"
        ],
        "properties": {
          "self": {
            "type": "string"
          },
          "next": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "PageMetadata": {
        "type": "object",
        "required": [
          "per_page",
          "next_cursor"
        ],
        "properties": {
          "per_page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "CountedPageMetadata": {
        "type": "object",
        "required": [
          "per_page",
          "next_cursor",
          "total"
        ],
        "properties": {
          "per_page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "Service": {
        "type": "object",
        "required": [
          "service",
          "version"
        ],
        "properties": {
          "service": {
            "const": "ezacto"
          },
          "version": {
            "const": "v1"
          }
        },
        "additionalProperties": false
      },
      "ServiceEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Service"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "TokenAuthentication": {
        "type": "object",
        "required": [
          "kind",
          "token_id",
          "scopes"
        ],
        "properties": {
          "kind": {
            "const": "token"
          },
          "token_id": {
            "type": "integer",
            "minimum": 1
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "time_entries:read",
                "time_entries:write",
                "projects:read",
                "projects:write",
                "clients:read",
                "clients:write",
                "invoices:read",
                "invoices:write",
                "expenses:read",
                "expenses:write",
                "team:read",
                "schedule:read",
                "schedule:write",
                "reports:read"
              ]
            }
          }
        },
        "additionalProperties": false
      },
      "SessionAuthentication": {
        "type": "object",
        "required": [
          "kind"
        ],
        "properties": {
          "kind": {
            "const": "session"
          }
        },
        "additionalProperties": false
      },
      "Whoami": {
        "type": "object",
        "required": [
          "user_id",
          "profile",
          "manager_grants",
          "authentication"
        ],
        "properties": {
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "profile": {
            "type": "string",
            "enum": [
              "member",
              "project_manager",
              "people_admin",
              "accounting",
              "executive_manager",
              "administrator"
            ]
          },
          "manager_grants": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "authentication": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TokenAuthentication"
              },
              {
                "$ref": "#/components/schemas/SessionAuthentication"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "WhoamiEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Whoami"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "GeneralResource": {
        "type": "object",
        "description": "Commercial fields are omitted without finance/admin authority or an explicit billable_rates_manager grant. The same authority is required to set them; resource read/write scopes still apply.",
        "x-commercial-fields": {
          "clients": [
            "payment_terms",
            "default_tax_pct",
            "default_tax2_pct",
            "default_discount_pct"
          ],
          "projects": [
            "billing_method",
            "bill_by",
            "billing_currency",
            "time_rounding_mode",
            "time_rounding_minutes"
          ],
          "contacts": [
            "invoice_recipient_status"
          ]
        },
        "required": [
          "id",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "GeneralMutationInput": {
        "type": "object",
        "description": "Commercial fields listed on GeneralResource require the same commercial authority for create and update, in addition to resource write scope.",
        "minProperties": 1,
        "additionalProperties": true
      },
      "GeneralResourceEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/GeneralResource"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "GeneralResourcePage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GeneralResource"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        },
        "additionalProperties": false
      },
      "ExpenseCategory": {
        "type": "object",
        "required": [
          "id",
          "name",
          "unit_name",
          "unit_price_cents",
          "is_active",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "unit_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "unit_price_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9000000000000
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ExpenseCategoryInput": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "unit_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "unit_price_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9000000000000
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ExpenseCategoryPatch": {
        "type": "object",
        "minProperties": 1,
        "properties": {
          "name": {
            "type": "string"
          },
          "unit_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "unit_price_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9000000000000
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ExpenseCategoryEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ExpenseCategory"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "ExpenseCategoryPage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExpenseCategory"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        },
        "additionalProperties": false
      },
      "UserRate": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "amount_cents",
          "start_date",
          "end_date",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "amount_cents": {
            "type": "integer",
            "minimum": 0
          },
          "start_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "end_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "UserRateInput": {
        "type": "object",
        "required": [
          "expected_version",
          "amount_cents"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "amount_cents": {
            "type": "integer",
            "minimum": 0
          },
          "start_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "UserRateEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/UserRate"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "UserRatePage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserRate"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        },
        "additionalProperties": false
      },
      "TeamStatus": {
        "type": "object",
        "required": [
          "enabled"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "TeamStatusEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TeamStatus"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "ActivityLogStatus": {
        "type": "object",
        "required": [
          "enabled"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ActivityLogStatusEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ActivityLogStatus"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "RollableActivityYearsEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/RollableActivityYears"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "RollableActivityYears": {
        "type": "object",
        "required": [
          "rollable"
        ],
        "properties": {
          "rollable": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "year",
                "entries"
              ],
              "properties": {
                "year": {
                  "type": "integer",
                  "minimum": 1
                },
                "entries": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "ActivityYearRolledEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ActivityYearRolled"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "ActivityYearRolled": {
        "type": "object",
        "required": [
          "year",
          "rolled"
        ],
        "properties": {
          "year": {
            "type": "integer",
            "minimum": 1
          },
          "rolled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "RollActivityYearInput": {
        "type": "object",
        "required": [
          "year"
        ],
        "properties": {
          "year": {
            "type": "integer",
            "minimum": 2000,
            "maximum": 9999
          }
        },
        "additionalProperties": false
      },
      "TeamNamedRelation": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "TeamPersonSummary": {
        "type": "object",
        "required": [
          "id",
          "first_name",
          "last_name",
          "email",
          "avatar_url",
          "profile",
          "is_owner",
          "is_contractor",
          "is_active",
          "weekly_capacity",
          "total_seconds",
          "billable_seconds",
          "nonbillable_seconds",
          "utilization_ppm",
          "running"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "profile": {
            "type": "string",
            "enum": [
              "member",
              "project_manager",
              "people_admin",
              "accounting",
              "executive_manager",
              "administrator"
            ]
          },
          "is_owner": {
            "type": "boolean"
          },
          "is_contractor": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean"
          },
          "weekly_capacity": {
            "type": "integer",
            "minimum": 0
          },
          "total_seconds": {
            "type": "integer"
          },
          "billable_seconds": {
            "type": "integer"
          },
          "nonbillable_seconds": {
            "type": "integer"
          },
          "utilization_ppm": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "running": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "TeamPersonSummaryPage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamPersonSummary"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        },
        "additionalProperties": false
      },
      "TeamProjectAssignment": {
        "type": "object",
        "required": [
          "id",
          "project_id",
          "project_name",
          "project_code",
          "client_id",
          "client_name",
          "is_active",
          "is_project_manager",
          "use_default_rates",
          "budget_seconds",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_name": {
            "type": "string"
          },
          "project_code": {
            "type": "string"
          },
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "client_name": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_project_manager": {
            "type": "boolean"
          },
          "use_default_rates": {
            "type": "boolean"
          },
          "hourly_rate_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "budget_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "TeamNotificationChannels": {
        "type": "object",
        "required": [
          "email",
          "desktop",
          "slack"
        ],
        "properties": {
          "email": {
            "type": "boolean"
          },
          "desktop": {
            "type": "boolean"
          },
          "slack": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "TeamNotificationChannelsInput": {
        "type": "object",
        "required": [
          "email",
          "desktop",
          "slack"
        ],
        "properties": {
          "email": {
            "type": "boolean"
          },
          "desktop": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "slack": {
            "type": "boolean",
            "enum": [
              false
            ]
          }
        },
        "additionalProperties": false
      },
      "TeamNotificationPreference": {
        "type": "object",
        "required": [
          "delivery_active",
          "daily_reminder_enabled",
          "reminder_time",
          "reminder_days",
          "channels",
          "include_in_team_reminders",
          "weekly_digest",
          "notify_project_deleted",
          "updated_at"
        ],
        "properties": {
          "delivery_active": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "daily_reminder_enabled": {
            "type": "boolean"
          },
          "reminder_time": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
              },
              {
                "type": "null"
              }
            ]
          },
          "reminder_days": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "monday",
                "tuesday",
                "wednesday",
                "thursday",
                "friday",
                "saturday",
                "sunday"
              ]
            }
          },
          "channels": {
            "$ref": "#/components/schemas/TeamNotificationChannels"
          },
          "include_in_team_reminders": {
            "type": "boolean"
          },
          "weekly_digest": {
            "type": "boolean"
          },
          "notify_project_deleted": {
            "type": "boolean"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "TeamPerson": {
        "type": "object",
        "required": [
          "id",
          "first_name",
          "last_name",
          "email",
          "telephone",
          "employee_id",
          "timezone",
          "is_contractor",
          "is_active",
          "has_access_to_all_future_projects",
          "weekly_capacity",
          "profile",
          "is_owner",
          "avatar_url",
          "version",
          "created_at",
          "updated_at",
          "roles",
          "departments",
          "project_assignments",
          "notifications"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "telephone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "employee_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "timezone": {
            "type": "string"
          },
          "is_contractor": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean"
          },
          "has_access_to_all_future_projects": {
            "type": "boolean"
          },
          "weekly_capacity": {
            "type": "integer",
            "minimum": 0
          },
          "profile": {
            "type": "string",
            "enum": [
              "member",
              "project_manager",
              "people_admin",
              "accounting",
              "executive_manager",
              "administrator"
            ]
          },
          "is_owner": {
            "type": "boolean"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "roles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamNamedRelation"
            }
          },
          "departments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamNamedRelation"
            }
          },
          "project_assignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamProjectAssignment"
            }
          },
          "billable_rates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserRate"
            }
          },
          "cost_rates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserRate"
            }
          },
          "notifications": {
            "$ref": "#/components/schemas/TeamNotificationPreference"
          }
        },
        "additionalProperties": false
      },
      "TeamPersonEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TeamPerson"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "TeamCatalogProject": {
        "type": "object",
        "required": [
          "id",
          "name",
          "code",
          "client_id",
          "client_name",
          "is_active"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "client_name": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "TeamCatalog": {
        "type": "object",
        "required": [
          "roles",
          "departments",
          "projects"
        ],
        "properties": {
          "roles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamNamedRelation"
            }
          },
          "departments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamNamedRelation"
            }
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamCatalogProject"
            }
          }
        },
        "additionalProperties": false
      },
      "TeamCatalogEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TeamCatalog"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "TeamPersonPatch": {
        "type": "object",
        "required": [
          "expected_version"
        ],
        "minProperties": 2,
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "first_name": {
            "type": "string",
            "minLength": 1
          },
          "last_name": {
            "type": "string",
            "minLength": 1
          },
          "telephone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "employee_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "timezone": {
            "type": "string",
            "minLength": 1
          },
          "is_contractor": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean"
          },
          "has_access_to_all_future_projects": {
            "type": "boolean"
          },
          "weekly_capacity": {
            "type": "integer",
            "minimum": 0
          },
          "profile": {
            "type": "string",
            "enum": [
              "member",
              "project_manager",
              "people_admin",
              "accounting",
              "executive_manager",
              "administrator"
            ]
          },
          "role_ids": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "integer",
              "minimum": 1
            }
          },
          "department_ids": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "integer",
              "minimum": 1
            }
          }
        },
        "additionalProperties": false
      },
      "TeamAssignmentInput": {
        "type": "object",
        "required": [
          "project_id",
          "is_project_manager"
        ],
        "properties": {
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "is_project_manager": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "TeamAssignmentReplaceInput": {
        "type": "object",
        "required": [
          "expected_version",
          "assignments"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "assignments": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "$ref": "#/components/schemas/TeamAssignmentInput"
            }
          }
        },
        "additionalProperties": false
      },
      "TeamNotificationInput": {
        "type": "object",
        "required": [
          "expected_version",
          "daily_reminder_enabled",
          "reminder_time",
          "reminder_days",
          "channels",
          "include_in_team_reminders",
          "weekly_digest",
          "notify_project_deleted"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "daily_reminder_enabled": {
            "type": "boolean"
          },
          "reminder_time": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
              },
              {
                "type": "null"
              }
            ]
          },
          "reminder_days": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "monday",
                "tuesday",
                "wednesday",
                "thursday",
                "friday",
                "saturday",
                "sunday"
              ]
            }
          },
          "channels": {
            "$ref": "#/components/schemas/TeamNotificationChannelsInput"
          },
          "include_in_team_reminders": {
            "type": "boolean"
          },
          "weekly_digest": {
            "type": "boolean"
          },
          "notify_project_deleted": {
            "type": "boolean",
            "enum": [
              false
            ]
          }
        },
        "additionalProperties": false
      },
      "ProfileNotificationInput": {
        "type": "object",
        "required": [
          "daily_reminder_enabled",
          "reminder_time",
          "reminder_days",
          "channels",
          "include_in_team_reminders",
          "weekly_digest",
          "notify_project_deleted"
        ],
        "properties": {
          "daily_reminder_enabled": {
            "type": "boolean"
          },
          "reminder_time": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
              },
              {
                "type": "null"
              }
            ]
          },
          "reminder_days": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "monday",
                "tuesday",
                "wednesday",
                "thursday",
                "friday",
                "saturday",
                "sunday"
              ]
            }
          },
          "channels": {
            "$ref": "#/components/schemas/TeamNotificationChannelsInput"
          },
          "include_in_team_reminders": {
            "type": "boolean"
          },
          "weekly_digest": {
            "type": "boolean"
          },
          "notify_project_deleted": {
            "type": "boolean",
            "enum": [
              false
            ]
          }
        },
        "additionalProperties": false
      },
      "ProfileNotificationEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TeamNotificationPreference"
          }
        },
        "additionalProperties": false
      },
      "TeamRateInput": {
        "type": "object",
        "required": [
          "expected_version",
          "kind",
          "amount_cents",
          "start_date"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "kind": {
            "type": "string",
            "enum": [
              "billable",
              "cost"
            ]
          },
          "amount_cents": {
            "type": "integer",
            "minimum": 0
          },
          "start_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "TeamRateRemovalInput": {
        "type": "object",
        "required": [
          "expected_version",
          "kind"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "kind": {
            "type": "string",
            "enum": [
              "billable",
              "cost"
            ]
          }
        },
        "additionalProperties": false
      },
      "ProjectMissingRatesInput": {
        "type": "object",
        "properties": {
          "fingerprint": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "additionalProperties": false
      },
      "ProjectMissingRatesEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ProjectMissingRates"
          }
        },
        "additionalProperties": false
      },
      "ProjectMissingRates": {
        "type": "object",
        "required": [
          "project_id",
          "hourly_rate_cents",
          "currency",
          "entry_count",
          "seconds",
          "earliest_date",
          "latest_date",
          "fingerprint",
          "applied_entries"
        ],
        "properties": {
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "hourly_rate_cents": {
            "type": "integer",
            "minimum": 0
          },
          "currency": {
            "type": "string"
          },
          "entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "seconds": {
            "type": "integer",
            "minimum": 0
          },
          "earliest_date": {
            "type": "string",
            "nullable": true
          },
          "latest_date": {
            "type": "string",
            "nullable": true
          },
          "fingerprint": {
            "type": "string"
          },
          "applied_entries": {
            "type": "integer",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "CostRateBackfillInput": {
        "type": "object",
        "required": [
          "from",
          "to",
          "cost_rate_cents",
          "reason"
        ],
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "cost_rate_cents": {
            "type": "integer",
            "minimum": 0
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "replace_captured": {
            "type": "boolean"
          },
          "apply": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "CostRateBackfillPeriod": {
        "type": "object",
        "required": [
          "month",
          "entry_count",
          "seconds",
          "cost_cents"
        ],
        "properties": {
          "month": {
            "type": "string"
          },
          "entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "seconds": {
            "type": "integer"
          },
          "cost_cents": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "CostRateBackfill": {
        "type": "object",
        "required": [
          "run_id",
          "applied",
          "user_id",
          "from",
          "to",
          "cost_rate_cents",
          "entry_count",
          "seconds",
          "cost_cents",
          "periods",
          "captured_entry_count",
          "running_entry_count"
        ],
        "properties": {
          "run_id": {
            "type": "string"
          },
          "applied": {
            "type": "boolean"
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "cost_rate_cents": {
            "type": "integer",
            "minimum": 0
          },
          "entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "seconds": {
            "type": "integer"
          },
          "cost_cents": {
            "type": "integer"
          },
          "periods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostRateBackfillPeriod"
            }
          },
          "captured_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "running_entry_count": {
            "type": "integer",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "CostRateBackfillEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CostRateBackfill"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "TeamCommandReceipt": {
        "type": "object",
        "required": [
          "target_user_id",
          "version",
          "resource_id",
          "occurred_at"
        ],
        "properties": {
          "target_user_id": {
            "type": "integer",
            "minimum": 1
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "resource_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "TeamCommandReceiptEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TeamCommandReceipt"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "ApiToken": {
        "type": "object",
        "required": [
          "id",
          "name",
          "scopes",
          "token_hint",
          "created_at",
          "last_used_at",
          "expires_at",
          "revoked_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "time_entries:read",
                "time_entries:write",
                "projects:read",
                "projects:write",
                "clients:read",
                "clients:write",
                "invoices:read",
                "invoices:write",
                "expenses:read",
                "expenses:write",
                "team:read",
                "schedule:read",
                "schedule:write",
                "reports:read"
              ]
            }
          },
          "token_hint": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "IssuedApiToken": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ApiToken"
          },
          {
            "type": "object",
            "required": [
              "token"
            ],
            "properties": {
              "token": {
                "type": "string"
              }
            }
          }
        ]
      },
      "CreateApiTokenInput": {
        "type": "object",
        "required": [
          "name",
          "scopes"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "scopes": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "time_entries:read",
                "time_entries:write",
                "projects:read",
                "projects:write",
                "clients:read",
                "clients:write",
                "invoices:read",
                "invoices:write",
                "expenses:read",
                "expenses:write",
                "team:read",
                "schedule:read",
                "schedule:write",
                "reports:read"
              ]
            }
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Omitted: the token expires one year after issue. Anyone may ask for a sooner expiry; only an administrator may ask for one more than a year away or for null (never). Others are refused with 422 and code too_long."
          }
        },
        "additionalProperties": false
      },
      "ApiTokenEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ApiToken"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "IssuedApiTokenEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/IssuedApiToken"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "ApiTokenListEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiToken"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "TimeEntry": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "project_id",
          "task_id",
          "spent_date",
          "seconds",
          "is_running",
          "billable",
          "budgeted",
          "approval_status",
          "is_locked",
          "minimum_note_length",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "task_id": {
            "type": "integer",
            "minimum": 1
          },
          "user_assignment_id": {
            "type": "integer",
            "minimum": 1
          },
          "task_assignment_id": {
            "type": "integer",
            "minimum": 1
          },
          "spent_date": {
            "type": "string",
            "format": "date"
          },
          "seconds": {
            "type": "integer"
          },
          "seconds_without_timer": {
            "type": "integer"
          },
          "rounded_seconds": {
            "type": "integer"
          },
          "is_running": {
            "type": "boolean"
          },
          "timer_started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "started_time": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-2][0-9]:[0-5][0-9]$"
              },
              {
                "type": "null"
              }
            ]
          },
          "ended_time": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-2][0-9]:[0-5][0-9]$"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "billable": {
            "type": "boolean"
          },
          "budgeted": {
            "type": "boolean"
          },
          "approval_status": {
            "type": "string",
            "enum": [
              "unsubmitted",
              "submitted",
              "approved"
            ]
          },
          "source_approval_status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "unsubmitted",
                  "submitted",
                  "approved"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "invoice_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "description": "Omitted without invoices:read authority (profile and token)."
          },
          "is_billed": {
            "type": "boolean",
            "description": "Omitted without invoices:read authority (profile and token)."
          },
          "is_locked": {
            "type": "boolean"
          },
          "locked_reason_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "locked_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "external_ref": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          },
          "calendar_event_ref": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          },
          "minimum_note_length": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          },
          "billable_rate_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_rate_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "TimeEntryInput": {
        "type": "object",
        "required": [
          "project_id",
          "task_id"
        ],
        "properties": {
          "user_id": {
            "type": "integer",
            "minimum": 1,
            "description": "Whose entry. Defaults to the acting user. Only an administrator may name somebody else, and only for stopped time: a timer is started by the person it tracks."
          },
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "task_id": {
            "type": "integer",
            "minimum": 1
          },
          "spent_date": {
            "type": "string",
            "format": "date"
          },
          "seconds": {
            "type": "integer",
            "minimum": 1,
            "description": "A duration entry's length. Not accepted with started_time or ended_time."
          },
          "started_time": {
            "type": "string",
            "description": "Canonical 24-hour HH:MM. With ended_time, a stopped start/end entry in either organization mode."
          },
          "ended_time": {
            "type": "string",
            "description": "Canonical 24-hour HH:MM. Requires started_time and spent_date."
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "budgeted": {
            "type": "boolean"
          },
          "external_ref": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          },
          "calendar_event_ref": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "TimeEntryPatch": {
        "type": "object",
        "minProperties": 1,
        "properties": {
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "task_id": {
            "type": "integer",
            "minimum": 1
          },
          "spent_date": {
            "type": "string",
            "format": "date"
          },
          "seconds": {
            "type": "integer",
            "minimum": 1
          },
          "started_time": {
            "type": "string"
          },
          "ended_time": {
            "type": "string"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "budgeted": {
            "type": "boolean"
          },
          "external_ref": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          },
          "calendar_event_ref": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "TimeEntryEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TimeEntry"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "TimeEntryPage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeEntry"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        },
        "additionalProperties": false
      },
      "CalendarCleanupStatus": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "pending",
          "manual_required",
          "revoked"
        ],
        "properties": {
          "pending": {
            "type": "integer",
            "minimum": 0
          },
          "manual_required": {
            "type": "integer",
            "minimum": 0
          },
          "revoked": {
            "type": "integer",
            "minimum": 0
          },
          "manual_confirmed": {
            "type": "integer",
            "minimum": 0
          },
          "operator_confirmed": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "CalendarProposal": {
        "type": "object",
        "required": [
          "id",
          "provider",
          "calendar_id",
          "event_id",
          "occurrence",
          "title",
          "starts_at",
          "ends_at",
          "status",
          "time_entry_id",
          "decided_at",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "provider": {
            "type": "string",
            "enum": [
              "google",
              "microsoft"
            ]
          },
          "calendar_id": {
            "type": "string"
          },
          "event_id": {
            "type": "string"
          },
          "occurrence": {
            "type": "string",
            "description": "Tells the instances of a recurring event apart; empty otherwise."
          },
          "title": {
            "type": "string"
          },
          "starts_at": {
            "type": "string",
            "format": "date-time"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "proposed",
              "accepted",
              "discarded",
              "cancelled"
            ]
          },
          "time_entry_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "description": "The entry an accepted proposal became; null until then."
          },
          "decided_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_changed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_cancelled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "CalendarProposalAcceptInput": {
        "type": "object",
        "required": [
          "project_id",
          "task_id"
        ],
        "properties": {
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "task_id": {
            "type": "integer",
            "minimum": 1
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Defaults to the event's title."
          },
          "budgeted": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "CalendarProposalEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CalendarProposal"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "CalendarProposalPage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalendarProposal"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        },
        "additionalProperties": false
      },
      "PlanningRevisionInput": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "additionalProperties": false
      },
      "Allocation": {
        "type": "object",
        "required": [
          "version",
          "id",
          "user_id",
          "project_id",
          "start_date",
          "end_date",
          "planned_seconds_per_week",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "description": "Included. Never before `start_date`."
          },
          "planned_seconds_per_week": {
            "type": "integer",
            "minimum": 1,
            "description": "Planned seconds in each week the range touches, between 1 and 604800."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "AllocationInput": {
        "type": "object",
        "required": [
          "user_id",
          "project_id",
          "start_date",
          "end_date",
          "planned_seconds_per_week"
        ],
        "properties": {
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "type": "string",
            "format": "date"
          },
          "planned_seconds_per_week": {
            "type": "integer",
            "minimum": 1
          }
        },
        "additionalProperties": false
      },
      "AllocationPatch": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "Version last read. Required from 2027-01-22; supplied values are always enforced."
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "type": "string",
            "format": "date"
          },
          "planned_seconds_per_week": {
            "type": "integer",
            "minimum": 1
          }
        },
        "additionalProperties": false
      },
      "AllocationEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Allocation"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "AllocationPage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Allocation"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        },
        "additionalProperties": false
      },
      "CapacityWeek": {
        "type": "object",
        "required": [
          "week_start",
          "planned_seconds",
          "time_off_seconds",
          "available_capacity_seconds",
          "tracked_seconds",
          "over_allocated"
        ],
        "properties": {
          "week_start": {
            "type": "string",
            "format": "date"
          },
          "planned_seconds": {
            "type": "integer",
            "minimum": 1
          },
          "time_off_seconds": {
            "type": "integer",
            "minimum": 1,
            "description": "Capacity removed by the person's time off in the week (Monday to Friday only, never more than the capacity)."
          },
          "available_capacity_seconds": {
            "type": "integer",
            "minimum": 1,
            "description": "`weekly_capacity_seconds` less `time_off_seconds`; what the plan is held against."
          },
          "tracked_seconds": {
            "type": "integer",
            "minimum": 1,
            "description": "Rounded time logged in the week; separate from the plan."
          },
          "over_allocated": {
            "type": "boolean",
            "description": "Planned exceeds available capacity (capacity less time off). A flag for the reader, never a refusal."
          }
        },
        "additionalProperties": false
      },
      "CapacityPerson": {
        "type": "object",
        "required": [
          "user_id",
          "first_name",
          "last_name",
          "weekly_capacity_seconds",
          "weeks"
        ],
        "properties": {
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "weekly_capacity_seconds": {
            "type": "integer",
            "minimum": 1
          },
          "weeks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CapacityWeek"
            }
          }
        },
        "additionalProperties": false
      },
      "Capacity": {
        "type": "object",
        "required": [
          "week_start_day",
          "weeks",
          "people"
        ],
        "properties": {
          "week_start_day": {
            "type": "string",
            "enum": [
              "saturday",
              "sunday",
              "monday"
            ]
          },
          "weeks": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date"
            }
          },
          "people": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CapacityPerson"
            }
          }
        },
        "additionalProperties": false
      },
      "CapacityEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Capacity"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "TimeOff": {
        "type": "object",
        "required": [
          "version",
          "id",
          "user_id",
          "start_date",
          "end_date",
          "kind",
          "seconds_per_day",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "description": "Included. Never before `start_date`."
          },
          "kind": {
            "type": "string",
            "enum": [
              "vacation",
              "sick",
              "holiday",
              "other"
            ]
          },
          "seconds_per_day": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "description": "Seconds away on each working day, between 1 and 86400; null is a whole day."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "TimeOffInput": {
        "type": "object",
        "required": [
          "user_id",
          "start_date",
          "end_date",
          "kind"
        ],
        "properties": {
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "type": "string",
            "format": "date"
          },
          "kind": {
            "type": "string",
            "enum": [
              "vacation",
              "sick",
              "holiday",
              "other"
            ]
          },
          "seconds_per_day": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "TimeOffPatch": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "Version last read. Required from 2027-01-22; supplied values are always enforced."
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "type": "string",
            "format": "date"
          },
          "kind": {
            "type": "string",
            "enum": [
              "vacation",
              "sick",
              "holiday",
              "other"
            ]
          },
          "seconds_per_day": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "TimeOffEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TimeOff"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "TimeOffPage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeOff"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        },
        "additionalProperties": false
      },
      "WorkItemConnection": {
        "type": "object",
        "required": [
          "id",
          "provider",
          "status",
          "owner_user_id",
          "credential_configured",
          "connected_at",
          "disconnected_at",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "provider": {
            "type": "string",
            "enum": [
              "github"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "disconnected"
            ]
          },
          "owner_user_id": {
            "type": "integer",
            "minimum": 1,
            "description": "The administrator who connected it."
          },
          "credential_configured": {
            "type": "boolean",
            "description": "Whether the deployment holds the provider's credential. The credential is never returned."
          },
          "connected_at": {
            "type": "string",
            "format": "date-time"
          },
          "disconnected_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "WorkItemConnectionInput": {
        "type": "object",
        "required": [
          "provider"
        ],
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "github"
            ]
          }
        },
        "additionalProperties": false
      },
      "WorkItemConnectionEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/WorkItemConnection"
          }
        },
        "additionalProperties": false
      },
      "WorkItemConnectionListEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkItemConnection"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "WorkItemLink": {
        "type": "object",
        "required": [
          "id",
          "connection_id",
          "provider",
          "time_entry_id",
          "project_id",
          "item_id",
          "url",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "connection_id": {
            "type": "integer",
            "minimum": 1
          },
          "provider": {
            "type": "string",
            "enum": [
              "github"
            ]
          },
          "time_entry_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "item_id": {
            "type": "string",
            "description": "The provider's own identity for the item."
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_by": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "WorkItemLinkInput": {
        "type": "object",
        "required": [
          "connection_id",
          "item_id"
        ],
        "properties": {
          "connection_id": {
            "type": "integer",
            "minimum": 1
          },
          "time_entry_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "item_id": {
            "type": "string"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "WorkItemLinkEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/WorkItemLink"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "WorkItemLinkPage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkItemLink"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        },
        "additionalProperties": false
      },
      "TimeEntrySettings": {
        "type": "object",
        "required": [
          "time_entry_mode",
          "time_format",
          "clock",
          "week_start_day",
          "time_rounding"
        ],
        "properties": {
          "time_rounding": {
            "$ref": "#/components/schemas/TimeRounding"
          },
          "time_entry_mode": {
            "type": "string",
            "enum": [
              "duration",
              "start_end"
            ]
          },
          "time_format": {
            "type": "string",
            "enum": [
              "decimal",
              "hours_minutes"
            ]
          },
          "clock": {
            "type": "string",
            "enum": [
              "12h",
              "24h"
            ]
          },
          "week_start_day": {
            "type": "string",
            "enum": [
              "saturday",
              "sunday",
              "monday"
            ]
          }
        },
        "additionalProperties": false
      },
      "TimeEntrySettingsEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TimeEntrySettings"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "TimeRounding": {
        "type": "object",
        "required": [
          "mode",
          "minutes"
        ],
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "exact",
              "up",
              "down",
              "nearest"
            ]
          },
          "minutes": {
            "type": "integer",
            "enum": [
              6,
              10,
              15,
              20,
              30,
              60
            ]
          }
        },
        "additionalProperties": false
      },
      "TimeRoundingPatch": {
        "type": "object",
        "minProperties": 1,
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "exact",
              "up",
              "down",
              "nearest"
            ]
          },
          "minutes": {
            "type": "integer",
            "enum": [
              6,
              10,
              15,
              20,
              30,
              60
            ]
          }
        },
        "additionalProperties": false
      },
      "TimeRoundingEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TimeRounding"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "EffectiveTimeRounding": {
        "type": "object",
        "required": [
          "mode",
          "minutes",
          "source"
        ],
        "description": "The rule an entry on a project is saved under, and whose it is.",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "exact",
              "up",
              "down",
              "nearest"
            ]
          },
          "minutes": {
            "type": "integer",
            "enum": [
              6,
              10,
              15,
              20,
              30,
              60
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "organization",
              "project"
            ]
          }
        },
        "additionalProperties": false
      },
      "TimeRoundingRecalculationScope": {
        "type": "object",
        "required": [
          "project_id",
          "from",
          "to"
        ],
        "properties": {
          "project_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "from": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "to": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "TimeRoundingRecalculationProject": {
        "type": "object",
        "required": [
          "project_id",
          "project_name",
          "time_rounding",
          "changed_entries",
          "rounded_seconds_before",
          "rounded_seconds_after"
        ],
        "properties": {
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_name": {
            "type": "string"
          },
          "time_rounding": {
            "$ref": "#/components/schemas/EffectiveTimeRounding"
          },
          "changed_entries": {
            "type": "integer",
            "minimum": 0
          },
          "rounded_seconds_before": {
            "type": "integer",
            "minimum": 0
          },
          "rounded_seconds_after": {
            "type": "integer",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "TimeRoundingRecalculationPreview": {
        "type": "object",
        "required": [
          "scope",
          "open_entries",
          "changed_entries",
          "rounded_seconds_before",
          "rounded_seconds_after",
          "earliest_spent_date",
          "latest_spent_date",
          "projects",
          "kept",
          "fingerprint"
        ],
        "properties": {
          "scope": {
            "$ref": "#/components/schemas/TimeRoundingRecalculationScope"
          },
          "open_entries": {
            "type": "integer",
            "minimum": 0
          },
          "changed_entries": {
            "type": "integer",
            "minimum": 0
          },
          "rounded_seconds_before": {
            "type": "integer",
            "minimum": 0
          },
          "rounded_seconds_after": {
            "type": "integer",
            "minimum": 0
          },
          "earliest_spent_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "latest_spent_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeRoundingRecalculationProject"
            }
          },
          "kept": {
            "type": "object",
            "required": [
              "invoiced",
              "approved",
              "locked",
              "other"
            ],
            "properties": {
              "invoiced": {
                "type": "integer",
                "minimum": 0
              },
              "approved": {
                "type": "integer",
                "minimum": 0
              },
              "locked": {
                "type": "integer",
                "minimum": 0
              },
              "other": {
                "type": "integer",
                "minimum": 0
              }
            },
            "additionalProperties": false
          },
          "fingerprint": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        },
        "additionalProperties": false
      },
      "TimeRoundingRecalculationPreviewEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TimeRoundingRecalculationPreview"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "TimeRoundingRecalculationRequest": {
        "type": "object",
        "required": [
          "fingerprint"
        ],
        "properties": {
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "fingerprint": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        },
        "additionalProperties": false
      },
      "TimeRoundingRecalculationApplied": {
        "type": "object",
        "required": [
          "recalculated_entries",
          "preview"
        ],
        "properties": {
          "recalculated_entries": {
            "type": "integer",
            "minimum": 0
          },
          "preview": {
            "$ref": "#/components/schemas/TimeRoundingRecalculationPreview"
          }
        },
        "additionalProperties": false
      },
      "TimeRoundingRecalculationAppliedEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TimeRoundingRecalculationApplied"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "TimeEntryNoteSettings": {
        "type": "object",
        "required": [
          "required",
          "minimum_length"
        ],
        "properties": {
          "required": {
            "type": "boolean"
          },
          "minimum_length": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          }
        },
        "additionalProperties": false
      },
      "TimeEntryNoteSettingsPatch": {
        "type": "object",
        "minProperties": 1,
        "properties": {
          "required": {
            "type": "boolean"
          },
          "minimum_length": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          }
        },
        "additionalProperties": false
      },
      "TimeEntryNoteSettingsEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TimeEntryNoteSettings"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "Profile": {
        "type": "object",
        "required": [
          "user_id",
          "timezone"
        ],
        "properties": {
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "timezone": {
            "type": "string",
            "minLength": 1
          },
          "effective_timezone": {
            "type": "string",
            "minLength": 1,
            "readOnly": true
          },
          "invoice_copy_to_self": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ProfilePatch": {
        "type": "object",
        "minProperties": 1,
        "properties": {
          "timezone": {
            "type": "string",
            "minLength": 1
          },
          "invoice_copy_to_self": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ProfileEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Profile"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "NativeAppleCapabilities": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "available",
          "lifecycle_version"
        ],
        "properties": {
          "available": {
            "type": "boolean"
          },
          "lifecycle_version": {
            "type": "integer",
            "const": 1
          }
        }
      },
      "NativeAppleSignInInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "identityToken",
          "bindingReceipt"
        ],
        "properties": {
          "identityToken": {
            "type": "string",
            "maxLength": 16384
          },
          "bindingReceipt": {
            "type": "string",
            "maxLength": 16384
          },
          "fullName": {
            "type": "object",
            "properties": {
              "givenName": {
                "type": "string"
              },
              "familyName": {
                "type": "string"
              }
            }
          }
        }
      },
      "NativeAppleSignInEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "ok"
            ],
            "additionalProperties": false,
            "properties": {
              "ok": {
                "type": "boolean",
                "const": true
              }
            }
          }
        }
      },
      "AppleLifecycleProofInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "receipt"
        ],
        "properties": {
          "receipt": {
            "type": "string",
            "maxLength": 16384
          }
        }
      },
      "AppleCleanupStatus": {
        "type": "string",
        "enum": [
          "not_linked",
          "pending",
          "revoked",
          "manual_required"
        ]
      },
      "AccountClosureInventoryItem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "location",
          "count",
          "category"
        ],
        "properties": {
          "location": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "minimum": 1
          },
          "category": {
            "type": "string",
            "enum": [
              "time_and_worker_attribution",
              "billing_and_payments",
              "audit_and_security",
              "legal_hold"
            ]
          }
        }
      },
      "AccountClosureRecord": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "request_id",
          "user_id",
          "actor_user_id",
          "closed_at",
          "policy_version",
          "policy_snapshot",
          "inventory",
          "retained_identity",
          "apple_cleanup"
        ],
        "properties": {
          "request_id": {
            "type": "string"
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "actor_user_id": {
            "type": "integer",
            "minimum": 1
          },
          "closed_at": {
            "type": "string",
            "format": "date-time"
          },
          "policy_version": {
            "type": "integer",
            "minimum": 1
          },
          "policy_snapshot": {
            "$ref": "#/components/schemas/AccountRetentionPolicy"
          },
          "inventory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountClosureInventoryItem"
            }
          },
          "retained_identity": {
            "type": "boolean"
          },
          "calendar_cleanup": {
            "$ref": "#/components/schemas/CalendarCleanupStatus"
          },
          "apple_cleanup": {
            "$ref": "#/components/schemas/AppleCleanupStatus"
          }
        }
      },
      "AccountClosurePreview": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "request_id",
          "user_id",
          "request_version",
          "review_token",
          "policy_version",
          "policy_snapshot",
          "inventory",
          "uncovered_categories",
          "owner_transfer_required",
          "running_timer",
          "closure"
        ],
        "properties": {
          "apple_cleanup_retry_available": {
            "type": "boolean"
          },
          "request_id": {
            "type": "string"
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "request_version": {
            "type": "integer",
            "minimum": 1
          },
          "review_token": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "policy_version": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "policy_snapshot": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountRetentionPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "inventory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountClosureInventoryItem"
            }
          },
          "uncovered_categories": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "time_and_worker_attribution",
                "billing_and_payments",
                "audit_and_security",
                "legal_hold"
              ]
            }
          },
          "owner_transfer_required": {
            "type": "boolean"
          },
          "running_timer": {
            "type": "boolean"
          },
          "closure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountClosureRecord"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "EmptyObject": {
        "type": "object",
        "additionalProperties": false,
        "properties": {}
      },
      "AppleCleanupStatusEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "apple_cleanup"
            ],
            "properties": {
              "apple_cleanup": {
                "$ref": "#/components/schemas/AppleCleanupStatus"
              }
            }
          }
        }
      },
      "RetentionReview": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "request_id",
          "area",
          "kind",
          "original_reason",
          "original_period",
          "decision",
          "basis",
          "release_condition",
          "evidence",
          "next_review_at",
          "hold_active",
          "version",
          "reviewed_at",
          "actor_user_id"
        ],
        "properties": {
          "request_id": {
            "type": "string"
          },
          "area": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "retained_category",
              "downstream"
            ]
          },
          "original_reason": {
            "type": "string"
          },
          "original_period": {
            "type": "string"
          },
          "decision": {
            "type": "string",
            "enum": [
              "pending",
              "retain",
              "removed",
              "not_applicable",
              "failed",
              "release_hold"
            ]
          },
          "basis": {
            "type": "string"
          },
          "release_condition": {
            "type": "string"
          },
          "evidence": {
            "type": "string"
          },
          "next_review_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "hold_active": {
            "type": "boolean"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "reviewed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "actor_user_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "RetentionReviewListEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RetentionReview"
            }
          }
        }
      },
      "RetentionReviewEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/RetentionReview"
          }
        }
      },
      "RetentionReviewInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "expected_version",
          "decision",
          "basis",
          "release_condition",
          "evidence",
          "next_review_at",
          "acknowledged"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 1
          },
          "decision": {
            "type": "string",
            "enum": [
              "retain",
              "removed",
              "not_applicable",
              "failed",
              "release_hold"
            ]
          },
          "basis": {
            "type": "string",
            "maxLength": 2000
          },
          "release_condition": {
            "type": "string",
            "maxLength": 2000
          },
          "evidence": {
            "type": "string",
            "maxLength": 2000
          },
          "next_review_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "acknowledged": {
            "type": "boolean",
            "const": true
          }
        }
      },
      "DeletionCompletionInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "expected_request_version",
          "expected_reviews",
          "acknowledged"
        ],
        "properties": {
          "apple_historical_manual_verified": {
            "type": "boolean"
          },
          "expected_request_version": {
            "type": "integer",
            "minimum": 1
          },
          "expected_reviews": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "minimum": 1
            }
          },
          "acknowledged": {
            "type": "boolean",
            "const": true
          }
        }
      },
      "DeletionCompletionEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "completed_at",
              "confirmation"
            ],
            "properties": {
              "completed_at": {
                "type": "string",
                "format": "date-time"
              },
              "confirmation": {
                "type": "string"
              }
            }
          }
        }
      },
      "AccountClosureInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "expected_version",
          "expected_policy_version",
          "review_token",
          "acknowledged"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 1
          },
          "expected_policy_version": {
            "type": "integer",
            "minimum": 1
          },
          "review_token": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "acknowledged": {
            "type": "boolean",
            "const": true
          }
        }
      },
      "AccountClosurePreviewEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AccountClosurePreview"
          }
        }
      },
      "AccountClosureRecordEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AccountClosureRecord"
          }
        }
      },
      "AccountDeletionStatusAccess": {
        "type": "object",
        "required": [
          "token",
          "expires_at",
          "url"
        ],
        "additionalProperties": false,
        "properties": {
          "token": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "AccountDeletionTrackingInput": {
        "type": "object",
        "required": [
          "token"
        ],
        "additionalProperties": false,
        "properties": {
          "token": {
            "type": "string",
            "maxLength": 100
          }
        }
      },
      "AccountDeletionRetainedDisclosure": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "category",
          "reason",
          "period",
          "review_after_days",
          "review_due"
        ],
        "properties": {
          "category": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "period": {
            "type": "string"
          },
          "review_after_days": {
            "type": "integer",
            "minimum": 1
          },
          "review_due": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AccountDeletionClosureDisclosure": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "retained_records",
          "backup_handling",
          "user_notice",
          "operator_contact"
        ],
        "properties": {
          "retained_records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountDeletionRetainedDisclosure"
            }
          },
          "backup_handling": {
            "type": "string"
          },
          "user_notice": {
            "type": "string"
          },
          "operator_contact": {
            "type": "string"
          }
        }
      },
      "AccountDeletionTrackingStatus": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "request_id",
          "status",
          "requested_at",
          "expected_completion_at",
          "closed_at",
          "completed_at",
          "message",
          "completion_confirmation",
          "policy_version",
          "policy_snapshot",
          "policy_reviewed",
          "closure_disclosure",
          "operator_contact",
          "expires_at"
        ],
        "properties": {
          "calendar_cleanup": {
            "$ref": "#/components/schemas/CalendarCleanupStatus"
          },
          "apple_cleanup": {
            "$ref": "#/components/schemas/AppleCleanupStatus"
          },
          "request_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "in_progress",
              "action_required",
              "completed"
            ]
          },
          "requested_at": {
            "type": "string",
            "format": "date-time"
          },
          "expected_completion_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "closed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "message": {
            "type": "string"
          },
          "completion_confirmation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "policy_version": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "policy_snapshot": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountRetentionPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "policy_reviewed": {
            "type": "boolean"
          },
          "closure_disclosure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountDeletionClosureDisclosure"
              },
              {
                "type": "null"
              }
            ]
          },
          "operator_contact": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AccountDeletionTrackingEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AccountDeletionTrackingStatus"
          }
        }
      },
      "AccountDeletionSubmission": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "expected_policy_version": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "AccountDeletionUpdate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "expected_version",
          "status",
          "message",
          "expected_completion_at"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "in_progress",
              "action_required"
            ]
          },
          "message": {
            "type": "string",
            "maxLength": 5000
          },
          "expected_completion_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "AccountDeletionRecord": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "user_id",
          "requested_at",
          "policy_version",
          "policy_snapshot",
          "policy_reviewed",
          "status",
          "version",
          "message",
          "response_target_at",
          "expected_completion_at",
          "completed_at",
          "completion_confirmation",
          "notification",
          "notification_updated_at",
          "notification_delivery_id",
          "updated_at"
        ],
        "properties": {
          "calendar_cleanup": {
            "$ref": "#/components/schemas/CalendarCleanupStatus"
          },
          "apple_cleanup": {
            "$ref": "#/components/schemas/AppleCleanupStatus"
          },
          "id": {
            "type": "string"
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "requested_at": {
            "type": "string",
            "format": "date-time"
          },
          "policy_version": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "policy_snapshot": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountRetentionPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "policy_reviewed": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "in_progress",
              "action_required",
              "completed"
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "message": {
            "type": "string"
          },
          "response_target_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "expected_completion_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "completion_confirmation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "notification": {
            "type": "string",
            "enum": [
              "pending",
              "sending",
              "queued",
              "failed",
              "unavailable"
            ]
          },
          "notification_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "notification_delivery_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AccountDeletionStatusEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountDeletionRecord"
              },
              {
                "type": "null"
              }
            ]
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        }
      },
      "AccountDeletionDetailEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AccountDeletionRecord"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "AccountDeletionListEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountDeletionRecord"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        }
      },
      "AccountDeletionRequest": {
        "type": "object",
        "required": [
          "user_id",
          "requested_at"
        ],
        "properties": {
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "requested_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "AccountDeletionRequestEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountDeletionRecord"
              },
              {
                "$ref": "#/components/schemas/AccountDeletionRequest"
              }
            ]
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "status_access": {
            "$ref": "#/components/schemas/AccountDeletionStatusAccess"
          }
        }
      },
      "TimeEntryOption": {
        "type": "object",
        "required": [
          "project_id",
          "task_id",
          "minimum_note_length",
          "time_rounding"
        ],
        "properties": {
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "task_id": {
            "type": "integer",
            "minimum": 1
          },
          "time_rounding": {
            "$ref": "#/components/schemas/EffectiveTimeRounding"
          },
          "minimum_note_length": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          }
        },
        "additionalProperties": false
      },
      "TimeEntryOptionListEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeEntryOption"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "TimesheetSubmission": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "user_name",
          "period_start",
          "period_end",
          "status",
          "origin",
          "source_status",
          "source_observed_at",
          "submitted_by_user_id",
          "submitted_at",
          "reviewed_by_user_id",
          "reviewed_at",
          "rejection_reason",
          "version",
          "entry_count",
          "expense_count",
          "total_seconds",
          "billable_seconds",
          "nonbillable_seconds",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "user_name": {
            "type": "string"
          },
          "period_start": {
            "type": "string",
            "format": "date"
          },
          "period_end": {
            "type": "string",
            "format": "date"
          },
          "status": {
            "type": "string",
            "enum": [
              "unsubmitted",
              "submitted",
              "approved"
            ]
          },
          "origin": {
            "type": "string",
            "enum": [
              "native",
              "harvest_import",
              "legacy_backfill"
            ]
          },
          "source_status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "submitted",
                  "approved"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "source_observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "submitted_by_user_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "submitted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "automatic_approval": {
            "type": "object",
            "required": [
              "actor",
              "authorized_by_user_id",
              "window_days",
              "effective_from",
              "submitted_at",
              "approved_at",
              "command_id"
            ],
            "properties": {
              "actor": {
                "type": "string",
                "enum": [
                  "system"
                ]
              },
              "authorized_by_user_id": {
                "type": "integer",
                "minimum": 1
              },
              "window_days": {
                "type": "integer",
                "minimum": 1,
                "maximum": 60
              },
              "effective_from": {
                "type": "string",
                "format": "date-time"
              },
              "submitted_at": {
                "type": "string",
                "format": "date-time"
              },
              "approved_at": {
                "type": "string",
                "format": "date-time"
              },
              "command_id": {
                "type": "string"
              }
            }
          },
          "reviewed_by_user_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "reviewed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "rejection_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "expense_count": {
            "type": "integer",
            "minimum": 0
          },
          "total_seconds": {
            "type": "integer"
          },
          "billable_seconds": {
            "type": "integer"
          },
          "nonbillable_seconds": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "TimesheetSubmissionInput": {
        "type": "object",
        "required": [
          "period_start",
          "period_end"
        ],
        "properties": {
          "period_start": {
            "type": "string",
            "format": "date"
          },
          "period_end": {
            "type": "string",
            "format": "date"
          }
        },
        "additionalProperties": false
      },
      "TimesheetSubmissionEntry": {
        "type": "object",
        "required": [
          "id",
          "spent_date",
          "project_id",
          "project_name",
          "task_id",
          "task_name",
          "seconds",
          "notes"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "spent_date": {
            "type": "string",
            "format": "date"
          },
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_name": {
            "type": "string"
          },
          "task_id": {
            "type": "integer",
            "minimum": 1
          },
          "task_name": {
            "type": "string"
          },
          "seconds": {
            "type": "integer"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "TimesheetSubmissionExpense": {
        "type": "object",
        "required": [
          "id",
          "spent_date",
          "project_id",
          "project_name",
          "expense_category_id",
          "expense_category_name",
          "total_cost_cents",
          "currency",
          "notes"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "spent_date": {
            "type": "string",
            "format": "date"
          },
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_name": {
            "type": "string"
          },
          "expense_category_id": {
            "type": "integer",
            "minimum": 1
          },
          "expense_category_name": {
            "type": "string"
          },
          "total_cost_cents": {
            "type": "integer",
            "minimum": -9000000000000,
            "maximum": 9000000000000
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "TimesheetSubmissionDetail": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "user_name",
          "period_start",
          "period_end",
          "status",
          "origin",
          "source_status",
          "source_observed_at",
          "submitted_by_user_id",
          "submitted_at",
          "reviewed_by_user_id",
          "reviewed_at",
          "rejection_reason",
          "version",
          "entry_count",
          "expense_count",
          "total_seconds",
          "billable_seconds",
          "nonbillable_seconds",
          "created_at",
          "updated_at",
          "entries",
          "expenses"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "user_name": {
            "type": "string"
          },
          "period_start": {
            "type": "string",
            "format": "date"
          },
          "period_end": {
            "type": "string",
            "format": "date"
          },
          "status": {
            "type": "string",
            "enum": [
              "unsubmitted",
              "submitted",
              "approved"
            ]
          },
          "origin": {
            "type": "string",
            "enum": [
              "native",
              "harvest_import",
              "legacy_backfill"
            ]
          },
          "source_status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "submitted",
                  "approved"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "source_observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "submitted_by_user_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "submitted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "reviewed_by_user_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "reviewed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "rejection_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "expense_count": {
            "type": "integer",
            "minimum": 0
          },
          "total_seconds": {
            "type": "integer"
          },
          "billable_seconds": {
            "type": "integer"
          },
          "nonbillable_seconds": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimesheetSubmissionEntry"
            }
          },
          "expenses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimesheetSubmissionExpense"
            }
          }
        },
        "additionalProperties": false
      },
      "TimesheetRejectionInput": {
        "type": "object",
        "required": [
          "reason"
        ],
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000,
            "pattern": "\\S"
          }
        },
        "additionalProperties": false
      },
      "TimesheetWithdrawalInput": {
        "type": "object",
        "required": [
          "reason"
        ],
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000,
            "pattern": "\\S"
          }
        },
        "additionalProperties": false
      },
      "TimesheetBulkApprovalInput": {
        "type": "object",
        "required": [
          "submissions"
        ],
        "properties": {
          "submissions": {
            "type": "array",
            "minItems": 1,
            "maxItems": 50,
            "items": {
              "type": "object",
              "required": [
                "id",
                "expected_version"
              ],
              "properties": {
                "id": {
                  "type": "integer",
                  "minimum": 1
                },
                "expected_version": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "TimesheetBulkApprovalResult": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimesheetSubmission"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "TimesheetSubmissionEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TimesheetSubmission"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "TimesheetSubmissionDetailEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TimesheetSubmissionDetail"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "TimesheetSubmissionPage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimesheetSubmission"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        },
        "additionalProperties": false
      },
      "TimesheetDeadline": {
        "type": "object",
        "required": [
          "day",
          "time"
        ],
        "properties": {
          "day": {
            "type": "string",
            "enum": [
              "sunday",
              "monday",
              "tuesday",
              "wednesday",
              "thursday",
              "friday",
              "saturday"
            ]
          },
          "time": {
            "type": "string",
            "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
          }
        },
        "additionalProperties": false
      },
      "TimesheetLockPolicy": {
        "type": "object",
        "required": [
          "auto_lock",
          "timesheet_deadline",
          "timezone",
          "week_start_day",
          "updated_at"
        ],
        "properties": {
          "auto_lock": {
            "type": "boolean"
          },
          "timesheet_deadline": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TimesheetDeadline"
              },
              {
                "type": "null"
              }
            ]
          },
          "timezone": {
            "type": "string"
          },
          "week_start_day": {
            "type": "string",
            "enum": [
              "saturday",
              "sunday",
              "monday"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "TimesheetLockPolicyPatch": {
        "type": "object",
        "minProperties": 1,
        "properties": {
          "auto_lock": {
            "type": "boolean"
          },
          "timesheet_deadline": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TimesheetDeadline"
              },
              {
                "type": "null"
              }
            ]
          },
          "timezone": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "TimesheetLockPolicyEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TimesheetLockPolicy"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "TimesheetLockWindow": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "period_start",
          "period_end",
          "reason",
          "locked_by_user_id",
          "locked_at",
          "unlocked_by_user_id",
          "unlocked_at",
          "unlock_reason",
          "active"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "kind": {
            "type": "string",
            "enum": [
              "manual",
              "auto"
            ]
          },
          "period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "period_end": {
            "type": "string",
            "format": "date"
          },
          "reason": {
            "type": "string"
          },
          "locked_by_user_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "locked_at": {
            "type": "string",
            "format": "date-time"
          },
          "unlocked_by_user_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "unlocked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "unlock_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "active": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "TimesheetManualLockInput": {
        "type": "object",
        "required": [
          "locked_through",
          "reason"
        ],
        "properties": {
          "locked_through": {
            "type": "string",
            "format": "date"
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000,
            "pattern": "\\S"
          }
        },
        "additionalProperties": false
      },
      "TimesheetUnlockInput": {
        "type": "object",
        "required": [
          "reason"
        ],
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000,
            "pattern": "\\S"
          }
        },
        "additionalProperties": false
      },
      "TimesheetLockWindowEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TimesheetLockWindow"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "TimesheetLockWindowPage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimesheetLockWindow"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        },
        "additionalProperties": false
      },
      "Expense": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "project_id",
          "expense_category_id",
          "spent_date",
          "total_cost_cents",
          "billable",
          "approval_status",
          "is_locked",
          "reimbursable",
          "reimbursement_status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "expense_category_id": {
            "type": "integer",
            "minimum": 1
          },
          "spent_date": {
            "type": "string",
            "format": "date"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "units": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "total_cost_cents": {
            "type": "integer",
            "minimum": -9000000000000,
            "maximum": 9000000000000
          },
          "billable": {
            "type": "boolean"
          },
          "approval_status": {
            "type": "string",
            "enum": [
              "unsubmitted",
              "submitted",
              "approved"
            ]
          },
          "source_approval_status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "unsubmitted",
                  "submitted",
                  "approved"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "invoice_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "description": "Omitted without invoices:read authority (profile and token)."
          },
          "is_billed": {
            "type": "boolean",
            "description": "Omitted without invoices:read authority (profile and token)."
          },
          "is_locked": {
            "type": "boolean"
          },
          "locked_reason_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "locked_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reimbursable": {
            "type": "boolean"
          },
          "reimbursement_status": {
            "type": "string",
            "enum": [
              "none",
              "pending",
              "approved",
              "paid"
            ]
          },
          "payout_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ExpenseInput": {
        "type": "object",
        "required": [
          "project_id",
          "expense_category_id",
          "spent_date"
        ],
        "properties": {
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "expense_category_id": {
            "type": "integer",
            "minimum": 1
          },
          "spent_date": {
            "type": "string",
            "format": "date"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "units": {
            "type": "number",
            "minimum": 0
          },
          "total_cost_cents": {
            "type": "integer",
            "minimum": 0
          },
          "billable": {
            "type": "boolean"
          },
          "reimbursable": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ExpensePatch": {
        "type": "object",
        "minProperties": 1,
        "properties": {
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "expense_category_id": {
            "type": "integer",
            "minimum": 1
          },
          "spent_date": {
            "type": "string",
            "format": "date"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "units": {
            "type": "number",
            "minimum": 0
          },
          "total_cost_cents": {
            "type": "integer",
            "minimum": 0
          },
          "billable": {
            "type": "boolean"
          },
          "reimbursable": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ExpenseEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Expense"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "ExpensePage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Expense"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        },
        "additionalProperties": false
      },
      "InvoiceLine": {
        "type": "object",
        "required": [
          "id",
          "invoice_id",
          "position",
          "kind",
          "description",
          "quantity",
          "unit_price_cents",
          "amount_cents",
          "taxed",
          "taxed2",
          "project_id",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "invoice_id": {
            "type": "integer",
            "minimum": 1
          },
          "position": {
            "type": "integer",
            "minimum": 0
          },
          "kind": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "quantity": {
            "type": "number"
          },
          "unit_price_cents": {
            "type": "integer"
          },
          "amount_cents": {
            "type": "integer"
          },
          "taxed": {
            "type": "boolean"
          },
          "taxed2": {
            "type": "boolean"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "Invoice": {
        "type": "object",
        "required": [
          "id",
          "client_id",
          "created_by_user_id",
          "number",
          "subject",
          "purchase_order",
          "notes",
          "currency",
          "issue_date",
          "due_date",
          "payment_terms",
          "state",
          "version",
          "close_reason",
          "close_write_off_cents",
          "sent_at",
          "paid_at",
          "paid_date",
          "closed_at",
          "period_start",
          "period_end",
          "project_id",
          "retainer_id",
          "recurring_invoice_id",
          "estimate_id",
          "reminder_policy",
          "tax_rate_ppm",
          "tax2_rate_ppm",
          "discount_rate_ppm",
          "amount_cents",
          "due_amount_cents",
          "tax_amount_cents",
          "tax2_amount_cents",
          "discount_amount_cents",
          "written_off_cents",
          "payment_options",
          "reference_token",
          "created_at",
          "updated_at",
          "line_items"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "created_by_user_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "number": {
            "type": "string"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "purchase_order": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "issue_date": {
            "type": "string",
            "format": "date"
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "payment_terms": {
            "type": "string",
            "enum": [
              "upon_receipt",
              "net_15",
              "net_30",
              "net_45",
              "net_60",
              "custom"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "draft",
              "open",
              "paid",
              "closed"
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "close_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "cancelled",
                  "written_off",
                  "source_closed"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "close_write_off_cents": {
            "type": "integer",
            "minimum": 0
          },
          "sent_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "paid_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "paid_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "closed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "retainer_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "recurring_invoice_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "estimate_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "reminder_policy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InvoiceReminderPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_rate_ppm": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000
              },
              {
                "type": "null"
              }
            ]
          },
          "tax2_rate_ppm": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000
              },
              {
                "type": "null"
              }
            ]
          },
          "discount_rate_ppm": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000
              },
              {
                "type": "null"
              }
            ]
          },
          "amount_cents": {
            "type": "integer"
          },
          "due_amount_cents": {
            "type": "integer",
            "minimum": 0
          },
          "tax_amount_cents": {
            "type": "integer"
          },
          "tax2_amount_cents": {
            "type": "integer"
          },
          "discount_amount_cents": {
            "type": "integer"
          },
          "written_off_cents": {
            "type": "integer",
            "minimum": 0
          },
          "payment_options": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "stripe_checkout",
                "paypal_checkout",
                "quickbooks_checkout",
                "mercury_transfer",
                "wise_transfer"
              ]
            }
          },
          "reference_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceLine"
            }
          }
        },
        "additionalProperties": false
      },
      "InvoiceEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Invoice"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "InvoicePage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Invoice"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        },
        "additionalProperties": false
      },
      "EstimateLine": {
        "type": "object",
        "required": [
          "id",
          "estimate_id",
          "position",
          "kind",
          "description",
          "quantity",
          "unit_price_cents",
          "amount_cents",
          "taxed",
          "taxed2",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "estimate_id": {
            "type": "integer",
            "minimum": 1
          },
          "position": {
            "type": "integer",
            "minimum": 0
          },
          "kind": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "quantity": {
            "type": "number"
          },
          "unit_price_cents": {
            "type": "integer"
          },
          "amount_cents": {
            "type": "integer"
          },
          "taxed": {
            "type": "boolean"
          },
          "taxed2": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "Estimate": {
        "type": "object",
        "required": [
          "id",
          "client_id",
          "created_by_user_id",
          "number",
          "purchase_order",
          "subject",
          "notes",
          "currency",
          "state",
          "version",
          "issue_date",
          "sent_at",
          "accepted_at",
          "declined_at",
          "tax_rate_ppm",
          "tax2_rate_ppm",
          "discount_rate_ppm",
          "amount_cents",
          "tax_amount_cents",
          "tax2_amount_cents",
          "discount_amount_cents",
          "created_at",
          "updated_at",
          "expires_on",
          "effective_expires_on",
          "line_items"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "created_by_user_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "number": {
            "type": "string"
          },
          "purchase_order": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "state": {
            "type": "string",
            "enum": [
              "draft",
              "sent",
              "accepted",
              "declined"
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "issue_date": {
            "type": "string",
            "format": "date"
          },
          "sent_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "accepted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "declined_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_rate_ppm": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000
              },
              {
                "type": "null"
              }
            ]
          },
          "tax2_rate_ppm": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000
              },
              {
                "type": "null"
              }
            ]
          },
          "discount_rate_ppm": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000
              },
              {
                "type": "null"
              }
            ]
          },
          "amount_cents": {
            "type": "integer"
          },
          "tax_amount_cents": {
            "type": "integer"
          },
          "tax2_amount_cents": {
            "type": "integer"
          },
          "discount_amount_cents": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "effective_expires_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EstimateLine"
            }
          }
        },
        "additionalProperties": false
      },
      "EstimateContent": {
        "type": "object",
        "required": [
          "subject",
          "notes",
          "currency",
          "tax_rate_ppm",
          "tax2_rate_ppm",
          "discount_rate_ppm",
          "lines"
        ],
        "properties": {
          "subject": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 20000
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "tax_rate_ppm": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000
              },
              {
                "type": "null"
              }
            ]
          },
          "tax2_rate_ppm": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000
              },
              {
                "type": "null"
              }
            ]
          },
          "discount_rate_ppm": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000
              },
              {
                "type": "null"
              }
            ]
          },
          "lines": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/EstimateContentLine"
            }
          }
        },
        "additionalProperties": false
      },
      "EstimateContentLine": {
        "type": "object",
        "required": [
          "kind",
          "description",
          "quantity",
          "unit_price_cents",
          "taxed",
          "taxed2"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10000
              },
              {
                "type": "null"
              }
            ]
          },
          "quantity": {
            "type": "number",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "unit_price_cents": {
            "type": "integer",
            "minimum": -9000000000000,
            "maximum": 9000000000000
          },
          "taxed": {
            "type": "boolean"
          },
          "taxed2": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "EstimateTemplate": {
        "type": "object",
        "required": [
          "id",
          "name",
          "version",
          "archived",
          "content",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "archived": {
            "type": "boolean"
          },
          "content": {
            "$ref": "#/components/schemas/EstimateContent"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "EstimateTemplateInput": {
        "type": "object",
        "required": [
          "name",
          "content"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "content": {
            "$ref": "#/components/schemas/EstimateContent"
          }
        },
        "additionalProperties": false
      },
      "EstimateTemplateUpdateInput": {
        "type": "object",
        "required": [
          "name",
          "content",
          "expected_version"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "content": {
            "$ref": "#/components/schemas/EstimateContent"
          },
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "archived": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "MigrationLoadStatus": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "status",
          "snapshot_sha256",
          "source_rows",
          "resource",
          "rows_done",
          "sequence",
          "attempts",
          "error_code",
          "created_at",
          "started_at",
          "completed_at",
          "source_cleaned_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "ready",
              "queued",
              "running",
              "completed",
              "failed",
              "cancelled"
            ]
          },
          "snapshot_sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "source_rows": {
            "type": "integer",
            "minimum": 0
          },
          "resource": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "rows_done": {
            "type": "integer",
            "minimum": 0
          },
          "sequence": {
            "type": "integer",
            "minimum": 0
          },
          "attempts": {
            "type": "integer",
            "minimum": 0
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_cleaned_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "MigrationLoadStatusEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MigrationLoadStatus"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "EstimateTemplateEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/EstimateTemplate"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "EstimateTemplateListEnvelope": {
        "type": "object",
        "required": [
          "data",
          "truncated"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EstimateTemplate"
            }
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "EstimateDraftInput": {
        "type": "object",
        "required": [
          "client_id",
          "number",
          "issue_date",
          "content"
        ],
        "properties": {
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "number": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "issue_date": {
            "type": "string",
            "format": "date"
          },
          "content": {
            "$ref": "#/components/schemas/EstimateContent"
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "template_version": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "EstimateDraftEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "integer",
                "minimum": 1
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "EstimateEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Estimate"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "EstimateExpiryInput": {
        "type": "object",
        "required": [
          "expected_version",
          "expires_on"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "expires_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "EstimatePage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Estimate"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        },
        "additionalProperties": false
      },
      "EstimateMessage": {
        "type": "object",
        "required": [
          "id",
          "estimate_id",
          "sent_by",
          "sent_by_email",
          "sent_from",
          "sent_from_email",
          "recipients",
          "subject",
          "body",
          "send_me_a_copy",
          "event_type",
          "delivery_status",
          "provider_message_id",
          "contact_id",
          "content_hash",
          "estimate_version",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "estimate_id": {
            "type": "integer",
            "minimum": 1
          },
          "sent_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sent_by_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sent_from": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sent_from_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "recipients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceRecipient"
            }
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "send_me_a_copy": {
            "type": "boolean"
          },
          "event_type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "send",
                  "accept",
                  "decline",
                  "re-open",
                  "view",
                  "invoice"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "delivery_status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "queued",
                  "sent",
                  "bounced",
                  "complained",
                  "failed"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "provider_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "content_hash": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "estimate_version": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "EstimateMessageListEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EstimateMessage"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "EstimateMessageInput": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "expected_version",
              "event_type",
              "recipients"
            ],
            "properties": {
              "expected_version": {
                "type": "integer",
                "minimum": 0
              },
              "event_type": {
                "const": "send"
              },
              "recipients": {
                "type": "array",
                "minItems": 1,
                "maxItems": 1000,
                "items": {
                  "$ref": "#/components/schemas/InvoiceRecipient"
                }
              },
              "subject": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "body": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "send_me_a_copy": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "expected_version",
              "event_type"
            ],
            "properties": {
              "expected_version": {
                "type": "integer",
                "minimum": 0
              },
              "event_type": {
                "type": "string",
                "enum": [
                  "accept",
                  "decline",
                  "re-open"
                ]
              },
              "recipients": {
                "type": "array",
                "maxItems": 1000,
                "items": {
                  "$ref": "#/components/schemas/InvoiceRecipient"
                }
              },
              "subject": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "body": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "send_me_a_copy": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "EstimateMessageCommandResponse": {
        "type": "object",
        "required": [
          "estimate",
          "message"
        ],
        "properties": {
          "estimate": {
            "$ref": "#/components/schemas/Estimate"
          },
          "message": {
            "$ref": "#/components/schemas/EstimateMessage"
          }
        },
        "additionalProperties": false
      },
      "EstimateMessageCommandEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/EstimateMessageCommandResponse"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "EstimateConversionInput": {
        "type": "object",
        "required": [
          "expected_version",
          "number",
          "issue_date",
          "due_date",
          "payment_terms"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "number": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "pattern": "\\S"
          },
          "issue_date": {
            "type": "string",
            "format": "date"
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "payment_terms": {
            "type": "string",
            "enum": [
              "upon_receipt",
              "net_15",
              "net_30",
              "net_45",
              "net_60",
              "custom"
            ]
          }
        },
        "additionalProperties": false
      },
      "EstimateConversion": {
        "type": "object",
        "required": [
          "invoice",
          "event"
        ],
        "properties": {
          "invoice": {
            "$ref": "#/components/schemas/Invoice"
          },
          "event": {
            "$ref": "#/components/schemas/EstimateMessage"
          }
        },
        "additionalProperties": false
      },
      "EstimateConversionEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/EstimateConversion"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "InvoiceGenerationInput": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "client_id",
              "to",
              "project_ids",
              "time_summary_type",
              "expense_summary_type"
            ],
            "properties": {
              "kind": {
                "const": "tracked"
              },
              "client_id": {
                "type": "integer",
                "minimum": 1
              },
              "from": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "to": {
                "type": "string",
                "format": "date"
              },
              "project_ids": {
                "type": "array",
                "minItems": 1,
                "maxItems": 10000,
                "uniqueItems": true,
                "items": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "time_summary_type": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "project",
                      "task",
                      "people",
                      "detailed"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "expense_summary_type": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "project",
                      "category",
                      "people",
                      "detailed"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "kind",
              "client_id"
            ],
            "properties": {
              "kind": {
                "const": "free_form"
              },
              "client_id": {
                "type": "integer",
                "minimum": 1
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "kind",
              "client_id",
              "to",
              "project_ids",
              "line_items",
              "claim_mode"
            ],
            "properties": {
              "kind": {
                "const": "banded"
              },
              "client_id": {
                "type": "integer",
                "minimum": 1
              },
              "from": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "to": {
                "type": "string",
                "format": "date"
              },
              "project_ids": {
                "type": "array",
                "minItems": 1,
                "maxItems": 10000,
                "uniqueItems": true,
                "items": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "line_items": {
                "type": "array",
                "minItems": 1,
                "maxItems": 100,
                "items": {
                  "type": "object",
                  "required": [
                    "kind",
                    "quantity",
                    "unit_price_cents"
                  ],
                  "properties": {
                    "kind": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "quantity": {
                      "type": "number"
                    },
                    "unit_price_cents": {
                      "type": "integer",
                      "minimum": -9000000000000,
                      "maximum": 9000000000000
                    },
                    "project_id": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              },
              "claim_mode": {
                "type": "string",
                "enum": [
                  "all",
                  "ceiling"
                ]
              },
              "claim_ceiling_seconds": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "claim_ceiling_cents": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "overage_summary_type": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "project",
                      "task",
                      "people",
                      "detailed"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "InvoiceBandClaim": {
        "type": "object",
        "required": [
          "claimed_entry_count",
          "claimed_seconds",
          "billed_entry_count",
          "billed_seconds"
        ],
        "properties": {
          "claimed_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "claimed_seconds": {
            "type": "integer"
          },
          "billed_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "billed_seconds": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "InvoiceGenerationEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Invoice"
          },
          "band": {
            "$ref": "#/components/schemas/InvoiceBandClaim"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "InvoiceCommandSnapshot": {
        "type": "object",
        "required": [
          "id",
          "version",
          "updated_at",
          "state",
          "close_reason",
          "close_write_off_cents",
          "sent_at",
          "paid_at",
          "paid_date",
          "closed_at",
          "amount_cents",
          "due_amount_cents",
          "written_off_cents",
          "payment_count",
          "payment_status"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "state": {
            "type": "string",
            "enum": [
              "draft",
              "open",
              "paid",
              "closed"
            ]
          },
          "close_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "cancelled",
                  "written_off",
                  "source_closed"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "close_write_off_cents": {
            "type": "integer",
            "minimum": 0
          },
          "sent_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "paid_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "paid_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "closed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "amount_cents": {
            "type": "integer"
          },
          "due_amount_cents": {
            "type": "integer",
            "minimum": 0
          },
          "written_off_cents": {
            "type": "integer",
            "minimum": 0
          },
          "payment_count": {
            "type": "integer",
            "minimum": 0
          },
          "payment_status": {
            "type": "string",
            "enum": [
              "unpaid",
              "partial",
              "paid"
            ]
          }
        },
        "additionalProperties": false
      },
      "InvoiceCommandResult": {
        "type": "object",
        "required": [
          "schema_version",
          "event_ids",
          "first_aggregate_sequence",
          "event_count",
          "invoice"
        ],
        "properties": {
          "schema_version": {
            "const": 1
          },
          "event_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 2,
            "items": {
              "type": "string"
            }
          },
          "first_aggregate_sequence": {
            "type": "integer",
            "minimum": 1
          },
          "event_count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2
          },
          "invoice": {
            "$ref": "#/components/schemas/InvoiceCommandSnapshot"
          }
        },
        "additionalProperties": false
      },
      "InvoiceCommandResponse": {
        "type": "object",
        "required": [
          "invoice",
          "command"
        ],
        "properties": {
          "invoice": {
            "$ref": "#/components/schemas/Invoice"
          },
          "command": {
            "$ref": "#/components/schemas/InvoiceCommandResult"
          }
        },
        "additionalProperties": false
      },
      "InvoiceCommandEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InvoiceCommandResponse"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "InvoiceEditInput": {
        "type": "object",
        "required": [
          "expected_version"
        ],
        "minProperties": 2,
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "number": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "purchase_order": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "issue_date": {
            "type": "string",
            "format": "date"
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "payment_terms": {
            "type": "string",
            "enum": [
              "upon_receipt",
              "net_15",
              "net_30",
              "net_45",
              "net_60",
              "custom"
            ]
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "retainer_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "reminder_policy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InvoiceReminderPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_options": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "stripe_checkout",
                "paypal_checkout",
                "quickbooks_checkout",
                "mercury_transfer",
                "wise_transfer"
              ]
            }
          },
          "tax_rate_ppm": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000
              },
              {
                "type": "null"
              }
            ]
          },
          "tax2_rate_ppm": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000
              },
              {
                "type": "null"
              }
            ]
          },
          "discount_rate_ppm": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "InvoiceLineInput": {
        "type": "object",
        "required": [
          "expected_version",
          "position",
          "kind",
          "quantity",
          "unit_price_cents"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "position": {
            "type": "integer",
            "minimum": 0
          },
          "kind": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "quantity": {
            "type": "number"
          },
          "unit_price_cents": {
            "type": "integer",
            "minimum": -9000000000000,
            "maximum": 9000000000000
          },
          "taxed": {
            "type": "boolean"
          },
          "taxed2": {
            "type": "boolean"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "InvoiceLineUpdateInput": {
        "type": "object",
        "required": [
          "expected_version",
          "expected_updated_at",
          "position",
          "kind",
          "quantity",
          "unit_price_cents"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "expected_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "position": {
            "type": "integer",
            "minimum": 0
          },
          "kind": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "quantity": {
            "type": "number"
          },
          "unit_price_cents": {
            "type": "integer",
            "minimum": -9000000000000,
            "maximum": 9000000000000
          },
          "taxed": {
            "type": "boolean"
          },
          "taxed2": {
            "type": "boolean"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "VersionedRowDeleteInput": {
        "type": "object",
        "required": [
          "expected_version",
          "expected_updated_at"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "expected_updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "InvoiceRecipient": {
        "type": "object",
        "required": [
          "name",
          "email"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 1000
          },
          "email": {
            "type": "string",
            "minLength": 3,
            "maxLength": 320
          }
        },
        "additionalProperties": false
      },
      "InvoiceMessage": {
        "type": "object",
        "required": [
          "id",
          "invoice_id",
          "sent_by",
          "sent_by_email",
          "sent_from",
          "sent_from_email",
          "recipients",
          "cc",
          "subject",
          "body",
          "attach_pdf",
          "send_me_a_copy",
          "thank_you",
          "reminder",
          "send_reminder_on",
          "event_type",
          "delivery_status",
          "provider_message_id",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "invoice_id": {
            "type": "integer",
            "minimum": 1
          },
          "sent_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sent_by_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sent_from": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sent_from_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "recipients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceRecipient"
            }
          },
          "cc": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceRecipient"
            }
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "attach_pdf": {
            "type": "boolean"
          },
          "send_me_a_copy": {
            "type": "boolean"
          },
          "thank_you": {
            "type": "boolean"
          },
          "reminder": {
            "type": "boolean"
          },
          "send_reminder_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "event_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivery_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "provider_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "InvoiceMessageListEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceMessage"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "InvoiceMessageInput": {
        "type": "object",
        "required": [
          "event_type",
          "expected_version"
        ],
        "properties": {
          "event_type": {
            "type": "string",
            "enum": [
              "send",
              "draft",
              "cancel",
              "write_off",
              "reopen",
              "re-open"
            ]
          },
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "recipients": {
            "type": "array",
            "maxItems": 1000,
            "items": {
              "$ref": "#/components/schemas/InvoiceRecipient"
            }
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "attach_pdf": {
            "type": "boolean"
          },
          "send_me_a_copy": {
            "type": "boolean"
          },
          "thank_you": {
            "type": "boolean"
          },
          "reminder": {
            "type": "boolean"
          },
          "send_reminder_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "InvoiceTransitionInput": {
        "type": "object",
        "required": [
          "command",
          "expected_version"
        ],
        "properties": {
          "command": {
            "type": "string",
            "enum": [
              "send",
              "draft",
              "cancel",
              "write_off",
              "reopen",
              "re-open"
            ]
          },
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "recipients": {
            "type": "array",
            "maxItems": 1000,
            "items": {
              "$ref": "#/components/schemas/InvoiceRecipient"
            }
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "attach_pdf": {
            "type": "boolean"
          },
          "send_me_a_copy": {
            "type": "boolean"
          },
          "thank_you": {
            "type": "boolean"
          },
          "reminder": {
            "type": "boolean"
          },
          "send_reminder_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "InvoiceEmailDeliveryInput": {
        "type": "object",
        "required": [
          "expected_version",
          "recipients",
          "confirmed"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "recipients": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1000,
            "items": {
              "$ref": "#/components/schemas/InvoiceRecipient"
            }
          },
          "cc": {
            "type": "array",
            "maxItems": 99,
            "items": {
              "$ref": "#/components/schemas/InvoiceRecipient"
            }
          },
          "subject": {
            "type": "string",
            "maxLength": 998
          },
          "message": {
            "type": "string",
            "maxLength": 100000
          },
          "send_me_a_copy": {
            "type": "boolean"
          },
          "sender_identity_id": {
            "type": "integer",
            "minimum": 1
          },
          "template_version": {
            "type": "integer",
            "minimum": 1
          },
          "confirmed": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        },
        "additionalProperties": false
      },
      "InvoiceEmailPreviewInput": {
        "type": "object",
        "required": [
          "recipients"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "recipients": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1000,
            "items": {
              "$ref": "#/components/schemas/InvoiceRecipient"
            }
          },
          "cc": {
            "type": "array",
            "maxItems": 99,
            "items": {
              "$ref": "#/components/schemas/InvoiceRecipient"
            }
          },
          "subject": {
            "type": "string",
            "maxLength": 998
          },
          "message": {
            "type": "string",
            "maxLength": 100000
          },
          "send_me_a_copy": {
            "type": "boolean"
          },
          "sender_identity_id": {
            "type": "integer",
            "minimum": 1
          },
          "template_version": {
            "type": "integer",
            "minimum": 1
          },
          "attach_pdf": {
            "type": "boolean"
          },
          "attach_files": {
            "type": "boolean"
          },
          "append_pdfs": {
            "type": "boolean"
          },
          "attach_journal": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "detailed",
                  "summary"
                ]
              },
              {
                "type": "boolean",
                "enum": [
                  false
                ]
              }
            ]
          },
          "journal_formats": {
            "$ref": "#/components/schemas/JournalFormats"
          }
        },
        "additionalProperties": false
      },
      "InvoiceEmailPreviewAttachment": {
        "type": "object",
        "required": [
          "kind",
          "filename",
          "content_type",
          "byte_size",
          "appended",
          "not_appended"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "invoice",
              "journal",
              "file"
            ]
          },
          "filename": {
            "type": "string"
          },
          "content_type": {
            "type": "string"
          },
          "byte_size": {
            "type": "integer",
            "minimum": 0
          },
          "appended": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "not_appended": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "encrypted",
                  "unreadable",
                  "empty",
                  "too_large"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "InvoiceEmailPreviewEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "invoice_id",
              "from",
              "reply_to",
              "to",
              "cc",
              "send_me_a_copy",
              "subject",
              "text",
              "html",
              "attachments"
            ],
            "properties": {
              "invoice_id": {
                "type": "integer",
                "minimum": 1
              },
              "from": {
                "$ref": "#/components/schemas/InvoiceRecipient"
              },
              "reply_to": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "to": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InvoiceRecipient"
                }
              },
              "cc": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InvoiceRecipient"
                }
              },
              "send_me_a_copy": {
                "type": "boolean"
              },
              "subject": {
                "type": "string"
              },
              "text": {
                "type": "string"
              },
              "html": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "attachments": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InvoiceEmailPreviewAttachment"
                }
              }
            },
            "additionalProperties": false
          },
          "links": {
            "type": "object",
            "required": [
              "document"
            ],
            "properties": {
              "document": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "InvoiceEmailPreviewSentEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "invoice_id",
              "delivery_id",
              "to",
              "subject"
            ],
            "properties": {
              "invoice_id": {
                "type": "integer",
                "minimum": 1
              },
              "delivery_id": {
                "type": "integer",
                "minimum": 1
              },
              "to": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InvoiceRecipient"
                }
              },
              "subject": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "InvoiceEmailDefaultsEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "invoice_id",
              "client_id",
              "company_name",
              "client_name",
              "time_zone",
              "template_version",
              "subject",
              "message",
              "to",
              "cc",
              "recipients_source",
              "always_cc",
              "sender",
              "send_me_a_copy",
              "delivery"
            ],
            "properties": {
              "invoice_id": {
                "type": "integer",
                "minimum": 1
              },
              "client_id": {
                "type": "integer",
                "minimum": 1
              },
              "company_name": {
                "type": "string"
              },
              "client_name": {
                "type": "string"
              },
              "time_zone": {
                "type": "string"
              },
              "template_version": {
                "type": "integer",
                "minimum": 1
              },
              "subject": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "to": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InvoiceRecipient"
                }
              },
              "cc": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InvoiceRecipient"
                }
              },
              "recipients_source": {
                "type": "string",
                "enum": [
                  "client",
                  "contacts"
                ]
              },
              "always_cc": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InvoiceRecipient"
                }
              },
              "sender": {
                "type": "object",
                "required": [
                  "name",
                  "email"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              },
              "send_me_a_copy": {
                "type": "boolean"
              },
              "delivery": {
                "type": "object",
                "required": [
                  "available",
                  "code",
                  "message"
                ],
                "properties": {
                  "available": {
                    "type": "boolean"
                  },
                  "code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "message": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "InvoiceRecipientLists": {
        "type": "object",
        "required": [
          "to",
          "cc"
        ],
        "properties": {
          "to": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "$ref": "#/components/schemas/InvoiceRecipient"
            }
          },
          "cc": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "$ref": "#/components/schemas/InvoiceRecipient"
            }
          }
        },
        "additionalProperties": false
      },
      "ClientInvoiceSendingEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "client_id",
              "recipients",
              "contacts",
              "attach_pdf",
              "append_pdfs",
              "attach_files",
              "attach_journal",
              "journal_formats",
              "organization"
            ],
            "properties": {
              "client_id": {
                "type": "integer",
                "minimum": 1
              },
              "recipients": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/InvoiceRecipientLists"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "contacts": {
                "$ref": "#/components/schemas/InvoiceRecipientLists"
              },
              "attach_pdf": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "append_pdfs": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "attach_files": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "attach_journal": {
                "anyOf": [
                  {
                    "oneOf": [
                      {
                        "type": "string",
                        "enum": [
                          "detailed",
                          "summary"
                        ]
                      },
                      {
                        "type": "boolean"
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "journal_formats": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/JournalFormats"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "organization": {
                "type": "object",
                "required": [
                  "attach_pdf",
                  "append_pdfs",
                  "attach_files",
                  "attach_journal",
                  "journal_formats"
                ],
                "properties": {
                  "attach_pdf": {
                    "type": "boolean"
                  },
                  "append_pdfs": {
                    "type": "boolean"
                  },
                  "attach_files": {
                    "type": "boolean"
                  },
                  "attach_journal": {
                    "oneOf": [
                      {
                        "type": "string",
                        "enum": [
                          "detailed",
                          "summary"
                        ]
                      },
                      {
                        "type": "boolean"
                      }
                    ]
                  },
                  "journal_formats": {
                    "$ref": "#/components/schemas/JournalFormats"
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "ClientInvoiceSendingInput": {
        "type": "object",
        "minProperties": 1,
        "properties": {
          "recipients": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InvoiceRecipientLists"
              },
              {
                "type": "null"
              }
            ]
          },
          "attach_pdf": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "append_pdfs": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "attach_files": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "attach_journal": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "detailed",
                      "summary"
                    ]
                  },
                  {
                    "type": "boolean",
                    "enum": [
                      false
                    ]
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "journal_formats": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JournalFormats"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "OrganizationInvoiceSendingEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "always_cc"
            ],
            "properties": {
              "always_cc": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InvoiceRecipient"
                }
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "OrganizationInvoiceSendingInput": {
        "type": "object",
        "required": [
          "always_cc"
        ],
        "properties": {
          "always_cc": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "$ref": "#/components/schemas/InvoiceRecipient"
            }
          }
        },
        "additionalProperties": false
      },
      "InvoicePayment": {
        "type": "object",
        "required": [
          "id",
          "invoice_id",
          "currency",
          "amount_cents",
          "paid_at",
          "paid_date",
          "notes",
          "recorded_by_user_id",
          "provider",
          "provider_shape",
          "provider_account_id",
          "provider_transaction_id",
          "bank_deposit_id",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "invoice_id": {
            "type": "integer",
            "minimum": 1
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "amount_cents": {
            "type": "integer",
            "minimum": 1
          },
          "paid_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "paid_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "recorded_by_user_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "provider": {
            "type": "string"
          },
          "provider_shape": {
            "type": "string"
          },
          "provider_account_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "provider_transaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "bank_deposit_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "InvoicePaymentListEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoicePayment"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "InvoicePaymentInput": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "expected_version",
              "amount_cents",
              "currency",
              "paid_at"
            ],
            "properties": {
              "expected_version": {
                "type": "integer",
                "minimum": 0
              },
              "amount_cents": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9000000000000
              },
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "paid_at": {
                "type": "string",
                "format": "date-time"
              },
              "notes": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "expected_version",
              "amount_cents",
              "currency",
              "paid_date"
            ],
            "properties": {
              "expected_version": {
                "type": "integer",
                "minimum": 0
              },
              "amount_cents": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9000000000000
              },
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "paid_date": {
                "type": "string",
                "format": "date"
              },
              "notes": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "InvoicePaymentUpdateInput": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "expected_version",
              "expected_updated_at",
              "amount_cents",
              "paid_at"
            ],
            "properties": {
              "expected_version": {
                "type": "integer",
                "minimum": 0
              },
              "expected_updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "amount_cents": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9000000000000
              },
              "paid_at": {
                "type": "string",
                "format": "date-time"
              },
              "notes": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "expected_version",
              "expected_updated_at",
              "amount_cents",
              "paid_date"
            ],
            "properties": {
              "expected_version": {
                "type": "integer",
                "minimum": 0
              },
              "expected_updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "amount_cents": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9000000000000
              },
              "paid_date": {
                "type": "string",
                "format": "date"
              },
              "notes": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "Retainer": {
        "type": "object",
        "required": [
          "id",
          "client_id",
          "project_id",
          "state",
          "denomination",
          "amount_cents",
          "seconds",
          "locked_rate_cents",
          "rate_locked_at",
          "period",
          "rollover",
          "expires_at",
          "on_exhaustion",
          "balance",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "client_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "ongoing",
              "closed"
            ]
          },
          "denomination": {
            "type": "string",
            "enum": [
              "money",
              "hours"
            ]
          },
          "amount_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "seconds": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "locked_rate_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "rate_locked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "period": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "rollover": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "carry",
                  "expire",
                  "cap"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "on_exhaustion": {
            "type": "string",
            "enum": [
              "block",
              "warn",
              "overflow"
            ]
          },
          "balance": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "RetainerEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Retainer"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "RetainerPage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Retainer"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        },
        "additionalProperties": false
      },
      "RetainerInput": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "denomination",
              "amount_cents"
            ],
            "properties": {
              "client_id": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "project_id": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "denomination": {
                "const": "money"
              },
              "amount_cents": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9000000000000
              },
              "period": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 64
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "rollover": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "carry",
                      "expire",
                      "cap"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "expires_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "on_exhaustion": {
                "type": "string",
                "enum": [
                  "block",
                  "warn",
                  "overflow"
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "denomination",
              "seconds"
            ],
            "properties": {
              "client_id": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "project_id": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "denomination": {
                "const": "hours"
              },
              "seconds": {
                "type": "integer",
                "minimum": 0
              },
              "period": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 64
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "rollover": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "carry",
                      "expire",
                      "cap"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "expires_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "on_exhaustion": {
                "type": "string",
                "enum": [
                  "block",
                  "warn",
                  "overflow"
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "denomination",
              "seconds",
              "locked_rate_cents",
              "rate_locked_at"
            ],
            "properties": {
              "client_id": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "project_id": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "denomination": {
                "const": "hours"
              },
              "seconds": {
                "type": "integer",
                "minimum": 0
              },
              "locked_rate_cents": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9000000000000
              },
              "rate_locked_at": {
                "type": "string",
                "format": "date-time"
              },
              "period": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 64
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "rollover": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "carry",
                      "expire",
                      "cap"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "expires_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "on_exhaustion": {
                "type": "string",
                "enum": [
                  "block",
                  "warn",
                  "overflow"
                ]
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "RetainerPatch": {
        "type": "object",
        "minProperties": 1,
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "ongoing",
              "closed"
            ]
          },
          "period": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64
              },
              {
                "type": "null"
              }
            ]
          },
          "rollover": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "carry",
                  "expire",
                  "cap"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "on_exhaustion": {
            "type": "string",
            "enum": [
              "block",
              "warn",
              "overflow"
            ]
          }
        },
        "additionalProperties": false
      },
      "RetainerLedgerEntry": {
        "type": "object",
        "required": [
          "id",
          "retainer_id",
          "kind",
          "unit",
          "amount",
          "invoice_id",
          "occurred_on",
          "notes",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "retainer_id": {
            "type": "integer",
            "minimum": 1
          },
          "kind": {
            "type": "string",
            "enum": [
              "deposit",
              "drawdown",
              "expiry",
              "reset",
              "adjustment"
            ]
          },
          "unit": {
            "type": "string",
            "enum": [
              "cents",
              "seconds"
            ]
          },
          "amount": {
            "type": "integer"
          },
          "invoice_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "occurred_on": {
            "type": "string",
            "format": "date"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "RetainerLedgerListEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RetainerLedgerEntry"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "RetainerLedgerMutation": {
        "type": "object",
        "required": [
          "entry",
          "balance",
          "denomination"
        ],
        "properties": {
          "entry": {
            "$ref": "#/components/schemas/RetainerLedgerEntry"
          },
          "balance": {
            "type": "integer"
          },
          "denomination": {
            "type": "string",
            "enum": [
              "money",
              "hours"
            ]
          }
        },
        "additionalProperties": false
      },
      "RetainerLedgerMutationEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/RetainerLedgerMutation"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "RetainerLedgerInput": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "kind",
              "amount_cents",
              "occurred_on",
              "invoice_id"
            ],
            "properties": {
              "kind": {
                "const": "deposit"
              },
              "invoice_id": {
                "type": "integer",
                "minimum": 1
              },
              "amount_cents": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9000000000000
              },
              "occurred_on": {
                "type": "string",
                "format": "date"
              },
              "notes": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "kind",
              "seconds",
              "occurred_on",
              "invoice_id"
            ],
            "properties": {
              "kind": {
                "const": "deposit"
              },
              "invoice_id": {
                "type": "integer",
                "minimum": 1
              },
              "seconds": {
                "type": "integer",
                "minimum": 1
              },
              "occurred_on": {
                "type": "string",
                "format": "date"
              },
              "notes": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "kind",
              "amount_cents",
              "occurred_on",
              "invoice_id"
            ],
            "properties": {
              "kind": {
                "const": "drawdown"
              },
              "invoice_id": {
                "type": "integer",
                "minimum": 1
              },
              "amount_cents": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9000000000000
              },
              "occurred_on": {
                "type": "string",
                "format": "date"
              },
              "notes": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "kind",
              "seconds",
              "occurred_on",
              "invoice_id"
            ],
            "properties": {
              "kind": {
                "const": "drawdown"
              },
              "invoice_id": {
                "type": "integer",
                "minimum": 1
              },
              "seconds": {
                "type": "integer",
                "minimum": 1
              },
              "occurred_on": {
                "type": "string",
                "format": "date"
              },
              "notes": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "kind",
              "amount_cents",
              "occurred_on"
            ],
            "properties": {
              "kind": {
                "const": "expiry"
              },
              "amount_cents": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9000000000000
              },
              "occurred_on": {
                "type": "string",
                "format": "date"
              },
              "notes": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "kind",
              "seconds",
              "occurred_on"
            ],
            "properties": {
              "kind": {
                "const": "expiry"
              },
              "seconds": {
                "type": "integer",
                "minimum": 1
              },
              "occurred_on": {
                "type": "string",
                "format": "date"
              },
              "notes": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "kind",
              "amount_cents",
              "occurred_on"
            ],
            "properties": {
              "kind": {
                "const": "reset"
              },
              "amount_cents": {
                "type": "integer",
                "minimum": -9000000000000,
                "maximum": 9000000000000,
                "not": {
                  "const": 0
                }
              },
              "occurred_on": {
                "type": "string",
                "format": "date"
              },
              "notes": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "kind",
              "seconds",
              "occurred_on"
            ],
            "properties": {
              "kind": {
                "const": "reset"
              },
              "seconds": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "not": {
                  "const": 0
                }
              },
              "occurred_on": {
                "type": "string",
                "format": "date"
              },
              "notes": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "kind",
              "amount_cents",
              "occurred_on",
              "notes"
            ],
            "properties": {
              "kind": {
                "const": "adjustment"
              },
              "amount_cents": {
                "type": "integer",
                "minimum": -9000000000000,
                "maximum": 9000000000000,
                "not": {
                  "const": 0
                }
              },
              "occurred_on": {
                "type": "string",
                "format": "date"
              },
              "notes": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "kind",
              "seconds",
              "occurred_on",
              "notes"
            ],
            "properties": {
              "kind": {
                "const": "adjustment"
              },
              "seconds": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "not": {
                  "const": 0
                }
              },
              "occurred_on": {
                "type": "string",
                "format": "date"
              },
              "notes": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "RetainerDrawdownInput": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "amount_cents",
              "occurred_on",
              "invoice_id"
            ],
            "properties": {
              "invoice_id": {
                "type": "integer",
                "minimum": 1
              },
              "amount_cents": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9000000000000
              },
              "occurred_on": {
                "type": "string",
                "format": "date"
              },
              "notes": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "seconds",
              "occurred_on",
              "invoice_id"
            ],
            "properties": {
              "invoice_id": {
                "type": "integer",
                "minimum": 1
              },
              "seconds": {
                "type": "integer",
                "minimum": 1
              },
              "occurred_on": {
                "type": "string",
                "format": "date"
              },
              "notes": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "RecurringFixedLine": {
        "type": "object",
        "required": [
          "kind",
          "description",
          "quantity",
          "unit_price_cents",
          "taxed",
          "taxed2",
          "project_id"
        ],
        "properties": {
          "kind": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "quantity": {
            "type": "number"
          },
          "unit_price_cents": {
            "type": "integer"
          },
          "taxed": {
            "type": "boolean"
          },
          "taxed2": {
            "type": "boolean"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "through": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "installments": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "RecurringAmountConfig": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "schema_version",
              "type",
              "line_items"
            ],
            "properties": {
              "schema_version": {
                "const": 1
              },
              "type": {
                "const": "fixed_lines"
              },
              "line_items": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "$ref": "#/components/schemas/RecurringFixedLine"
                }
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "schema_version",
              "type",
              "project_ids",
              "time"
            ],
            "properties": {
              "schema_version": {
                "const": 1
              },
              "type": {
                "const": "line_items_import"
              },
              "project_ids": {
                "type": "array",
                "minItems": 1,
                "uniqueItems": true,
                "items": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "time": {
                "type": "object",
                "required": [
                  "summary_type"
                ],
                "properties": {
                  "summary_type": {
                    "type": "string",
                    "enum": [
                      "project",
                      "task",
                      "people",
                      "detailed"
                    ]
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "schema_version",
              "type",
              "project_ids",
              "expenses"
            ],
            "properties": {
              "schema_version": {
                "const": 1
              },
              "type": {
                "const": "line_items_import"
              },
              "project_ids": {
                "type": "array",
                "minItems": 1,
                "uniqueItems": true,
                "items": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "expenses": {
                "type": "object",
                "required": [
                  "summary_type"
                ],
                "properties": {
                  "summary_type": {
                    "type": "string",
                    "enum": [
                      "project",
                      "category",
                      "people",
                      "detailed"
                    ]
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "schema_version",
              "type",
              "project_ids",
              "time",
              "expenses"
            ],
            "properties": {
              "schema_version": {
                "const": 1
              },
              "type": {
                "const": "line_items_import"
              },
              "project_ids": {
                "type": "array",
                "minItems": 1,
                "uniqueItems": true,
                "items": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "time": {
                "type": "object",
                "required": [
                  "summary_type"
                ],
                "properties": {
                  "summary_type": {
                    "type": "string",
                    "enum": [
                      "project",
                      "task",
                      "people",
                      "detailed"
                    ]
                  }
                },
                "additionalProperties": false
              },
              "expenses": {
                "type": "object",
                "required": [
                  "summary_type"
                ],
                "properties": {
                  "summary_type": {
                    "type": "string",
                    "enum": [
                      "project",
                      "category",
                      "people",
                      "detailed"
                    ]
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "RecurringInvoice": {
        "type": "object",
        "required": [
          "id",
          "client_id",
          "subject_template",
          "notes_template",
          "every_n_months",
          "day_of_month",
          "next_issue_on",
          "amount_config",
          "can_draw_from_retainer_id",
          "claims_project_ids",
          "claim_mode",
          "claim_ceiling_seconds",
          "claim_ceiling_cents",
          "claim_scope",
          "cost_alert_basis_points",
          "purchase_order",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "subject_template": {
            "type": "string"
          },
          "notes_template": {
            "type": "string"
          },
          "every_n_months": {
            "type": "integer",
            "minimum": 1
          },
          "day_of_month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 31
          },
          "next_issue_on": {
            "type": "string",
            "format": "date"
          },
          "amount_config": {
            "$ref": "#/components/schemas/RecurringAmountConfig"
          },
          "can_draw_from_retainer_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "claims_project_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "claim_mode": {
            "type": "string",
            "enum": [
              "all",
              "ceiling"
            ]
          },
          "claim_ceiling_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "claim_ceiling_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "claim_scope": {
            "type": "string",
            "enum": [
              "billable",
              "tracked"
            ]
          },
          "cost_alert_basis_points": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 20000
              },
              {
                "type": "null"
              }
            ]
          },
          "purchase_order": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "RecurringInvoiceEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/RecurringInvoice"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "RecurringGeneration": {
        "type": "object",
        "required": [
          "definition_id",
          "period",
          "next_issue_on",
          "retainer_drawdown_cents"
        ],
        "properties": {
          "definition_id": {
            "type": "integer",
            "minimum": 1
          },
          "period": {
            "type": "string"
          },
          "next_issue_on": {
            "type": "string"
          },
          "retainer_drawdown_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "RecurringGenerationEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "invoice",
              "generation"
            ],
            "properties": {
              "invoice": {
                "$ref": "#/components/schemas/Invoice"
              },
              "generation": {
                "$ref": "#/components/schemas/RecurringGeneration"
              }
            },
            "additionalProperties": false
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "RecurringInvoicePage": {
        "type": "object",
        "required": [
          "data",
          "links",
          "page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecurringInvoice"
            }
          },
          "links": {
            "$ref": "#/components/schemas/PageLinks"
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        },
        "additionalProperties": false
      },
      "BandClaimBackfillInput": {
        "type": "object",
        "required": [
          "invoice_ids"
        ],
        "properties": {
          "invoice_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1
            },
            "minItems": 1
          },
          "project_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1
            }
          },
          "apply": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "BandClaimBackfillLine": {
        "type": "object",
        "required": [
          "invoice_id",
          "number",
          "issue_date",
          "state",
          "amount_cents",
          "entry_count",
          "seconds",
          "billable_value_cents",
          "entries_without_billable_rate",
          "foregone_billable_cents"
        ],
        "properties": {
          "invoice_id": {
            "type": "integer",
            "minimum": 1
          },
          "number": {
            "type": "string"
          },
          "issue_date": {
            "type": "string",
            "format": "date"
          },
          "state": {
            "type": "string"
          },
          "amount_cents": {
            "type": "integer"
          },
          "entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "seconds": {
            "type": "integer"
          },
          "billable_value_cents": {
            "type": "integer"
          },
          "entries_without_billable_rate": {
            "type": "integer",
            "minimum": 0
          },
          "foregone_billable_cents": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "BandClaimBackfill": {
        "type": "object",
        "required": [
          "run_id",
          "applied",
          "invoices",
          "remaining_entry_count",
          "remaining_seconds"
        ],
        "properties": {
          "run_id": {
            "type": "string"
          },
          "applied": {
            "type": "boolean"
          },
          "invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BandClaimBackfillLine"
            }
          },
          "remaining_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "remaining_seconds": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "BandClaimBackfillEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/BandClaimBackfill"
          }
        },
        "additionalProperties": false
      },
      "RecurringInvoiceInput": {
        "type": "object",
        "required": [
          "client_id",
          "subject_template",
          "notes_template",
          "every_n_months",
          "day_of_month",
          "next_issue_on",
          "amount_config"
        ],
        "properties": {
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "subject_template": {
            "type": "string",
            "minLength": 1
          },
          "notes_template": {
            "type": "string"
          },
          "every_n_months": {
            "type": "integer",
            "minimum": 1
          },
          "day_of_month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 31
          },
          "next_issue_on": {
            "type": "string",
            "format": "date"
          },
          "amount_config": {
            "$ref": "#/components/schemas/RecurringAmountConfig"
          },
          "can_draw_from_retainer_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "claims_project_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "claim_mode": {
            "type": "string",
            "enum": [
              "all",
              "ceiling"
            ]
          },
          "claim_ceiling_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "claim_ceiling_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "claim_scope": {
            "type": "string",
            "enum": [
              "billable",
              "tracked"
            ]
          },
          "cost_alert_basis_points": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 20000
              },
              {
                "type": "null"
              }
            ]
          },
          "purchase_order": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "MyHoursProject": {
        "type": "object",
        "required": [
          "project_id",
          "project_name",
          "project_code",
          "client_id",
          "client_name",
          "seconds",
          "rounded_seconds",
          "billable_seconds",
          "time_entry_count"
        ],
        "properties": {
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_name": {
            "type": "string"
          },
          "project_code": {
            "type": "string"
          },
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "client_name": {
            "type": "string"
          },
          "seconds": {
            "type": "integer"
          },
          "rounded_seconds": {
            "type": "integer"
          },
          "billable_seconds": {
            "type": "integer"
          },
          "time_entry_count": {
            "type": "integer",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "MyHoursReport": {
        "type": "object",
        "required": [
          "from",
          "to",
          "user_id",
          "project_id",
          "seconds",
          "rounded_seconds",
          "billable_seconds",
          "time_entry_count",
          "projects"
        ],
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "seconds": {
            "type": "integer"
          },
          "rounded_seconds": {
            "type": "integer"
          },
          "billable_seconds": {
            "type": "integer"
          },
          "time_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MyHoursProject"
            }
          }
        },
        "additionalProperties": false
      },
      "MyHoursReportEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MyHoursReport"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "DetailedTimeRow": {
        "type": "object",
        "required": [
          "spent_date",
          "client_id",
          "client_name",
          "project_id",
          "project_name",
          "project_code",
          "task_id",
          "task_name",
          "user_id",
          "user_name",
          "roles",
          "currency",
          "seconds",
          "rounded_seconds",
          "billable_seconds",
          "uninvoiced_billable_seconds",
          "time_entry_count",
          "entries_without_billable_rate",
          "claimed"
        ],
        "properties": {
          "spent_date": {
            "type": "string",
            "format": "date"
          },
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "client_name": {
            "type": "string"
          },
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_name": {
            "type": "string"
          },
          "project_code": {
            "type": "string"
          },
          "task_id": {
            "type": "integer",
            "minimum": 1
          },
          "task_name": {
            "type": "string"
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "user_name": {
            "type": "string"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "currency": {
            "type": "string"
          },
          "seconds": {
            "type": "integer"
          },
          "rounded_seconds": {
            "type": "integer"
          },
          "billable_seconds": {
            "type": "integer"
          },
          "uninvoiced_billable_seconds": {
            "type": "integer"
          },
          "time_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "billable_amount_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "entries_without_billable_rate": {
            "type": "integer",
            "minimum": 0
          },
          "claimed": {
            "type": "boolean"
          },
          "time_entry_id": {
            "type": "integer",
            "minimum": 1
          },
          "invoice_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "invoice_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Entry notes, or distinct audience-visible notes joined with · at daily grain."
          },
          "project_active": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "DetailedTimeCurrencyTotal": {
        "type": "object",
        "required": [
          "currency",
          "entries_without_billable_rate"
        ],
        "properties": {
          "currency": {
            "type": "string"
          },
          "billable_amount_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "entries_without_billable_rate": {
            "type": "integer",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "DetailedTimeReport": {
        "type": "object",
        "required": [
          "from",
          "to",
          "client_id",
          "project_id",
          "task_id",
          "user_id",
          "role_id",
          "tag_id",
          "invoice_state",
          "hours",
          "grain",
          "active_projects_only",
          "seconds",
          "rounded_seconds",
          "billable_seconds",
          "uninvoiced_billable_seconds",
          "claimed_seconds",
          "unclaimed_seconds",
          "time_entry_count",
          "currencies",
          "facets",
          "rows"
        ],
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "client_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "task_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "user_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "role_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "tag_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "invoice_state": {
            "type": "string",
            "enum": [
              "all",
              "invoiced",
              "uninvoiced"
            ]
          },
          "hours": {
            "type": "string",
            "enum": [
              "all",
              "billable",
              "non_billable",
              "uninvoiced",
              "claimed",
              "unclaimed"
            ]
          },
          "grain": {
            "type": "string",
            "enum": [
              "day",
              "entry"
            ]
          },
          "active_projects_only": {
            "type": "boolean"
          },
          "seconds": {
            "type": "integer"
          },
          "rounded_seconds": {
            "type": "integer"
          },
          "billable_seconds": {
            "type": "integer"
          },
          "uninvoiced_billable_seconds": {
            "type": "integer"
          },
          "claimed_seconds": {
            "type": "integer"
          },
          "unclaimed_seconds": {
            "type": "integer"
          },
          "time_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "currencies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DetailedTimeCurrencyTotal"
            }
          },
          "facets": {
            "$ref": "#/components/schemas/DetailedTimeFacets"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DetailedTimeRow"
            }
          }
        },
        "additionalProperties": false
      },
      "DetailedTimeFacet": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "DetailedTimeFacets": {
        "type": "object",
        "required": [
          "people",
          "tasks",
          "roles",
          "tags"
        ],
        "properties": {
          "people": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DetailedTimeFacet"
            }
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DetailedTimeFacet"
            }
          },
          "roles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DetailedTimeFacet"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DetailedTimeFacet"
            }
          }
        },
        "additionalProperties": false
      },
      "DetailedTimeReportEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DetailedTimeReport"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "ReportTimeActionInput": {
        "type": "object",
        "required": [
          "command_id",
          "action",
          "entry_ids",
          "confirmed"
        ],
        "properties": {
          "command_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_-]+$"
          },
          "action": {
            "type": "string",
            "enum": [
              "mark_invoiced",
              "mark_uninvoiced",
              "move"
            ]
          },
          "entry_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1000,
            "uniqueItems": true,
            "items": {
              "type": "integer",
              "minimum": 1
            }
          },
          "confirmed": {
            "const": true
          },
          "invoice_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "task_id": {
            "type": "integer",
            "minimum": 1
          }
        },
        "additionalProperties": false
      },
      "ReportTimeAction": {
        "type": "object",
        "required": [
          "command_id",
          "action",
          "requested",
          "changed_entry_ids",
          "ineligible_entry_ids",
          "replayed"
        ],
        "properties": {
          "command_id": {
            "type": "string"
          },
          "action": {
            "type": "string",
            "enum": [
              "mark_invoiced",
              "mark_uninvoiced",
              "move"
            ]
          },
          "requested": {
            "type": "integer",
            "minimum": 1
          },
          "changed_entry_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1
            }
          },
          "ineligible_entry_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1
            }
          },
          "replayed": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ReportTimeActionEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ReportTimeAction"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "TimeReportAmount": {
        "type": "object",
        "required": [
          "currency",
          "billable_cents",
          "uninvoiced_cents"
        ],
        "properties": {
          "currency": {
            "type": "string"
          },
          "billable_cents": {
            "type": "integer"
          },
          "uninvoiced_cents": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "TimeReportTotals": {
        "type": "object",
        "required": [
          "seconds",
          "rounded_seconds",
          "billable_seconds",
          "time_entry_count",
          "unpriced_billable_entry_count"
        ],
        "properties": {
          "seconds": {
            "type": "integer"
          },
          "rounded_seconds": {
            "type": "integer"
          },
          "billable_seconds": {
            "type": "integer"
          },
          "time_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "unpriced_billable_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "amounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeReportAmount"
            }
          }
        },
        "additionalProperties": false
      },
      "TimeReportClientRow": {
        "type": "object",
        "required": [
          "seconds",
          "rounded_seconds",
          "billable_seconds",
          "time_entry_count",
          "unpriced_billable_entry_count",
          "client_id",
          "client_name"
        ],
        "properties": {
          "seconds": {
            "type": "integer"
          },
          "rounded_seconds": {
            "type": "integer"
          },
          "billable_seconds": {
            "type": "integer"
          },
          "time_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "unpriced_billable_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "amounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeReportAmount"
            }
          },
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "client_name": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "TimeReportProjectRow": {
        "type": "object",
        "required": [
          "seconds",
          "rounded_seconds",
          "billable_seconds",
          "time_entry_count",
          "unpriced_billable_entry_count",
          "project_id",
          "project_name",
          "project_code",
          "client_id",
          "client_name"
        ],
        "properties": {
          "seconds": {
            "type": "integer"
          },
          "rounded_seconds": {
            "type": "integer"
          },
          "billable_seconds": {
            "type": "integer"
          },
          "time_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "unpriced_billable_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "amounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeReportAmount"
            }
          },
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_name": {
            "type": "string"
          },
          "project_code": {
            "type": "string"
          },
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "client_name": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "TimeReportTaskRow": {
        "type": "object",
        "required": [
          "seconds",
          "rounded_seconds",
          "billable_seconds",
          "time_entry_count",
          "unpriced_billable_entry_count",
          "task_id",
          "task_name"
        ],
        "properties": {
          "seconds": {
            "type": "integer"
          },
          "rounded_seconds": {
            "type": "integer"
          },
          "billable_seconds": {
            "type": "integer"
          },
          "time_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "unpriced_billable_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "amounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeReportAmount"
            }
          },
          "task_id": {
            "type": "integer",
            "minimum": 1
          },
          "task_name": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "TimeReportTeammateRow": {
        "type": "object",
        "required": [
          "seconds",
          "rounded_seconds",
          "billable_seconds",
          "time_entry_count",
          "unpriced_billable_entry_count",
          "user_id",
          "user_name",
          "is_contractor",
          "capacity_seconds",
          "utilization_ppm"
        ],
        "properties": {
          "seconds": {
            "type": "integer"
          },
          "rounded_seconds": {
            "type": "integer"
          },
          "billable_seconds": {
            "type": "integer"
          },
          "time_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "unpriced_billable_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "amounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeReportAmount"
            }
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "user_name": {
            "type": "string"
          },
          "is_contractor": {
            "type": "boolean"
          },
          "capacity_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "utilization_ppm": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "TimeReport": {
        "type": "object",
        "required": [
          "from",
          "to",
          "fixed_fee_included",
          "totals",
          "clients",
          "projects",
          "tasks",
          "teammates"
        ],
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "fixed_fee_included": {
            "type": "boolean"
          },
          "totals": {
            "$ref": "#/components/schemas/TimeReportTotals"
          },
          "clients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeReportClientRow"
            }
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeReportProjectRow"
            }
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeReportTaskRow"
            }
          },
          "teammates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeReportTeammateRow"
            }
          }
        },
        "additionalProperties": false
      },
      "TimeReportEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TimeReport"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "UninvoicedCurrencyTotal": {
        "type": "object",
        "required": [
          "currency",
          "rounded_seconds",
          "time_entry_count",
          "unpriced_time_entry_count",
          "expense_count"
        ],
        "properties": {
          "currency": {
            "type": "string"
          },
          "rounded_seconds": {
            "type": "integer"
          },
          "time_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "unpriced_time_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "expense_count": {
            "type": "integer",
            "minimum": 0
          },
          "time_cents": {
            "type": "integer"
          },
          "expense_cents": {
            "type": "integer",
            "minimum": 0
          },
          "total_cents": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "UninvoicedProjectRow": {
        "type": "object",
        "required": [
          "client_id",
          "client_name",
          "project_id",
          "project_name",
          "project_code",
          "totals"
        ],
        "properties": {
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "client_name": {
            "type": "string"
          },
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_name": {
            "type": "string"
          },
          "project_code": {
            "type": "string"
          },
          "totals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UninvoicedCurrencyTotal"
            }
          }
        },
        "additionalProperties": false
      },
      "UninvoicedReport": {
        "type": "object",
        "required": [
          "from",
          "to",
          "client_id",
          "project_id",
          "totals",
          "projects"
        ],
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "client_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "totals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UninvoicedCurrencyTotal"
            }
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UninvoicedProjectRow"
            }
          }
        },
        "additionalProperties": false
      },
      "UninvoicedReportEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/UninvoicedReport"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "ContractorCostRow": {
        "type": "object",
        "required": [
          "user_id",
          "name",
          "payroll_email",
          "is_contractor",
          "currency",
          "rounded_seconds",
          "utilization_ppm",
          "cost_cents",
          "cost_rate_cents",
          "cost_rate_is_mixed",
          "entry_count",
          "entries_without_rate"
        ],
        "properties": {
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "payroll_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_contractor": {
            "type": "boolean"
          },
          "currency": {
            "type": "string"
          },
          "rounded_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "utilization_ppm": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_rate_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_rate_is_mixed": {
            "type": "boolean"
          },
          "entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "entries_without_rate": {
            "type": "integer",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "ContractorCostReport": {
        "type": "object",
        "required": [
          "from",
          "to",
          "rows"
        ],
        "properties": {
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContractorCostRow"
            }
          }
        },
        "additionalProperties": false
      },
      "ContractorCostReportEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ContractorCostReport"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "InvoicedReportTotal": {
        "type": "object",
        "required": [
          "currency",
          "invoice_count"
        ],
        "properties": {
          "currency": {
            "type": "string"
          },
          "invoice_count": {
            "type": "integer",
            "minimum": 0
          },
          "invoiced_cents": {
            "type": "integer"
          },
          "paid_cents": {
            "type": "integer"
          },
          "balance_cents": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "InvoicedReportRow": {
        "type": "object",
        "required": [
          "invoice_id",
          "number",
          "state",
          "close_reason",
          "issue_date",
          "due_date",
          "client_id",
          "client_name",
          "subject",
          "currency"
        ],
        "properties": {
          "invoice_id": {
            "type": "integer",
            "minimum": 1
          },
          "number": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "draft",
              "open",
              "paid",
              "closed"
            ]
          },
          "close_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "cancelled",
                  "written_off",
                  "source_closed"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "issue_date": {
            "type": "string",
            "format": "date"
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "client_name": {
            "type": "string"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string"
          },
          "invoiced_cents": {
            "type": "integer"
          },
          "paid_cents": {
            "type": "integer"
          },
          "balance_cents": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "InvoicedReport": {
        "type": "object",
        "required": [
          "from",
          "to",
          "client_id",
          "status",
          "totals",
          "rows"
        ],
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "client_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "draft",
                  "open",
                  "paid",
                  "closed"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "totals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoicedReportTotal"
            }
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoicedReportRow"
            }
          }
        },
        "additionalProperties": false
      },
      "InvoicedReportEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InvoicedReport"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "PaymentsReceivedReportTotal": {
        "type": "object",
        "required": [
          "currency",
          "payment_count"
        ],
        "properties": {
          "currency": {
            "type": "string"
          },
          "payment_count": {
            "type": "integer",
            "minimum": 0
          },
          "payment_cents": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "PaymentReceivedReportRow": {
        "type": "object",
        "required": [
          "payment_id",
          "payment_date",
          "invoice_id",
          "invoice_number",
          "client_id",
          "client_name",
          "currency",
          "provider"
        ],
        "properties": {
          "payment_id": {
            "type": "integer",
            "minimum": 1
          },
          "payment_date": {
            "type": "string",
            "format": "date"
          },
          "invoice_id": {
            "type": "integer",
            "minimum": 1
          },
          "invoice_number": {
            "type": "string"
          },
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "client_name": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "invoice_total_cents": {
            "type": "integer"
          },
          "payment_cents": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "PaymentsReceivedReport": {
        "type": "object",
        "required": [
          "from",
          "to",
          "client_id",
          "totals",
          "rows"
        ],
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "client_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "totals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentsReceivedReportTotal"
            }
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentReceivedReportRow"
            }
          }
        },
        "additionalProperties": false
      },
      "PaymentsReceivedReportEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PaymentsReceivedReport"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "ReceivablesReportTotal": {
        "type": "object",
        "required": [
          "currency",
          "invoice_count"
        ],
        "properties": {
          "currency": {
            "type": "string"
          },
          "invoice_count": {
            "type": "integer",
            "minimum": 0
          },
          "invoiced_cents": {
            "type": "integer"
          },
          "outstanding_cents": {
            "type": "integer"
          },
          "not_due_cents": {
            "type": "integer"
          },
          "days_1_to_30_cents": {
            "type": "integer"
          },
          "days_31_to_60_cents": {
            "type": "integer"
          },
          "days_61_to_90_cents": {
            "type": "integer"
          },
          "days_90_plus_cents": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "ReceivablesReportRow": {
        "type": "object",
        "required": [
          "client_id",
          "client_name",
          "currency",
          "invoice_count"
        ],
        "properties": {
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "client_name": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "invoice_count": {
            "type": "integer",
            "minimum": 0
          },
          "invoiced_cents": {
            "type": "integer"
          },
          "outstanding_cents": {
            "type": "integer"
          },
          "not_due_cents": {
            "type": "integer"
          },
          "days_1_to_30_cents": {
            "type": "integer"
          },
          "days_31_to_60_cents": {
            "type": "integer"
          },
          "days_61_to_90_cents": {
            "type": "integer"
          },
          "days_90_plus_cents": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "ReceivablesReport": {
        "type": "object",
        "required": [
          "as_of",
          "client_id",
          "totals",
          "rows"
        ],
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date"
          },
          "client_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "totals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReceivablesReportTotal"
            }
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReceivablesReportRow"
            }
          }
        },
        "additionalProperties": false
      },
      "ReceivablesReportEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ReceivablesReport"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "ReportDefinitionPresentation": {
        "type": "object",
        "required": [
          "result",
          "grouped",
          "include_zero_values"
        ],
        "properties": {
          "result": {
            "type": "string",
            "enum": [
              "summary",
              "detailed"
            ]
          },
          "grouped": {
            "type": "boolean"
          },
          "include_zero_values": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "SavedReportInput": {
        "type": "object",
        "required": [
          "name",
          "fields",
          "metrics",
          "filters",
          "group_by",
          "presentation"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "metrics": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "filters": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "group_by": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          },
          "presentation": {
            "$ref": "#/components/schemas/ReportDefinitionPresentation"
          }
        },
        "additionalProperties": false
      },
      "SavedReportUpdate": {
        "type": "object",
        "required": [
          "version"
        ],
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "metrics": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "filters": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "group_by": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          },
          "view": {
            "$ref": "#/components/schemas/SavedReportAddress"
          },
          "presentation": {
            "$ref": "#/components/schemas/ReportDefinitionPresentation"
          }
        },
        "additionalProperties": false
      },
      "SavedReportAddress": {
        "type": "object",
        "required": [
          "report",
          "query"
        ],
        "properties": {
          "report": {
            "type": "string",
            "description": "The Reports kind, such as time or invoiced."
          },
          "query": {
            "type": "string",
            "description": "The report's query string: filters, grouping, sort and range."
          }
        },
        "additionalProperties": false
      },
      "SavedReportViewInput": {
        "type": "object",
        "required": [
          "name",
          "view"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "view": {
            "$ref": "#/components/schemas/SavedReportAddress"
          }
        },
        "additionalProperties": false
      },
      "SavedReport": {
        "type": "object",
        "required": [
          "id",
          "name",
          "version",
          "fields",
          "metrics",
          "filters",
          "group_by",
          "presentation",
          "owner",
          "is_custom",
          "view",
          "pinned",
          "shared",
          "shared_with",
          "owned_by_viewer",
          "can_delete",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "metrics": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "filters": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "group_by": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          },
          "presentation": {
            "$ref": "#/components/schemas/ReportDefinitionPresentation"
          },
          "owner": {
            "type": "object",
            "additionalProperties": true
          },
          "is_custom": {
            "type": "boolean"
          },
          "pinned": {
            "type": "boolean"
          },
          "shared": {
            "type": "boolean"
          },
          "view": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SavedReportAddress"
              },
              {
                "type": "null"
              }
            ]
          },
          "shared_with": {
            "type": "object",
            "required": [
              "users",
              "profiles"
            ],
            "properties": {
              "users": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "user_id",
                    "name"
                  ],
                  "properties": {
                    "user_id": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "profiles": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "member",
                    "project_manager",
                    "people_admin",
                    "accounting",
                    "executive_manager",
                    "administrator"
                  ]
                }
              }
            },
            "additionalProperties": false
          },
          "owned_by_viewer": {
            "type": "boolean"
          },
          "can_delete": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "SavedReportEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SavedReport"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "SavedReportListEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SavedReport"
            }
          }
        },
        "additionalProperties": false
      },
      "ReportRunnerResult": {
        "type": "object",
        "required": [
          "definitionId",
          "definitionVersion",
          "state",
          "rows"
        ],
        "properties": {
          "definitionId": {
            "type": "string"
          },
          "definitionVersion": {
            "type": "integer",
            "minimum": 1
          },
          "state": {
            "type": "string",
            "enum": [
              "ready",
              "empty",
              "too_many_rows"
            ]
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": false
      },
      "ReportRunnerEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ReportRunnerResult"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "ReportDefinitionRegistry": {
        "type": "object",
        "required": [
          "fields",
          "metrics"
        ],
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "metrics": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": false
      },
      "ReportDefinitionRegistryEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ReportDefinitionRegistry"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "DetailedExpenseRow": {
        "type": "object",
        "required": [
          "expense_id",
          "spent_date",
          "client_id",
          "client_name",
          "project_id",
          "project_name",
          "project_code",
          "category_id",
          "category_name",
          "user_id",
          "user_name",
          "notes",
          "units",
          "billable",
          "reimbursable",
          "invoice_id",
          "currency"
        ],
        "properties": {
          "expense_id": {
            "type": "integer",
            "minimum": 1
          },
          "spent_date": {
            "type": "string",
            "format": "date"
          },
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "client_name": {
            "type": "string"
          },
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_name": {
            "type": "string"
          },
          "project_code": {
            "type": "string"
          },
          "category_id": {
            "type": "integer",
            "minimum": 1
          },
          "category_name": {
            "type": "string"
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "user_name": {
            "type": "string"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "units": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "billable": {
            "type": "boolean"
          },
          "reimbursable": {
            "type": "boolean"
          },
          "invoice_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string"
          },
          "total_cost_cents": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "DetailedExpenseTotal": {
        "type": "object",
        "required": [
          "currency",
          "expense_count"
        ],
        "properties": {
          "currency": {
            "type": "string"
          },
          "expense_count": {
            "type": "integer",
            "minimum": 0
          },
          "total_cost_cents": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "DetailedExpenseReport": {
        "type": "object",
        "required": [
          "from",
          "to",
          "client_id",
          "project_id",
          "category_id",
          "user_id",
          "billable",
          "reimbursable",
          "invoice_state",
          "active_projects_only",
          "totals",
          "rows"
        ],
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "client_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "category_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "user_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "billable": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "reimbursable": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "invoice_state": {
            "type": "string",
            "enum": [
              "all",
              "invoiced",
              "uninvoiced"
            ]
          },
          "active_projects_only": {
            "type": "boolean"
          },
          "totals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DetailedExpenseTotal"
            }
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DetailedExpenseRow"
            }
          }
        },
        "additionalProperties": false
      },
      "DetailedExpenseReportEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DetailedExpenseReport"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "MonthEndItem": {
        "type": "object",
        "required": [
          "subject_type",
          "subject_id",
          "description",
          "amount_cents",
          "currency",
          "target",
          "brand_name",
          "cost_cents",
          "margin_cents"
        ],
        "properties": {
          "subject_type": {
            "type": "string"
          },
          "subject_id": {
            "type": "integer",
            "minimum": 1
          },
          "description": {
            "type": "string"
          },
          "amount_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "target": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "brand_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "margin_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "MonthEndExclusion": {
        "type": "object",
        "required": [
          "invoice_id",
          "number",
          "reason"
        ],
        "properties": {
          "invoice_id": {
            "type": "integer",
            "minimum": 1
          },
          "number": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "MonthEndManifest": {
        "type": "object",
        "required": [
          "period_start",
          "period_end",
          "items",
          "excluded"
        ],
        "properties": {
          "period_start": {
            "type": "string",
            "format": "date"
          },
          "period_end": {
            "type": "string",
            "format": "date"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonthEndItem"
            }
          },
          "excluded": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonthEndExclusion"
            }
          }
        },
        "additionalProperties": false
      },
      "MonthEndManifestEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MonthEndManifest"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "BandedMonthRow": {
        "type": "object",
        "required": [
          "period_start",
          "period_end",
          "project_id",
          "project_name",
          "client_id",
          "client_name",
          "currency",
          "rounded_seconds",
          "billable_value_cents",
          "cost_value_cents",
          "entries_without_billable_rate",
          "entries_without_cost_rate",
          "claimed_in_other_currency",
          "billed_cents",
          "foregone_cents",
          "cost_ratio_basis_points",
          "cost_alert_basis_points",
          "cost_ratio_state"
        ],
        "properties": {
          "period_start": {
            "type": "string",
            "format": "date"
          },
          "period_end": {
            "type": "string",
            "format": "date"
          },
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_name": {
            "type": "string"
          },
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "client_name": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "rounded_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "billable_value_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_value_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "entries_without_billable_rate": {
            "type": "integer",
            "minimum": 0
          },
          "entries_without_cost_rate": {
            "type": "integer",
            "minimum": 0
          },
          "claimed_in_other_currency": {
            "type": "integer",
            "minimum": 0
          },
          "billed_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "foregone_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_ratio_basis_points": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_alert_basis_points": {
            "type": "integer",
            "minimum": 1
          },
          "cost_ratio_state": {
            "type": "string",
            "enum": [
              "within",
              "over",
              "unpriced",
              "unbilled"
            ]
          }
        },
        "additionalProperties": false
      },
      "BandedMonthReport": {
        "type": "object",
        "required": [
          "from",
          "to",
          "rows"
        ],
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BandedMonthRow"
            }
          }
        },
        "additionalProperties": false
      },
      "BandedMonthReportEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/BandedMonthReport"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "BandCostAlert": {
        "type": "object",
        "required": [
          "basis_points"
        ],
        "properties": {
          "basis_points": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20000
          }
        },
        "additionalProperties": false
      },
      "BandCostAlertEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/BandCostAlert"
          }
        },
        "additionalProperties": false
      },
      "BandCostAlertInput": {
        "type": "object",
        "required": [
          "basis_points"
        ],
        "properties": {
          "basis_points": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20000
          }
        },
        "additionalProperties": false
      },
      "ProfitabilityRow": {
        "type": "object",
        "required": [
          "project_id",
          "project_name",
          "project_code",
          "client_id",
          "client_name",
          "currency",
          "rounded_seconds",
          "revenue_cents",
          "cost_cents",
          "profit_cents",
          "return_on_cost_ppm",
          "revenue_fee_cents",
          "fees_included_in_delivery_cost_cents",
          "entries_without_billable_rate",
          "entries_without_cost_rate"
        ],
        "properties": {
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "project_name": {
            "type": "string"
          },
          "project_code": {
            "type": "string"
          },
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "client_name": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "rounded_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "revenue_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "profit_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "return_on_cost_ppm": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "revenue_fee_cents": {
            "type": "integer",
            "minimum": 0
          },
          "fees_included_in_delivery_cost_cents": {
            "type": "integer",
            "minimum": 0
          },
          "entries_without_billable_rate": {
            "type": "integer",
            "minimum": 0
          },
          "entries_without_cost_rate": {
            "type": "integer",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "ProfitabilityTotals": {
        "type": "object",
        "required": [
          "rounded_seconds",
          "revenue_cents",
          "cost_cents",
          "profit_cents",
          "return_on_cost_ppm",
          "revenue_fee_cents",
          "fees_included_in_delivery_cost_cents",
          "entries_without_billable_rate",
          "entries_without_cost_rate",
          "projects_not_converted"
        ],
        "properties": {
          "rounded_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "revenue_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "profit_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "return_on_cost_ppm": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "revenue_fee_cents": {
            "type": "integer",
            "minimum": 0
          },
          "fees_included_in_delivery_cost_cents": {
            "type": "integer",
            "minimum": 0
          },
          "entries_without_billable_rate": {
            "type": "integer",
            "minimum": 0
          },
          "entries_without_cost_rate": {
            "type": "integer",
            "minimum": 0
          },
          "projects_not_converted": {
            "type": "integer",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "ProfitabilityDimensionRow": {
        "type": "object",
        "required": [
          "dimension_id",
          "dimension_name",
          "currency",
          "rounded_seconds",
          "revenue_cents",
          "cost_cents",
          "profit_cents",
          "return_on_cost_ppm",
          "revenue_fee_cents",
          "fees_included_in_delivery_cost_cents",
          "entries_without_billable_rate",
          "entries_without_cost_rate",
          "included_in_headline"
        ],
        "properties": {
          "dimension_id": {
            "type": "integer",
            "minimum": 1
          },
          "dimension_name": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "rounded_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "revenue_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "profit_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "return_on_cost_ppm": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "revenue_fee_cents": {
            "type": "integer",
            "minimum": 0
          },
          "fees_included_in_delivery_cost_cents": {
            "type": "integer",
            "minimum": 0
          },
          "entries_without_billable_rate": {
            "type": "integer",
            "minimum": 0
          },
          "entries_without_cost_rate": {
            "type": "integer",
            "minimum": 0
          },
          "included_in_headline": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ProfitabilityTrendRow": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProfitabilityDimensionRow"
          },
          {
            "type": "object",
            "required": [
              "period_start",
              "period_end",
              "current"
            ],
            "properties": {
              "period_start": {
                "type": "string",
                "format": "date"
              },
              "period_end": {
                "type": "string",
                "format": "date"
              },
              "current": {
                "type": "boolean"
              }
            }
          }
        ]
      },
      "ProfitabilityFilters": {
        "type": "object",
        "required": [
          "project_status",
          "billing_method",
          "manager_id",
          "tag_id"
        ],
        "properties": {
          "project_status": {
            "type": "string",
            "enum": [
              "all",
              "active",
              "archived"
            ]
          },
          "billing_method": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "non_billable",
                  "time_materials",
                  "fixed_fee"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "manager_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "tag_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "ProfitabilityReport": {
        "type": "object",
        "required": [
          "from",
          "to",
          "organization_currency",
          "rows",
          "clients",
          "teammates",
          "tasks",
          "trend",
          "totals",
          "filters",
          "previous_from",
          "previous_to",
          "previous_totals"
        ],
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "organization_currency": {
            "type": "string"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfitabilityRow"
            }
          },
          "clients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfitabilityDimensionRow"
            }
          },
          "teammates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfitabilityDimensionRow"
            }
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfitabilityDimensionRow"
            }
          },
          "trend": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfitabilityTrendRow"
            }
          },
          "totals": {
            "$ref": "#/components/schemas/ProfitabilityTotals"
          },
          "filters": {
            "$ref": "#/components/schemas/ProfitabilityFilters"
          },
          "previous_from": {
            "type": "string",
            "format": "date"
          },
          "previous_to": {
            "type": "string",
            "format": "date"
          },
          "previous_totals": {
            "$ref": "#/components/schemas/ProfitabilityTotals"
          }
        },
        "additionalProperties": false
      },
      "ProfitabilityReportEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ProfitabilityReport"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "ClientRollupCurrency": {
        "type": "object",
        "required": [
          "currency",
          "expense_cents"
        ],
        "properties": {
          "currency": {
            "type": "string"
          },
          "expense_cents": {
            "type": "integer",
            "minimum": 0
          },
          "uninvoiced_time_cents": {
            "type": "integer"
          },
          "uninvoiced_expense_cents": {
            "type": "integer",
            "minimum": 0
          },
          "uninvoiced_total_cents": {
            "type": "integer"
          },
          "money_budget_cents": {
            "type": "integer",
            "minimum": 0
          },
          "cost_cents": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "ClientRollupMetrics": {
        "type": "object",
        "required": [
          "time_entry_count",
          "expense_count",
          "rounded_seconds",
          "billable_seconds",
          "budgeted_seconds",
          "time_budget_seconds",
          "unpriced_billable_entry_count",
          "unpriced_cost_entry_count",
          "currencies"
        ],
        "properties": {
          "time_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "expense_count": {
            "type": "integer",
            "minimum": 0
          },
          "rounded_seconds": {
            "type": "integer"
          },
          "billable_seconds": {
            "type": "integer"
          },
          "budgeted_seconds": {
            "type": "integer"
          },
          "time_budget_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "unpriced_billable_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "unpriced_cost_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "currencies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientRollupCurrency"
            }
          }
        },
        "additionalProperties": false
      },
      "ClientRollupNode": {
        "type": "object",
        "required": [
          "client_id",
          "name",
          "parent_client_id",
          "depth",
          "direct",
          "rollup"
        ],
        "properties": {
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "parent_client_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "depth": {
            "type": "integer",
            "minimum": 0
          },
          "direct": {
            "$ref": "#/components/schemas/ClientRollupMetrics"
          },
          "rollup": {
            "$ref": "#/components/schemas/ClientRollupMetrics"
          }
        },
        "additionalProperties": false
      },
      "ClientRollupReport": {
        "type": "object",
        "required": [
          "root_client_id",
          "from",
          "to",
          "nodes"
        ],
        "properties": {
          "root_client_id": {
            "type": "integer",
            "minimum": 1
          },
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientRollupNode"
            }
          }
        },
        "additionalProperties": false
      },
      "ClientRollupReportEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ClientRollupReport"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "ProjectBudgetGrain": {
        "type": "object",
        "required": [
          "source",
          "source_id",
          "unit",
          "calculation",
          "unpriced_entry_count"
        ],
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "project",
              "task_assignment",
              "user_assignment"
            ]
          },
          "source_id": {
            "type": "integer",
            "minimum": 1
          },
          "unit": {
            "type": "string",
            "enum": [
              "seconds",
              "cents"
            ]
          },
          "calculation": {
            "type": "string",
            "enum": [
              "time",
              "billable",
              "cost"
            ]
          },
          "unpriced_entry_count": {
            "type": "integer",
            "minimum": 0
          },
          "budget_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "spent_seconds": {
            "type": "integer"
          },
          "remaining_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "budget_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "spent_cents": {
            "type": "integer"
          },
          "remaining_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "ProjectBudgetReport": {
        "type": "object",
        "required": [
          "project_id",
          "budget_by",
          "expenses_included",
          "from",
          "to",
          "grains"
        ],
        "properties": {
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "budget_by": {
            "type": "string",
            "enum": [
              "project",
              "project_cost",
              "task",
              "task_fees",
              "person",
              "none"
            ]
          },
          "expenses_included": {
            "type": "boolean"
          },
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "grains": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectBudgetGrain"
            }
          }
        },
        "additionalProperties": false
      },
      "ProjectBudgetReportEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ProjectBudgetReport"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "ProjectBudgetSummary": {
        "type": "object",
        "required": [
          "project_id",
          "currency",
          "budget_by",
          "unit",
          "unpriced_entry_count"
        ],
        "properties": {
          "project_id": {
            "type": "integer",
            "minimum": 1
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "budget_by": {
            "type": "string",
            "enum": [
              "project",
              "project_cost",
              "task",
              "task_fees",
              "person",
              "none"
            ]
          },
          "unit": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "seconds",
              "cents",
              null
            ]
          },
          "unpriced_entry_count": {
            "type": "integer",
            "minimum": 1
          },
          "budget_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "spent_seconds": {
            "type": "integer"
          },
          "remaining_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "budget_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "spent_cents": {
            "type": "integer"
          },
          "remaining_cents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_cents": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "ProjectBudgetSummaryListEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectBudgetSummary"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "ClientHierarchyNode": {
        "type": "object",
        "required": [
          "ancestor_id",
          "descendant_id",
          "depth"
        ],
        "properties": {
          "ancestor_id": {
            "type": "integer",
            "minimum": 1
          },
          "descendant_id": {
            "type": "integer",
            "minimum": 1
          },
          "depth": {
            "type": "integer",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "ClientHierarchyListEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientHierarchyNode"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "ModuleState": {
        "type": "object",
        "required": [
          "module",
          "enabled"
        ],
        "properties": {
          "module": {
            "type": "string",
            "enum": [
              "approval",
              "expenses",
              "own_money",
              "activity_log"
            ]
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ModuleListEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModuleState"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "AccountRetentionRule": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "category",
          "reason",
          "period",
          "review_after_days"
        ],
        "properties": {
          "category": {
            "type": "string",
            "enum": [
              "time_and_worker_attribution",
              "billing_and_payments",
              "audit_and_security",
              "legal_hold"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "period": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "review_after_days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 365
          }
        }
      },
      "AccountRetentionPolicy": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "frameworks",
          "retained_records",
          "response_target_days",
          "operator_contact",
          "user_notice",
          "backup_handling",
          "acknowledged"
        ],
        "properties": {
          "frameworks": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "gdpr",
                "us_florida",
                "us_al",
                "us_ak",
                "us_az",
                "us_ar",
                "california_ccpa_cpra",
                "colorado_cpa",
                "us_ct",
                "us_de",
                "us_dc",
                "us_fl",
                "us_ga",
                "us_hi",
                "us_id",
                "us_il",
                "us_in",
                "us_ia",
                "us_ks",
                "us_ky",
                "us_la",
                "us_me",
                "us_md",
                "us_ma",
                "us_mi",
                "us_mn",
                "us_ms",
                "us_mo",
                "us_mt",
                "us_ne",
                "us_nv",
                "us_nh",
                "us_nj",
                "us_nm",
                "us_ny",
                "us_nc",
                "us_nd",
                "us_oh",
                "us_ok",
                "us_or",
                "us_pa",
                "us_ri",
                "us_sc",
                "us_sd",
                "us_tn",
                "texas_tdpsa",
                "us_ut",
                "us_vt",
                "us_va",
                "us_wa",
                "us_wv",
                "us_wi",
                "us_wy",
                "other"
              ]
            }
          },
          "retained_records": {
            "type": "array",
            "maxItems": 4,
            "items": {
              "$ref": "#/components/schemas/AccountRetentionRule"
            }
          },
          "response_target_days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 90
          },
          "operator_contact": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "user_notice": {
            "type": "string",
            "minLength": 1,
            "maxLength": 5000
          },
          "backup_handling": {
            "type": "string",
            "minLength": 1,
            "maxLength": 5000
          },
          "acknowledged": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        }
      },
      "AccountRetentionPublication": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "expected_version",
          "policy"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "policy": {
            "$ref": "#/components/schemas/AccountRetentionPolicy"
          }
        }
      },
      "AccountRetentionRecord": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version",
          "policy",
          "published_at"
        ],
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "policy": {
            "$ref": "#/components/schemas/AccountRetentionPolicy"
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AccountRetentionEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountRetentionRecord"
              },
              {
                "type": "null"
              }
            ]
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        }
      },
      "SignInMethodState": {
        "type": "object",
        "required": [
          "method",
          "configured",
          "enabled"
        ],
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "password",
              "magic_link",
              "google",
              "github",
              "apple"
            ]
          },
          "configured": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "SignInMethodListEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SignInMethodState"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "SsoDomain": {
        "type": "object",
        "required": [
          "id",
          "domain",
          "verified",
          "verified_at",
          "last_checked_at",
          "record_name",
          "record_type",
          "record_value",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "domain": {
            "type": "string"
          },
          "verified": {
            "type": "boolean"
          },
          "verified_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_checked_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "record_name": {
            "type": "string"
          },
          "record_type": {
            "const": "TXT"
          },
          "record_value": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "SsoDomainCheck": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SsoDomain"
          },
          {
            "type": "object",
            "required": [
              "dnssec_validated"
            ],
            "properties": {
              "dnssec_validated": {
                "type": "boolean"
              }
            }
          }
        ]
      },
      "SsoDomainListEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SsoDomain"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "SsoDomainEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SsoDomain"
          }
        },
        "additionalProperties": false
      },
      "SsoDomainCheckEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SsoDomainCheck"
          }
        },
        "additionalProperties": false
      },
      "BrandAsset": {
        "type": "object",
        "required": [
          "slot",
          "content_hash",
          "content_type",
          "byte_size",
          "url",
          "updated_at"
        ],
        "properties": {
          "slot": {
            "enum": [
              "wordmark_light",
              "wordmark_dark",
              "favicon"
            ]
          },
          "content_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "content_type": {
            "enum": [
              "image/png",
              "image/jpeg",
              "image/webp"
            ]
          },
          "byte_size": {
            "type": "integer",
            "minimum": 1
          },
          "url": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "BrandAssetListEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BrandAsset"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "BrandMark": {
        "type": "object",
        "required": [
          "slot",
          "url",
          "content_type",
          "updated_at"
        ],
        "properties": {
          "slot": {
            "enum": [
              "wordmark_light",
              "wordmark_dark",
              "favicon"
            ]
          },
          "url": {
            "type": "string"
          },
          "content_type": {
            "enum": [
              "image/png",
              "image/jpeg",
              "image/webp"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "Brand": {
        "type": "object",
        "required": [
          "organization_name",
          "assets"
        ],
        "properties": {
          "organization_name": {
            "type": "string"
          },
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BrandMark"
            }
          },
          "palette": {
            "$ref": "#/components/schemas/InstancePalette"
          }
        },
        "additionalProperties": false
      },
      "BrandEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Brand"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "BrandAssetEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/BrandAsset"
          }
        },
        "additionalProperties": false
      },
      "BrandAssetUploadInput": {
        "type": "object",
        "required": [
          "file"
        ],
        "properties": {
          "file": {
            "type": "string",
            "format": "binary"
          }
        },
        "additionalProperties": false
      },
      "InstancePalette": {
        "type": "object",
        "additionalProperties": {
          "type": "string",
          "pattern": "^#[0-9A-F]{6}$"
        }
      },
      "InstanceTheme": {
        "type": "object",
        "required": [
          "palette",
          "updated_at"
        ],
        "properties": {
          "palette": {
            "$ref": "#/components/schemas/InstancePalette"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "InstanceThemeEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InstanceTheme"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "InstanceThemeInput": {
        "type": "object",
        "required": [
          "palette"
        ],
        "properties": {
          "palette": {
            "$ref": "#/components/schemas/InstancePalette"
          }
        },
        "additionalProperties": false
      },
      "BillStatus": {
        "type": "object",
        "required": [
          "configured",
          "company_id",
          "environment",
          "can_send_from_bill"
        ],
        "properties": {
          "configured": {
            "type": "boolean"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "environment": {
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "can_send_from_bill": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "BillStatusEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/BillStatus"
          }
        },
        "additionalProperties": false
      },
      "BillClientDelivery": {
        "type": "object",
        "required": [
          "client_id",
          "deliver_via_bill"
        ],
        "properties": {
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "deliver_via_bill": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "BillClientDeliveryEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/BillClientDelivery"
          }
        },
        "additionalProperties": false
      },
      "InvoicePaymentLinkEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "invoice_id",
              "url"
            ],
            "properties": {
              "invoice_id": {
                "type": "integer",
                "minimum": 1
              },
              "url": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "IncompleteRecurringInvoiceListEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "harvest_id",
                "client_id",
                "client_name",
                "invoice_count",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "id": {
                  "type": "integer",
                  "minimum": 1
                },
                "harvest_id": {
                  "type": "integer",
                  "nullable": true
                },
                "client_id": {
                  "type": "integer",
                  "minimum": 1
                },
                "client_name": {
                  "type": "string"
                },
                "invoice_count": {
                  "type": "integer",
                  "minimum": 1
                },
                "created_at": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "RecurringInvoiceCompletionEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "completed"
            ],
            "properties": {
              "id": {
                "type": "integer",
                "minimum": 1
              },
              "completed": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "InvoiceThankYouPreferenceEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "invoice_id",
              "auto_thank_you",
              "organization_auto_thank_you",
              "effective"
            ],
            "properties": {
              "invoice_id": {
                "type": "integer",
                "minimum": 1
              },
              "auto_thank_you": {
                "type": "boolean",
                "nullable": true
              },
              "organization_auto_thank_you": {
                "type": "boolean"
              },
              "effective": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "OrganizationInvoiceThankYouEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "auto_thank_you"
            ],
            "properties": {
              "auto_thank_you": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "ReminderPolicy": {
        "type": "object",
        "required": [
          "first_after_days",
          "every_days"
        ],
        "properties": {
          "first_after_days": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3650
          },
          "every_days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 365
          }
        },
        "additionalProperties": false
      },
      "InvoiceReminderPreferenceInput": {
        "type": "object",
        "required": [
          "reminders"
        ],
        "properties": {
          "reminders": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "InvoiceReminderPreferenceEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "invoice_id",
              "reminders",
              "organization_reminder_policy",
              "effective",
              "next_reminder_at"
            ],
            "properties": {
              "invoice_id": {
                "type": "integer",
                "minimum": 1
              },
              "reminders": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "organization_reminder_policy": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ReminderPolicy"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "effective": {
                "type": "boolean"
              },
              "next_reminder_at": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "OrganizationInvoiceRemindersInput": {
        "type": "object",
        "required": [
          "reminder_policy"
        ],
        "properties": {
          "reminder_policy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReminderPolicy"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "OrganizationInvoiceRemindersEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "reminder_policy"
            ],
            "properties": {
              "reminder_policy": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ReminderPolicy"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "applied_to_open_invoices": {
                "type": "integer",
                "minimum": 0
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "NotificationSettingsInput": {
        "type": "object",
        "properties": {
          "budget_alerts_include_admins": {
            "type": "boolean"
          },
          "submission_reminder": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SubmissionReminderSchedule"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "SubmissionReminderSchedule": {
        "type": "object",
        "required": [
          "day",
          "time"
        ],
        "properties": {
          "day": {
            "type": "string",
            "enum": [
              "monday",
              "tuesday",
              "wednesday",
              "thursday",
              "friday",
              "saturday",
              "sunday"
            ]
          },
          "time": {
            "type": "string",
            "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
          }
        },
        "additionalProperties": false
      },
      "NotificationSettingsEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "budget_alerts_include_admins",
              "submission_reminder"
            ],
            "properties": {
              "budget_alerts_include_admins": {
                "type": "boolean"
              },
              "submission_reminder": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/SubmissionReminderSchedule"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "TimesheetAutoApprovalInput": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "window_days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 60
          }
        },
        "additionalProperties": false
      },
      "TimesheetAutoApprovalEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "enabled",
              "window_days",
              "clock_starts_at",
              "effective_from",
              "approval_module_enabled"
            ],
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "window_days": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 60
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "clock_starts_at": {
                "type": "string",
                "enum": [
                  "submitted_at"
                ]
              },
              "effective_from": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "approval_module_enabled": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "JournalFormats": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "pdf",
            "csv",
            "xlsx"
          ]
        },
        "minItems": 1,
        "maxItems": 3,
        "uniqueItems": true
      },
      "InvoiceDocumentPreferenceInput": {
        "type": "object",
        "minProperties": 1,
        "properties": {
          "attach_pdf": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "attach_files": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "append_pdfs": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "attach_journal": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "detailed",
                      "summary"
                    ]
                  },
                  {
                    "type": "boolean",
                    "enum": [
                      false
                    ]
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "journal_formats": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JournalFormats"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "OrganizationInvoiceDocumentsInput": {
        "type": "object",
        "minProperties": 1,
        "properties": {
          "attach_pdf": {
            "type": "boolean"
          },
          "attach_files": {
            "type": "boolean"
          },
          "append_pdfs": {
            "type": "boolean"
          },
          "attach_journal": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "detailed",
                  "summary"
                ]
              },
              {
                "type": "boolean",
                "enum": [
                  false
                ]
              }
            ]
          },
          "journal_formats": {
            "$ref": "#/components/schemas/JournalFormats"
          }
        },
        "additionalProperties": false
      },
      "InvoiceDefaults": {
        "type": "object",
        "required": [
          "company_name",
          "company_address",
          "notes",
          "subject",
          "estimate_validity_days",
          "view_receipts"
        ],
        "properties": {
          "company_name": {
            "type": "string"
          },
          "company_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "estimate_validity_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 3650
              },
              {
                "type": "null"
              }
            ]
          },
          "view_receipts": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "InvoiceDefaultsEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InvoiceDefaults"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "InvoiceDefaultsInput": {
        "type": "object",
        "minProperties": 1,
        "properties": {
          "company_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "company_address": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100000
              },
              {
                "type": "null"
              }
            ]
          },
          "subject": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 998
              },
              {
                "type": "null"
              }
            ]
          },
          "estimate_validity_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 3650
              },
              {
                "type": "null"
              }
            ]
          },
          "view_receipts": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "InvoiceDocumentPreferenceEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "invoice_id",
              "attach_pdf",
              "client_attach_pdf",
              "organization_attach_pdf",
              "effective",
              "attach_files",
              "client_attach_files",
              "organization_attach_files",
              "effective_files",
              "append_pdfs",
              "client_append_pdfs",
              "organization_append_pdfs",
              "effective_append_pdfs",
              "attach_journal",
              "client_attach_journal",
              "organization_attach_journal",
              "effective_journal",
              "journal_formats",
              "client_journal_formats",
              "organization_journal_formats",
              "effective_journal_formats"
            ],
            "properties": {
              "invoice_id": {
                "type": "integer",
                "minimum": 1
              },
              "attach_pdf": {
                "type": "boolean",
                "nullable": true
              },
              "client_attach_pdf": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "organization_attach_pdf": {
                "type": "boolean"
              },
              "effective": {
                "type": "boolean"
              },
              "attach_files": {
                "type": "boolean",
                "nullable": true
              },
              "client_attach_files": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "organization_attach_files": {
                "type": "boolean"
              },
              "effective_files": {
                "type": "boolean"
              },
              "append_pdfs": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "client_append_pdfs": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "organization_append_pdfs": {
                "type": "boolean"
              },
              "effective_append_pdfs": {
                "type": "boolean"
              },
              "attach_journal": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "detailed",
                      "summary"
                    ]
                  },
                  {
                    "type": "boolean"
                  }
                ],
                "nullable": true
              },
              "client_attach_journal": {
                "anyOf": [
                  {
                    "oneOf": [
                      {
                        "type": "string",
                        "enum": [
                          "detailed",
                          "summary"
                        ]
                      },
                      {
                        "type": "boolean"
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "organization_attach_journal": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "detailed",
                      "summary"
                    ]
                  },
                  {
                    "type": "boolean"
                  }
                ]
              },
              "effective_journal": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "detailed",
                      "summary"
                    ]
                  },
                  {
                    "type": "boolean"
                  }
                ]
              },
              "journal_formats": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/JournalFormats"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "client_journal_formats": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/JournalFormats"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "organization_journal_formats": {
                "$ref": "#/components/schemas/JournalFormats"
              },
              "effective_journal_formats": {
                "$ref": "#/components/schemas/JournalFormats"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "OrganizationInvoiceDocumentsEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "attach_pdf",
              "attach_files",
              "append_pdfs",
              "attach_journal",
              "journal_formats"
            ],
            "properties": {
              "attach_pdf": {
                "type": "boolean"
              },
              "attach_files": {
                "type": "boolean"
              },
              "append_pdfs": {
                "type": "boolean"
              },
              "attach_journal": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "detailed",
                      "summary"
                    ]
                  },
                  {
                    "type": "boolean"
                  }
                ]
              },
              "journal_formats": {
                "$ref": "#/components/schemas/JournalFormats"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "InvoiceHoursReconciliationEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "invoice_id",
              "linked_seconds",
              "billed_seconds",
              "difference_seconds",
              "status",
              "tolerance_seconds",
              "projects",
              "not_compared",
              "hours_version",
              "total_tolerance_seconds",
              "comparison_complete",
              "has_mismatch",
              "invoice_version",
              "invoice_state",
              "not_compared_entry_ids",
              "lines",
              "entries"
            ],
            "properties": {
              "invoice_id": {
                "type": "integer",
                "minimum": 1
              },
              "linked_seconds": {
                "type": "integer"
              },
              "billed_seconds": {
                "type": "integer"
              },
              "difference_seconds": {
                "type": "integer"
              },
              "status": {
                "type": "string",
                "enum": [
                  "matched",
                  "billed_below_linked",
                  "billed_above_linked",
                  "not_comparable"
                ]
              },
              "tolerance_seconds": {
                "type": "integer",
                "minimum": 0
              },
              "hours_version": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "total_tolerance_seconds": {
                "type": "integer",
                "minimum": 0
              },
              "comparison_complete": {
                "type": "boolean"
              },
              "has_mismatch": {
                "type": "boolean"
              },
              "invoice_version": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "invoice_state": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "not_compared_entry_ids": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "line_id",
                    "project_id",
                    "entry_ids",
                    "linked_seconds",
                    "billed_seconds",
                    "difference_seconds",
                    "status"
                  ],
                  "properties": {
                    "line_id": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "project_id": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "entry_ids": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 1
                      }
                    },
                    "linked_seconds": {
                      "type": "integer"
                    },
                    "billed_seconds": {
                      "type": "integer"
                    },
                    "difference_seconds": {
                      "type": "integer"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "matched",
                        "billed_below_linked",
                        "billed_above_linked",
                        "not_comparable"
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              },
              "entries": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "entry_id",
                    "user_id",
                    "user_name",
                    "spent_date",
                    "project_id",
                    "project_name",
                    "seconds",
                    "eligible_for_release"
                  ],
                  "properties": {
                    "entry_id": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "user_id": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "user_name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "spent_date": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "project_id": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "project_name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "seconds": {
                      "type": "integer"
                    },
                    "eligible_for_release": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "projects": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "project_id",
                    "project_name",
                    "tolerance_seconds",
                    "linked_seconds",
                    "billed_seconds",
                    "difference_seconds",
                    "status"
                  ],
                  "properties": {
                    "project_id": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "project_name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tolerance_seconds": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "linked_seconds": {
                      "type": "integer"
                    },
                    "billed_seconds": {
                      "type": "integer"
                    },
                    "difference_seconds": {
                      "type": "integer"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "matched",
                        "billed_below_linked",
                        "billed_above_linked",
                        "not_comparable"
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              },
              "not_compared": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "line_id",
                    "position",
                    "description",
                    "quantity"
                  ],
                  "properties": {
                    "line_id": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "position": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "quantity": {
                      "type": "number"
                    }
                  },
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "InvoiceLineTimeReleaseInput": {
        "type": "object",
        "required": [
          "command_id",
          "line_id",
          "expected_version",
          "hours_version",
          "entry_ids",
          "confirmed"
        ],
        "properties": {
          "command_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          },
          "line_id": {
            "type": "integer",
            "minimum": 1
          },
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "hours_version": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "entry_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1000,
            "items": {
              "type": "integer",
              "minimum": 1
            }
          },
          "confirmed": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        },
        "additionalProperties": false
      },
      "InvoiceLineTimeReleaseEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "command_id",
              "invoice_id",
              "line_id",
              "expected_version",
              "hours_version",
              "released_entry_ids",
              "released_seconds",
              "recorded_at",
              "replayed"
            ],
            "properties": {
              "command_id": {
                "type": "string"
              },
              "invoice_id": {
                "type": "integer",
                "minimum": 1
              },
              "line_id": {
                "type": "integer",
                "minimum": 1
              },
              "expected_version": {
                "type": "integer",
                "minimum": 0
              },
              "hours_version": {
                "type": "string"
              },
              "released_entry_ids": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "released_seconds": {
                "type": "integer"
              },
              "recorded_at": {
                "type": "string"
              },
              "replayed": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "ReleasedTimeEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "invoice_id",
              "released"
            ],
            "properties": {
              "invoice_id": {
                "type": "integer",
                "minimum": 1
              },
              "released": {
                "type": "integer",
                "minimum": 1
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "PayoutAccount": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "provider",
          "external_id",
          "linked_by_user_id",
          "linked_at",
          "verified_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "provider": {
            "enum": [
              "deel",
              "wise"
            ]
          },
          "external_id": {
            "type": "string"
          },
          "linked_by_user_id": {
            "type": "integer",
            "minimum": 1
          },
          "linked_at": {
            "type": "string",
            "format": "date-time"
          },
          "verified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "PayoutPreference": {
        "type": "object",
        "required": [
          "user_id",
          "provider",
          "effective_provider",
          "organization_default",
          "version",
          "set_by",
          "linked_providers"
        ],
        "properties": {
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "provider": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "deel",
                  "wise"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "effective_provider": {
            "type": "string",
            "enum": [
              "deel",
              "wise"
            ]
          },
          "organization_default": {
            "type": "string",
            "enum": [
              "deel",
              "wise"
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "set_by": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "person",
                  "administrator",
                  "automatic"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "linked_providers": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "deel",
                "wise"
              ]
            }
          }
        },
        "additionalProperties": false
      },
      "PayoutPreferenceEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PayoutPreference"
          }
        },
        "additionalProperties": false
      },
      "PayoutPreferenceInput": {
        "type": "object",
        "required": [
          "provider",
          "expected_version"
        ],
        "properties": {
          "provider": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "deel",
                  "wise"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "expected_version": {
            "type": "integer",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "PayoutPreferenceRosterEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "organization_default",
              "people"
            ],
            "properties": {
              "organization_default": {
                "type": "string",
                "enum": [
                  "deel",
                  "wise"
                ]
              },
              "people": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "user_id",
                    "name",
                    "provider",
                    "version",
                    "set_by",
                    "linked_providers"
                  ],
                  "properties": {
                    "user_id": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "name": {
                      "type": "string"
                    },
                    "provider": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "deel",
                            "wise"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "set_by": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "person",
                            "administrator",
                            "automatic"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "linked_providers": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "deel",
                          "wise"
                        ]
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "PayoutProviderListEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PayoutProviderSetting"
            }
          }
        },
        "additionalProperties": false
      },
      "PayoutProviderSetting": {
        "type": "object",
        "required": [
          "provider",
          "enabled"
        ],
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "deel",
              "wise"
            ]
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PayoutProviderSettingInput": {
        "type": "object",
        "required": [
          "enabled"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PayoutAccountListEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PayoutAccount"
            }
          }
        },
        "additionalProperties": false
      },
      "PayoutAccountEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PayoutAccount"
          }
        },
        "additionalProperties": false
      },
      "PayoutAccountInput": {
        "type": "object",
        "required": [
          "provider",
          "external_id"
        ],
        "properties": {
          "provider": {
            "enum": [
              "deel",
              "wise"
            ]
          },
          "external_id": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "BillClientDeliveryInput": {
        "type": "object",
        "required": [
          "deliver_via_bill"
        ],
        "properties": {
          "deliver_via_bill": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "SsoDomainInput": {
        "type": "object",
        "required": [
          "domain"
        ],
        "properties": {
          "domain": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "TwoFactorStatus": {
        "type": "object",
        "required": [
          "enrolled",
          "email_enabled",
          "pending_confirmation",
          "recovery_codes_remaining"
        ],
        "properties": {
          "enrolled": {
            "type": "boolean"
          },
          "email_enabled": {
            "type": "boolean"
          },
          "pending_confirmation": {
            "type": "boolean"
          },
          "recovery_codes_remaining": {
            "type": "integer",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "TwoFactorStatusEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TwoFactorStatus"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "TwoFactorEnrolment": {
        "type": "object",
        "required": [
          "secret",
          "otpauth_uri",
          "recovery_codes"
        ],
        "properties": {
          "secret": {
            "type": "string"
          },
          "otpauth_uri": {
            "type": "string"
          },
          "recovery_codes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "TwoFactorEnrolmentEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TwoFactorEnrolment"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "TwoFactorCodeInput": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "TwoFactorChallengeIssued": {
        "type": "object",
        "required": [
          "status",
          "challenge",
          "expires_at",
          "methods"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "two_factor_required"
            ]
          },
          "challenge": {
            "type": "string"
          },
          "expires_at": {
            "type": "string"
          },
          "methods": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "totp",
                "email"
              ]
            }
          }
        },
        "additionalProperties": false
      },
      "TwoFactorChallengeIssuedEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TwoFactorChallengeIssued"
          }
        },
        "additionalProperties": false
      },
      "TwoFactorEmailCodeInput": {
        "type": "object",
        "properties": {
          "challenge": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "TwoFactorEmailState": {
        "type": "object",
        "required": [
          "user_id",
          "email_enabled"
        ],
        "properties": {
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "email_enabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "TwoFactorEmailStateEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TwoFactorEmailState"
          }
        },
        "additionalProperties": false
      },
      "TwoFactorEmailDisabled": {
        "type": "object",
        "required": [
          "user_id",
          "email_enabled"
        ],
        "properties": {
          "user_id": {
            "type": "integer",
            "minimum": 1
          },
          "email_enabled": {
            "type": "boolean",
            "enum": [
              false
            ]
          }
        },
        "additionalProperties": false
      },
      "TwoFactorEmailDisabledEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TwoFactorEmailDisabled"
          }
        },
        "additionalProperties": false
      },
      "TwoFactorChallengeInput": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "challenge": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "TwoFactorChallengeAccepted": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "authenticated"
            ]
          }
        },
        "additionalProperties": false
      },
      "TwoFactorChallengeAcceptedEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TwoFactorChallengeAccepted"
          }
        },
        "additionalProperties": false
      },
      "SignInResult": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/AuthPrincipal"
          },
          {
            "$ref": "#/components/schemas/TwoFactorChallengeIssued"
          }
        ]
      },
      "SignInResultEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SignInResult"
          }
        },
        "additionalProperties": false
      },
      "UserEmailInput": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "UserEmailAcceptedEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "status",
              "email"
            ],
            "properties": {
              "status": {
                "const": "verification_sent"
              },
              "email": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "ModulePatch": {
        "type": "object",
        "required": [
          "enabled"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ClientRateCardLine": {
        "type": "object",
        "required": [
          "task_id",
          "amount_cents"
        ],
        "properties": {
          "task_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "description": "The task this rate is for; null is the card default."
          },
          "amount_cents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000,
            "description": "Hourly rate in integer cents."
          }
        },
        "additionalProperties": false
      },
      "ClientRateCardVersion": {
        "type": "object",
        "required": [
          "id",
          "start_date",
          "lines",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "start_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "First day this version is in force; null means all prior dates."
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientRateCardLine"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ClientRateCard": {
        "type": "object",
        "required": [
          "id",
          "client_id",
          "name",
          "created_at",
          "versions"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "versions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientRateCardVersion"
            }
          }
        },
        "additionalProperties": false
      },
      "ClientRateCardInput": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "additionalProperties": false
      },
      "ClientRateCardVersionInput": {
        "type": "object",
        "required": [
          "start_date",
          "lines"
        ],
        "properties": {
          "start_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "lines": {
            "type": "array",
            "maxItems": 200,
            "items": {
              "$ref": "#/components/schemas/ClientRateCardLine"
            }
          }
        },
        "additionalProperties": false
      },
      "ClientRateCardEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ClientRateCard"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "EffectiveClientRateCard": {
        "type": "object",
        "required": [
          "client_id",
          "supplied_by_client_id",
          "depth",
          "card_id",
          "card_name",
          "version_start_date",
          "task_id",
          "amount_cents"
        ],
        "properties": {
          "client_id": {
            "type": "integer",
            "minimum": 1
          },
          "supplied_by_client_id": {
            "type": "integer",
            "minimum": 1
          },
          "depth": {
            "type": "integer",
            "minimum": 0
          },
          "card_id": {
            "type": "integer",
            "minimum": 1
          },
          "card_name": {
            "type": "string"
          },
          "version_start_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "task_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "description": "The matching line's task; null when the card default priced it."
          },
          "amount_cents": {
            "type": "integer",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "EffectiveClientRateCardEnvelope": {
        "type": "object",
        "required": [
          "data",
          "links"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/EffectiveClientRateCard"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          }
        },
        "additionalProperties": false
      },
      "CsvImportUploadBytes": {
        "type": "string",
        "format": "binary"
      },
      "CsvImportCapabilities": {
        "type": "object",
        "required": [
          "runtime",
          "staging_supported",
          "browser_ready",
          "apply_supported",
          "max_csv_bytes",
          "max_mapping_bytes",
          "raw_retention_hours"
        ],
        "additionalProperties": false,
        "properties": {
          "runtime": {
            "type": "string",
            "enum": [
              "container",
              "worker"
            ]
          },
          "staging_supported": {
            "type": "boolean"
          },
          "browser_ready": {
            "type": "boolean"
          },
          "apply_supported": {
            "type": "boolean"
          },
          "max_csv_bytes": {
            "type": "integer"
          },
          "max_mapping_bytes": {
            "type": "integer"
          },
          "raw_retention_hours": {
            "const": 24
          }
        }
      },
      "CsvImportTallies": {
        "type": "object",
        "required": [
          "file_rows",
          "selected_rows",
          "new_rows",
          "already_imported_rows",
          "rejected_row_count",
          "diagnostic_count",
          "file_error_count",
          "invalid_rows",
          "unsupported_rows",
          "source_seconds",
          "destination_seconds",
          "destination_delta_seconds",
          "deleted_imported_rows",
          "organization_currency",
          "unpriced",
          "ignored_columns",
          "ignored_column_count",
          "warning_count",
          "people",
          "clients",
          "projects",
          "tasks",
          "assignments"
        ],
        "additionalProperties": false,
        "properties": {
          "file_rows": {
            "type": "integer"
          },
          "selected_rows": {
            "type": "integer"
          },
          "new_rows": {
            "type": "integer"
          },
          "already_imported_rows": {
            "type": "integer"
          },
          "rejected_row_count": {
            "type": "integer"
          },
          "diagnostic_count": {
            "type": "integer"
          },
          "file_error_count": {
            "type": "integer"
          },
          "invalid_rows": {
            "type": "integer"
          },
          "unsupported_rows": {
            "type": "integer"
          },
          "source_seconds": {
            "type": "integer"
          },
          "destination_seconds": {
            "type": "integer"
          },
          "destination_delta_seconds": {
            "type": "integer"
          },
          "deleted_imported_rows": {
            "type": "integer"
          },
          "organization_currency": {
            "type": "string"
          },
          "unpriced": {
            "const": true
          },
          "ignored_columns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ignored_column_count": {
            "type": "integer"
          },
          "warning_count": {
            "type": "integer"
          },
          "people": {
            "type": "object",
            "required": [
              "matched",
              "new",
              "rejected"
            ],
            "additionalProperties": false,
            "properties": {
              "matched": {
                "type": "integer"
              },
              "new": {
                "type": "integer"
              },
              "rejected": {
                "type": "integer"
              }
            }
          },
          "clients": {
            "type": "object",
            "required": [
              "matched",
              "new",
              "rejected"
            ],
            "additionalProperties": false,
            "properties": {
              "matched": {
                "type": "integer"
              },
              "new": {
                "type": "integer"
              },
              "rejected": {
                "type": "integer"
              }
            }
          },
          "projects": {
            "type": "object",
            "required": [
              "matched",
              "new",
              "rejected"
            ],
            "additionalProperties": false,
            "properties": {
              "matched": {
                "type": "integer"
              },
              "new": {
                "type": "integer"
              },
              "rejected": {
                "type": "integer"
              }
            }
          },
          "tasks": {
            "type": "object",
            "required": [
              "matched",
              "new",
              "rejected"
            ],
            "additionalProperties": false,
            "properties": {
              "matched": {
                "type": "integer"
              },
              "new": {
                "type": "integer"
              },
              "rejected": {
                "type": "integer"
              }
            }
          },
          "assignments": {
            "type": "object",
            "required": [
              "user_project",
              "project_task"
            ],
            "additionalProperties": false,
            "properties": {
              "user_project": {
                "type": "integer"
              },
              "project_task": {
                "type": "integer"
              }
            }
          }
        }
      },
      "CsvImportChoices": {
        "type": "object",
        "required": [
          "workspace_identity",
          "source_id",
          "adapter_id",
          "date_format",
          "exporter_zone",
          "destination_interpretation",
          "currency_policy",
          "excluded_lines",
          "mapping"
        ],
        "additionalProperties": false,
        "properties": {
          "workspace_identity": {
            "type": "string"
          },
          "source_id": {
            "type": "string"
          },
          "adapter_id": {
            "type": "string"
          },
          "date_format": {
            "type": "string",
            "enum": [
              "iso"
            ]
          },
          "exporter_zone": {
            "type": "string"
          },
          "destination_interpretation": {
            "type": "string",
            "enum": [
              "source_wall_time"
            ]
          },
          "currency_policy": {
            "type": "string",
            "enum": [
              "destination_rates"
            ]
          },
          "excluded_lines": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "mapping": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "CsvImportMapping": {
        "type": "object",
        "required": [
          "workspace_identity",
          "exporter_zone",
          "date_format",
          "destination_interpretation",
          "currency_policy",
          "excluded_lines",
          "mapping",
          "version"
        ],
        "additionalProperties": false,
        "properties": {
          "workspace_identity": {
            "type": "string"
          },
          "exporter_zone": {
            "type": "string"
          },
          "date_format": {
            "type": "string",
            "enum": [
              "iso"
            ]
          },
          "destination_interpretation": {
            "type": "string",
            "enum": [
              "source_wall_time"
            ]
          },
          "currency_policy": {
            "type": "string",
            "enum": [
              "destination_rates"
            ]
          },
          "excluded_lines": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "mapping": {
            "type": "object",
            "additionalProperties": true
          },
          "version": {
            "type": "integer"
          }
        }
      },
      "CsvImportMappingState": {
        "type": "object",
        "required": [
          "version",
          "choices",
          "preview_id"
        ],
        "additionalProperties": false,
        "properties": {
          "version": {
            "type": "integer"
          },
          "choices": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CsvImportChoices"
              },
              {
                "type": "null"
              }
            ]
          },
          "preview_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "CsvImportRun": {
        "type": "object",
        "required": [
          "id",
          "status",
          "version",
          "file_sha256",
          "bytes",
          "staging_expires_at",
          "retention_deadline",
          "purge_allowed",
          "allowed_actions",
          "retryable",
          "preview_id",
          "preview_stale",
          "source_id",
          "tallies"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "uploading",
              "staged",
              "previewed",
              "confirmed",
              "completed",
              "failed",
              "cancelled",
              "expired",
              "purged"
            ]
          },
          "version": {
            "type": "integer"
          },
          "file_sha256": {
            "type": "string"
          },
          "bytes": {
            "type": "integer"
          },
          "staging_expires_at": {
            "type": "string"
          },
          "retention_deadline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "purge_allowed": {
            "type": "boolean"
          },
          "allowed_actions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "map",
                "preview",
                "purge"
              ]
            }
          },
          "retryable": {
            "type": "boolean"
          },
          "preview_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "preview_stale": {
            "type": "boolean"
          },
          "source_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tallies": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CsvImportTallies"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "CsvImportPreviewRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "preview_id": {
            "type": "string"
          }
        }
      },
      "CsvImportPreview": {
        "type": "object",
        "required": [
          "organization_name",
          "preview_id",
          "run",
          "choices",
          "tallies"
        ],
        "additionalProperties": false,
        "properties": {
          "organization_name": {
            "type": "string"
          },
          "preview_id": {
            "type": "string"
          },
          "run": {
            "$ref": "#/components/schemas/CsvImportRun"
          },
          "choices": {
            "$ref": "#/components/schemas/CsvImportChoices"
          },
          "tallies": {
            "$ref": "#/components/schemas/CsvImportTallies"
          }
        }
      },
      "CsvImportLineError": {
        "type": "object",
        "required": [
          "line",
          "scope",
          "excludable",
          "kind",
          "code",
          "message"
        ],
        "additionalProperties": false,
        "properties": {
          "line": {
            "type": "integer"
          },
          "scope": {
            "type": "string",
            "enum": [
              "file",
              "row"
            ]
          },
          "excludable": {
            "type": "boolean"
          },
          "kind": {
            "type": "string",
            "enum": [
              "invalid",
              "unsupported",
              "warning"
            ]
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "CsvImportErrorPage": {
        "type": "object",
        "required": [
          "items",
          "total",
          "next_cursor",
          "preview_id"
        ],
        "additionalProperties": false,
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CsvImportLineError"
            }
          },
          "total": {
            "type": "integer"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "preview_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "CsvImportSourceEntity": {
        "type": "object",
        "required": [
          "kind",
          "source_key",
          "label",
          "parent_source_key",
          "parents",
          "state",
          "selected_id",
          "selected_destination",
          "ambiguous"
        ],
        "additionalProperties": false,
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "people",
              "clients",
              "projects",
              "tasks"
            ]
          },
          "source_key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "parent_source_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "parents": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "kind",
                "source_key",
                "label"
              ],
              "additionalProperties": false,
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "clients",
                    "projects"
                  ]
                },
                "source_key": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                }
              }
            }
          },
          "state": {
            "type": "string",
            "enum": [
              "matched",
              "new",
              "rejected",
              "excluded"
            ]
          },
          "selected_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "selected_destination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CsvImportCandidate"
              },
              {
                "type": "null"
              }
            ]
          },
          "ambiguous": {
            "type": "boolean"
          }
        }
      },
      "CsvImportCandidate": {
        "type": "object",
        "required": [
          "id",
          "name",
          "parent_id",
          "parent_name",
          "is_active",
          "selectable",
          "currency"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "parent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "type": "boolean"
          },
          "selectable": {
            "type": "boolean"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "CsvImportCatalogPage": {
        "type": "object",
        "required": [
          "items",
          "total",
          "next_cursor",
          "preview_id"
        ],
        "additionalProperties": false,
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/CsvImportSourceEntity"
                },
                {
                  "$ref": "#/components/schemas/CsvImportCandidate"
                }
              ]
            }
          },
          "total": {
            "type": "integer"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "preview_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "CsvImportCapabilitiesEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CsvImportCapabilities"
          }
        }
      },
      "CsvImportRunEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CsvImportRun"
          }
        }
      },
      "CsvImportMappingStateEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CsvImportMappingState"
          }
        }
      },
      "CsvImportPreviewEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CsvImportPreview"
          }
        }
      },
      "CsvImportErrorPageEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CsvImportErrorPage"
          }
        }
      },
      "CsvImportCatalogPageEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CsvImportCatalogPage"
          }
        }
      },
      "CsvImportApplyCommand": {
        "type": "object",
        "properties": {
          "preview_id": {
            "type": "string",
            "pattern": "^preview_[a-f0-9]{64}$"
          },
          "command_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "expected_selected_rows": {
            "type": "integer",
            "minimum": 0,
            "maximum": 50000
          },
          "expected_source_seconds": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4320000000
          },
          "expected_destination_seconds": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "acknowledge_exclusions": {
            "type": "boolean"
          },
          "acknowledge_destination_difference": {
            "type": "boolean"
          },
          "acknowledge_new_people": {
            "type": "boolean"
          }
        },
        "required": [
          "preview_id",
          "command_id",
          "version",
          "expected_selected_rows",
          "expected_source_seconds",
          "expected_destination_seconds",
          "acknowledge_exclusions",
          "acknowledge_destination_difference",
          "acknowledge_new_people"
        ],
        "additionalProperties": false
      },
      "CsvImportCancelCommand": {
        "type": "object",
        "properties": {
          "command_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "command_id"
        ],
        "additionalProperties": false
      },
      "CsvImportApplyRun": {
        "type": "object",
        "properties": {
          "stage_id": {
            "type": "string"
          },
          "preview_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^preview_[a-f0-9]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "not_confirmed",
              "queued",
              "running",
              "paused",
              "partial",
              "completed",
              "cancelled",
              "failed",
              "superseded"
            ]
          },
          "code": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "processing_budget_exceeded",
                  "authority_expired",
                  "authority_revoked",
                  "input_expired",
                  "input_unavailable",
                  "policy_changed",
                  "parse_rejected",
                  "storage_unavailable",
                  "cancelled_by_administrator"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "command_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "command_known": {
            "type": "boolean"
          },
          "pending_command": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CsvImportApplyCommand"
              },
              {
                "type": "null"
              }
            ]
          },
          "file_rows": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "selected_rows": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "excluded_rows": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "committed_rows": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "inserted_rows": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "already_imported_rows": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "created_setup": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "source_seconds_total": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "source_seconds_committed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "destination_seconds": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "destination_delta_seconds": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "deleted_imported_rows": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "retention_deadline": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "retryable": {
            "type": "boolean"
          },
          "allowed_actions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "apply",
                "resume",
                "cancel",
                "inspect",
                "purge",
                "reconcile"
              ]
            }
          }
        },
        "required": [
          "stage_id",
          "preview_id",
          "state",
          "code",
          "command_id",
          "command_known",
          "pending_command",
          "file_rows",
          "selected_rows",
          "excluded_rows",
          "committed_rows",
          "inserted_rows",
          "already_imported_rows",
          "created_setup",
          "source_seconds_total",
          "source_seconds_committed",
          "destination_seconds",
          "destination_delta_seconds",
          "deleted_imported_rows",
          "retention_deadline",
          "retryable",
          "allowed_actions"
        ],
        "additionalProperties": false
      },
      "CsvImportApplyEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CsvImportApplyRun"
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      }
    }
  }
}