{
  "openapi": "3.1.0",
  "info": {
    "title": "Invarent Runtime API",
    "version": "1.0.0",
    "description": "Source-aligned contract for the Nest runtime. Shared target operations retain their canonical operation IDs; operational extensions remain explicitly source named."
  },
  "servers": [
    {
      "url": "https://api.invarent.com",
      "description": "Production API; sandbox and live isolation is selected by credential"
    },
    {
      "url": "https://api.cognautic.com",
      "description": "Legacy production alias retained during the Invarent domain transition"
    },
    {
      "url": "http://localhost:{port}",
      "description": "Local development runtime",
      "variables": {
        "port": {
          "default": "3000"
        }
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/access-grants": {
      "get": {
        "operationId": "listAccessGrants",
        "summary": "List access grants",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listAccessGrants",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "access:read"
        ]
      },
      "post": {
        "operationId": "createAccessGrants",
        "summary": "Create access grant",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createAccessGrant",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "access:write"
        ]
      }
    },
    "/v1/access-grants/{id}": {
      "get": {
        "operationId": "getAccessGrant",
        "summary": "Get access grant",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getAccessGrant",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "access:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateAccessGrant",
        "summary": "Update access grant",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateAccessGrant",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "access:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/access-grants/{id}:revoke": {
      "post": {
        "operationId": "revokeAccessGrant",
        "summary": "Revoke access grant",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#revokeAccessGrant",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "access:grant"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyInput"
              }
            }
          }
        }
      }
    },
    "/v1/accounting-periods": {
      "get": {
        "operationId": "listAccountingPeriods",
        "summary": "Accounting periods",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#accountingPeriods",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tenant:read"
        ]
      },
      "post": {
        "operationId": "createAccountingPeriods",
        "summary": "Create accounting period",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#createAccountingPeriod",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tenant:write"
        ]
      }
    },
    "/v1/accounting-periods/{id}": {
      "get": {
        "operationId": "getAccountingPeriod",
        "summary": "Accounting period",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#accountingPeriod",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tenant:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateAccountingPeriod",
        "summary": "Update accounting period",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#updateAccountingPeriod",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tenant:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/accounting-periods/{id}:hard-close": {
      "post": {
        "operationId": "hardClosePeriod",
        "summary": "Hard close period",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#hardClosePeriod",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "close:certify"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/accounting-periods/{id}:reopen": {
      "post": {
        "operationId": "reopenPeriod",
        "summary": "Reopen period",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#reopenPeriod",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "close:certify"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/accounting-periods/{id}:soft-close": {
      "post": {
        "operationId": "softClosePeriod",
        "summary": "Soft close period",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#softClosePeriod",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "close:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/accounting-policies": {
      "get": {
        "operationId": "listAccountingPolicies",
        "summary": "List accounting policies",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listAccountingPolicies",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "coa:read"
        ]
      },
      "post": {
        "operationId": "createAccountingPolicies",
        "summary": "Create accounting policy",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createAccountingPolicy",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "coa:write"
        ]
      }
    },
    "/v1/accounting-policies/{id}": {
      "get": {
        "operationId": "getAccountingPolicie",
        "summary": "Get accounting policy",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getAccountingPolicy",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "coa:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateAccountingPolicie",
        "summary": "Update accounting policy",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateAccountingPolicy",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "coa:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/accounts": {
      "get": {
        "operationId": "listAccounts",
        "summary": "Accounts",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#accounts",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "coa:read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/BookIdOptional"
          }
        ]
      },
      "post": {
        "operationId": "createAccounts",
        "summary": "Create account",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#createAccount",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "coa:write"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountCreateInput"
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{id}": {
      "get": {
        "operationId": "getAccount",
        "summary": "Account",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#account",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "coa:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateAccount",
        "summary": "Update account",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#updateAccount",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "coa:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/accruals": {
      "get": {
        "operationId": "listAccruals",
        "summary": "List accruals",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listAccruals",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "assets:read"
        ]
      },
      "post": {
        "operationId": "createAccruals",
        "summary": "Create accrual",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createAccrual",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "assets:write"
        ]
      }
    },
    "/v1/accruals/{id}": {
      "get": {
        "operationId": "getAccrual",
        "summary": "Get accrual",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getAccrual",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "assets:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateAccrual",
        "summary": "Update accrual",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateAccrual",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "assets:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/ai/suggestions": {
      "get": {
        "operationId": "listAISuggestions",
        "summary": "List ai suggestions",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#listAiSuggestions",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ai:read"
        ]
      }
    },
    "/v1/ai/suggestions/{id}": {
      "get": {
        "operationId": "getAISuggestion",
        "summary": "Get ai suggestion",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#getAiSuggestion",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ai:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/ai/suggestions/{id}:approve": {
      "post": {
        "operationId": "approveAISuggestion",
        "summary": "Approve ai suggestion",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#approveAiSuggestion",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ai:review"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/ai/suggestions/{id}:reject": {
      "post": {
        "operationId": "rejectAISuggestion",
        "summary": "Reject ai suggestion",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#rejectAiSuggestion",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ai:review"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/ap-aging": {
      "get": {
        "operationId": "getAPAging",
        "summary": "Ap aging",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#apAging",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:read"
        ]
      }
    },
    "/v1/api-keys": {
      "get": {
        "operationId": "platformListKeys",
        "summary": "List keys",
        "tags": [
          "platform"
        ],
        "x-ledgeros-source": "apps/api/src/platform/platform.controller.ts#listKeys",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "keys:manage"
        ]
      },
      "post": {
        "operationId": "platformCreateKey",
        "summary": "Create key",
        "tags": [
          "platform"
        ],
        "x-ledgeros-source": "apps/api/src/platform/platform.controller.ts#createKey",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "keys:manage"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CredentialCreateInput"
              }
            }
          }
        }
      }
    },
    "/v1/api-keys/{id}:revoke": {
      "post": {
        "operationId": "platformRevokeKey",
        "summary": "Revoke key",
        "tags": [
          "platform"
        ],
        "x-ledgeros-source": "apps/api/src/platform/platform.controller.ts#revokeKey",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "keys:manage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyInput"
              }
            }
          }
        }
      }
    },
    "/v1/api-keys/{id}:rotate": {
      "post": {
        "operationId": "platformRotateKey",
        "summary": "Rotate key",
        "tags": [
          "platform"
        ],
        "x-ledgeros-source": "apps/api/src/platform/platform.controller.ts#rotateKey",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "keys:manage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyInput"
              }
            }
          }
        }
      }
    },
    "/v1/approval-grants": {
      "post": {
        "operationId": "approvalRequest",
        "summary": "Request",
        "tags": [
          "approval"
        ],
        "x-ledgeros-source": "apps/api/src/approval/approval.controller.ts#request",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "approvals:request"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApprovalRequestInput"
              }
            }
          }
        }
      }
    },
    "/v1/approval-grants/{id}:approve": {
      "post": {
        "operationId": "approvalApprove",
        "summary": "Approve",
        "tags": [
          "approval"
        ],
        "x-ledgeros-source": "apps/api/src/approval/approval.controller.ts#approve",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "approvals:approve"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApprovalDecisionInput"
              }
            }
          }
        }
      }
    },
    "/v1/approval-grants/{id}:revoke": {
      "post": {
        "operationId": "approvalRevoke",
        "summary": "Revoke",
        "tags": [
          "approval"
        ],
        "x-ledgeros-source": "apps/api/src/approval/approval.controller.ts#revoke",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "approvals:approve"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApprovalRevokeInput"
              }
            }
          }
        }
      }
    },
    "/v1/ar-aging": {
      "get": {
        "operationId": "getARAging",
        "summary": "Ar aging",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#arAging",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:read"
        ]
      }
    },
    "/v1/audit-events": {
      "get": {
        "operationId": "listAuditEvents",
        "summary": "List",
        "tags": [
          "audit"
        ],
        "x-ledgeros-source": "apps/api/src/audit/audit.controller.ts#list",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "audit:read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/AuditCursor"
          },
          {
            "$ref": "#/components/parameters/AuditAction"
          },
          {
            "$ref": "#/components/parameters/ObjectType"
          },
          {
            "$ref": "#/components/parameters/ActorId"
          },
          {
            "$ref": "#/components/parameters/FromDateTime"
          },
          {
            "$ref": "#/components/parameters/ToDateTime"
          }
        ]
      }
    },
    "/v1/bank-accounts": {
      "get": {
        "operationId": "listBankAccounts",
        "summary": "List bank accounts",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listBankAccounts",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "bank:read"
        ]
      },
      "post": {
        "operationId": "createBankAccounts",
        "summary": "Create bank account",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createBankAccount",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "bank:write"
        ]
      }
    },
    "/v1/bank-accounts/{id}": {
      "get": {
        "operationId": "getBankAccount",
        "summary": "Get bank account",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getBankAccount",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "bank:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateBankAccount",
        "summary": "Update bank account",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateBankAccount",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "bank:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/bank-transactions": {
      "get": {
        "operationId": "listBankTransactions",
        "summary": "List bank transactions",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listBankTransactions",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "bank:read"
        ]
      }
    },
    "/v1/bank-transactions/{id}": {
      "get": {
        "operationId": "getBankTransaction",
        "summary": "Get bank transaction",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getBankTransaction",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "bank:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/bills": {
      "get": {
        "operationId": "listBills",
        "summary": "List bills",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#listBills",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/LegalEntityIdOptional"
          },
          {
            "$ref": "#/components/parameters/DocumentStatus"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ]
      },
      "post": {
        "operationId": "createBills",
        "summary": "Create bill",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#createBill",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:write"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillCreateInput"
              }
            }
          }
        }
      }
    },
    "/v1/bills/{id}": {
      "get": {
        "operationId": "getBill",
        "summary": "Get bill",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#getBill",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateBill",
        "summary": "Update bill",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#updateBill",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/bills/{id}:approve": {
      "post": {
        "operationId": "approveBill",
        "summary": "Approve bill",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#approveBill",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:approve"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/bills/{id}:post": {
      "post": {
        "operationId": "postBill",
        "summary": "Post bill",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#postBill",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptionalApprovalGrantInput"
              }
            }
          }
        }
      }
    },
    "/v1/books": {
      "get": {
        "operationId": "listBooks",
        "summary": "Books",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#books",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tenant:read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/BookIdOptional"
          }
        ]
      },
      "post": {
        "operationId": "createBooks",
        "summary": "Create book",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#createBook",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tenant:write"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookCreateInput"
              }
            }
          }
        }
      }
    },
    "/v1/books/{id}": {
      "get": {
        "operationId": "getBook",
        "summary": "Book",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#book",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tenant:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateBook",
        "summary": "Update book",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#updateBook",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tenant:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/cash-applications": {
      "get": {
        "operationId": "listCashApplications",
        "summary": "List cash applications",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listCashApplications",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:read"
        ]
      },
      "post": {
        "operationId": "createCashApplications",
        "summary": "Create cash application",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createCashApplication",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:write"
        ]
      }
    },
    "/v1/cash-applications/{id}": {
      "get": {
        "operationId": "getCashApplication",
        "summary": "Get cash application",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getCashApplication",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateCashApplication",
        "summary": "Update cash application",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateCashApplication",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/cash-receipts": {
      "get": {
        "operationId": "listCashReceipts",
        "summary": "List cash receipts",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listCashReceipts",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:read"
        ]
      },
      "post": {
        "operationId": "createCashReceipts",
        "summary": "Create cash receipt",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createCashReceipt",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:write"
        ]
      }
    },
    "/v1/cash-receipts/{id}": {
      "get": {
        "operationId": "getCashReceipt",
        "summary": "Get cash receipt",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getCashReceipt",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateCashReceipt",
        "summary": "Update cash receipt",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateCashReceipt",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/clins": {
      "get": {
        "operationId": "listClins",
        "summary": "List clins",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listClins",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:read"
        ]
      },
      "post": {
        "operationId": "createClins",
        "summary": "Create clin",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createClin",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:write"
        ]
      }
    },
    "/v1/clins/{id}": {
      "get": {
        "operationId": "getClin",
        "summary": "Get clin",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getClin",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateClin",
        "summary": "Update clin",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateClin",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/close-cycles": {
      "get": {
        "operationId": "listCloseCycles",
        "summary": "List close cycles",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listCloseCycles",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "close:read"
        ]
      },
      "post": {
        "operationId": "createCloseCycles",
        "summary": "Create close cycle",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createCloseCycle",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "close:write"
        ]
      }
    },
    "/v1/close-cycles/{id}": {
      "get": {
        "operationId": "getCloseCycle",
        "summary": "Get close cycle",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getCloseCycle",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "close:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateCloseCycle",
        "summary": "Update close cycle",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateCloseCycle",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "close:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/close-cycles/{id}:certify": {
      "post": {
        "operationId": "certifyCloseCycle",
        "summary": "Certify close cycle",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#certifyCloseCycle",
        "responses": {
          "202": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "close:certify"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/close-tasks": {
      "get": {
        "operationId": "listCloseTasks",
        "summary": "List close tasks",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listCloseTasks",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "close:read"
        ]
      },
      "post": {
        "operationId": "createCloseTasks",
        "summary": "Create close task",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createCloseTask",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "close:write"
        ]
      }
    },
    "/v1/close-tasks/{id}": {
      "get": {
        "operationId": "getCloseTask",
        "summary": "Get close task",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getCloseTask",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "close:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateCloseTask",
        "summary": "Update close task",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateCloseTask",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "close:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/connections": {
      "get": {
        "operationId": "listConnections",
        "summary": "List connections",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listConnections",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "source:read"
        ]
      },
      "post": {
        "operationId": "createConnections",
        "summary": "Create connection",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createConnection",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "source:write"
        ]
      }
    },
    "/v1/connections/{id}": {
      "get": {
        "operationId": "getConnection",
        "summary": "Get connection",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getConnection",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "source:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateConnection",
        "summary": "Update connection",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateConnection",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "source:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/connections/{id}:sync": {
      "post": {
        "operationId": "syncConnection",
        "summary": "Sync connection",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#syncConnection",
        "responses": {
          "202": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "source:sync"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/contracts": {
      "get": {
        "operationId": "listContracts",
        "summary": "List contracts",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listContracts",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:read"
        ]
      },
      "post": {
        "operationId": "createContracts",
        "summary": "Create contract",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createContract",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:write"
        ]
      }
    },
    "/v1/contracts/{id}": {
      "get": {
        "operationId": "getContract",
        "summary": "Get contract",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getContract",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateContract",
        "summary": "Update contract",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateContract",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/control-definitions": {
      "get": {
        "operationId": "listControlDefinitions",
        "summary": "List control definitions",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listControlDefinitions",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "close:read"
        ]
      },
      "post": {
        "operationId": "createControlDefinitions",
        "summary": "Create control definition",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createControlDefinition",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "close:write"
        ]
      }
    },
    "/v1/control-definitions/{id}": {
      "get": {
        "operationId": "getControlDefinition",
        "summary": "Get control definition",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getControlDefinition",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "close:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateControlDefinition",
        "summary": "Update control definition",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateControlDefinition",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "close:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/cost-pools": {
      "get": {
        "operationId": "listCostPools",
        "summary": "List cost pools",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listCostPools",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:read"
        ]
      },
      "post": {
        "operationId": "createCostPools",
        "summary": "Create cost pool",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createCostPool",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:write"
        ]
      }
    },
    "/v1/cost-pools/{id}": {
      "get": {
        "operationId": "getCostPool",
        "summary": "Get cost pool",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getCostPool",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateCostPool",
        "summary": "Update cost pool",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateCostPool",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/customers": {
      "get": {
        "operationId": "listCustomers",
        "summary": "List customers",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#listCustomers",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/LegalEntityIdOptional"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ]
      },
      "post": {
        "operationId": "createCustomers",
        "summary": "Create customer",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#createCustomer",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:write"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerCreateInput"
              }
            }
          }
        }
      }
    },
    "/v1/customers/{id}": {
      "get": {
        "operationId": "getCustomer",
        "summary": "Get customer",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#getCustomer",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateCustomer",
        "summary": "Update customer",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#updateCustomer",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/dimension-values": {
      "get": {
        "operationId": "listDimensionValues",
        "summary": "Dimension values",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#dimensionValues",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "coa:read"
        ]
      },
      "post": {
        "operationId": "createDimensionValues",
        "summary": "Create dimension value",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#createDimensionValue",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "coa:write"
        ]
      }
    },
    "/v1/dimension-values/{id}": {
      "get": {
        "operationId": "getDimensionValue",
        "summary": "Dimension value",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#dimensionValue",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "coa:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateDimensionValue",
        "summary": "Update dimension value",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#updateDimensionValue",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "coa:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/dimensions": {
      "get": {
        "operationId": "listDimensions",
        "summary": "Dimensions",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#dimensions",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "coa:read"
        ]
      },
      "post": {
        "operationId": "createDimensions",
        "summary": "Create dimension",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#createDimension",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "coa:write"
        ]
      }
    },
    "/v1/dimensions/{id}": {
      "get": {
        "operationId": "getDimension",
        "summary": "Dimension",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#dimension",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "coa:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateDimension",
        "summary": "Update dimension",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#updateDimension",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "coa:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/documents": {
      "get": {
        "operationId": "listDocuments",
        "summary": "List documents",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#listDocuments",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "documents:read"
        ]
      },
      "post": {
        "operationId": "createDocuments",
        "summary": "Create document",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#createDocument",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "documents:write"
        ]
      }
    },
    "/v1/documents/{id}": {
      "get": {
        "operationId": "getDocument",
        "summary": "Get document",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#getDocument",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "documents:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateDocument",
        "summary": "Update document",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#updateDocument",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "documents:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/exceptions": {
      "get": {
        "operationId": "listExceptions",
        "summary": "List exceptions",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listExceptions",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "close:read"
        ]
      },
      "post": {
        "operationId": "createExceptions",
        "summary": "Create exception",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createException",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "close:write"
        ]
      }
    },
    "/v1/exceptions/{id}": {
      "get": {
        "operationId": "getException",
        "summary": "Get exception",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getException",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "close:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateException",
        "summary": "Update exception",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateException",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "close:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/financial-statements": {
      "get": {
        "operationId": "getFinancialStatements",
        "summary": "Target financial statements",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#targetFinancialStatements",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "reports:read"
        ]
      }
    },
    "/v1/fixed-assets": {
      "get": {
        "operationId": "listFixedAssets",
        "summary": "List fixed assets",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listFixedAssets",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "assets:read"
        ]
      },
      "post": {
        "operationId": "createFixedAssets",
        "summary": "Create fixed asset",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createFixedAsset",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "assets:write"
        ]
      }
    },
    "/v1/fixed-assets/{id}": {
      "get": {
        "operationId": "getFixedAsset",
        "summary": "Get fixed asset",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getFixedAsset",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "assets:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateFixedAsset",
        "summary": "Update fixed asset",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateFixedAsset",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "assets:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/healthz": {
      "get": {
        "operationId": "healthHealth",
        "summary": "Health",
        "tags": [
          "health"
        ],
        "x-ledgeros-source": "apps/api/src/health/health.controller.ts#health",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": []
      }
    },
    "/v1/import-jobs": {
      "get": {
        "operationId": "listImportJobs",
        "summary": "List import jobs",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listImportJobs",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "source:read"
        ]
      },
      "post": {
        "operationId": "createImportJobs",
        "summary": "Create import job",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createImportJob",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "source:write"
        ]
      }
    },
    "/v1/import-jobs/{id}": {
      "get": {
        "operationId": "getImportJob",
        "summary": "Get import job",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getImportJob",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "source:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateImportJob",
        "summary": "Update import job",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateImportJob",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "source:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/indirect-rates": {
      "get": {
        "operationId": "listIndirectRates",
        "summary": "List indirect rates",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listIndirectRates",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:read"
        ]
      },
      "post": {
        "operationId": "createIndirectRates",
        "summary": "Create indirect rate",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createIndirectRate",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:write"
        ]
      }
    },
    "/v1/indirect-rates/{id}": {
      "get": {
        "operationId": "getIndirectRate",
        "summary": "Get indirect rate",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getIndirectRate",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateIndirectRate",
        "summary": "Update indirect rate",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateIndirectRate",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/indirect-rates/{id}:approve": {
      "post": {
        "operationId": "approveIndirectRate",
        "summary": "Approve indirect rate",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#approveIndirectRate",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "rates:approve"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/invoices": {
      "get": {
        "operationId": "listInvoices",
        "summary": "List invoices",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#listInvoices",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/LegalEntityIdOptional"
          },
          {
            "$ref": "#/components/parameters/DocumentStatus"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ]
      },
      "post": {
        "operationId": "createInvoices",
        "summary": "Create invoice",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#createInvoice",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:write"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceCreateInput"
              }
            }
          }
        }
      }
    },
    "/v1/invoices/{id}": {
      "get": {
        "operationId": "getInvoice",
        "summary": "Get invoice",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#getInvoice",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateInvoice",
        "summary": "Update invoice",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#updateInvoice",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/invoices/{id}:issue": {
      "post": {
        "operationId": "issueInvoice",
        "summary": "Issue invoice",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#issueInvoice",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/invoices/{id}:post": {
      "post": {
        "operationId": "subledgerPostInvoice",
        "summary": "Post invoice",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#postInvoice",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptionalApprovalGrantInput"
              }
            }
          }
        }
      }
    },
    "/v1/job-cost-summaries": {
      "get": {
        "operationId": "getJobCostSummaries",
        "summary": "Job cost summaries",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#jobCostSummaries",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:read"
        ]
      }
    },
    "/v1/jobs/{id}": {
      "get": {
        "operationId": "getAsyncJob",
        "summary": "Get async job",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getAsyncJob",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "source:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/journal-entries": {
      "get": {
        "operationId": "listJournalEntries",
        "summary": "List",
        "tags": [
          "journal"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/journal.controller.ts#list",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ledger:read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BookIdOptional"
          },
          {
            "$ref": "#/components/parameters/PeriodIdOptional"
          },
          {
            "$ref": "#/components/parameters/JournalStatus"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ]
      },
      "post": {
        "operationId": "createJournalEntries",
        "summary": "Create",
        "tags": [
          "journal"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/journal.controller.ts#create",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ledger:draft"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JournalCreateInput"
              }
            }
          }
        }
      }
    },
    "/v1/journal-entries/{id}": {
      "get": {
        "operationId": "getJournalEntry",
        "summary": "Get",
        "tags": [
          "journal"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/journal.controller.ts#get",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ledger:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateJournalEntry",
        "summary": "Update",
        "tags": [
          "journal"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/journal.controller.ts#update",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ledger:draft"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/journal-entries/{id}:approve": {
      "post": {
        "operationId": "approveJournalEntry",
        "summary": "Approve",
        "tags": [
          "journal"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/journal.controller.ts#approve",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ledger:post"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyInput"
              }
            }
          }
        }
      }
    },
    "/v1/journal-entries/{id}:post": {
      "post": {
        "operationId": "postJournalEntry",
        "summary": "Post",
        "tags": [
          "journal"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/journal.controller.ts#post",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ledger:post"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptionalApprovalGrantInput"
              }
            }
          }
        }
      }
    },
    "/v1/journal-entries/{id}:reverse": {
      "post": {
        "operationId": "reverseJournalEntry",
        "summary": "Reverse",
        "tags": [
          "journal"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/journal.controller.ts#reverse",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ledger:reverse"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JournalReverseInput"
              }
            }
          }
        }
      }
    },
    "/v1/journal-entries/{id}:submit": {
      "post": {
        "operationId": "submitJournalEntry",
        "summary": "Submit",
        "tags": [
          "journal"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/journal.controller.ts#submit",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ledger:draft"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyInput"
              }
            }
          }
        }
      }
    },
    "/v1/legal-entities": {
      "get": {
        "operationId": "listLegalEntities",
        "summary": "Entities",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#entities",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tenant:read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/BookIdOptional"
          }
        ]
      },
      "post": {
        "operationId": "createLegalEntities",
        "summary": "Create entity",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#createEntity",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tenant:write"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LegalEntityCreateInput"
              }
            }
          }
        }
      }
    },
    "/v1/legal-entities/{id}": {
      "get": {
        "operationId": "getLegalEntity",
        "summary": "Entity",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#entity",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tenant:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateLegalEntity",
        "summary": "Update entity",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#updateEntity",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tenant:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/oauth-clients": {
      "get": {
        "operationId": "platformListOAuthClients",
        "summary": "List o auth clients",
        "tags": [
          "platform"
        ],
        "x-ledgeros-source": "apps/api/src/platform/platform.controller.ts#listOAuthClients",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "keys:manage"
        ]
      },
      "post": {
        "operationId": "platformCreateOAuthClient",
        "summary": "Create o auth client",
        "tags": [
          "platform"
        ],
        "x-ledgeros-source": "apps/api/src/platform/platform.controller.ts#createOAuthClient",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "keys:manage"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CredentialCreateInput"
              }
            }
          }
        }
      }
    },
    "/v1/oauth-clients/{id}:revoke": {
      "post": {
        "operationId": "platformRevokeOAuthClient",
        "summary": "Revoke o auth client",
        "tags": [
          "platform"
        ],
        "x-ledgeros-source": "apps/api/src/platform/platform.controller.ts#revokeOAuthClient",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "keys:manage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyInput"
              }
            }
          }
        }
      }
    },
    "/v1/oauth-clients/{id}:rotate": {
      "post": {
        "operationId": "platformRotateOAuthClient",
        "summary": "Rotate o auth client",
        "tags": [
          "platform"
        ],
        "x-ledgeros-source": "apps/api/src/platform/platform.controller.ts#rotateOAuthClient",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "keys:manage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyInput"
              }
            }
          }
        }
      }
    },
    "/v1/oauth/token": {
      "post": {
        "operationId": "oAuthToken",
        "summary": "Token",
        "tags": [
          "oauth"
        ],
        "x-ledgeros-source": "apps/api/src/auth/oauth.controller.ts#token",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthTokenResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/OAuthTokenInput"
              }
            }
          }
        }
      }
    },
    "/v1/payment-runs": {
      "get": {
        "operationId": "listPaymentRuns",
        "summary": "List payment runs",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listPaymentRuns",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:read"
        ]
      },
      "post": {
        "operationId": "createPaymentRuns",
        "summary": "Create payment run",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createPaymentRun",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:write"
        ]
      }
    },
    "/v1/payment-runs/{id}": {
      "get": {
        "operationId": "getPaymentRun",
        "summary": "Get payment run",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getPaymentRun",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updatePaymentRun",
        "summary": "Update payment run",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updatePaymentRun",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/payment-runs/{id}:approve": {
      "post": {
        "operationId": "approvePaymentRun",
        "summary": "Approve payment run",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#approvePaymentRun",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:approve"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/payment-runs/{id}:release": {
      "post": {
        "operationId": "releasePaymentRun",
        "summary": "Release payment run",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#releasePaymentRun",
        "responses": {
          "202": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:pay"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/payments": {
      "post": {
        "operationId": "subledgerCreatePayment",
        "summary": "Create payment",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#createPayment",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:write"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentCreateInput"
              }
            }
          }
        }
      }
    },
    "/v1/payments/{id}:apply": {
      "post": {
        "operationId": "subledgerApplyPayment",
        "summary": "Apply payment",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#applyPayment",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentApplicationInput"
              }
            }
          }
        }
      }
    },
    "/v1/payments/{id}:post": {
      "post": {
        "operationId": "subledgerPostPayment",
        "summary": "Post payment",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#postPayment",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptionalApprovalGrantInput"
              }
            }
          }
        }
      }
    },
    "/v1/payroll-runs": {
      "get": {
        "operationId": "listPayrollRuns",
        "summary": "List payroll runs",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listPayrollRuns",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "payroll:read"
        ]
      },
      "post": {
        "operationId": "createPayrollRuns",
        "summary": "Create payroll run",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createPayrollRun",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "payroll:write"
        ]
      }
    },
    "/v1/payroll-runs/{id}": {
      "get": {
        "operationId": "getPayrollRun",
        "summary": "Get payroll run",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getPayrollRun",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "payroll:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updatePayrollRun",
        "summary": "Update payroll run",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updatePayrollRun",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "payroll:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/payroll-runs/{id}:post": {
      "post": {
        "operationId": "postPayrollRun",
        "summary": "Post payroll run",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#postPayrollRun",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "payroll:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/periods": {
      "get": {
        "operationId": "catalogPeriods",
        "summary": "Periods",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#periods",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tenant:read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/BookIdOptional"
          }
        ]
      },
      "post": {
        "operationId": "catalogCreatePeriod",
        "summary": "Create period",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#createPeriod",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tenant:write"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PeriodCreateInput"
              }
            }
          }
        }
      }
    },
    "/v1/periods/{id}": {
      "get": {
        "operationId": "catalogPeriod",
        "summary": "Period",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#period",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tenant:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/prepaid-schedules": {
      "get": {
        "operationId": "listPrepaidSchedules",
        "summary": "List prepaid schedules",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listPrepaidSchedules",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "assets:read"
        ]
      },
      "post": {
        "operationId": "createPrepaidSchedules",
        "summary": "Create prepaid schedule",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createPrepaidSchedule",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "assets:write"
        ]
      }
    },
    "/v1/prepaid-schedules/{id}": {
      "get": {
        "operationId": "getPrepaidSchedule",
        "summary": "Get prepaid schedule",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getPrepaidSchedule",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "assets:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updatePrepaidSchedule",
        "summary": "Update prepaid schedule",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updatePrepaidSchedule",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "assets:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/projects": {
      "get": {
        "operationId": "listProjects",
        "summary": "List projects",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listProjects",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:read"
        ]
      },
      "post": {
        "operationId": "createProjects",
        "summary": "Create project",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createProject",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:write"
        ]
      }
    },
    "/v1/projects/{id}": {
      "get": {
        "operationId": "getProject",
        "summary": "Get project",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getProject",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateProject",
        "summary": "Update project",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateProject",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/purchase-orders": {
      "get": {
        "operationId": "listPurchaseOrders",
        "summary": "List purchase orders",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listPurchaseOrders",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:read"
        ]
      },
      "post": {
        "operationId": "createPurchaseOrders",
        "summary": "Create purchase order",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createPurchaseOrder",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:write"
        ]
      }
    },
    "/v1/purchase-orders/{id}": {
      "get": {
        "operationId": "getPurchaseOrder",
        "summary": "Get purchase order",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getPurchaseOrder",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updatePurchaseOrder",
        "summary": "Update purchase order",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updatePurchaseOrder",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/receipts": {
      "get": {
        "operationId": "listReceipts",
        "summary": "List receipts",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#listReceipts",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:read"
        ]
      },
      "post": {
        "operationId": "createReceipts",
        "summary": "Create receipt",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#createReceipt",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:write"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiptCreateInput"
              }
            }
          }
        }
      }
    },
    "/v1/receipts/{id}": {
      "get": {
        "operationId": "getReceipt",
        "summary": "Get receipt",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#getReceipt",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateReceipt",
        "summary": "Update receipt",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#updateReceipt",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/receipts/{id}:apply": {
      "post": {
        "operationId": "subledgerApplyReceipt",
        "summary": "Apply receipt",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#applyReceipt",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiptApplicationInput"
              }
            }
          }
        }
      }
    },
    "/v1/receipts/{id}:post": {
      "post": {
        "operationId": "subledgerPostReceipt",
        "summary": "Post receipt",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#postReceipt",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ar:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptionalApprovalGrantInput"
              }
            }
          }
        }
      }
    },
    "/v1/reconciliations": {
      "get": {
        "operationId": "listReconciliations",
        "summary": "List reconciliations",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#listReconciliations",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "bank:read"
        ]
      },
      "post": {
        "operationId": "createReconciliations",
        "summary": "Create reconciliation",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#createReconciliation",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "bank:write"
        ]
      }
    },
    "/v1/reconciliations/{id}": {
      "get": {
        "operationId": "getReconciliation",
        "summary": "Get reconciliation",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#getReconciliation",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "bank:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateReconciliation",
        "summary": "Update reconciliation",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#updateReconciliation",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "bank:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/reconciliations/{id}:auto-match": {
      "post": {
        "operationId": "autoMatchReconciliation",
        "summary": "Auto match reconciliation",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#autoMatchReconciliation",
        "responses": {
          "202": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "bank:reconcile"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/reconciliations/{id}:certify": {
      "post": {
        "operationId": "certifyReconciliation",
        "summary": "Certify reconciliation",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#certifyReconciliation",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "bank:reconcile"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/report-runs": {
      "get": {
        "operationId": "listReportRuns",
        "summary": "List report runs",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listReportRuns",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "reports:read"
        ]
      },
      "post": {
        "operationId": "createReportRuns",
        "summary": "Create report run",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createReportRun",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "reports:write"
        ]
      }
    },
    "/v1/report-runs/{id}": {
      "get": {
        "operationId": "getReportRun",
        "summary": "Get report run",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getReportRun",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "reports:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateReportRun",
        "summary": "Update report run",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateReportRun",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "reports:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/report-snapshots": {
      "get": {
        "operationId": "listReportSnapshots",
        "summary": "List report snapshots",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#listReportSnapshots",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "reports:read"
        ]
      },
      "post": {
        "operationId": "createReportSnapshots",
        "summary": "Create report snapshot",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#createReportSnapshot",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "reports:run"
        ]
      }
    },
    "/v1/report-snapshots/{id}": {
      "get": {
        "operationId": "getReportSnapshot",
        "summary": "Get report snapshot",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#getReportSnapshot",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "reports:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateReportSnapshot",
        "summary": "Update report snapshot",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#updateReportSnapshot",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "reports:run"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/report-snapshots/{id}:verify": {
      "post": {
        "operationId": "verifyReportSnapshot",
        "summary": "Verify report snapshot",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#verifyReportSnapshot",
        "responses": {
          "202": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "reports:export"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/reports/balance-sheet": {
      "get": {
        "operationId": "reportingBalanceSheet",
        "summary": "Balance sheet",
        "tags": [
          "reporting"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/reporting.controller.ts#balanceSheet",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "reports:read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BookId"
          },
          {
            "$ref": "#/components/parameters/PeriodId"
          }
        ]
      }
    },
    "/v1/reports/general-ledger": {
      "get": {
        "operationId": "reportingGeneralLedger",
        "summary": "General ledger",
        "tags": [
          "reporting"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/reporting.controller.ts#generalLedger",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "reports:read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BookId"
          },
          {
            "$ref": "#/components/parameters/PeriodId"
          },
          {
            "$ref": "#/components/parameters/AccountIdOptional"
          },
          {
            "$ref": "#/components/parameters/ReportLimit"
          }
        ]
      }
    },
    "/v1/reports/profit-and-loss": {
      "get": {
        "operationId": "reportingProfitAndLoss",
        "summary": "Profit and loss",
        "tags": [
          "reporting"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/reporting.controller.ts#profitAndLoss",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "reports:read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BookId"
          },
          {
            "$ref": "#/components/parameters/PeriodId"
          }
        ]
      }
    },
    "/v1/reports/subledger-reconciliation": {
      "get": {
        "operationId": "reportingReconciliation",
        "summary": "Reconciliation",
        "tags": [
          "reporting"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/reporting.controller.ts#reconciliation",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "reports:read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/LegalEntityId"
          },
          {
            "$ref": "#/components/parameters/Subledger"
          }
        ]
      }
    },
    "/v1/reports/trial-balance": {
      "get": {
        "operationId": "reportingTrialBalance",
        "summary": "Trial balance",
        "tags": [
          "reporting"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/reporting.controller.ts#trialBalance",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "reports:read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BookId"
          },
          {
            "$ref": "#/components/parameters/PeriodId"
          }
        ]
      }
    },
    "/v1/revenue-schedules": {
      "get": {
        "operationId": "listRevenueSchedules",
        "summary": "List revenue schedules",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listRevenueSchedules",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "assets:read"
        ]
      },
      "post": {
        "operationId": "createRevenueSchedules",
        "summary": "Create revenue schedule",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createRevenueSchedule",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "assets:write"
        ]
      }
    },
    "/v1/revenue-schedules/{id}": {
      "get": {
        "operationId": "getRevenueSchedule",
        "summary": "Get revenue schedule",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getRevenueSchedule",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "assets:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateRevenueSchedule",
        "summary": "Update revenue schedule",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateRevenueSchedule",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "assets:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/sandbox": {
      "get": {
        "operationId": "platformGetSandbox",
        "summary": "Get sandbox",
        "tags": [
          "platform"
        ],
        "x-ledgeros-source": "apps/api/src/platform/platform.controller.ts#getSandbox",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "sandbox:manage"
        ]
      }
    },
    "/v1/sandboxes/{id}:reset": {
      "post": {
        "operationId": "platformResetSandbox",
        "summary": "Reset sandbox",
        "tags": [
          "platform"
        ],
        "x-ledgeros-source": "apps/api/src/platform/platform.controller.ts#resetSandbox",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "sandbox:manage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyInput"
              }
            }
          }
        }
      }
    },
    "/v1/signup": {
      "post": {
        "operationId": "platformSignup",
        "summary": "Signup",
        "tags": [
          "platform"
        ],
        "x-ledgeros-source": "apps/api/src/platform/platform.controller.ts#signup",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignupInput"
              }
            }
          }
        }
      }
    },
    "/v1/source-events": {
      "get": {
        "operationId": "listSourceEvents",
        "summary": "List",
        "tags": [
          "sourceevent"
        ],
        "x-ledgeros-source": "apps/api/src/source-events/source-event.controller.ts#list",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "sources:read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/SourceEventStatus"
          },
          {
            "$ref": "#/components/parameters/EventType"
          }
        ]
      },
      "post": {
        "operationId": "createSourceEvents",
        "summary": "Create",
        "tags": [
          "sourceevent"
        ],
        "x-ledgeros-source": "apps/api/src/source-events/source-event.controller.ts#create",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "sources:write"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceEventInput"
              }
            }
          }
        }
      }
    },
    "/v1/source-events/batch": {
      "post": {
        "operationId": "sourceEventBatch",
        "summary": "Batch",
        "tags": [
          "sourceevent"
        ],
        "x-ledgeros-source": "apps/api/src/source-events/source-event.controller.ts#batch",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "sources:write"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceEventBatchInput"
              }
            }
          }
        }
      }
    },
    "/v1/source-events/{id}": {
      "get": {
        "operationId": "getSourceEvent",
        "summary": "Get",
        "tags": [
          "sourceevent"
        ],
        "x-ledgeros-source": "apps/api/src/source-events/source-event.controller.ts#get",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "sources:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/source-events/{id}:reprocess": {
      "post": {
        "operationId": "reprocessSourceEvent",
        "summary": "Reprocess source event",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#reprocessSourceEvent",
        "responses": {
          "202": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "source:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/tax-packages": {
      "get": {
        "operationId": "listTaxPackages",
        "summary": "List tax packages",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listTaxPackages",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tax:read"
        ]
      },
      "post": {
        "operationId": "createTaxPackages",
        "summary": "Create tax package",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createTaxPackage",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tax:write"
        ]
      }
    },
    "/v1/tax-packages/{id}": {
      "get": {
        "operationId": "getTaxPackage",
        "summary": "Get tax package",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getTaxPackage",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tax:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateTaxPackage",
        "summary": "Update tax package",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateTaxPackage",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tax:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/tax-packages/{id}:certify": {
      "post": {
        "operationId": "certifyTaxPackage",
        "summary": "Certify tax package",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#certifyTaxPackage",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tax:approve"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/tax-returns": {
      "get": {
        "operationId": "listTaxReturns",
        "summary": "List tax returns",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listTaxReturns",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tax:read"
        ]
      },
      "post": {
        "operationId": "createTaxReturns",
        "summary": "Create tax return",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createTaxReturn",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tax:write"
        ]
      }
    },
    "/v1/tax-returns/{id}": {
      "get": {
        "operationId": "getTaxReturn",
        "summary": "Get tax return",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getTaxReturn",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tax:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateTaxReturn",
        "summary": "Update tax return",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateTaxReturn",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tax:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/tax-returns/{id}:file": {
      "post": {
        "operationId": "fileTaxReturn",
        "summary": "File tax return",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#fileTaxReturn",
        "responses": {
          "202": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tax:file"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/tenant": {
      "get": {
        "operationId": "catalogTenant",
        "summary": "Tenant",
        "tags": [
          "catalog"
        ],
        "x-ledgeros-source": "apps/api/src/catalog/catalog.controller.ts#tenant",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "tenant:read"
        ]
      }
    },
    "/v1/timesheets": {
      "get": {
        "operationId": "listTimesheets",
        "summary": "List timesheets",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listTimesheets",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "time:read"
        ]
      },
      "post": {
        "operationId": "createTimesheets",
        "summary": "Create timesheet",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createTimesheet",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "time:write"
        ]
      }
    },
    "/v1/timesheets/{id}": {
      "get": {
        "operationId": "getTimesheet",
        "summary": "Get timesheet",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getTimesheet",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "time:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateTimesheet",
        "summary": "Update timesheet",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateTimesheet",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "time:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/timesheets/{id}:approve": {
      "post": {
        "operationId": "approveTimesheet",
        "summary": "Approve timesheet",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#approveTimesheet",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "time:approve"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/trial-balances": {
      "get": {
        "operationId": "getTrialBalance",
        "summary": "Target trial balance",
        "tags": [
          "controls"
        ],
        "x-ledgeros-source": "apps/api/src/controls/controls.controller.ts#targetTrialBalance",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "reports:read"
        ]
      }
    },
    "/v1/usage": {
      "get": {
        "operationId": "usageSummary",
        "summary": "Summary",
        "tags": [
          "usage"
        ],
        "x-ledgeros-source": "apps/api/src/usage/usage.controller.ts#summary",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "usage:read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/FromDate"
          },
          {
            "$ref": "#/components/parameters/ToDate"
          }
        ]
      }
    },
    "/v1/vendors": {
      "get": {
        "operationId": "listVendors",
        "summary": "List vendors",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#listVendors",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/LegalEntityIdOptional"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ]
      },
      "post": {
        "operationId": "createVendors",
        "summary": "Create vendor",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#createVendor",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:write"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VendorCreateInput"
              }
            }
          }
        }
      }
    },
    "/v1/vendors/{id}": {
      "get": {
        "operationId": "getVendor",
        "summary": "Get vendor",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#getVendor",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateVendor",
        "summary": "Update vendor",
        "tags": [
          "subledger"
        ],
        "x-ledgeros-source": "apps/api/src/ledger/subledger.controller.ts#updateVendor",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "ap:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/wbs-nodes": {
      "get": {
        "operationId": "listWbsNodes",
        "summary": "List wbs nodes",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#listWbsNodes",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:read"
        ]
      },
      "post": {
        "operationId": "createWbsNodes",
        "summary": "Create wbs node",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#createWbsNode",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:write"
        ]
      }
    },
    "/v1/wbs-nodes/{id}": {
      "get": {
        "operationId": "getWbsNode",
        "summary": "Get wbs node",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#getWbsNode",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateWbsNode",
        "summary": "Update wbs node",
        "tags": [
          "domain"
        ],
        "x-ledgeros-source": "apps/api/src/domain/domain.controller.ts#updateWbsNode",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "jobcost:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/webhook-dead-letters": {
      "get": {
        "operationId": "webhookDeadLetters",
        "summary": "Dead letters",
        "tags": [
          "webhook"
        ],
        "x-ledgeros-source": "apps/api/src/webhooks/webhook.controller.ts#deadLetters",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "webhooks:manage"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/EndpointId"
          }
        ]
      }
    },
    "/v1/webhook-deliveries": {
      "get": {
        "operationId": "listWebhookDeliveries",
        "summary": "Deliveries",
        "tags": [
          "webhook"
        ],
        "x-ledgeros-source": "apps/api/src/webhooks/webhook.controller.ts#deliveries",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "webhooks:manage"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/DeliveryStatus"
          },
          {
            "$ref": "#/components/parameters/EndpointId"
          }
        ]
      }
    },
    "/v1/webhook-deliveries/{id}:replay": {
      "post": {
        "operationId": "webhookReplay",
        "summary": "Replay",
        "tags": [
          "webhook"
        ],
        "x-ledgeros-source": "apps/api/src/webhooks/webhook.controller.ts#replay",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "webhooks:manage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyInput"
              }
            }
          }
        }
      }
    },
    "/v1/webhook-endpoints": {
      "get": {
        "operationId": "listWebhookEndpoints",
        "summary": "List",
        "tags": [
          "webhook"
        ],
        "x-ledgeros-source": "apps/api/src/webhooks/webhook.controller.ts#list",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "webhooks:manage"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/WebhookStatus"
          }
        ]
      },
      "post": {
        "operationId": "createWebhookEndpoints",
        "summary": "Create",
        "tags": [
          "webhook"
        ],
        "x-ledgeros-source": "apps/api/src/webhooks/webhook.controller.ts#create",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "webhooks:manage"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointCreateInput"
              }
            }
          }
        }
      }
    },
    "/v1/webhook-endpoints/{id}": {
      "get": {
        "operationId": "getWebhookEndpoint",
        "summary": "Get",
        "tags": [
          "webhook"
        ],
        "x-ledgeros-source": "apps/api/src/webhooks/webhook.controller.ts#get",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "webhooks:manage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateWebhookEndpoint",
        "summary": "Update",
        "tags": [
          "webhook"
        ],
        "x-ledgeros-source": "apps/api/src/webhooks/webhook.controller.ts#update",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "webhooks:manage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/webhook-endpoints/{id}:disable": {
      "post": {
        "operationId": "webhookDisable",
        "summary": "Disable",
        "tags": [
          "webhook"
        ],
        "x-ledgeros-source": "apps/api/src/webhooks/webhook.controller.ts#disable",
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericObject"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-scopes": [
          "webhooks:manage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyInput"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "LedgerOS API key or OAuth bearer token"
      }
    },
    "parameters": {
      "Limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 50
        }
      },
      "ReportLimit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 500,
          "default": 100
        }
      },
      "Cursor": {
        "name": "cursor",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "AuditCursor": {
        "name": "cursor",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      },
      "BookId": {
        "name": "bookId",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "BookIdOptional": {
        "name": "bookId",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "PeriodId": {
        "name": "periodId",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "PeriodIdOptional": {
        "name": "periodId",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "AccountIdOptional": {
        "name": "accountId",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "LegalEntityId": {
        "name": "legalEntityId",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "LegalEntityIdOptional": {
        "name": "legalEntityId",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "EndpointId": {
        "name": "endpointId",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "JournalStatus": {
        "name": "status",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "DRAFT",
            "SUBMITTED",
            "APPROVED",
            "POSTED",
            "REJECTED"
          ]
        }
      },
      "DocumentStatus": {
        "name": "status",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "maxLength": 20
        }
      },
      "SourceEventStatus": {
        "name": "status",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "RECEIVED",
            "VALIDATED",
            "AWAITING_APPROVAL",
            "POSTED",
            "REJECTED",
            "FAILED"
          ]
        }
      },
      "WebhookStatus": {
        "name": "status",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "ACTIVE",
            "DISABLED"
          ]
        }
      },
      "DeliveryStatus": {
        "name": "status",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "PENDING",
            "DELIVERING",
            "DELIVERED",
            "RETRYING",
            "DEAD_LETTER"
          ]
        }
      },
      "Subledger": {
        "name": "subledger",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string",
          "enum": [
            "AP",
            "AR"
          ]
        }
      },
      "EventType": {
        "name": "eventType",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "maxLength": 120
        }
      },
      "AuditAction": {
        "name": "action",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "maxLength": 120
        }
      },
      "ObjectType": {
        "name": "objectType",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "maxLength": 120
        }
      },
      "ActorId": {
        "name": "actorId",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "maxLength": 240
        }
      },
      "FromDateTime": {
        "name": "from",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date-time"
        }
      },
      "ToDateTime": {
        "name": "to",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date-time"
        }
      },
      "FromDate": {
        "name": "from",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "ToDate": {
        "name": "to",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string",
          "format": "date"
        }
      }
    },
    "schemas": {
      "EmptyInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {}
      },
      "OptionalApprovalGrantInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "grantId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "DimensionInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "dimensionId": {
            "type": "string",
            "format": "uuid"
          },
          "dimensionValueId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "dimensionId",
          "dimensionValueId"
        ]
      },
      "JournalLineInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "debit": {
            "type": "string",
            "pattern": "^(?!0+(?:\\.0+)?$)\\d+(?:\\.\\d{1,8})?$"
          },
          "credit": {
            "type": "string",
            "pattern": "^(?!0+(?:\\.0+)?$)\\d+(?:\\.\\d{1,8})?$"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "memo": {
            "type": "string",
            "maxLength": 2000
          },
          "dimensions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DimensionInput"
            },
            "default": []
          }
        },
        "required": [
          "accountId",
          "currency"
        ],
        "oneOf": [
          {
            "required": [
              "debit"
            ],
            "not": {
              "required": [
                "credit"
              ]
            }
          },
          {
            "required": [
              "credit"
            ],
            "not": {
              "required": [
                "debit"
              ]
            }
          }
        ]
      },
      "JournalCreateInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "entityId": {
            "type": "string",
            "format": "uuid"
          },
          "bookId": {
            "type": "string",
            "format": "uuid"
          },
          "periodId": {
            "type": "string",
            "format": "uuid"
          },
          "effectiveDate": {
            "type": "string",
            "format": "date"
          },
          "memo": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "lines": {
            "type": "array",
            "minItems": 2,
            "items": {
              "$ref": "#/components/schemas/JournalLineInput"
            }
          }
        },
        "required": [
          "entityId",
          "bookId",
          "periodId",
          "effectiveDate",
          "memo",
          "lines"
        ]
      },
      "JournalReverseInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "periodId": {
            "type": "string",
            "format": "uuid"
          },
          "effectiveDate": {
            "type": "string",
            "format": "date"
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          }
        },
        "required": [
          "periodId",
          "effectiveDate",
          "reason"
        ]
      },
      "OAuthTokenInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "grant_type": {
            "type": "string",
            "const": "client_credentials"
          },
          "client_id": {
            "type": "string",
            "minLength": 12,
            "maxLength": 200
          },
          "client_secret": {
            "type": "string",
            "minLength": 32,
            "maxLength": 500
          },
          "scope": {
            "type": "string",
            "maxLength": 2000
          }
        },
        "required": [
          "grant_type",
          "client_id",
          "client_secret"
        ]
      },
      "OAuthTokenResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "access_token": {
            "type": "string"
          },
          "token_type": {
            "type": "string",
            "const": "Bearer"
          },
          "expires_in": {
            "type": "integer",
            "minimum": 1
          },
          "scope": {
            "type": "string"
          }
        },
        "required": [
          "access_token",
          "token_type",
          "expires_in",
          "scope"
        ]
      },
      "CredentialCreateInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "environment": {
            "type": "string",
            "enum": [
              "LIVE",
              "SANDBOX"
            ]
          },
          "scopes": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "ledger:read",
                "ledger:draft",
                "ledger:post",
                "ledger:reverse",
                "approvals:request",
                "approvals:approve",
                "sources:write",
                "sources:read",
                "reports:read",
                "ap:read",
                "ap:write",
                "ar:read",
                "ar:write",
                "tenant:read",
                "tenant:write",
                "coa:read",
                "coa:write",
                "audit:read",
                "webhooks:manage",
                "usage:read",
                "keys:manage",
                "sandbox:manage"
              ]
            }
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "name",
          "environment",
          "scopes"
        ]
      },
      "SignupInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "displayName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "organizationName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "legalName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "coaTemplate": {
            "type": "string",
            "enum": [
              "STARTUP",
              "PROFESSIONAL_SERVICES",
              "CONTRACTOR"
            ]
          }
        },
        "required": [
          "email",
          "displayName",
          "organizationName",
          "legalName",
          "currency",
          "coaTemplate"
        ]
      },
      "ApprovalRequestInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "objectType": {
            "type": "string"
          },
          "objectId": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "payloadHash": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "objectType",
          "objectId",
          "action",
          "payloadHash"
        ]
      },
      "ApprovalDecisionInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "ttlSeconds": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "ttlSeconds"
        ]
      },
      "ApprovalRevokeInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "LegalEntityCreateInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "legalName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "displayName": {
            "type": "string",
            "maxLength": 200
          },
          "baseCurrency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          }
        },
        "required": [
          "legalName",
          "baseCurrency"
        ]
      },
      "BookCreateInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "legalEntityId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "basis": {
            "type": "string",
            "enum": [
              "GAAP_ACCRUAL",
              "CASH",
              "TAX",
              "MANAGEMENT",
              "GOVERNMENT_COST",
              "STATUTORY",
              "CONSOLIDATION"
            ]
          },
          "functionalCurrency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          }
        },
        "required": [
          "legalEntityId",
          "name",
          "basis",
          "functionalCurrency"
        ]
      },
      "PeriodCreateInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "bookId": {
            "type": "string",
            "format": "uuid"
          },
          "periodKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "format": "date"
          }
        },
        "required": [
          "bookId",
          "periodKey",
          "startDate",
          "endDate"
        ]
      },
      "AccountCreateInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "bookId": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "parentId": {
            "type": "string",
            "format": "uuid"
          },
          "accountType": {
            "type": "string",
            "enum": [
              "ASSET",
              "LIABILITY",
              "EQUITY",
              "REVENUE",
              "EXPENSE",
              "CONTRA_ASSET",
              "CONTRA_LIABILITY",
              "CONTRA_REVENUE",
              "STATISTICAL"
            ]
          },
          "normalBalance": {
            "type": "string",
            "enum": [
              "DEBIT",
              "CREDIT"
            ]
          },
          "canonicalTaxonomyCode": {
            "type": "string",
            "maxLength": 120
          },
          "manualPostingAllowed": {
            "type": "boolean",
            "default": true
          }
        },
        "required": [
          "bookId",
          "code",
          "name",
          "accountType",
          "normalBalance"
        ]
      },
      "VendorCreateInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "legalEntityId": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "paymentTerms": {
            "type": "string",
            "maxLength": 200
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "INACTIVE",
              "BLOCKED"
            ]
          },
          "defaultExpenseAccountId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "legalEntityId",
          "code",
          "name"
        ]
      },
      "CustomerCreateInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "legalEntityId": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "paymentTerms": {
            "type": "string",
            "maxLength": 200
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "INACTIVE",
              "BLOCKED"
            ]
          },
          "defaultRevenueAccountId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "legalEntityId",
          "code",
          "name"
        ]
      },
      "BillCreateInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "legalEntityId": {
            "type": "string",
            "format": "uuid"
          },
          "bookId": {
            "type": "string",
            "format": "uuid"
          },
          "dueDate": {
            "type": "string",
            "format": "date"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "totalAmount": {
            "type": "string",
            "pattern": "^(?!0+(?:\\.0+)?$)\\d+(?:\\.\\d{1,8})?$"
          },
          "controlAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "lines": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "description": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 4000
                },
                "accountId": {
                  "type": "string",
                  "format": "uuid"
                },
                "amount": {
                  "type": "string",
                  "pattern": "^(?!0+(?:\\.0+)?$)\\d+(?:\\.\\d{1,8})?$"
                },
                "dimensions": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              },
              "required": [
                "description",
                "accountId",
                "amount"
              ]
            }
          },
          "vendorId": {
            "type": "string",
            "format": "uuid"
          },
          "billNumber": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "billDate": {
            "type": "string",
            "format": "date"
          }
        },
        "required": [
          "legalEntityId",
          "bookId",
          "vendorId",
          "billNumber",
          "billDate",
          "dueDate",
          "currency",
          "totalAmount",
          "controlAccountId",
          "lines"
        ]
      },
      "InvoiceCreateInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "legalEntityId": {
            "type": "string",
            "format": "uuid"
          },
          "bookId": {
            "type": "string",
            "format": "uuid"
          },
          "dueDate": {
            "type": "string",
            "format": "date"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "totalAmount": {
            "type": "string",
            "pattern": "^(?!0+(?:\\.0+)?$)\\d+(?:\\.\\d{1,8})?$"
          },
          "controlAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "lines": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "description": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 4000
                },
                "accountId": {
                  "type": "string",
                  "format": "uuid"
                },
                "amount": {
                  "type": "string",
                  "pattern": "^(?!0+(?:\\.0+)?$)\\d+(?:\\.\\d{1,8})?$"
                },
                "dimensions": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              },
              "required": [
                "description",
                "accountId",
                "amount"
              ]
            }
          },
          "customerId": {
            "type": "string",
            "format": "uuid"
          },
          "invoiceNumber": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "invoiceDate": {
            "type": "string",
            "format": "date"
          }
        },
        "required": [
          "legalEntityId",
          "bookId",
          "customerId",
          "invoiceNumber",
          "invoiceDate",
          "dueDate",
          "currency",
          "totalAmount",
          "controlAccountId",
          "lines"
        ]
      },
      "PaymentCreateInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "legalEntityId": {
            "type": "string",
            "format": "uuid"
          },
          "vendorId": {
            "type": "string",
            "format": "uuid"
          },
          "paymentDate": {
            "type": "string",
            "format": "date"
          },
          "amount": {
            "type": "string",
            "pattern": "^(?!0+(?:\\.0+)?$)\\d+(?:\\.\\d{1,8})?$"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "method": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "cashAccountId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "legalEntityId",
          "vendorId",
          "paymentDate",
          "amount",
          "currency",
          "method"
        ]
      },
      "ReceiptCreateInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "legalEntityId": {
            "type": "string",
            "format": "uuid"
          },
          "customerId": {
            "type": "string",
            "format": "uuid"
          },
          "receiptDate": {
            "type": "string",
            "format": "date"
          },
          "amount": {
            "type": "string",
            "pattern": "^(?!0+(?:\\.0+)?$)\\d+(?:\\.\\d{1,8})?$"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "method": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "cashAccountId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "legalEntityId",
          "customerId",
          "receiptDate",
          "amount",
          "currency",
          "method"
        ]
      },
      "PaymentApplicationInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "applications": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "billId": {
                  "type": "string",
                  "format": "uuid"
                },
                "amount": {
                  "type": "string",
                  "pattern": "^(?!0+(?:\\.0+)?$)\\d+(?:\\.\\d{1,8})?$"
                }
              },
              "required": [
                "billId",
                "amount"
              ]
            }
          }
        },
        "required": [
          "applications"
        ]
      },
      "ReceiptApplicationInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "applications": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "invoiceId": {
                  "type": "string",
                  "format": "uuid"
                },
                "amount": {
                  "type": "string",
                  "pattern": "^(?!0+(?:\\.0+)?$)\\d+(?:\\.\\d{1,8})?$"
                }
              },
              "required": [
                "invoiceId",
                "amount"
              ]
            }
          }
        },
        "required": [
          "applications"
        ]
      },
      "SourceEventInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "legalEntityId": {
            "type": "string",
            "format": "uuid"
          },
          "schemaVersion": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          },
          "eventType": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "sourceSystem": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "connectionId": {
            "type": "string",
            "format": "uuid"
          },
          "externalId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "externalVersion": {
            "type": "string",
            "maxLength": 120
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 8,
            "maxLength": 240
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "effectiveDate": {
            "type": "string",
            "format": "date"
          },
          "correlationId": {
            "type": "string",
            "maxLength": 240
          },
          "causationId": {
            "type": "string",
            "maxLength": 240
          },
          "payload": {
            "type": "object",
            "additionalProperties": true
          },
          "controlTotals": {
            "type": "object",
            "additionalProperties": true
          },
          "dimensionHints": {
            "type": "object",
            "additionalProperties": true
          },
          "sourceSignature": {
            "type": "string",
            "maxLength": 1000
          }
        },
        "required": [
          "legalEntityId",
          "schemaVersion",
          "eventType",
          "sourceSystem",
          "externalId",
          "idempotencyKey",
          "occurredAt",
          "effectiveDate",
          "payload",
          "controlTotals"
        ]
      },
      "WebhookEndpointCreateInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "url": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          },
          "eventTypes": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          }
        },
        "required": [
          "name",
          "url",
          "eventTypes"
        ]
      },
      "GenericObject": {
        "type": "object",
        "additionalProperties": true
      },
      "ErrorEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "requestId": {
                "type": "string"
              },
              "details": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "required": [
              "code",
              "message",
              "requestId"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "SourceEventBatchInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "events": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/SourceEventInput"
            }
          }
        },
        "required": [
          "events"
        ]
      }
    },
    "responses": {
      "Error": {
        "description": "LedgerOS error envelope",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      }
    }
  }
}
